This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Flashing a 3rd party NFR52832 with ST link V2 on Eclise?

Hello,

I am in a little bit of trouble here trying to flash a 3rd party module that is mounted on a custom PCB I made with the SWD pins exposed for programming.

I've been using it with the Arduino IDE and the st link V2 so far(Thus flashed softdevice S132 on it already) but I want to make the transacting from it sins it lacks capabilities. any way I know it works in term of hardware.

Now I'm not interested in wasting my money on buying the Segger J link so I want to use the ST link V2 so far I've followed this tutorial: devzone.nordicsemi.com/.../ up to the point of "Flash download" build the blinky code successful and waiting to see how you flash the chip with it.

Does anybody have any experience with it? thanks for your time.

  • Yes I took a look at those pages several times and didn't fin'd some that could help me.

  • I would go this way:

    • Installing Keil MDK5 which can work without paid license up to 32kB of app binary.
    • Open nRF5_SDK_14.0.0_3bcc1f7\examples\ble_peripheral\ble_app_blinky\pca10040\s132\arm5_no_packs\ project and recompile.
    • If all is OK then go to project settings and instead of BOARD_PCA10040 global define set BOARD_CUSTOM. That will cause that in nRF5_SDK_14.0.0_3bcc1f7\components\boards\boards.h file it will direct to your custom board layout definition.
    • Copy nRF5_SDK_14.0.0_3bcc1f7\components\boards\pca10040.h file into project space nRF5_SDK_14.0.0_3bcc1f7\examples\ble_peripheral\ble_app_blinky\pca10040\s132\config\ and rename it to custom_board.h. Open the file and align with your actual HW set-up (I cannot help you much here, you need to know what are you using and how).

    (1/x)

  • (2/2)

    • Now recompile the project again and it should pass (HEX binary should be produced).
    • In the end if your STM32 dev kit really works as SEGGER J-Link it should be connectable to your machine and Keil exactly the same way as nRF52 DK so all what is explained in the Keil and BLE blinky tutorials by Nordic on this site should be applicable.

    If you encounter any problem, please set new question where you exactly explain what HW and SW are you using, what steps you made, what you expect to see and what happened instead. I'm sure you will get further support...

  • I'll try that but I have a few questions: My application will probably take more than 32K that's why I wanted to use eclipse.

    1. how much would a licence for that software cost? 2)what do you think about the fact that I cant get any voltage out of the SWD port on my STM32 disco board? is it normal?
  • Cannot comment on Keil, you need to find out at their local reseller. But yes, you should be able to go with GCC without limit, it just needs more effort then "open project and hit build button". Follow the tutorials and submit question if you hit any problem. Regarding powering the target: many cheap boards like NXP LPC don't drive 3V3 pin on JTAGs 10-pin connector. Simply measure it and provide external power from different PIN of your STM32 board where it gives enough power.

Related