0

I want to build FreeRTOS executables for my target which is a beaglebone black that has a AM335X ARM Cortex-A8 processor. I am running windows but i am using a virtual machine that runs linux debian 10 which is what i am cross compiling from. uname -a provides:

Linux debian 4.19.0-13-amd64 #1 SMP Debian 4.19.160-2 (2020-11-28) x86_64 GNU/Linux

I'm new to FreeRTOS so let me know if im going about this the wrong way. My plans is to write a FreeRtos program with C and and cross compile it and simply send over the executable to the beaglebone and run the executable. I tried this with a Hello world program succesfully so i figured it should be possible with a FreeRTOS program. I want to get this working on two different compilers since i want to test out both. The first one is arm-linux-gnueabihf-gcc and the second one is a bare metal version called gcc-arm-8.2-2019.01-x86_64-arm-eabi. My project can be found here: https://github.com/frank2597/FreeRTOS_BBB.git and as a shortcut my compiler option settings can be found in these two files:

https://github.com/frank2597/FreeRTOS_BBB/blob/master/source/CMakeLists.txt

https://github.com/frank2597/FreeRTOS_BBB/blob/master/source/toolchain.cmake

I am using Cmake to generate the makefile.Both cross compilers have troubles compiling with my testing.c freertos program. When i use the arm-linux-gnueabihf-gcc compiler i get various warnings and some undefined references but the compiler reaches 100%, the errors from the make command is presented below (cant post verbose output due to character limit):

    [  0%] Building C object application/CMakeFiles/src_application.dir/TaskLED2.c.o
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/TaskLED2.c: In function ‘vLED_blink_evBits_ActivateHook’:
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/TaskLED2.c:70:39: warning: variable ‘xResult’ set but not used [-Wunused-but-set-variable]
      BaseType_t xHigherPriorityTaskWoken, xResult;
                                           ^~~~~~~

    [  2%] Building C object application/CMakeFiles/src_application.dir/app_MultiSinkLogger.c.o
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_MultiSinkLogger.c: In function ‘vMultiSinkLoggerConsole_main’:
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_MultiSinkLogger.c:105:30: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
                 char * q       = pMsg;
                                  ^~~~
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_MultiSinkLogger.c: In function ‘InitSerialisedLogPrintf’:
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_MultiSinkLogger.c:144:30: warning: returning ‘QueueHandle_t’ {aka ‘struct QueueDefinition *’} from a function with return type ‘uint32_t’ {aka ‘unsigned int’} makes integer from pointer without a cast [-Wint-conversion]
         return ConsoleInterafceQ = q;
                ~~~~~~~~~~~~~~~~~~^~~
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_MultiSinkLogger.c: In function ‘prvPrefixStringToMessage’:
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_MultiSinkLogger.c:153:14: warning: unused variable ‘rv’ [-Wunused-variable]
         uint32_t rv = pdFAIL;
                  ^~
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_MultiSinkLogger.c: In function ‘prvPrefixDebugStringToMessage’:
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_MultiSinkLogger.c:173:36: warning: format ‘%d’ expects argument of type ‘int’, but argument 7 has type ‘long unsigned int’ [-Wformat=]
             snprintf(pMsg,m,"%s:%s:%s:%d:%s",pcTaskName,pcFileName,pcFuncName,ulLine,msg);
                                       ~^                                      ~~~~~~
                                       %ld
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_MultiSinkLogger.c:168:14: warning: unused variable ‘rv’ [-Wunused-variable]
         uint32_t rv = pdFAIL;
                  ^~
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_MultiSinkLogger.c: In function ‘SerialisedLogPrintf’:
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_MultiSinkLogger.c:216:19: warning: pointer targets in initialization of ‘char *’ from ‘uint8_t *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
         char * pMsg = BUFFERPOOL_GetFreeBuffer(&m);
                       ^~~~~~~~~~~~~~~~~~~~~~~~
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_MultiSinkLogger.c:235:37: warning: pointer targets in passing argument 1 of ‘BUFFERPOOL_ReturnBuffer’ differ in signedness [-Wpointer-sign]
                 BUFFERPOOL_ReturnBuffer(pMsg);
                                         ^~~~
    In file included from /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_MultiSinkLogger.c:43:
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/portable/ported_aws_bufpool/inc/aws_bufferpool.h:72:6: note: expected ‘uint8_t * const’ {aka ‘unsigned char * const’} but argument is of type ‘char *’
     void BUFFERPOOL_ReturnBuffer( uint8_t * const pucBuffer );
          ^~~~~~~~~~~~~~~~~~~~~~~
    [  3%] Building C object application/CMakeFiles/src_application.dir/app_utils.c.o
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_utils.c: In function ‘vAssertCalled’:
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_utils.c:185:22: warning: unused variable ‘xPrinted’ [-Wunused-variable]
     static portBASE_TYPE xPrinted = pdFALSE;
                          ^~~~~~~~
    /usr/arm-linux-gnueabihf/include/unistd.h: In function ‘_exit’:
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_utils.c:107:1: warning: ‘noreturn’ function does return
     }
     ^
    At top level:
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_utils.c:185:22: warning: ‘xPrinted’ defined but not used [-Wunused-variable]
     static portBASE_TYPE xPrinted = pdFALSE;
                          ^~~~~~~~
    [  3%] Building C object application/CMakeFiles/src_application.dir/enet_wrapper.c.o
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/enet_wrapper.c: In function ‘InitLwipStack’:
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/enet_wrapper.c:279:21: warning: unused variable ‘rv’ [-Wunused-variable]
                 uint8_t rv = PhyReset(CPSW0_MDIO_REGS, ifNum);
                         ^~
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/enet_wrapper.c: In function ‘lwip_main’:
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/enet_wrapper.c:369:18: warning: unused variable ‘ipAddr’ [-Wunused-variable]
         unsigned int ipAddr;
                      ^~~~~~
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/enet_wrapper.c: In function ‘lwIPDHCPComplete’:
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/enet_wrapper.c:672:19: warning: assignment to ‘volatile unsigned char *’ from incompatible pointer type ‘void **’ [-Wincompatible-pointer-types]
                 state = &(cpswNetIF[ifNum].state);
                       ^
    At top level:
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/enet_wrapper.c:654:13: warning: ‘lwIPDHCPComplete’ defined but not used [-Wunused-function]
     static void lwIPDHCPComplete(unsigned int ifNum)
                 ^~~~~~~~~~~~~~~~
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/enet_wrapper.c:618:13: warning: ‘IpAddrDisplay’ defined but not used [-Wunused-function]
     static void IpAddrDisplay(unsigned int ipAddr)
                 ^~~~~~~~~~~~~
    make[2]: Entering directory '/home/frank/eclipse-workspace/FreeRTOS_BBB/build'
    [ 80%] Building C object netif/CMakeFiles/src_portable_lwip_ports_cpsw_netif.dir/cpswif.c.o
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/portable/lwip/ports/cpsw/netif/cpswif.c: In function ‘cpswif_ale_entry_match_free’:
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/portable/lwip/ports/cpsw/netif/cpswif.c:320:51: warning: passing argument 3 of ‘CPSWALETableEntryGet’ from incompatible pointer type [-Wincompatible-pointer-types]
         CPSWALETableEntryGet(cpswinst->ale_base, idx, ale_entry);
                                                       ^~~~~~~~~
    In file included from /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/portable/lwip/ports/cpsw/netif/cpswif.c:61:
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/lib/third_party/ti/include/cpsw.h:297:41: note: expected ‘unsigned int *’ but argument is of type ‘u32_t *’ {aka ‘long unsigned int *’}
                               unsigned int *aleEntryPtr);
                               ~~~~~~~~~~~~~~^~~~~~~~~~~
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/portable/lwip/ports/cpsw/netif/cpswif.c: In function ‘cpswif_port_to_host_vlan_cfg’:
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/portable/lwip/ports/cpsw/netif/cpswif.c:371:49: warning: passing argument 3 of ‘CPSWALETableEntrySet’ from incompatible pointer type [-Wincompatible-pointer-types]
       CPSWALETableEntrySet(cpswinst->ale_base, idx, ale_v_entry);
                                                     ^~~~~~~~~~~
    In file included from /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/portable/lwip/ports/cpsw/netif/cpswif.c:61:
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/lib/third_party/ti/include/cpsw.h:295:41: note: expected ‘unsigned int *’ but argument is of type ‘u32_t *’ {aka ‘long unsigned int *’}
                               unsigned int *aleEntryPtr);
                               ~~~~~~~~~~~~~~^~~~~~~~~~~
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/portable/lwip/ports/cpsw/netif/cpswif.c:389:49: warning: passing argument 3 of ‘CPSWALETableEntrySet’ from incompatible pointer type [-Wincompatible-pointer-types]
       CPSWALETableEntrySet(cpswinst->ale_base, idx, ale_vu_entry);
                                                     ^~~~~~~~~~~~
    In file included from /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/portable/lwip/ports/cpsw/netif/cpswif.c:61:
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/lib/third_party/ti/include/cpsw.h:295:41: note: expected ‘unsigned int *’ but argument is of type ‘u32_t *’ {aka ‘long unsigned int *’}
                               unsigned int *aleEntryPtr);
                               ~~~~~~~~~~~~~~^~~~~~~~~~~
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/portable/lwip/ports/cpsw/netif/cpswif.c: In function ‘cpswif_rx_inthandler’:
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/portable/lwip/ports/cpsw/netif/cpswif.c:2144:8: warning: implicit declaration of function ‘ethernet_input’; did you mean ‘etharp_input’? [-Wimplicit-function-declaration]
         if(ethernet_input((struct pbuf *)pbuf, netif_arr + if_num) != ERR_OK) {
            ^~~~~~~~~~~~~~
            etharp_input

    [ 87%] Building C object ARM_CA8_amm335x/CMakeFiles/src_portable_FreeRTOS_portable_GCC_ARM_CA8_amm335x.dir/port.c.o
 /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/portable/FreeRTOS/portable/GCC/ARM_CA8_amm335x/port.c: In function ‘vPortEnterCritical’:
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/portable/FreeRTOS/portable/GCC/ARM_CA8_amm335x/port.c:361:23: warning: unused variable ‘xInsideISR’ [-Wunused-variable]
      extern portBASE_TYPE xInsideISR;
                           ^~~~~~~~~~
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/portable/FreeRTOS/portable/GCC/ARM_CA8_amm335x/port.c: In function ‘vPortExitCritical’:
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/portable/FreeRTOS/portable/GCC/ARM_CA8_amm335x/port.c:387:23: warning: unused variable ‘xInsideISR’ [-Wunused-variable]
      extern portBASE_TYPE xInsideISR;
                           ^~~~~~~~~~
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/portable/FreeRTOS/portable/GCC/ARM_CA8_amm335x/port.c: In function ‘ulPortSetInterruptMask’:
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/portable/FreeRTOS/portable/GCC/ARM_CA8_amm335x/port.c:123:2: warning: macro expands to multiple statements [-Wmultistatement-macros]
      __asm volatile ( "CPSID i" );         \
      ^~~~~
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/portable/FreeRTOS/portable/GCC/ARM_CA8_amm335x/port.c:448:3: note: in expansion of macro ‘portCPU_IRQ_DISABLE’
       portCPU_IRQ_DISABLE();
       ^~~~~~~~~~~~~~~~~~~
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/portable/FreeRTOS/portable/GCC/ARM_CA8_amm335x/port.c:447:2: note: some parts of macro expansion are not guarded by this ‘if’ clause
      if(ulPortInterruptNesting == 0)
      ^~
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/portable/FreeRTOS/portable/GCC/ARM_CA8_amm335x/port.c:128:2: warning: macro expands to multiple statements [-Wmultistatement-macros]
      __asm volatile ( "CPSIE i" );         \
      ^~~~~
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/portable/FreeRTOS/portable/GCC/ARM_CA8_amm335x/port.c:464:3: note: in expansion of macro ‘portCPU_IRQ_ENABLE’
       portCPU_IRQ_ENABLE();
       ^~~~~~~~~~~~~~~~~~
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/portable/FreeRTOS/portable/GCC/ARM_CA8_amm335x/port.c:463:2: note: some parts of macro expansion are not guarded by this ‘if’ clause
      if(ulPortInterruptNesting == 0)
      ^~
    [ 92%] Building C object AM335X/CMakeFiles/src_portable_AM335X.dir/bsp_platform.c.o
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/portable/AM335X/bsp_platform.c: In function ‘vApplicationFPUSafeIRQHandler’:
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/portable/AM335X/bsp_platform.c:89:14: warning: unused variable ‘IrqPrio’ [-Wunused-variable]
         uint32_t IrqPrio     = IntCurrIrqPriorityGet();
                  ^~~~~~~
    [ 93%] Building C object AM335X/CMakeFiles/src_portable_AM335X.dir/hal_bspInit.c.o
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/portable/AM335X/hal_bspInit.c: In function ‘configure_platform’:
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/portable/AM335X/hal_bspInit.c:97:5: warning: implicit declaration of function ‘InitMem’ [-Wimplicit-function-declaration]
         InitMem();
         ^~~~~~~
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/portable/AM335X/hal_bspInit.c:103:5: warning: implicit declaration of function ‘CP15BranchPredictionEnable’; did you mean ‘IntProtectionEnable’? [-Wimplicit-function-declaration]
         CP15BranchPredictionEnable();
         ^~~~~~~~~~~~~~~~~~~~~~~~~~
         IntProtectionEnable
    [100%] Linking C executable freeRTOSBBB
    /usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: AM335X/libsrc_portable_AM335X.a(bsp_platform.c.o): in function `vSetupTickInterrupt':
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/portable/AM335X/bsp_platform.c:47: undefined reference to `ConsoleUtilsPrintf'
    /usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/portable/AM335X/bsp_platform.c:47: undefined reference to `DMTimerIntEnable'
    /usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: AM335X/libsrc_portable_AM335X.a(bsp_platform.c.o): in function `vApplicationFPUSafeIRQHandler':
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/portable/AM335X/bsp_platform.c:99: undefined reference to `xInsideISR'
    /usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: AM335X/libsrc_portable_AM335X.a(ported_am335x_interrupt.c.o): in function `IntMasterIRQEnable':
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/portable/AM335X/ported_am335x_interrupt.c:479: undefined reference to `CPUirqe'
    /usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: AM335X/libsrc_portable_AM335X.a(ported_am335x_interrupt.c.o): in function `IntMasterIRQDisable':
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/portable/AM335X/ported_am335x_interrupt.c:496: undefined reference to `CPUirqd'
    /usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: AM335X/libsrc_portable_AM335X.a(ported_am335x_interrupt.c.o): in function `IntMasterFIQEnable':
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/portable/AM335X/ported_am335x_interrupt.c:513: undefined reference to `CPUfiqe'
    /usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: AM335X/libsrc_portable_AM335X.a(ported_am335x_interrupt.c.o): in function `IntMasterFIQDisable':
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/portable/AM335X/ported_am335x_interrupt.c:530: undefined reference to `CPUfiqd'
    /usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: AM335X/libsrc_portable_AM335X.a(ported_am335x_interrupt.c.o): in function `IntMasterStatusGet':
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/portable/AM335X/ported_am335x_interrupt.c:544: undefined reference to `CPUIntStatus'
    /usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: application/libsrc_application.a(app_MultiSinkLogger.c.o): in function `vMultiSinkLoggerConsole_main':
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_MultiSinkLogger.c:94: undefined reference to `BUFFERPOOL_ReturnBuffer'
    /usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: application/libsrc_application.a(app_MultiSinkLogger.c.o): in function `prvPrefixStringToMessage':
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_MultiSinkLogger.c:162: undefined reference to `BUFFERPOOL_GetFreeBuffer'
    /usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: application/libsrc_application.a(app_MultiSinkLogger.c.o): in function `prvPrefixDebugStringToMessage':
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_MultiSinkLogger.c:176: undefined reference to `BUFFERPOOL_GetFreeBuffer'
    /usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: application/libsrc_application.a(app_MultiSinkLogger.c.o): in function `SerialisedConsolePrintfDebug':
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_MultiSinkLogger.c:193: undefined reference to `BUFFERPOOL_ReturnBuffer'
    /usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: application/libsrc_application.a(app_MultiSinkLogger.c.o): in function `SerialisedConsolePrintf':
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_MultiSinkLogger.c:209: undefined reference to `BUFFERPOOL_ReturnBuffer'
    /usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: application/libsrc_application.a(app_MultiSinkLogger.c.o): in function `SerialisedLogPrintf':
    /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_MultiSinkLogger.c:241: undefined reference to `BUFFERPOOL_GetFreeBuffer'
    /usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_MultiSinkLogger.c:241: undefined reference to `BUFFERPOOL_ReturnBuffer'
    collect2: error: ld returned 1 exit status
    make[2]: *** [CMakeFiles/freeRTOSBBB.dir/build.make:101: freeRTOSBBB] Error 1
    make[2]: Leaving directory '/home/frank/eclipse-workspace/FreeRTOS_BBB/build'
    make[1]: *** [CMakeFiles/Makefile2:89: CMakeFiles/freeRTOSBBB.dir/all] Error 2
    make[1]: Leaving directory '/home/frank/eclipse-workspace/FreeRTOS_BBB/build'
    make: *** [Makefile:87: all] Error 2

When i use the bare metal compiler gcc-arm-8.2-2019.01-x86_64-arm-eabi i get some assembler errors. The full output is below:

frank@debian:~/eclipse-workspace/FreeRTOS_BBB/mybuild$ make
[  0%] Building C object application/CMakeFiles/src_application.dir/TaskLED2.c.o
/home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/TaskLED2.c: In function 'vLED_blink_evBits_ActivateHook':
/home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/TaskLED2.c:70:39: warning: variable 'xResult' set but not used [-Wunused-but-set-variable]
  BaseType_t xHigherPriorityTaskWoken, xResult;
                                       ^~~~~~~
[  1%] Building C object application/CMakeFiles/src_application.dir/app_InitOSEvents.c.o
[  2%] Building C object application/CMakeFiles/src_application.dir/app_MultiSinkLogger.c.o
/home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_MultiSinkLogger.c: In function 'vMultiSinkLoggerConsole_main':
/home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_MultiSinkLogger.c:105:30: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
             char * q       = pMsg;
                              ^~~~
/home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_MultiSinkLogger.c: In function 'InitSerialisedLogPrintf':
/home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_MultiSinkLogger.c:144:30: warning: returning 'QueueHandle_t' {aka 'struct QueueDefinition *'} from a function with return type 'uint32_t' {aka 'long unsigned int'} makes integer from pointer without a cast [-Wint-conversion]
     return ConsoleInterafceQ = q;
            ~~~~~~~~~~~~~~~~~~^~~
/home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_MultiSinkLogger.c: In function 'prvPrefixStringToMessage':
/home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_MultiSinkLogger.c:153:14: warning: unused variable 'rv' [-Wunused-variable]
     uint32_t rv = pdFAIL;
              ^~
/home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_MultiSinkLogger.c: In function 'prvPrefixDebugStringToMessage':
/home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_MultiSinkLogger.c:173:36: warning: format '%d' expects argument of type 'int', but argument 7 has type 'long unsigned int' [-Wformat=]
         snprintf(pMsg,m,"%s:%s:%s:%d:%s",pcTaskName,pcFileName,pcFuncName,ulLine,msg);
                                   ~^                                      ~~~~~~
                                   %ld
/home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_MultiSinkLogger.c:168:14: warning: unused variable 'rv' [-Wunused-variable]
     uint32_t rv = pdFAIL;
              ^~
/home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_MultiSinkLogger.c: In function 'SerialisedLogPrintf':
/home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_MultiSinkLogger.c:216:19: warning: pointer targets in initialization of 'char *' from 'uint8_t *' {aka 'unsigned char *'} differ in signedness [-Wpointer-sign]
     char * pMsg = BUFFERPOOL_GetFreeBuffer(&m);
                   ^~~~~~~~~~~~~~~~~~~~~~~~
/home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_MultiSinkLogger.c:235:37: warning: pointer targets in passing argument 1 of 'BUFFERPOOL_ReturnBuffer' differ in signedness [-Wpointer-sign]
             BUFFERPOOL_ReturnBuffer(pMsg);
                                     ^~~~
In file included from /home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_MultiSinkLogger.c:43:
/home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/portable/ported_aws_bufpool/inc/aws_bufferpool.h:72:6: note: expected 'uint8_t * const' {aka 'unsigned char * const'} but argument is of type 'char *'
 void BUFFERPOOL_ReturnBuffer( uint8_t * const pucBuffer );
      ^~~~~~~~~~~~~~~~~~~~~~~
[  3%] Building C object application/CMakeFiles/src_application.dir/app_utils.c.o
/home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_utils.c: In function 'vAssertCalled':
/home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_utils.c:185:22: warning: unused variable 'xPrinted' [-Wunused-variable]
 static portBASE_TYPE xPrinted = pdFALSE;
                      ^~~~~~~~
/usr/gcc-arm-8.2-2019.01-x86_64-arm-eabi/arm-eabi/include/sys/unistd.h: In function '_exit':
/home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_utils.c:107:1: warning: 'noreturn' function does return
 }
 ^
