I have a build environment variable available, let's say for differentiating 2 hardware variants: HW_VER1
We are using linker script in build.
So, we want something like this. But, of course below gives error "invalid syntax in flags"
MEMORY
{
ifeq ($(HW_VER1),YES)
iram0_0_seg : org = 0x00080400, len = 0x21C00
else
iram0_0_seg : org = 0x00080400, len = 0xf1C00
endif
}
The requirement is not to use 2 linker scripts with the same exact contents, except the len value above, and let build system decide which one based on the env variable (the one with bigger len or smaller len based on the hw ver)