Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Map file viewer bug(Map file containing ASSERTs is erroneously flagged for errors)
Map file viewer bug [message #1852636] Sat, 28 May 2022 18:09 Go to next message
Eclipse UserFriend
Viewing a GCC map file, ASSERT lines are flagged as a problem:
Description Resource Path Location Type
missing '=' at '(' MFW2.map /MFW2/Debug line: 17202 /MFW2/Debug/MFW2.map Map File Problem


The map file contents are for example:
LOAD ./Generated_uC_setup/pin_mux.o
LOAD C:\git_CAP\repo_MFW2\MFW2\libs\libarm_cortexM4lf_math.a
                0x00016000                HEAP_SIZE = DEFINED (__heap_size__)?__heap_size__:0x400
                0x00000800                STACK_SIZE = DEFINED (__stack_size__)?__stack_size__:0x400
                0x00000001                ASSERT (((HEAP_SIZE & 0xf) == 0x0), HEAP_SIZE must be multiple of 16)
                0x00000001                ASSERT (((STACK_SIZE & 0xf) == 0x0), STACK_SIZE must be multiple of 16)
                0x00016000                _HeapSize = HEAP_SIZE
                0x00000800                _StackSize = STACK_SIZE
                0x00000000                M_VECTOR_RAM_SIZE = 0x0


I'm afraid I have no idea of the plumbing or component I should report a bug for?

I'm using NXP's MCUXpresso IDE v11.3.0 [Build 5222] [2021-01-11],
which is based on Eclipse CDT 9.11.1.202006011430

Thanks in advance,
Best Regards, Dave

PS: Also... If Eclipse is started with the map file as an open tab, but the map file is not present (after a clean), the viewer dies with a null-ptr exception.
Re: Map file viewer bug [message #1852651 is a reply to message #1852636] Mon, 30 May 2022 02:01 Go to previous messageGo to next message
Eclipse UserFriend
It's better to ask on the CDT forum:

https://www.eclipse.org/forums/index.php?t=thread&frm_id=80

But I expect this is something provided by MCUXpresso not a bug in CDT..
Re: Map file viewer bug [message #1852663 is a reply to message #1852636] Mon, 30 May 2022 11:44 Go to previous messageGo to next message
Eclipse UserFriend
ASSERT is not a valid GNU ld command, maybe a bastardization in the MCUExpresso. Check your ld script.

[Updated on: Mon, 30 May 2022 11:44] by Moderator

Re: Map file viewer bug [message #1852668 is a reply to message #1852663] Mon, 30 May 2022 15:19 Go to previous messageGo to next message
Eclipse UserFriend
To get early and concise warnings of configuration problems, ASSERT is used in LD scripts by many software professionals, just as we liberally use asserts in our code. For documentation, see for example:
https://access.redhat.com/webassets/avalon/d/Red_Hat_Enterprise_Linux-4-Red_Hat_Enterprise_Linux_4_-_Archived_Documents-en-US/files/Red_Hat_Enterprise_Linux-4-Using_ld_the_GNU_Linker-en-US.pdf
https://home.cs.colorado.edu/~main/cs1300/doc/gnu/ld_3.html
Hope that helps,
Best Regards, Dave
Re: Map file viewer bug [message #1852676 is a reply to message #1852668] Tue, 31 May 2022 02:48 Go to previous messageGo to next message
Eclipse UserFriend
It is not in the GNU documentation, must be a branch modification, maybe a Red Hat one.
<https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html>

It is easily possible to achieve the same end result without using ASSERT.
Re: Map file viewer bug [message #1852803 is a reply to message #1852651] Sat, 04 June 2022 10:03 Go to previous messageGo to next message
Eclipse UserFriend
Thanks Ed, This is confirmed as a bug in NXP's extension in MCUxpresso:
https://community.nxp.com/t5/MCUXpresso-IDE/map-file-viewer-bugs-ASSERT-Macro-flagged-as-problem-null-ptr/m-p/1466632
Best Regards, Dave
Re: Map file viewer bug [message #1853107 is a reply to message #1852803] Sat, 18 June 2022 01:41 Go to previous messageGo to next message
Eclipse UserFriend
Same issue don't know how to solve it.
Re: Map file viewer bug [message #1853292 is a reply to message #1852676] Sun, 26 June 2022 15:57 Go to previous message
Eclipse UserFriend
ASSERT is definitely part of GNU ld - https://sourceware.org/binutils/docs/ld/Miscellaneous-Commands.html#index-ASSERT and as mentioned above widely used.

It was added in GNU LD 2.10 (see the NEWS file) and was in sourceware's ld from before that.

Note that the link above to GNU ld manual is very ancient as ASSERT was added to gnu ld in 1999 (although that ancient manual is the first result on my google search for "gnu ld"!) IIRC That manual refers to the version of binutils before the sourceware / gnu versions were recombined - hence "old-gnu" in the URL.
Previous Topic:couldn't find path in the cdt build environment variable
Next Topic:Whats the state of CMake Build Support ?
Goto Forum:
  


Current Time: Mon Jul 14 20:15:24 EDT 2025

Powered by FUDForum. Page generated in 0.04341 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top