At top level:
/home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/app_utils.c:185:22: warning: 'xPrinted' defined but not used [-Wunused-variable]
 static portBASE_TYPE xPrinted = pdFALSE;
                      ^~~~~~~~
[  3%] Building C object application/CMakeFiles/src_application.dir/enet_wrapper.c.o
/home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/enet_wrapper.c: In function 'InitLwipStack':
/home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/enet_wrapper.c:279:21: warning: unused variable 'rv' [-Wunused-variable]
             uint8_t rv = PhyReset(CPSW0_MDIO_REGS, ifNum);
                     ^~
/home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/enet_wrapper.c: In function 'lwip_main':
/home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/enet_wrapper.c:369:18: warning: unused variable 'ipAddr' [-Wunused-variable]
     unsigned int ipAddr;
                  ^~~~~~
/home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/enet_wrapper.c: In function 'lwIPDHCPComplete':
/home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/enet_wrapper.c:672:19: warning: assignment to 'volatile unsigned char *' from incompatible pointer type 'void **' [-Wincompatible-pointer-types]
             state = &(cpswNetIF[ifNum].state);
                   ^
At top level:
/home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/enet_wrapper.c:654:13: warning: 'lwIPDHCPComplete' defined but not used [-Wunused-function]
 static void lwIPDHCPComplete(unsigned int ifNum)
             ^~~~~~~~~~~~~~~~
