File tree Expand file tree Collapse file tree 7 files changed +65
-0
lines changed Expand file tree Collapse file tree 7 files changed +65
-0
lines changed Original file line number Diff line number Diff line change 1+ on :
2+ - push
3+
4+ jobs :
5+ build :
6+ runs-on : ubuntu-latest
7+ steps :
8+ - uses : actions/checkout@v4
9+
10+ - name : Install toolchain
11+ run : |
12+ wget https://github.com/dinuxbg/gnupru/releases/download/2025.05/pru-elf-2025.05.amd64.tar.xz
13+ tar xJf pru-elf-2025.05.amd64.tar.xz
14+ echo "$(pwd)/pru-elf/bin" >> $GITHUB_PATH
15+
16+ - name : Compile project
17+ run : make
18+
19+ - uses : actions/upload-artifact@v4
20+ with :
21+ name : pru_ledpwm
22+ path : pru_ledpwm.*
Original file line number Diff line number Diff line change 1+ * .o
2+ * .elf
3+ * .bin
Original file line number Diff line number Diff line change 1+ CC = pru-gcc
2+ OBJCOPY = pru-objcopy
3+ BUILD_TARGET = pru_ledpwm
4+
5+ ASFLAGS += -g
6+ CFLAGS += -g -Wall -Wno-main -Os
7+ LDFLAGS += -g -nostdlib -mmcu=am1808.pru1.specs
8+
9+ .PHONY : all clean
10+
11+ all : $(BUILD_TARGET ) .bin
12+
13+ $(BUILD_TARGET ) .bin : $(BUILD_TARGET ) .elf
14+
15+ $(BUILD_TARGET ) .elf : start.o main.o
16+ $(CC ) $(LDFLAGS ) -o $@ $+
17+
18+ % .bin : % .elf
19+ $(OBJCOPY ) -O binary $< $@
20+
21+ clean :
22+ rm -rf * .o * .elf * .bin
Original file line number Diff line number Diff line change 1+ *cpp_device:
2+ -D__AM1808_PRU0__ -D__AM1808__
3+
4+ *link_device:
5+ %{!r:--gc-sections --defsym=__IMEM_SIZE=4K --defsym=__DMEM_SIZE=512 --defsym=__HEAP_SIZE=0 --defsym=__STACK_SIZE=32 -z common-page-size=4 -z max-page-size=8}
Original file line number Diff line number Diff line change 1+ *cpp_device:
2+ -D__AM1808_PRU1__ -D__AM1808__
3+
4+ *link_device:
5+ %{!r:--gc-sections --defsym=__IMEM_SIZE=4K --defsym=__DMEM_SIZE=512 --defsym=__HEAP_SIZE=0 --defsym=__STACK_SIZE=32 -z common-page-size=4 -z max-page-size=8}
Original file line number Diff line number Diff line change 1+ void main () {
2+ __halt ();
3+ }
Original file line number Diff line number Diff line change 1+ .sect ".init0"
2+ .global _start
3+
4+ _start:
5+ jmp main
You can’t perform that action at this time.
0 commit comments