1

I want to reprogram the external flash of a raspberry Pico via SWD line. This feature must be implemented in a different microcontroller, not from a Linux computer so the OpenOCD library cannot be used.

I already wrote a C library that is able to read and write in RAM and in core registers via SWD and I'm able to put the Cortex-M0+ into halt state.

I read many tutorials and documentation and those that are useful are:

but unfortunately they aren't clear enough.

Can you explain the sequence of commands that I should send to RP2040 to correctly upload the new firmware?

Thanks for your help!

Jonas
  • 121,568
  • 97
  • 310
  • 388
Luca
  • 61
  • 1
  • 7
  • I realise this is not a direct answer to the question, but why not write a bootloader for the RP2040 and flash the new firmware from that? You could then use whatever interface was convenient for the transfer of the data. This scheme would also give you the opportunity to e.g. CRC check the update and abort if it fails. – cooperised Nov 15 '21 at 14:36
  • I would prefer to not touch the RP side, but actually It is a very good tips! I take it into account. – Luca Nov 15 '21 at 16:27

0 Answers0