/home/frank/eclipse-workspace/FreeRTOS_BBB/source/src/application/enet_wrapper.c:618:13: warning: 'IpAddrDisplay' defined but not used [-Wunused-function]
 static void IpAddrDisplay(unsigned int ipAddr)
             ^~~~~~~~~~~~~
[  4%] Building ASM object application/CMakeFiles/src_application.dir/imageLoad.S.o

[ 49%] Building ASM object armv7a/CMakeFiles/lib_third_party_ti_system_config_armv7a.dir/gcc/cp15.S.o
/home/frank/eclipse-workspace/FreeRTOS_BBB/source/lib/third_party/ti/system_config/armv7a/gcc/cp15.S: Assembler messages:
/home/frank/eclipse-workspace/FreeRTOS_BBB/source/lib/third_party/ti/system_config/armv7a/gcc/cp15.S:123: Error: selected processor does not support `dmb' in ARM mode
/home/frank/eclipse-workspace/FreeRTOS_BBB/source/lib/third_party/ti/system_config/armv7a/gcc/cp15.S:136: Error: selected processor does not support `isb' in ARM mode
/home/frank/eclipse-workspace/FreeRTOS_BBB/source/lib/third_party/ti/system_config/armv7a/gcc/cp15.S:142: Error: selected processor does not support `clz r5,r4' in ARM mode
/home/frank/eclipse-workspace/FreeRTOS_BBB/source/lib/third_party/ti/system_config/armv7a/gcc/cp15.S:574: Error: selected processor does not support `ubfx r0,r0,#4,#12' in ARM mode
make[2]: *** [armv7a/CMakeFiles/lib_third_party_ti_system_config_armv7a.dir/build.make:89: armv7a/CMakeFiles/lib_third_party_ti_system_config_armv7a.dir/gcc/cp15.S.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:416: armv7a/CMakeFiles/lib_third_party_ti_system_config_armv7a.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

Im struggling to figure out whats wrong with both compilers, im not sure if im missing compiler flags, missing some source files or perhaps just using the wrong compiler. Ideally i would like both to work but assistance with either issue is appreciated. I should also say that my project is based off of this one which seems to implement a slightly different method although it did not work for me:https://github.com/kryochronic/AM335X-FreeRTOS-lwip.git Let me know if you need any extra info. Thanks for the help.

Extra info: I have added the verbose outputs on my github project. For the arm-linux-gnueabihf-gcc : https://raw.githubusercontent.com/frank2597/FreeRTOS_BBB/master/make-output-arm-linux-gnueabihf.md

For the bare metal version gcc-arm-8.2-2019.01-x86_64-arm-eabi: https://raw.githubusercontent.com/frank2597/FreeRTOS_BBB/master/make-output-arm-eabi-gcc.md

7
  • you are not cross compiling your tools are trying to build arm code with a non-arm toolchain that is why they dont recognize the instructions. or you have selected the wrong flavor of arm as the error states. most likely the latter. Please read the output from the tools.
    – old_timer
    Jan 6, 2021 at 16:19
  • Is this answering the second part?stackoverflow.com/questions/62304821/…
    – yflelion
    Jan 6, 2021 at 19:28
  • @old_timer i posted links with the verbose outputs. I checked and its showing that the compiler i chose is being used. Jan 7, 2021 at 2:13
  • As indicated in the output the wrong arm target was selected even if the right tool was used.
    – old_timer
    Jan 7, 2021 at 2:24
  • Or, you are using the wrong files for this target, there may be correct files for each target and the wrong files were selected.
    – old_timer
    Jan 7, 2021 at 2:25

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.