Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
aappleby committed Oct 6, 2023
1 parent 1d37787 commit 9933fe4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
cmake_minimum_required(VERSION 3.13)

set(PICO_SDK_FETCH_FROM_GIT on)
include(pico_sdk_import.cmake)

project(PicoRVD C CXX ASM)
Expand Down
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#rm -rf bin
#mkdir -p bin
(cd example; ./build.sh)
cmake -B bin && make -j8 -C bin
6 changes: 3 additions & 3 deletions example/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ rm -rf bin
rm -rf obj
mkdir -p bin
mkdir -p obj
riscv64-unknown-elf-gcc -g -O0 -flto -ffunction-sections -static-libgcc -lgcc -march=rv32ec -mabi=ilp32e -I/usr/include/newlib -nostdlib -I. -Wall -c ch32v003fun.c -o obj/ch32v003fun.o
riscv64-unknown-elf-g++ -g -O0 -flto -ffunction-sections -static-libgcc -lgcc -march=rv32ec -mabi=ilp32e -I/usr/include/newlib -nostdlib -I. -Wall -c blink.cpp -o obj/blink.o
riscv64-unknown-elf-g++ -g -O0 -flto -ffunction-sections -static-libgcc -lgcc -march=rv32ec -mabi=ilp32e -I/usr/include/newlib -nostdlib -I. -Wall -T ch32v003fun.ld -Wl,--gc-sections -L. -o bin/blink.elf obj/ch32v003fun.o obj/blink.o -lgcc
riscv64-unknown-elf-gcc -g -O0 -flto -ffunction-sections -static-libgcc -lgcc -march=rv32ec_zicsr -mabi=ilp32e -I/usr/include/newlib -nostdlib -I. -Wall -c ch32v003fun.c -o obj/ch32v003fun.o
riscv64-unknown-elf-g++ -g -O0 -flto -ffunction-sections -static-libgcc -lgcc -march=rv32ec_zicsr -mabi=ilp32e -I/usr/include/newlib -nostdlib -I. -Wall -c blink.cpp -o obj/blink.o
riscv64-unknown-elf-g++ -g -O0 -flto -ffunction-sections -static-libgcc -lgcc -march=rv32ec_zicsr -mabi=ilp32e -I/usr/include/newlib -nostdlib -I. -Wall -T ch32v003fun.ld -Wl,--gc-sections -L. -o bin/blink.elf obj/ch32v003fun.o obj/blink.o -lgcc
riscv64-unknown-elf-size bin/blink.elf
riscv64-unknown-elf-objdump -S bin/blink.elf > bin/blink.lst
riscv64-unknown-elf-objdump -t bin/blink.elf > bin/blink.map
Expand Down

0 comments on commit 9933fe4

Please sign in to comment.