Open zaoshang67dian opened 1 year ago
been a long time since I looked at this, but have a look at the SDCC User Guide section 3.3.6 MCS51 Options
--model-large Generate code for Large model programs, see section Memory Models for more details. If this option is used all source files in the project have to be compiled with this option. It must also be used when invoking the linker
also must pass this option to linker
might be -Wl
?
https://docs.platformio.org/en/stable/projectconf/sections/env/options/build/build_flags.html#scopes-scons-variables
been a long time since I looked at this, but have a look at the SDCC User Guide section 3.3.6 MCS51 Options
--model-large Generate code for Large model programs, see section Memory Models for more details. If this option is used all source files in the project have to be compiled with this option. It must also be used when invoking the linker
also must pass this option to linker might be
-Wl
? https://docs.platformio.org/en/stable/projectconf/sections/env/options/build/build_flags.html#scopes-scons-variables
the option of SDCC -Wl i have tried。 but unfortunatly it does not work. config: build_flags = --model-large -Wl,--model-large
output:
Building in release mode
sdcc -o .pio/build/RD8T37P48R/src/main.rel -c --std-sdcc11 --opt-code-size --peep-return -mmcs51 --model-large -DF_CPU=32000000L -DHEAP_SIZE=128 -DPLATFORMIO=60111 -DRD8T3X -DRD8T37P48R -DNAKED_ARCH_MCS51 -DNAKED_MCS51_STC8G2KXXS4 -Iinclude -Isrc src/main.c
src/main.c:11: warning 85: in function main unreferenced local variable : 'i'
sdcc -o .pio/build/RD8T37P48R/firmware.hex -mmcs51 --iram-size 256 --xram-size 8448 --code-size 131072 --out-fmt-ihx -Wl,--model-large .pio/build/RD8T37P48R/src/main.rel -L.pio/build/RD8T37P48R
?ASlink-Error-
[env:STC8G2K64S4] platform = intel_mcs51 board = STC8G2K64S4 board_build.f_cpu = 35000000L build_flags = --model-large
I get the error: ?ASlink-Warning-Conflicting sdcc options: "-mmcs51 --model-large" in module "main" and "-mmcs51 --model-small" in module "_startup". *** [.pio/build/STC8G2K64S4/firmware.hex] Error 1
what "_startup" is ?