Forum Discussion
Altera_Forum
Honored Contributor
15 years agoHow to Pass an Extra Option to 'elf2hex' in a BSP's 'mem_init.mk'
Hi,
This is a question for someone who is familiar with the NIOS II building system. When executing 'make mem_init_generate' I want the extra option '--record=4' passed to elf2hex. It seems that I have to modify 'mem_init.mk' in the BSP directory, but the 'mem_init.mk' is generated automatically and my change will be overwritten next time I regenerate the BSP :cry:... So, what is the best place to set this? Thanks, -- Alex3 Replies
- Altera_Forum
Honored Contributor
Hi,
I have the same problem with quartus v9.1 sp2 (I'm forced to use this version to be compatible with an IP license). Did you find a solution to add the --record=4 parameter to elf2hex command without modifying manually the script ? Regards, Claude - Altera_Forum
Honored Contributor
Hi,
I modified "mem_init.mk" in the bsp directory, then created a patch that I apply it automatically in "create_bsp.sh". Hope that helps, -- Alex - Altera_Forum
Honored Contributor
It might be possible to replace the 'elf2hex' binary seen by the script (eg put it earlier in $PATH) to an executable shell script that contians:
where 'full_path' is the real location of the program.#!/bin/sh exec /full_path/elf2hex --record=4 "$@"