golden-gate
golden-gate copied to clipboard
Cortex-M4 Code Migrating
Hi,
We are trying to migrate golden-gate to a Cotex-M4 chip (GR5515, this chip is very cheap). I notice there are source code for NRF52840 in golden-gate/platform/mynewt/apps/gg-tool/apps/gg_central/src/ . But I did't see any code from NRF52840 lib in main.c. How does golden-gate migrate to NRF52840 board? Could you explain the blueprint behind the code?
Thanks!
Hi,
sorry for taking so long to respond.
Porting to a new platform requires mainly two things:
1/ Ensure that there are implementations of the abstraction layers for the OS/RTOS that runs on your target platform. Some of the existing abstraction layer implementations (the code that's found under a 'port/xxx' directory, most of them are under xp/common/ports/...) may already be compatible with your target OS (windows, macOS, iOS, Android, Linux, MyNewt, FreeRTOS,...).
2/ Interfacing with the Bluetooth APIs on your platform. Same as for the OS abstraction layer, the existing Bluetooth bindings that are included in the project may already be compatible with your OS (for example, several RTOS paltforms use the Nimble Bluetooth stack, for which this project already includes bindings).
For example, the port to the nrf52840 is currently done by compiling as a MyNewt app, with the Nimble BLE API. The code for that port lives under platform/mynewt.
Do you know which OS/RTOS you will be running, and what Bluetooth APIs are available?
Thanks for reply! We haven't decide to use which OS yet. I got a Nordic nRF52840 DK Development Kit.
We I use 'invoke pylon.provision' command, I got error as below:
"Building target targets/boot_nrf52840pdk
Target successfully built: targets/boot_nrf52840pdk
cp: cannot stat 'platform/mynewt/apps/gg-tool/bin/targets/boot_nrf52840pdk/app/boot/mynewt/mynewt.elf.bin': No such file or directory"
I am not sure the evidence is normal or not.
After that I use "newt run gg_peripheral_nrf52840pdk" command to run the app on my Nordic nRF52840 DK. It shows the firmware was running correctly, but my GoldenGateHost app on my Android phone couldn't scan the device correctly.

Thanks!