altos: Use --gc-sections This allows the linker to discard unused functions. Don't use -ffunctions-sections and -fdata-sections as that eliminates several optimization opportunities and increases code size. Signed-off-by: Keith Packard <keithp@keithp.com>
altos: Add -Wconversion This adds the -Wconversion flag to detect potential mistakes in implicit type conversion. Signed-off-by: Keith Packard <keithp@keithp.com>
altos: Leave floating printf enabled on m3 devices These devices all use floating point computations, so leave the floating point printf included in case they print one of those values. If we run short on flash space, we can switch back. Signed-off-by: Keith Packard <keithp@keithp.com>
altos: Move from newlib-nano to picolibc Use picolibc.ld, which involved some .ld file hacking, including: 1) Defining ao_boot RAM address in the .ld file and declaring it 'extern' 2) Changing how m0 interrupt vector got moved to ram 3) Using -Taltos.ld instead of -Wl,-Taltos.ld so picolibc.specs wouldn't add picolibc.ld 4) Placing romconfig vars in '.init.1' and '.init.2' sections instead of '.romconfig' 5) Place code needing to run out of RAM in section .srodata instead of .ramtext Signed-off-by: Keith Packard <keithp@keithp.com>
Create map file for all programs
altos: Allow applications to override newlib printf selection Re-defining NEWLIB_PRINTF_CFLAGS will allow applications to select printf with floating point support if desired. Signed-off-by: Keith Packard <keithp@keithp.com>
altos: Move common build definitions to src/Makefile.defs This cleans up the build process for all architectures, providing a common place to specify vpath, cflags and build rules for various common files. Signed-off-by: Keith Packard <keithp@keithp.com>