Psas

From Wiki at Neela Nurseries
Jump to navigation Jump to search

Portland State Aerospace Society

2025 Q3

Electromechanical Recovery System

Kicad

Link to Kicad installation instructions page.

ERS board TODO

[ ] create board files for ERS board as of LV3.1-recovery

[ ] add device tree code to select and to enable MCU debug UART

[ ] add a DTS compatible type or entity to group GPIOs together in primary ERS dts file

Comparing flash invocation ChibiOS versus Zephyr

ChibiOS ERS make file gives:

ted@localhost:~/projects/psas/psas-avionics/lv3.1-recovery/controlSystem/RecoveryBoard/firmware$ make write
openocd -f toolchain/oocd.cfg -c "program ./build/recovery-firmware.hex verify reset exit"
Open On-Chip Debugger 0.11.0-rc2+dev-00002-g427552c07-dirty (2021-01-30-10:36)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
Info : clock speed 1000 kHz
Info : STLINK V3J8M3B5S1 (API v3) VID:PID 0483:374F
Info : Target voltage: 3.323200
Info : stm32f0x.cpu: hardware has 4 breakpoints, 2 watchpoints
Info : starting gdb server for stm32f0x.cpu on 3333
Info : Listening on port 3333 for gdb connections
target halted due to debug-request, current mode: Thread 
xPSR: 0xc1000000 pc: 0x08000190 msp: 0x20000200
** Programming Started **
Info : device id = 0x10006442
Info : flash size = 256kbytes
** Programming Finished **
** Verify Started **
** Verified OK **
** Resetting Target **
shutdown command invoked

To flash Zephyr based app using same openocd call gives:

ted@localhost:~/projects/zephyr-project/psas-ers-firmware/samples/hello-world$ openocd -f /home/ted/projects/psas/psas-avionics/lv3.1-recovery/controlSystem/RecoveryBoard/firmware/toolchain/oocd.cfg -c "program ./build/zephyr/zephyr.hex verify reset exit"
Open On-Chip Debugger 0.11.0-rc2+dev-00002-g427552c07-dirty (2021-01-30-10:36)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
Info : clock speed 1000 kHz
Info : STLINK V3J8M3B5S1 (API v3) VID:PID 0483:374F
Info : Target voltage: 3.312000
Info : stm32f0x.cpu: hardware has 4 breakpoints, 2 watchpoints
Info : starting gdb server for stm32f0x.cpu on 3333
Info : Listening on port 3333 for gdb connections
target halted due to debug-request, current mode: Thread 
xPSR: 0xc1000000 pc: 0x08000190 msp: 0x20000200
** Programming Started **
Info : device id = 0x10006442
Info : flash size = 256kbytes
** Programming Finished **
** Verify Started **
** Verified OK **
** Resetting Target **
shutdown command invoked

Bindings files and Zephyr

Newer way of doing things with GPIO properties, Zephyr 4.2.0 . . .

  • "./dts/bindings/pinctrl/nxp,s32k3-pinctrl.yaml" 115 lines

CAN Bus Sample App

  • zephyr/samples/drivers/can/babbling/src

File `zephyr/dts/arm/st/f0/stm32f091.dtsi` defines a node named `can1`. Node is disabled in this overlay file.