electronut / ElectronutLabs-bluey

Nordic nRF52832 BLE development board with sensors.
Other
96 stars 54 forks source link

No support for Black Magic Probe to program the examples to Bluey #6

Closed EarthLord closed 7 years ago

EarthLord commented 7 years ago

Since Electronut is providing Bumpy, can Black Magic Probe (BMP) be supported for programming/debugging the Bluey with the examples provided?

For now I'm copying the examples provided along with bluey-common to the examples\ble_peripheral folder of nRF5 SDK 12.2.0. The compilation is successful in the /bluey1.2/s132/armgcc/ folder. Next I merge the s132 hex file and the compiled hex file with in the armgcc folder.

srec_cat ../../../../../../components/softdevice/s132/hex/s132_nrf52_3.0.0_softdevice.hex -Intel _build/nrf52832_xxaa.hex -Intel -O _build/full.hex -Intel --line-length=44

The programming of the merged hex file is done with BMP by the command

sudo arm-none-eabi-gdb -q -ex 'target extended-remote /dev/ttyBmpGdb' -ex 'monitor swdp_scan' -ex 'attach 1' -ex 'load' -ex 'compare-sections' -ex 'detach' -ex 'quit' _build/full.hex

This flashed the merged hex file but Bluey doesn't seem to work as intended. Post erasing all using this command also didn't work https://github.com/Appiko/nrf5x-firmware/blob/master/application/Makefile.common#L277

If there is an official way, I can follow that. Thanks.

rishi-electronut commented 7 years ago

bluey-sensor-test-BLE example was selected for bumpy test. The generated hex file was merged with softdevice to create a packaged application. Packaged application can be found towards the end of this post.

This application was transferred to bluey (completely erased chip). On execution, bluey advertised as Bluey-BLE successfully.

Following steps will walk you through the procedure employed to conduct above mentioned test.

mergehex -m s132-softdevice.hex bluey-ble.hex -o bluey-ble-pkg.hex

target extended-remote \\.\COM60 ............................... (\\.\ - issue in Windows for COM ports over 10)

monitor swdp_scan

attach 1

load bluey-ble-pkg.hex

run

bluey-ble-pkg.zip

EarthLord commented 7 years ago

This is essentially what I did, but with a different tool to merge the hex files. I tried using your merged hex from the zip that you've attached with a BMP, but that still isn't providing any advertisements on scanning.

Can the Makefile for the examples in a Linux environment be updated to use either JLink or BMP?

electronut commented 7 years ago

I downloaded the merged hex file and tried the same on OS X - works fine. So looks like either you are unable to erase your board somehow, or there is a hardware issue. It could be that the code is just crashing because a sensor is not responding via I2C...

electronut commented 7 years ago

@EarthLord - is the sensor_test (non BLE) working?

rishi-electronut commented 7 years ago

The above test was performed with a new board. Also, the package was uploaded to a bluey with blank chip directly using nRFgo Studio.

Bluey advertising successfully in both cases.

EarthLord commented 7 years ago

I'll check with another board later in the evening and let you now. If I figure out what's happening, I could send a pull request to add support to BMP in this repo in a Linux based environment.

electronut commented 7 years ago

Sure, thanks. We can replace the board if that's the issue.

Mahesh Venkitachalam Founder, Electronut Labs electronut.in

On Mon, Jul 24, 2017 at 3:50 PM, Prithvi Raj Narendra < notifications@github.com> wrote:

I'll check with another board later in the evening and let you now. If I figure out what's happening, I could send a pull request to add support to BMP in this repo in a Linux based environment.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/electronut/ElectronutLabs-bluey/issues/6#issuecomment-317380721, or mute the thread https://github.com/notifications/unsubscribe-auth/ADHwAh3beGMxcvEv9ipShovPnAam88Ddks5sRG_qgaJpZM4OgzB4 .

EarthLord commented 7 years ago

Ok, if I comment out all the TWI related activities in the bluey-beacon example I can get it to work. Seems like an issue with one of the sensors on this board. I'll work on adding the Bluey support to this repo. I'll add a default debugger in the Makefile and a user can change it when using the make command. Would this be fine?

electronut commented 7 years ago

Yes, sounds fine. Please drop the board at our office and we'll give you a new one.

That HDC1010 BGA chip is a pain. We're changing it in the next version...

Mahesh Venkitachalam Founder, Electronut Labs electronut.in

On Tue, Jul 25, 2017 at 1:05 AM, Prithvi Raj Narendra < notifications@github.com> wrote:

Ok, if I comment out all the TWI related activities in the bluey-beacon example I can get it to work. Seems like an issue with one of the sensors on this board. I'll work on adding the Bluey support to this repo. I'll add a default debugger in the Makefile and a user can change it when using the make command. Would this be fine?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/electronut/ElectronutLabs-bluey/issues/6#issuecomment-317530973, or mute the thread https://github.com/notifications/unsubscribe-auth/ADHwAhrQ-kr88peeBtuGwtp7BDYhlWgdks5sRPIGgaJpZM4OgzB4 .

electronut commented 7 years ago

@EarthLord is your board version 1.1?

EarthLord commented 7 years ago

Bluey 1.0. I just created a PR for adding BMP support too. Please check for the beacon example and if its fine, it can be replicated for the other examples too.