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

  • Okay I corrected it, thanks, now I now what've meant. But debug did not change. Failed initializing hardware. 

    I attached photos in earlier comment, can you have a look and tell me what else could be making this error?

    First is en error with TimerLFnRF5x g_Timer; and I really have no clue what is wrong? 

    and the second is with 

    bool res = HardwareInit(); so I assume that It still did not see the mpu9250?

  • There are no error. Everything is working.  The Timer is just a timer instance.  The Segger just break at instantiation of that object, nothing special.  Just continue execution.

  • Okay thanks, so what else could be causing the bool res = HardwareInit(); error? Something in the code? or connection mpu9250 to dev board? 

    Maybe there is a way to check whether dev board sees mpu9250 or not? 

  • Well, you have the debugger setup and running. Just step through and you will what happens.

  • Okay I will be trying, thanks.

    I have one question also,

    Can you explain me this lines 4 and 5? 

    static const I2CCFG s_I2cCfg = {
    	0,			// I2C device number
    	{
    		{I2C0_SDA_PORT, I2C0_SDA_PIN, I2C0_SDA_PINOP, IOPINDIR_BI, IOPINRES_PULLUP, IOPINTYPE_OPENDRAIN},
    		{I2C0_SCL_PORT, I2C0_SCL_PIN, I2C0_SCL_PINOP, IOPINDIR_OUTPUT, IOPINRES_PULLUP, IOPINTYPE_OPENDRAIN},
    	},
    	115200,	    // Rate
    	I2CMODE_MASTER,
    	5,			// Retry
    	0,			// Number of slave addresses
    	{0,},		// Slave addresses
    	true,	    // DMA
    	false,		// Use interrupt
    	7,			// Interrupt prio
    	NULL		// Event callback
    };


    Especially this:
    I2C0_SDA_PORT, I2C0_SDA_PIN, I2C0_SDA_PINOP

    and

    I2C0_SCL_PORT, I2C0_SCL_PIN, I2C0_SCL_PINOP

    Because those are declared in board.h for board BLUEIO_TAG_BME680_PROTO

    here:

    //#define BLUEIO_TAG_BME680_PROTO
    #ifdef BLUEIO_TAG_BME680_PROTO
    #define I2C0_SDA_PORT					BLUEIO_TAG_BME280_I2C_SDA_PORT
    #define I2C0_SDA_PIN					BLUEIO_TAG_BME280_I2C_SDA_PIN
    #define I2C0_SDA_PINOP					BLUEIO_TAG_BME280_I2C_SDA_PINOP
    #define I2C0_SCL_PORT					BLUEIO_TAG_BME280_I2C_SCL_PORT
    #define I2C0_SCL_PIN					BLUEIO_TAG_BME280_I2C_SCL_PIN
    #define I2C0_SCL_PINOP					BLUEIO_TAG_BME280_I2C_SCL_PINOP
    #else
    #define I2C0_SDA_PORT					BLUEIO_TAG_BME680_I2C_SDA_PORT
    #define I2C0_SDA_PIN					BLUEIO_TAG_BME680_I2C_SDA_PIN
    #define I2C0_SDA_PINOP					BLUEIO_TAG_BME680_I2C_SDA_PINOP
    #define I2C0_SCL_PORT					BLUEIO_TAG_BME680_I2C_SCL_PORT
    #define I2C0_SCL_PIN					BLUEIO_TAG_BME680_I2C_SCL_PIN
    #define I2C0_SCL_PINOP					BLUEIO_TAG_BME680_I2C_SCL_PINOP
    #endif


    Why I am using some ports from different board than mine and bee 680 sensor for I2C configuration? Is this a must? Or I can delete it? Or change it anyway to be assigned to my board nrf 52 dk?


    And also this lines:
    //#include "sensor.h"
    //#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 */


    Do I need to delete "//" and enable it? Or as I assume can I delete  it? Because mpu9250 has AK8963 magnetometer not a AK0991x.

Related