Generation of map files in explorer_board project

Technical questions regarding the XTC tools and programming with XMOS.
arun.v@emqos.com
Member
Posts: 9
Joined: Wed Dec 04, 2024 9:30 am

Generation of map files in explorer_board project

Post by arun.v@emqos.com »

I am using the standard explorer_board project in examples/freertos with cmake. I want to generate map files to understand memory allocations.

Can you please provide instructions on how to generate map file for this project?

Regards
Arun
arun.v@emqos.com
Member
Posts: 9
Joined: Wed Dec 04, 2024 9:30 am

Post by arun.v@emqos.com »

I see there is compiler flag set here
set(APP_COMPILER_FLAGS
-Os
-g
-report
-fxscope
-lquadspi
-lquadflash
-mcmodel=large
-Wno-xcore-fptrgroup
${CMAKE_CURRENT_LIST_DIR}/src/config.xscope
${CMAKE_CURRENT_LIST_DIR}/XCORE-AI-EXPLORER.xn
)

in explorer_board.cmake, where it takes options like -report, -g. It is not taking Xmapper options properly.
Regards
Arun
User avatar
upav
Verified
Member
Posts: 14
Joined: Wed May 22, 2024 3:30 pm

Post by upav »

From the way I understand your problem, you're trying to pass an xmap option to the xcc.
If you want to do so, you need to pass it through -Wm and the comma-separated option to the xmap (look at xcc --help for more details)
so your flag to the xcc will look something like:

Code: Select all

-Wm,--map,map.txt
I'm not sure how it'll work through cmake and where it will place it, you might need to run xmake with VERBOSE=1 to see.
Hope it helps ~
Pavel
xmos software engineer
danielp
Active Member
Posts: 33
Joined: Tue Jul 16, 2024 9:52 am
Location: Bristol, UK

Post by danielp »

You need to supply the Xmapper options like this:

Code: Select all

set(APP_COMPILER_FLAGS
    -Os
    -g
    -report
    -fxscope
    -lquadspi
    -lquadflash
    -mcmodel=large
    -Wno-xcore-fptrgroup
    "SHELL:-Xmapper --map"
    "SHELL:-Xmapper MAPFILE"
)
Also note that the xscope file and XN file don't need to be added to the APP_COMPILER_FLAGS variable - the build system handles them separately.
XMOS, Senior Software Engineer
arun.v@emqos.com
Member
Posts: 9
Joined: Wed Dec 04, 2024 9:30 am

Post by arun.v@emqos.com »

Thanks danielp, That solves the issue. i am able to generate map file