adafruit / Adafruit_nRF52_Bootloader

USB-enabled bootloaders for the nRF52 BLE SoC chips
MIT License
445 stars 401 forks source link

S340 for nrf52840 feather #124

Closed orrmany closed 4 years ago

orrmany commented 4 years ago

Hi,

In connection to PR #494 for Adafruit_nRF52_Arduino here comes the PR for the bootloader.

I would like to ask for some modifications to the nRF52 bootloader for making it easier to use nRF52840 Express with BLE & ANT+ protocol stacks together. That necessitates modificiations to the bootloader to have the S340 BLE & ANT multiprotocol SoftDevice (SD) instead of the stock S140 SD. (which will come in a separate PR, since that is a different repo). The modification leaves S140 in place, since instead of replacing S140, it rather defines a new board type "feather_nrf52840_express_s340" for S340.

I believe that these changes together with PR #494 for Adafruit_nRF52_Arduino makes possible to reuse all Bluefruit52 code as-is with S340 and enables ANT+ communication.

Of course, in order to be able to build the firmware for S340 one needs to register at thisisant.com, obtain the license and download the softdevice. A readme.txt has been added to the repo describing where and how shall the user insert the S340 header and hex files into the source tree.

You can read further details at my Wiki below (Note, those articles were written a few months ago, so they reflect an earlier SW version of your code):

Credit shall also go to @rtgree01 (Ryan Green) who made most of the early hacks of these and he kindly shared his results with me and @cujomalainey Curtis Malainey.

orrmany commented 4 years ago

Now, this is interesting: the CI check step 'build' for "feather_nrf52840_express_s340" has been failed, since I have not added the license-bound S340 files. As such, this build-failure is "intentious". Advice how to handle this situation would be highly appreciated.

orrmany commented 4 years ago

@hathach: any advice how to solve this "we need a skeleton board" situation here?

hathach commented 4 years ago

Thank you for your PR, we are currently decoupling the Softdevice from bootloader (still in the making) https://github.com/adafruit/Adafruit_nRF52_Bootloader/issues/126 It will allow you or any other users to replace softdevice with any other stack of choice e.g S340. Therefore this PR wouldn't be needed for you to add S340 support to existing board. Though I will leave it open until we got the new release out.

orrmany commented 4 years ago

Hi @hathach , I am not sure if I understand the USB lingo in issue #126, I am sorry. Basically this is my use case:

Suppose that I, as an Adafruit customer, previously purchased an Adafruit MCU with an nRF52 SoC onboard.

Now, also suppose that I, as an Arduino developer, would like to be able replace the stock SoftDevice (SD) delivered with product with a multiprotocol SD alternative, if such one exists. nRF52832, or nRF52840 are multiprotocol capable, for example.

I would like to retain all legacy Adafruit functionality with the alternative, multiprotocol SoftDevices, since the functionality of the alternative SD-s are extensions of that of their lesser (BLE only) counterparts. That is, I would like to use CircuitPython, DFU, Bluefruit, etc. with the multiprotocol SD-s.

Furthermore I would like to retain the DFU capability over serial. For example, today I am using nRF52840 with a computer, where USB Mass Storage is blocked for administrative reasons. That is, UF2 (whatever UF2 means) is not an option for me.

Could you explain what of those checklist items of yours in issue #126 are applicable to my use case?

Thanks, Gábor

hathach commented 4 years ago

checkilist is test list,

orrmany commented 4 years ago

Ok. Btw: I only used jlink for unbricking occasionally. The modification here worked with plain serial DFU, as far as I remember.

Ha Thach notifications@github.com ezt írta (időpont: 2020. máj. 6., Sze, 19:48):

checkilist is test list,

  • cdc interface will work as it is right now.
  • UF2 currently only allows updating application, it will allow update application + softdevice + bootloader in later version. You can use it flash S340 (in form of uf2) to stock bootloader without the need of jlink

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/adafruit/Adafruit_nRF52_Bootloader/pull/124#issuecomment-624794380, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD3DSNC4L762MA7PYG5SZPDRQGPHHANCNFSM4MWORT6A .

hathach commented 4 years ago

closed, since we don't have hex, specs or any information to maintain the S340. In fact, we have no plan to maintain other SoftDevice than S140 and S132.