Other Parts Discussed in Thread: SYSCONFIG
Hi E2E-team,
Please can you help me on the following error? when I try to build the m4f image/application build. (I believe need to reconfigure the linker.cmd stack_size but I am not sure. ) I added few lines of code and it started this error; it disappear when I remove that code.
//--------------
time_t rawtime;
time(&rawtime); //Obtain current time
struct tm *pTimeInfo = localtime(&rawtime); //convert to local time
DebugP_log("%02d:%02d:%02d \r\n", pTimeInfo->tm_hour, pTimeInfo->tm_min, pTimeInfo->tm_sec );
//----------------------
Error-Log,
6$ make -s -C "/home/vpalanisamy/workspace/adas/compute/sitara/mcu_sdk/mcu_plus_sdk_am62x_08_04_00_16/harman/Am62x_MCU/mcu_svc/am62x-sk/m4fss0-0_freertos/ti-arm-clang/"
Compiling: am62x:m4fss0-0:freertos:ti-arm-clang mcu_svc_linux.release.out: ../../../drvCanTrnsRcvr.c
Generating SysConfig files ...
Running script...
Validating...
Generating Code (mcu_svc.syscfg)...
Unchanged /home/vpalanisamy/workspace/adas/compute/sitara/mcu_sdk/mcu_plus_sdk_am62x_08_04_00_16/harman/Am62x_MCU/mcu_svc/am62x-sk/m4fss0-0_freertos/ti-arm-clang/generated/ti_dpl_config.c...
Unchanged /home/vpalanisamy/workspace/adas/compute/sitara/mcu_sdk/mcu_plus_sdk_am62x_08_04_00_16/harman/Am62x_MCU/mcu_svc/am62x-sk/m4fss0-0_freertos/ti-arm-clang/generated/ti_dpl_config.h...
Unchanged /home/vpalanisamy/workspace/adas/compute/sitara/mcu_sdk/mcu_plus_sdk_am62x_08_04_00_16/harman/Am62x_MCU/mcu_svc/am62x-sk/m4fss0-0_freertos/ti-arm-clang/generated/ti_drivers_config.c...
Unchanged /home/vpalanisamy/workspace/adas/compute/sitara/mcu_sdk/mcu_plus_sdk_am62x_08_04_00_16/harman/Am62x_MCU/mcu_svc/am62x-sk/m4fss0-0_freertos/ti-arm-clang/generated/ti_drivers_config.h...
Unchanged /home/vpalanisamy/workspace/adas/compute/sitara/mcu_sdk/mcu_plus_sdk_am62x_08_04_00_16/harman/Am62x_MCU/mcu_svc/am62x-sk/m4fss0-0_freertos/ti-arm-clang/generated/ti_drivers_open_close.c...
Unchanged /home/vpalanisamy/workspace/adas/compute/sitara/mcu_sdk/mcu_plus_sdk_am62x_08_04_00_16/harman/Am62x_MCU/mcu_svc/am62x-sk/m4fss0-0_freertos/ti-arm-clang/generated/ti_drivers_open_close.h...
Unchanged /home/vpalanisamy/workspace/adas/compute/sitara/mcu_sdk/mcu_plus_sdk_am62x_08_04_00_16/harman/Am62x_MCU/mcu_svc/am62x-sk/m4fss0-0_freertos/ti-arm-clang/generated/ti_pinmux_config.c...
Unchanged /home/vpalanisamy/workspace/adas/compute/sitara/mcu_sdk/mcu_plus_sdk_am62x_08_04_00_16/harman/Am62x_MCU/mcu_svc/am62x-sk/m4fss0-0_freertos/ti-arm-clang/generated/ti_power_clock_config.c...
Unchanged /home/vpalanisamy/workspace/adas/compute/sitara/mcu_sdk/mcu_plus_sdk_am62x_08_04_00_16/harman/Am62x_MCU/mcu_svc/am62x-sk/m4fss0-0_freertos/ti-arm-clang/generated/ti_board_config.c...
Unchanged /home/vpalanisamy/workspace/adas/compute/sitara/mcu_sdk/mcu_plus_sdk_am62x_08_04_00_16/harman/Am62x_MCU/mcu_svc/am62x-sk/m4fss0-0_freertos/ti-arm-clang/generated/ti_board_config.h...
Unchanged /home/vpalanisamy/workspace/adas/compute/sitara/mcu_sdk/mcu_plus_sdk_am62x_08_04_00_16/harman/Am62x_MCU/mcu_svc/am62x-sk/m4fss0-0_freertos/ti-arm-clang/generated/ti_board_open_close.c...
Unchanged /home/vpalanisamy/workspace/adas/compute/sitara/mcu_sdk/mcu_plus_sdk_am62x_08_04_00_16/harman/Am62x_MCU/mcu_svc/am62x-sk/m4fss0-0_freertos/ti-arm-clang/generated/ti_board_open_close.h...
.
Linking: am62x:m4fss0-0:freertos:ti-arm-clang mcu_svc_linux.release.out ...
"linker.cmd", line 29: error: program will not fit into available memory, or
the section contains a call site that requires a trampoline that can't be
generated for this section. placement with alignment fails for section
".data" size 0x507. Available memory ranges:
M4F_DRAM size: 0x10000 unused: 0x4b0 max hole: 0x4b0
error: errors encountered during linking; "mcu_svc_linux.release.out" not
built
tiarmclang: error: tiarmlnk command failed with exit code 1 (use -v to see invocation)
makefile:172: recipe for target 'mcu_svc_linux.release.out' failed
make: *** [mcu_svc_linux.release.out] Error 1
linker.cmd file:
/* make sure below retain is there in your linker command file, it keeps the vector table in the final binary */
--retain="*(.vectors)"
/* This is the stack that is used by code running within main()
* In case of NORTOS,
* - This means all the code outside of ISR uses this stack
* In case of FreeRTOS
* - This means all the code until vTaskStartScheduler() is called in main()
* uses this stack.
* - After vTaskStartScheduler() each task created in FreeRTOS has its own stack
*/
--stack_size=16384
/* This is the heap size for malloc() API in NORTOS and FreeRTOS
* This is also the heap used by pvPortMalloc in FreeRTOS
*/
--heap_size=32768
SECTIONS
{
/* This has the M4F entry point and vector table, this MUST be at 0x0 */
.vectors:{} palign(8) > M4F_VECS
.text: {} palign(8) > M4F_IRAM /* This is where code resides */
.bss: {} palign(8) > M4F_DRAM /* This is where uninitialized globals go */
RUN_START(__BSS_START)
RUN_END(__BSS_END)
.data: {} palign(8) > M4F_DRAM /* This is where initialized globals and static go */
.rodata: {} palign(8) > M4F_DRAM /* This is where const's go */
.sysmem: {} palign(8) > M4F_IRAM /* This is where the malloc heap goes */
.stack: {} palign(8) > M4F_IRAM /* This is where the main() stack goes */
GROUP {
/* This is the resource table used by linux to know where the IPC "VRINGs" are located */
.resource_table: {} palign(4096)
} > DDR_0
/* Sections needed for C++ projects */
.ARM.exidx: {} palign(8) > M4F_IRAM /* Needed for C++ exception handling */
.init_array: {} palign(8) > M4F_IRAM /* Contains function pointers called before main */
.fini_array: {} palign(8) > M4F_IRAM /* Contains function pointers called after main */
}
MEMORY
{
M4F_VECS : ORIGIN = 0x00000000 , LENGTH = 0x00000200
M4F_IRAM : ORIGIN = 0x00000200 , LENGTH = 0x0002FE00
M4F_DRAM : ORIGIN = 0x00030000 , LENGTH = 0x00010000
/* when using multi-core application's i.e more than one R5F/M4F active, make sure
* this memory does not overlap with R5F's
*/
/* Resource table must be placed at the start of DDR_0 when M4 core is early booting with Linux */
DDR_0 : ORIGIN = 0x9CC00000 , LENGTH = 0x1000
}
sdk:
ti-processor-sdk-linux-am62xx-evm-08.04.01.09
mcu_plus_sdk_am62x_08_04_00_16
Regards,
Vadivel