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

I need help with converting any example from Keil to SES

Hello,

I've been trying for days to convert any example from Keil to SES, I have road probably every question here on the dev zone but I am unable to fix this, I ever specially install windows on my mac to try if there it would work.

So, I have done everything from official nordic documents, I've been through several problems which I happily solve, but that I'm not able to.

I get those errors:


unplaced section: .log_dynamic_data_app [nrf_log_frontend.o], size=12, align=4

undefined symbol: __SRAM_segment_end__

undefined symbol: __start_log_const_data

undefined symbol: __start_log_dynamic_data

undefined symbol: __stop_log_const_data

I'm working on latest SEGGER, I have tried latest SDK, also 14.2 . The same errors. 

Thanks for reply

Parents Reply
  • And also, to begin with, I am trying to set up to work this example: (Nothing less BleAdvertiser is working there is only issue with the name of device which I do not understand why it is not changing, but Okay I'am trying to move on to more complex example using mpu9250). 
    https://github.com/IOsonata/IOsonata/tree/master/ARM/Nordic/nRF52/nRF52832/exemples/MotionSensorDemo

    What I do:
    1. In board.h I enable #define NORDIC_DK by delating "//" before it, because I have this board

    2. in mot_sensor_demo.cpp I add "//" before #define ICM20948 and delete "//" before #define MPU9250 because I use MPU9250

    What else should I change? 

    Also:
    I run a program and everything seems okay, I get "Failed initializing hardware" that is for sure because that  I still don't know to which pins connect mpu9250 (SDA,SCL). You said its above the SPI, okay I searched all board.h document and I can of course find I2C_SCL and I2C_SDA but in //#define BLUEIO_TAG_BME680_PROTO and that is not my board. 



Children
  • Have you change the device address in the config data ?  You need to set it to the I2C device address of your board. 

  • What exactly do you mean? you mean change dresses in agm_mpu9250.h ? there is I think correct address 

    #define MPU9250_I2C_DEV_ADDR0 0x68

    0x68 for MPU9250 correct address. 

    Can you please elaborate?

    In motion sensors demo I have only 2 files in src. board.h and mot_sensor_demo.cpp. In board.h there is no i2c pins defined for nordic dev board. and in mot_sensor_demo.cpp there is only this two lines about i2c (line 61,62)

    #define AK0991x_DEFAULT_I2C_ADDR 0x0C /* The default I2C address for AK0991x Magnetometers */

    #define AK0991x_SECONDARY_I2C_ADDR  0x0E /* The secondary I2C address for AK0991x Magnetometers */


    Maybe is there a way to connect mpu9250 by SPI communication?
    That I also have tried, the pins are
    MISO 13 --> which is ADD pin on mpu9250 
    MOSI 12 --> which is SDA pin o mpu9250
    SCK 11 --> which is SCL pin on mpu9250

    I did as I write up, and nothing changed, when I run I got "Failed initializing hardware"

    When I try a debug I got this:



    I assume that it is problem with not seeing sensor?

  • You need to know the difference between I2C and SPI.  In SPI the device is selected via it's Chip Select pin.  In I2C the device is selected with its address.  Every I2C device has its own predefined 7bits address.  In the case of the MPU-9250, it's 0x68.

    The I2C pins are defined in board.h just above the SPI pin defines.

    SDA & SCL are I2C pins.  The ADD is the address selection.  The chip allows you to select 2 different address.  It must be connected to VCC or GND depending on address you want use.  Please read the user guide of your board. You must not assigned those pin to SPI if you want to use i2c.  Otherwise it will cause a conflict and won't work.


  • Okay, I checked the user guide for my port, and SDA -> 26, SCL ->27. So I connect it. Also of course I connected VCC to 3.3V on my board and GND to GND. 



    I am unable to see any i2c pins defined in board.h I really do not understand What do you mean by that it's defined "above" but I assume that if my user guide says its 26,27 so I need to connect it to those and maybe its not need to be defined in board.h yes? 

    I am still getting the same error. 








  • Are you using the BlueIoThingy or another example ?  The board.h I was referring to is the one in the BlueIOThingy example.  If you use a different project, you can take the I2C setup from the BlueIOThingy example to creat the interface object.  See also this I2C example

    https://github.com/IOsonata/IOsonata/tree/master/exemples/i2c

    You should not defined in the SPI because it will initialize those pins as SPI.

Related