jamesmunns / nrf52dk-sys

A Rust Crate to develop on the Nordic nRF52-DK
MIT License
85 stars 19 forks source link

[WIP] Update to the recent embedded ecosystem #16

Closed eupn closed 4 years ago

eupn commented 5 years ago

Resolves #15.

Updated this crate to recent embedded ecosystem, including:

For now, only blinky example is working and tested, for others I have to go through some linking issues.

jamesmunns commented 5 years ago

Overall looks wonderful, thank you @eupn!

Could you please confirm that the other examples still work, particularly ble_app_template.rs? If that is good to go, I'm happy to merge this!

eupn commented 5 years ago

As I mentioned earlier, there are some linker issues with logging and BLE examples, as soon as I figure them out it is good to go.

mcvicuna commented 5 years ago

Is this a link issue due to having libc included by accident or is libc included on purpose?

dwaite commented 5 years ago

@eupn I played around with this a bit today. To device.x, I needed to add

GROUP(AS_NEEDED(-lgcc -lc -lnosys))

and to also define end (at least for sbrk). I did the following there, but my linker script fu is poor so I'm not sure this was correct.

PROVIDE(end = __sheap)

I went ahead and removed the start-group/end-group and library imports from .cargo/config as well as updating crates to their newest version.

My 52840DK board would step through in gdb but not flash lights for blinky, presumably because of the board difference. Trying to get 15.x SDK running is more than I want to bite off at this point in time. I didn't test the actual bluetooth example, just that it built.

eupn commented 5 years ago

@dwaite Hello and thank you for your time and effort! Could you please make a PR with those changes against my branch?

dwaite commented 5 years ago

Sure - I was reluctant to do a PR because I couldn't successfully test

eupn commented 5 years ago

@dwaite No problem! I have a board and can test your changes as soon as you make a PR.

erik-nymi commented 4 years ago

I was looking to use this crate for a prototype. Is this branch close to being merged?