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

Newbie having trouble getting started...

Hello, I just received my BMD-200 eval board today and cannot get any of the examples working. I started out trying to get blinky to work using GCC and the make files provided. I am able to successfully build the projects. The _build directory has the .hex files. It is not clear what the next step should be here. make soft_device seems to just load the Soft Device so how does the example get loaded in this paradigm? What dictates where in memory it gets loaded in the GCC paradigm? Is this important?

After many attempts, I gave up on the above method and tried using nrfGo Studio. I loaded the 110 Soft Device (I am on the latest SDK version 8), and then loaded several peripheral examples. None of them run.

I gave up on this method and downloaded the Keil tools. I followed the instructions in the manual by first using nrfGo Studio to load the 110 Soft Device, and then moved over to the Keil tool. Made all of the configuration modifcations, downloaded custom_board.h, and the project builds successfully. It even seems to download to Flash successfully but it won't run. blinky does not blink and none of the ble peripheral examples advertise, so I know its not working.

I'm not sure what to try next. Can you please let me know what I am doing wrong based on the above. I don't care which method I use; I just need one that works.

Any help would be greatly appreciated.

Thanks.

Ernest

  • So I actually don't know if the BMD-200 is like the PCA10028. It is definitely a different circuit board but I can't find any information on the relationship between the 2 boards. The SDK only has references to the PCA10028 and the PCA10031. I am currently using the PCA10028 settings...again this could be wrong...I feel like I'm flying blind.

    I also noticed that xxac vs xxaa differences which I have corrected in the Makefile. I have also modified the gcc_nrf51_common.ld" file with the following settings based on the eval board documentation:

    /* Linker script to configure memory regions. */

    SEARCH_DIR(.) GROUP(-lgcc -lc -lnosys)

    MEMORY { FLASH (rx) : ORIGIN = 0x16000, LENGTH = 0x29000 RAM (rwx) : ORIGIN = 0x20002000, LENGTH = 0x2000 }

    INCLUDE "gcc_nrf51_common.ld"

    Do you know what this compiler flag translates into: CFLAGS = -DBOARD_PCA10028 ? This could perhaps be the problem...again there is no reference in any documentation to BMD-200 specific makefile settings so I am flying blind....

    After making the aforementioned changes and reflashing it still does not run...:-(

  • I suggest going back to the start, with an untouched copy of the blinky sample code.

    1. in the directory copy the pca100028 directory entirely to something, call it 'custom' or 'bmd200' or similar.

    2. start with the 'blank' example not the s110 one, get a simple blinky to work first.

    3. change all the -DBOARD=PCA100028 to -DBOARD=

    4. write a board definition for your board which has the correct GPIOs for the LEDs and the BUTTONS, it's very unlikely that board has them mapped to the same pins. Put that in examples/bsp/ and edit the boards.h file to recognize your -DBOARD=.. or call it CUSTOM_BOARD and write custom_board.h, I personally like to have the actual board name in the file but it doesn't matter.

    make clean and make it then upload it. When you can get that to blink the LEDs on your board, then try the s110 version which is the exact same code put at 0x18000 instead of 0x00000.

    you can use nrfstudio or nrfgo to get it on the board, or use the JLink commands yourself if you want.

    At some point you'll need to work out which chip you have and pick the correct .ld script but for these simple, tiny, short examples it doesn't make a jot of difference, all the code is in the early part of flash, all the RAM is in the early part of RAM (yes including the stack) so at this point they are all going to work.

    Important points - get the LED and BUTTON mappings right for YOUR board, start with the simple blank example with no softdevice and get that going first.

    .. and what does nrfstudio tell you about the revision of the chip you have, that will eventually be important

  • Hi RK,

    I actually have the custom_board.h file for the board which was provided by Rigado. I have it configured in the Makefile with this line:

    CFLAGS  = -DBOARD_CUSTOM
    

    Here are the contents of custom_board.h:

    #ifndef __BMD200_H__
    #define __BMD200_H__
    
    #define LEDS_NUMBER    3
    
    #define LED_RED        1
    #define LED_GREEN      24
    #define LED_BLUE       25
    
    #define LEDS_LIST 	  { LED_RED, LED_GREEN, LED_BLUE }
    
    #define BSP_LED_0      LED_RED
    #define BSP_LED_1      LED_GREEN
    #define BSP_LED_2      LED_BLUE
    
    #define BSP_LED_0_MASK (1<<BSP_LED_0)
    #define BSP_LED_1_MASK (1<<BSP_LED_1)
    #define BSP_LED_2_MASK (1<<BSP_LED_2)
    
    #define LEDS_MASK      (BSP_LED_0_MASK | BSP_LED_1_MASK | BSP_LED_2_MASK)
    /* all LEDs are lit when GPIO is high */
    #define LEDS_INV_MASK  0
    
    #define BUTTONS_NUMBER 2
    
    #define BUTTON_1       0
    #define BUTTON_2       11
    
    #define BUTTON_PULL    NRF_GPIO_PIN_PULLUP
    
    #define BUTTONS_LIST { BUTTON_1, BUTTON_2, }
    
    #define BSP_BUTTON_0   BUTTON_1
    #define BSP_BUTTON_1   BUTTON_2
    
    #define BSP_BUTTON_0_MASK (1<<BSP_BUTTON_0)
    #define BSP_BUTTON_1_MASK (1<<BSP_BUTTON_1)
    
    #define BUTTONS_MASK   0x00000801
    
    #define RX_PIN_NUMBER  9
    #define TX_PIN_NUMBER  10
    #define CTS_PIN_NUMBER 2
    #define RTS_PIN_NUMBER 3
    #define HWFC           true
    
    #define SPIM0_SCK_PIN       0     /**< SPI clock GPIO pin number. */
    #define SPIM0_MOSI_PIN      1     /**< SPI Master Out Slave In GPIO pin number. */
    #define SPIM0_MISO_PIN      2     /**< SPI Master In Slave Out GPIO pin number. */
    #define SPIM0_SS_PIN        0     /**< SPI Slave Select GPIO pin number. */
    
    #endif // __BMD200_H__
    

    I have confirmed that it is linking this by defining BOARD_CUSTOM in the Makefile, removing custom_board.h from the directory and seeing it complain.

    I have confirmed that the chip is: nrf51822_xxaa

    Yes I would love to see an LED blink...so far no luck...

  • I suggest that you check the chip revision as well. Chip rev 1 may not work with SDK8.

  • can you please format that with 4 spaces at the start of each line so it doesn't look so awful?

    You're doing this with the blank version - no softdevice? Use nrfjprog to reset the board, make sure the code is on it. Until you can get this to work, you're not going to get too far.

Related