Building C++ Applications |
![]() |
In order to build a C++ application, do the following. After activation of the cross-build environment (. ./ACTIVATE.sh), run the following command for Cortex-M3 targets (SimpleClass.cc being the application in the below example): [psl@ocean app]$ arm-v7-linux-uclibceabi-g++ -o SimpleClass SimpleClass.cc -I \ ${INSTALL_ROOT}/A2F/root/usr/include -mcpu=cortex-m3 -mthumb -static -L \ ${INSTALL_ROOT}/A2F/root/usr/lib If your target is Cortex-M4 or Cortex-M7, run the following command instead: [psl@ocean app]$ arm-v7-linux-uclibceabi-g-g++ -o SimpleClass SimpleClass.cc -I \ ${INSTALL_ROOT}/A2F/root/usr/include -mcpu=cortex-m4 -mthumb -static -L \ ${INSTALL_ROOT}/A2F/root/usr/lib Run the application on the target (assuming /mnt is NFS-mounted to the host): / # /mnt/SimpleClass NOTE: The sample application used in this application note was downloaded from the following web site: http://www.inference.phy.cam.ac.uk/teaching/comput/C++/examples/index.shtml
|