Skip to content

Commit f9ef70f

Browse files
authored
Merge pull request #21 from snegovick/master
Fix build on debian
2 parents 2769b98 + c4ae6ae commit f9ef70f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

example/build.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ mkdir -p obj
88
#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
99
#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
1010

11-
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
12-
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
13-
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
11+
riscv64-unknown-elf-gcc -g -O0 -ffunction-sections -static-libgcc -lgcc -march=rv32ec_zicsr -mabi=ilp32e -I/usr/include/newlib -nostdlib -I. -Wall -c ch32v003fun.c -o obj/ch32v003fun.o
12+
riscv64-unknown-elf-g++ -g -O0 -ffunction-sections -static-libgcc -lgcc -march=rv32ec_zicsr -mabi=ilp32e -I/usr/include/newlib -nostdlib -I. -Wall -c blink.cpp -o obj/blink.o
13+
riscv64-unknown-elf-g++ -g -O0 -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
1414

1515
riscv64-unknown-elf-size bin/blink.elf
1616
riscv64-unknown-elf-objdump -S bin/blink.elf > bin/blink.lst

src/PicoSWIO.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ void PicoSWIO::reset(int pin) {
5858
// If we use the sdk functions to do this we get jitter :/
5959
sio_hw->gpio_clr = (1 << pin);
6060
sio_hw->gpio_oe_set = (1 << pin);
61-
iobank0_hw->io[pin].ctrl = GPIO_FUNC_SIO << IO_BANK0_GPIO0_CTRL_FUNCSEL_LSB;
61+
io_bank0_hw->io[pin].ctrl = GPIO_FUNC_SIO << IO_BANK0_GPIO0_CTRL_FUNCSEL_LSB;
6262
busy_wait(100); // ~8 usec
6363
sio_hw->gpio_oe_clr = (1 << pin);
64-
iobank0_hw->io[pin].ctrl = GPIO_FUNC_PIO0 << IO_BANK0_GPIO0_CTRL_FUNCSEL_LSB;
64+
io_bank0_hw->io[pin].ctrl = GPIO_FUNC_PIO0 << IO_BANK0_GPIO0_CTRL_FUNCSEL_LSB;
6565

6666
// Enable debug output pin on target
6767
put(WCH_DM_SHDWCFGR, 0x5AA50400);

0 commit comments

Comments
 (0)