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

Cortex-M4 Code Migrating #47

Open
xygh opened this issue Feb 3, 2022 · 2 comments
Open

Cortex-M4 Code Migrating #47

xygh opened this issue Feb 3, 2022 · 2 comments

Comments

@xygh
Copy link

xygh commented Feb 3, 2022

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!

@xygh xygh changed the title Cotex-M4 Code Migrating Cortex-M4 Code Migrating Feb 3, 2022
@barbibulle
Copy link
Contributor

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?

@xygh
Copy link
Author

xygh commented Feb 20, 2022

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.
image

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants