Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 22:09 Go to next message
Dave Nadler is currently offline Dave NadlerFriend
Messages: 14
Registered: December 2015
Junior Member
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 06:01 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
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..


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Map file viewer bug [message #1852663 is a reply to message #1852636] Mon, 30 May 2022 15:44 Go to previous messageGo to next message
Tauno Voipio is currently offline Tauno VoipioFriend
Messages: 742
Registered: August 2014
Senior Member
ASSERT is not a valid GNU ld command, maybe a bastardization in the MCUExpresso. Check your ld script.

--

Tauno Voipio

[Updated on: Mon, 30 May 2022 15:44]

Report message to a moderator

Re: Map file viewer bug [message #1852668 is a reply to message #1852663] Mon, 30 May 2022 19:19 Go to previous messageGo to next message
Dave Nadler is currently offline Dave NadlerFriend
Messages: 14
Registered: December 2015
Junior Member
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 06:48 Go to previous messageGo to next message
Tauno Voipio is currently offline Tauno VoipioFriend
Messages: 742
Registered: August 2014
Senior Member
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.


--

Tauno Voipio
Re: Map file viewer bug [message #1852803 is a reply to message #1852651] Sat, 04 June 2022 14:03 Go to previous messageGo to next message
Dave Nadler is currently offline Dave NadlerFriend
Messages: 14
Registered: December 2015
Junior Member
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 05:41 Go to previous messageGo to next message
Johnny Bravo is currently offline Johnny BravoFriend
Messages: 2
Registered: June 2022
Location: United States
Junior Member
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 19:57 Go to previous message
Jonah Graham is currently offline Jonah GrahamFriend
Messages: 416
Registered: June 2014
Senior Member
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: Fri Apr 19 21:46:18 GMT 2024

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

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

Back to the top