Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instructions for initial programming of Dash #1

Open
rbalik opened this issue May 10, 2018 · 6 comments

Comments

@rbalik
Copy link

commented May 10, 2018

The first time you program a Dash after manufacturing, it can't be done via USB and must use the SWD pins. We have a procedure to do this via openocd on the Raspberry Pi and should document it for open source users.
This should also include some suggestions for items to test to make sure the board is functioning properly.

@1tron1

This comment has been minimized.

Copy link

commented Jun 5, 2018

@rbalik is there any update on this? We're interested in using the Ublox module but adding BT and Wifi chipset on board and so any help on this front would help us get our new boards up and going with Holo quicker.

@rbalik

This comment has been minimized.

Copy link
Author

commented Jun 8, 2018

Sorry that I haven't had a chance to get this all written up yet. I might be able to put something together over the next few days.

@1tron1

This comment has been minimized.

Copy link

commented Jun 12, 2018

@rbalik thanks!

@rbalik

This comment has been minimized.

Copy link
Author

commented Jun 22, 2018

So for now I'm going to drop some notes in here so people can get started and then can work on a more formal doc over the coming weeks.

So the way initial programming works is you have to program the user and system micros by plugging in certain pins into the raspberry pi and using openocd to write to the flash on each micro.

Here are the pins to plug in (note this only works with the Dash 1.2):

Dash -> RPi
R18 (SYS SWD CLK) -> BCM 25 (22)
L18 (SYS SWD IO) -> BCM 24 (18)
R10 (SYS RESET) -> BCM 18 (12)
L17 (USR SWD CLK) -> BCM 21 (40)
L16 (USR SWD IO) -> BCM 20 (38)
L15 (USR RESET) -> BCM 16 (36)
R2 (GND) -> GND (6)

These next two are optional, but we use them in the factory to easily run some tests and verify installation is ok. You can do this over USB instead if you want. (You might also need to reconfigure something on the pi for these pins to show up as a serial port)

L08 (UART TX) -> BCM 15 (10)
L06 (UART RX) -> BCM 14 (8)

You'll need to compile openocd from source on the Pi because the version in apt doesn't support everything needed. Fortunately there are instructions for this here: https://movr0.com/2016/09/02/use-raspberry-pi-23-as-a-jtagswd-adapter/

Openocd config files are attached here:
openocd-dashconfig.tar.gz

Firmware binaries are here
dashfirmware.tar.gz

The commands you'll run are:
sudo openocd -f system0.cfg -f system_boot.cfg -c program dash_system_module_firmware_0.10.1.bin 0x6000 verify reset exit

sudo openocd -f user0.cfg -f user_boot.cfg -c program repl_0.11.0.bin 0x8000 verify reset exit

Let me know if you run into any trouble here. I'll try to put this into a better formatted doc soon.

@labiancoCgi

This comment has been minimized.

Copy link

commented Apr 3, 2019

Hi @rbalik, I am trying to program the Dash MCUs by using the JLINK J-flash lite. Is there any reason why this would not work?

If not, do you know the initial address at which to program the binaries.

Thanks!

@rbalik

This comment has been minimized.

Copy link
Author

commented Apr 23, 2019

Been a while since I looked at this but it seems like it should work if you're using the right pins. I think the addresses in those openocd commands are the starting addresses

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.