Skip to content

squadracorsepolito/SCarrellino

Repository files navigation

SCarrellino - Charging Handcart ECU

This repo contains the firmware and bootloader for the SCarrellino device.

3d_pcb_view

Important Notes

This device will use the same XCP CAN ids as DSPACE since it's doing the same job on the handcart.

Develop

PLEASE STOP USING CRLF LINE ENDING : use LF as normal people do

Git can handle this for you correctly!

If you want it configured for this project only use --local otherwise for your whole system use --global.

  • On windows: git config --local core.autocrlf=true
  • On Linux/OSX: git config --local core.autocrlf=input

Checkout out either this or this for more information.

Don't use .gitattributes it gets messy very quickly.

Dependencies

  • arm-none-eabi-gdb, arm-none-eabi-gcc, arm-none-eabi-newlib,arm-none-eabi-binutils: ARM toolchain necessary to compile and debug the firmware
  • make: or similar
  • openocd: to flash the firmware on the target via a debug probe (STLINK)
  • bootcommander, libopenblt: to flash the firmware via can-bus

Build

If all the software dependencies are available through $PATH

make

otherwise specify them via:

make GCC_PATH=/<path_to_compiler>

This will build the firmware to be flashed via openocd and a debug probe (STLINK)

Build Bootloader

All software dependencies must be available in $PATH

cd ./openblt_f446re
make
cd ..

This will build the Bootloader firmware to be flashed via openocd and a debug probe (STLINK)

Flash

Two approaches for flashing:

  • Baremetal no bootloader
  • Bootloader + flash via can

Baremetal no bootloader

Make sure the debug probe is attached to the target and they see each other. To verify this run this command from the project rootdir:

openocd -f openocd.cfg

It should look something like this:

TODO add openocd status

Make sure you have openocd dependency in $PATH.

make flash

otherwise specify the path via:

make flash OPENOCD_PATH=/<openocd_path>

Bootloader + flash via can

First flash the bootloader on the device (all dependencies must be in $PATH, the debugger probe must be able to talk to the target see before)

cd ./openblt_f446re
make flash
cd ..

Then connect the sensorboard device on a CAN bus network where you can send and receive data.

make can_flash

If bootcommander dependency is not in $PATH specify it like this:

make can_flash BOOTCOMMANDER_PATH=/<path_to_bootcomamnder_dir>

About

SC - HV battery pack charging-handcart ECU

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages