Add library build and update via CLI

pico-sdk-lib/build.sh will compile a libpico.a file from scratch using
the selected pico SDK directory.
parent 2a80cfaa
......@@ -62,8 +62,13 @@ pico_stdlib
pico_unique_id
tinyusb
)
add_custom_command(TARGET pico PRE_BUILD
COMMAND ../../system/arm-none-eabi/bin/arm-none-eabi-gcc -g -c ../../assembly/crt0.S -I ../../pico-sdk/src/rp2040/hardware_regs/include -I ../../pico-sdk/src/common/pico_binary_info/include/
)
add_custom_command(TARGET pico POST_BUILD
COMMAND ar dv libpico.a stdio_uart.c.obj stdio.c.obj printf.c.obj
COMMAND ar d libpico.a crt0.S.obj
COMMAND ar r libpico.a crt0.o
)
# COMMAND ar dv libpico.a stdio_uart.c.obj stdio.c.obj printf.c.obj
......@@ -106,7 +106,7 @@ archive_file_path={build.path}/{archive_file}
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
## Combine gc-sections, archives, and objects
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-Wl,--script={build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} "{build.path}/{archive_file}" {runtime.platform.path}/lib/pico.a -lm -I{runtime.platform.path}/pico-sdk/src/rp2040/hardware_regs/include/ -I{runtime.platform.path}/pico-sdk/src/common/pico_binary_info/include {runtime.platform.path}/assembly/bs2_default_padded_checksummed.S
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-Wl,--script={build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} "{build.path}/{archive_file}" {runtime.platform.path}/lib/libpico.a -lm -I{runtime.platform.path}/pico-sdk/src/rp2040/hardware_regs/include/ -I{runtime.platform.path}/pico-sdk/src/common/pico_binary_info/include {runtime.platform.path}/assembly/bs2_default_padded_checksummed.S
## Create output (UF2 file)
recipe.objcopy.uf2.pattern="{runtime.tools.pqt-elf2uf2.path}/elf2uf2" "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.uf2"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment