Add this fix to compile projects for 8051


in the Environment.py file, add the highlighted code so that you can compile projects for 8051 with this flag “build_flags = -Wl,!–model-large --model-large”

new version


Environment.py file

piobuild.py file

add the highlighted code so that you can compile projects for 8051 with this flag:

build_flags = -Wl_,–model-large,--acall-ajmp --model-large

or

build_flags = -Wl_,–model-large,--acall-ajmp
build_src_flags = –model-large

You might want to open an issue at GitHub - platformio/platform-intel_mcs51: Intel MCS-51 (8051): development platform for PlatformIO to get this into the platform and more easily configured

yes i already added it
env["LINKFLAGS"]=str(env["LINKFLAGS"]).replace(" -Wl,"," ").replace(","," ")
but it would be nice if the base handler for all platforms set the flags correctly