Skip to content

Commit

Permalink
Docker compose ner-gcc-arm (#109)
Browse files Browse the repository at this point in the history
* Add build automation
* Integrated with other repos
  • Loading branch information
jr1221 authored Apr 9, 2024
1 parent 23f3297 commit bac1ad0
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_cerberus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
run-build:
runs-on: ubuntu-latest
container:
image: nwdepatie/ner-gcc-arm:latest
image: ghcr.io/northeastern-electric-racing/embedded-base:docker-compose
timeout-minutes: 10
steps:
- name: Clone Cerberus
Expand Down
3 changes: 1 addition & 2 deletions dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ COPY ./scripts .

RUN echo "source /home/dev/scripts/alias.sh" >> ~/.bashrc

# for usb/ip comms and get binary symlinked
EXPOSE 3240
# for usb/ip
RUN ln -sf /usr/lib/linux-tools-*/* /usr/bin/

# Install cross compiler
Expand Down
34 changes: 1 addition & 33 deletions dev/scripts/alias.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,36 +1,4 @@
if [ $n -e /home/app/shepherd2.ioc ]; then echo \
" ______ __ __ ______ ______ __ __ ______ ______ _____
/\ ___\ /\ \_\ \ /\ ___\ /\ == \ /\ \_\ \ /\ ___\ /\ == \ /\ __-.
\ \___ \ \ \ __ \ \ \ __\ \ \ _-/ \ \ __ \ \ \ __\ \ \ __< \ \ \/\ \
\/\_____\ \ \_\ \_\ \ \_____\ \ \_\ \ \_\ \_\ \ \_____\ \ \_\ \_\ \ \____-
\/_____/ \/_/\/_/ \/_____/ \/_/ \/_/\/_/ \/_____/ \/_/ /_/ \/____/"; fi;

if [ $n -e /home/app/cerberus.ioc ]; then echo \
"_________ ___
\_ ___ \ __________\_ |__ ___________ __ __ ______
/ \ \/_/ __ \_ __ \ __ \_/ __ \_ __ \ | \/ ___/
\ \___\ ___/| | \/ \_\ \ ___/| | \/ | /\___ \
\______ /\___ >__| |___ /\___ >__| |____//____ >
\/ \/ \/ \/ \/ "; fi;

if [ $n -e /home/app/proteus.ioc ]; then echo \
" _______ ______ _______ _______ _______ __ __ _______
| || _ | | || || || | | || |
| _ || | || | _ ||_ _|| ___|| | | || _____|
| |_| || |_||_ | | | | | | | |___ | |_| || |_____
| ___|| __ || |_| | | | | ___|| ||_____ |
| | | | | || | | | | |___ | | _____| |
|___| |___| |_||_______| |___| |_______||_______||_______|"; fi;

if [ $n -e /home/app/Charger-FW.ioc ]; then echo \
" /###### /####### /###### /## /##
|_ ##_/| ##__ ## /##__ ##| ## | ##
| ## | ## \ ##| ## \ ##| ## | ##
| ## | #######/| ## | ##| ########
| ## | ##__ ##| ## | ##| ##__ ##
| ## | ## \ ##| ## | ##| ## | ##
/######| ## | ##| ######/| ## | ##
|______/|__/ |__/ \______/ |__/ |__/"; fi;
cat "/home/app/art"

alias serial='/home/dev/scripts/serial.sh'
alias flash='/home/dev/scripts/flash.sh'
Expand Down
Empty file modified dev/scripts/emulate.sh
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion dev/scripts/flash.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ elf_file=$(ls /home/app/build/*.elf)

printf "$elf_file"

openocd -f interface/cmsis-dap.cfg -f target/stm32f4x.cfg -c "adapter speed 5000" -c "program $elf_file verify reset exit"
openocd -f interface/cmsis-dap.cfg -f target/"$STM_TARGET_NAME"x.cfg -c "adapter speed 5000" -c "program $elf_file verify reset exit"
2 changes: 1 addition & 1 deletion dev/scripts/gdb.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ elf_file=$(ls /home/app/build/*.elf)

printf "$elf_file"

openocd -f interface/cmsis-dap.cfg -f target/stm32f4x.cfg -c "adapter speed 5000" -c "init" -c "reset halt" & sleep 1 && arm-none-eabi-gdb $elf_file -ex "target remote localhost:3333"
openocd -f interface/cmsis-dap.cfg -f target/"$STM_TARGET_NAME"x.cfg -c "adapter speed 5000" -c "init" -c "reset halt" & sleep 1 && arm-none-eabi-gdb $elf_file -ex "target remote localhost:3333"

kill $(pidof openocd)
10 changes: 1 addition & 9 deletions dev/scripts/ody-connect.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
#!/bin/bash

if [ $n -e /home/app/shepherd2.ioc ]
then
usbip attach -r 192.168.100.12 -b 1-1.4
elif [ $n -e /home/app/cerberus.ioc ]
then
usbip attach -r 192.168.100.12 -b 1-1.3
else
echo "No project found, to connect to usb port X at tpu IP P: usbip attach -r P -b 1-1.X"
fi
usbip attach -r 192.168.100.12 -b "$USPIP_PORT"
Empty file modified dev/scripts/serial.sh
100644 → 100755
Empty file.

0 comments on commit bac1ad0

Please sign in to comment.