AnsweredAssumed Answered

MCUXpresso arm-none-eabi-gcc .map file generation problem

Question asked by rshipman on Nov 6, 2019
Latest reply on Nov 6, 2019 by LPCX presso support

IDE: MCUXpresso IDE v11.0.0 [Build 2516] [2019-06-05]

Platform: MIMXRT1020-evk eval board

Example project: demos/iled_blinky

 

I'm experiencing a problem with a map file error in MCUXpresso when I put an ASSERT in the linker file.

If I have something like the following in the linker .ld file (this is just a pointless dummy assert):

 

  ASSERT(__boot_hdr_start__ <= __boot_hdr_end__, "Dummy assert for map problem.");

 

I get an error from the .map generation:

Map file line:

 

0x00000001 ASSERT ((__boot_hdr_start__ <= __boot_hdr_end__), Dummy assert for map problem.)

 

Error:

no viable alternative at character '<'

 

The ASSERT works, because when I turn the expression to be >= the linker fails as expected. Otherwise it compiles/links fine. It is the map file that seems to have a problem. It is MCUXpresso that is reporting the error in the Problems tab. And I am unable to run the binary because of it (MCUXpresso IDE: Error: "Unable to perform operation: project build failed!").

 

I've used a completely fresh copy of the iled_blinky demo with just the ASSERT in the attached .ld file (which I created first as managed, and then edited and used it as unmanaged).

 

Linker command line:

 

arm-none-eabi-gcc -nostdlib -Xlinker -Map="evkmimxrt1020_iled_blinky_map_problem.map" -Xlinker --gc-sections -Xlinker -print-memory-usage -Xlinker --sort-section=alignment -Xlinker --cref -mcpu=cortex-m7 -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -T evkmimxrt1020_iled_blinky_map_problem_Debug.ld -o "evkmimxrt1020_iled_blinky_map_problem.axf" ./xip/evkmimxrt1020_flexspi_nor_config.o ./xip/evkmimxrt1020_sdram_ini_dcd.o ./xip/fsl_flexspi_nor_boot.o ./utilities/fsl_assert.o ./utilities/fsl_debug_console.o ./utilities/fsl_str.o ./startup/startup_mimxrt1021.o ./source/led_blinky.o ./source/semihost_hardfault.o ./drivers/fsl_clock.o ./drivers/fsl_common.o ./drivers/fsl_gpio.o ./drivers/fsl_lpuart.o ./device/system_MIMXRT1021.o ./component/uart/lpuart_adapter.o ./component/serial_manager/serial_manager.o ./component/serial_manager/serial_port_uart.o ./component/lists/generic_list.o ./board/board.o ./board/clock_config.o ./board/pin_mux.o

 

 

Screen shot attached.

 

Many thanks for any help.

Outcomes