Heap-1-dot-c

From Wiki at Neela Nurseries
Revision as of 17:20, 9 July 2018 by Ted (talk | contribs)
Jump to: navigation, search


make -r all

Building file: ../Source/FreeRTOS_Source/portable/MemMang/heap_1.c

Invoking: MCU C Compiler

arm-none-eabi-gcc -D__REDLIB__ -DDEBUG -D__CODE_RED -D__USE_CMSIS=CMSISv2p00_LPC11xx -I"/home/veris/Downloads/freertos/FreeRTOSv10.0.1/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/CMSISv2p00_LPC11xx/inc" -I"/home/veris/Downloads/freertos/tmp/FreeRTOSv10.0.1/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/CMSISv2p00_LPC11xx/inc" -I"../../../Common/include" -I"/home/veris/projects/nxp/rtos-demo-3/Source/Common_Demo_Tasks/include" -I"/home/veris/projects/nxp/rtos-demo-3/Source" -I"/home/veris/projects/nxp/rtos-demo-3/Source/FreeRTOS_Source/include" -I"/home/veris/projects/nxp/rtos-demo-3/Source/FreeRTOS_Source/portable/GCC/ARM_CM0" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -Wextra -mcpu=cortex-m0 -mthumb -D__REDLIB__ -specs=redlib.specs -MMD -MP -MF"Source/FreeRTOS_Source/portable/MemMang/heap_1.d" -MT"Source/FreeRTOS_Source/portable/MemMang/heap_1.o" -MT"Source/FreeRTOS_Source/portable/MemMang/heap_1.d" -o "Source/FreeRTOS_Source/portable/MemMang/heap_1.o" "../Source/FreeRTOS_Source/portable/MemMang/heap_1.c"

Finished building: ../Source/FreeRTOS_Source/portable/MemMang/heap_1.c


Invocations

Trying to invoke gcc to observe dependency rule output for one source file:


## Note path is ~/projects/nxp/rtos-demo-3/Debug:

$ arm-none-eabi-gcc -MMD -MP -MF"Source/FreeRTOS_Source/portable/MemMang/heap_1.d" "../Source/FreeRTOS_Source/portable/MemMang/heap_1.c" -I"/home/veris/LPCXpresso/workspace/rtos-demo-3/Source/FreeRTOS_Source/include" -I"/home/veris/projects/nxp/rtos-demo-3/Source" -I"/home/veris/LPCXpresso/workspace/rtos-demo-3/Source/FreeRTOS_Source/portable/GCC/ARM_CM0"
/tmp/ccc6sGOb.s: Assembler messages:
/tmp/ccc6sGOb.s:118: Error: selected processor does not support ARM mode `cpsid i'

$

Adding reference to Arm Cortex M0 processor type:

$ arm-none-eabi-gcc -MMD -MP -MF"Source/FreeRTOS_Source/portable/MemMang/heap_1.d" "../Source/FreeRTOS_Source/portable/MemMang/heap_1.c" -I"/home/veris/LPCXpresso/workspace/rtos-demo-3/Source/FreeRTOS_Source/include" -I"/home/veris/projects/nxp/rtos-demo-3/Source" -I"/home/veris/LPCXpresso/workspace/rtos-demo-3/Source/FreeRTOS_Source/portable/GCC/ARM_CM0" -mcpu=cortex-m0
../Source/FreeRTOS_Source/portable/MemMang/heap_1.c:1:0: error: target CPU does not support ARM mode
 /*
 ^

$

Adding reference to use thumb type instructions:

$ arm-none-eabi-gcc -MMD -MP -MF"Source/FreeRTOS_Source/portable/MemMang/heap_1.d" "../Source/FreeRTOS_Source/portable/MemMang/heap_1.c" -I"/home/veris/LPCXpresso/workspace/rtos-demo-3/Source/FreeRTOS_Source/include" -I"/home/veris/projects/nxp/rtos-demo-3/Source" -I"/home/veris/LPCXpresso/workspace/rtos-demo-3/Source/FreeRTOS_Source/portable/GCC/ARM_CM0" -mcpu=cortex-m0 -mthumb
/usr/lib/gcc/arm-none-eabi/4.8/../../../arm-none-eabi/lib/armv6-m/libc.a(lib_a-exit.o): In function `exit':
/home/tin/projects/debian/arm-toolchain/collab-maint/newlib/build/arm-none-eabi/armv6-m/newlib/libc/stdlib/../../../../../../newlib/libc/stdlib/exit.c:70: undefined reference to `_exit'
/usr/lib/gcc/arm-none-eabi/4.8/../../../arm-none-eabi/lib/armv6-m/crt0.o: In function `_start':
/home/tin/projects/debian/arm-toolchain/collab-maint/newlib/build/arm-none-eabi/armv6-m/libgloss/arm/../../../../../libgloss/arm/crt0.S:420: undefined reference to `main'
/tmp/ccHnZU0F.o: In function `pvPortMalloc':
heap_1.c:(.text+0x1e): undefined reference to `vTaskSuspendAll'
heap_1.c:(.text+0x6c): undefined reference to `xTaskResumeAll'
heap_1.c:(.text+0x76): undefined reference to `vApplicationMallocFailedHook'
collect2: error: ld returned 1 exit status

$


Adding references to both linker scripts:

$ arm-none-eabi-gcc -MMD -MP -MF"Source/FreeRTOS_Source/portable/MemMang/heap_1.d" "../Source/FreeRTOS_Source/portable/MemMang/heap_1.c" -I"/home/veris/LPCXpresso/workspace/rtos-demo-3/Source/FreeRTOS_Source/include" -I"/home/veris/projects/nxp/rtos-demo-3/Source" -I"/home/veris/LPCXpresso/workspace/rtos-demo-3/Source/FreeRTOS_Source/portable/GCC/ARM_CM0" -mcpu=cortex-m0 -mthumb -T./extra-linker-script.ld -T./RTOSDemo_Debug.ld



/usr/lib/gcc/arm-none-eabi/4.8/../../../arm-none-eabi/bin/ld: cannot find libcr_c.a
/usr/lib/gcc/arm-none-eabi/4.8/../../../arm-none-eabi/bin/ld: cannot find libcr_eabihelpers.a
collect2: error: ld returned 1 exit status