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
Generation of map files in explorer_board project
-
- Member
- Posts: 9
- Joined: Wed Dec 04, 2024 9:30 am
-
- Member
- Posts: 9
- Joined: Wed Dec 04, 2024 9:30 am
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
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
-
Verified
- Member
- Posts: 14
- Joined: Wed May 22, 2024 3:30 pm
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:
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 ~
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
Hope it helps ~
Pavel
xmos software engineer
xmos software engineer
-
- Active Member
- Posts: 33
- Joined: Tue Jul 16, 2024 9:52 am
- Location: Bristol, UK
You need to supply the Xmapper options like this:
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.
Code: Select all
set(APP_COMPILER_FLAGS
-Os
-g
-report
-fxscope
-lquadspi
-lquadflash
-mcmodel=large
-Wno-xcore-fptrgroup
"SHELL:-Xmapper --map"
"SHELL:-Xmapper MAPFILE"
)
XMOS, Senior Software Engineer
-
- Member
- Posts: 9
- Joined: Wed Dec 04, 2024 9:30 am
Thanks danielp, That solves the issue. i am able to generate map file