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 (Custom) UART Bootloader to Hercules and Make it Programmable via RS422 via the Watchdog. #183

Open
5 tasks
zCoCo opened this issue Nov 16, 2022 · 0 comments
Labels
_CRITICAL Very important. Need this working ASAP. enhancement New feature or request FPrime FPrime on Hercules GSW-GDS Ground Data System int-test Integrated System Test Required WD Code changes to the WatchDog
Milestone

Comments

@zCoCo
Copy link
Member

zCoCo commented Nov 16, 2022

Allows us to refine and change Hercules operation as late as the Moon.

See #193 for supporting WD + GSW commanding infrastructure.

Critical Resources:

Helpful Resources:

Highlevel Process:

  • Get the demo UART bootloader for the HDK working on the HDK

  • Make the following modifications so that it could work in our system and test on HDK

  • Port to our SBC and test

  • Also will likely require custom GSW program to process the binary, pass all data as commands to WD, and generally manage the programming as was the case in Make Radio Programming Possible using BGAPI Passthrough via Hercules #152 (i.e. making sure all commands go through, in the right order, etc.).

  • Make sure there are no downstream consequences to how FreeRTOS kernel runs, etc (might use fixed memory addresses, which could be changed by addition of bootloader). Perform FreeRTOS Kernel health checks after everything else works.

Likely Needed Changes in bootloader and get working on the HDK:

  • Which UART (needs to be the one used with WD)
      • UART settings (needs to be WD UART settings: 57600 baud, etc)
  • Bootloader should send an I’ve booted message over UART (so WD knows it’s up) then wait for a response message over UART telling it whether to enter “user program” or bootloader “main menu” (instead of a push button / GPIO line - b/c I believe WD and Herc don’t share any besides reset lines).
    • This will require moving UART initialization to the top of the bootloader program.
    • WD can then send commands to “navigate” the bootloader “menu” from there (since it’s just fancy UART comms).
  • Ideally, data chunk size (so FW chunks can be sent in blocks that fit within the WD’s 512B maximum message size - technically 600B but requires some overhead)
  • Make sure there’s no timeout on the bootloader (make sure it won’t jump to the “user program” address if it waits for a couple minutes.

Other notes:

  • bl_config.h contains a lot of settings you can screw around with an might be a good place to start.
  • Lingering question: figure out how to program (using CCS) both a bootloader and our main program.
  • Cool side note: it says in the app note that this bootloader app was written by a dude named “QJ Wang”. Apparently, he has been active on the forums before so if we hit a road block, it’s not unthinkable that we could try to contact him.
@zCoCo zCoCo added enhancement New feature or request FPrime FPrime on Hercules _CRITICAL Very important. Need this working ASAP. GSW-GDS Ground Data System WD Code changes to the WatchDog int-test Integrated System Test Required labels Nov 16, 2022
@zCoCo zCoCo modified the milestones: RC6, RC7 Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
_CRITICAL Very important. Need this working ASAP. enhancement New feature or request FPrime FPrime on Hercules GSW-GDS Ground Data System int-test Integrated System Test Required WD Code changes to the WatchDog
Projects
None yet
Development

No branches or pull requests

1 participant