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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

1,556 Views
rshipman
Contributor V

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.

Labels (1)
0 Kudos
1 Reply

1,358 Views
lpcxpresso_supp
NXP Employee
NXP Employee

There were several improvements to the map file/linker script awareness implemented as part of IDE v11.0.1:

However it looks like this particular erroneous problem report with your map file is still there - we'll look at resolving in our next IDE release.

However, you should note that the awareness functionality is informational - it doesn't actually stop your project building correctly. When you have erroneous reports of problems like this, then you can disable the awareness for a map file by selecting the file in Project Properties, right clicking and selecting "Open with -> Generic text editor" from the context sensitive menu. Note that you may still need use the refresh option, or else to go to the Problems view, to remove the erroneous "errors".

Regards,

MCUXpresso IDE Support

0 Kudos