Hi Mayank,toggle quoted messageShow quoted text
I am surprised to say this doesn't appear to be covered in the MCUboot
David, did I miss it somewhere?
Mayank: you need at least three pins connecting the i.MX and nRF chips:
- UART TX
- UART RX
- a "serial detect" GPIO
The i.MX chip also needs to be able to reset the nRF chip, e.g. with
another i.MX GPIO connected to the nRF reset pin.
(If you have already manufactured your PCB and don't have those required
features, then you're out of luck, I'm afraid. You'll have to use
something like the smp_svr app.)
You need to customize your MCUboot build for your board so the
bootloader reads your serial detect pin at reset and drops into serial
recovery mode if it is asserted. The mcumgr serial protocol is used to
do the update itself.
Assuming the mcuboot kconfig help is still accurate, you need to set
your MCUboot Kconfig knobs roughly like so:
CONFIG_BOOT_SERIAL_DETECT_PORT="GPIO_0" # or GPIO_1 if your pin is on that port
Also make sure your zephyr,console chosen node in devicetree is the
nRF52840 UART you want to use, and that its TX/RX pins are set correctly
in DT as well.
Once configured in this way, you need to build and reflash MCUboot on the nRF.
On the i.MX side, to do an update, you need to do something like this:
1. assert the serial detect pin
2. reset the nRF SoC
3. use the mcumgr serial transport protocol to upload an update
4. deassert the serial detect pin (this just needs to happen sometime
after mcuboot has read it out of reset)
5. use mcumgr to reset the nRF with serial detect deasserted,
to boot into the new image
You may find the west build + west sign + mcumgr command lines on this
If you are running Linux and can get golang programs running on the
i.MX, you should be able to get mcumgr running and adapt the 'mcumgr ...
image upload' and 'mcumgr ... reset' lines from there.
Hope this helps!
"Mayank via Lists.Zephyrproject.Org"