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
  • It seems like you are not using the correct startup code.  Startup code and linker scripts are different.  Startup code and linker script go in pair. You need to use the one made for SES.

  • Hey, I have followed instructions from here https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/segger-embedded-studio-a-cross-platform-ide but its a little bit outdated since now there is SES 4.50.

    Maybe there is a tutorial of how to rewrite programs from Keil to SES? Please like, I have spent so much hours for that, everyone seems get it done, and I am unable to transfer even Blinky example... 

  • Don't try to import project.  That is what will get you into big troubles.  It is better to start from a existing SES example project, then add the source files you need.  Note that SES compiler is very limited.  It does not support C++.  

  • I have tried this also, to be specific, I have tried to rewrite MPU9250 any example from: https://github.com/Martinsbl/nrf5-mpu-examples on base of example twi_sensor from sdk14.2 . 
    Firstly I imported his example (mpu-simple) to ses, then I have opened another window with twi_sensor example in ses, and comparing two of them together I added all nrf libraries, all nrf drivers and all application .c files that was in imported example. I did not touch any system file or something else. And I almost got it to built, but I have few errors.

    1. With compiling app_error_weak.c:
    'NRF_LOG_ENABLED' undeclared (first use in this function); did you mean 'NRF_MODULE_ENABLED'?
    (this error is not present when compiling the same document in imported example)

    2. With compiling SEGGER_RTT_printf.c
    'SEGGER_RTT_CONFIG_MAX_NUM_UP_BUFFERS' undeclared here (not in a function); did you mean 'SEGGER_RTT_MAX_NUM_UP_BUFFERS'?
    'SEGGER_RTT_CONFIG_MAX_NUM_DOWN_BUFFERS' undeclared here (not in a function); did you mean 'SEGGER_RTT_MAX_NUM_DOWN_BUFFERS'?

    3. With compiling SEGGER_RTT_Syscalls_SES.c
    'SEGGER_RTT_CONFIG_MAX_NUM_UP_BUFFERS' undeclared here (not in a function); did you mean 'SEGGER_RTT_MAX_NUM_UP_BUFFERS'?
    'SEGGER_RTT_CONFIG_MAX_NUM_DOWN_BUFFERS' undeclared here (not in a function); did you mean 'SEGGER_RTT_MAX_NUM_DOWN_BUFFERS'?

    4. With compiling SEGGER_RTT.c
    'SEGGER_RTT_CONFIG_MAX_NUM_UP_BUFFERS' undeclared here (not in a function); did you mean 'SEGGER_RTT_MAX_NUM_UP_BUFFERS'?
    'SEGGER_RTT_CONFIG_MAX_NUM_DOWN_BUFFERS' undeclared here (not in a function); did you mean 'SEGGER_RTT_MAX_NUM_DOWN_BUFFERS'?
    'SEGGER_RTT_CONFIG_BUFFER_SIZE_UP' undeclared here (not in a function); did you mean 'SEGGER_RTT_PRINTF_BUFFER_SIZE'?
    'SEGGER_RTT_CONFIG_BUFFER_SIZE_DOWN' undeclared here (not in a function); did you mean 'SEGGER_RTT_PRINTF_BUFFER_SIZE'?
    'SEGGER_RTT_CONFIG_DEFAULT_MODE' undeclared (first use in this function); did you mean 'SEGGER_RTT_MODE_DEFAULT'?

    And I have compiled these example in Keil with no problem at all, But I don't have enough money to buy Keil since I am student Disappointed

Reply
  • I have tried this also, to be specific, I have tried to rewrite MPU9250 any example from: https://github.com/Martinsbl/nrf5-mpu-examples on base of example twi_sensor from sdk14.2 . 
    Firstly I imported his example (mpu-simple) to ses, then I have opened another window with twi_sensor example in ses, and comparing two of them together I added all nrf libraries, all nrf drivers and all application .c files that was in imported example. I did not touch any system file or something else. And I almost got it to built, but I have few errors.

    1. With compiling app_error_weak.c:
    'NRF_LOG_ENABLED' undeclared (first use in this function); did you mean 'NRF_MODULE_ENABLED'?
    (this error is not present when compiling the same document in imported example)

    2. With compiling SEGGER_RTT_printf.c
    'SEGGER_RTT_CONFIG_MAX_NUM_UP_BUFFERS' undeclared here (not in a function); did you mean 'SEGGER_RTT_MAX_NUM_UP_BUFFERS'?
    'SEGGER_RTT_CONFIG_MAX_NUM_DOWN_BUFFERS' undeclared here (not in a function); did you mean 'SEGGER_RTT_MAX_NUM_DOWN_BUFFERS'?

    3. With compiling SEGGER_RTT_Syscalls_SES.c
    'SEGGER_RTT_CONFIG_MAX_NUM_UP_BUFFERS' undeclared here (not in a function); did you mean 'SEGGER_RTT_MAX_NUM_UP_BUFFERS'?
    'SEGGER_RTT_CONFIG_MAX_NUM_DOWN_BUFFERS' undeclared here (not in a function); did you mean 'SEGGER_RTT_MAX_NUM_DOWN_BUFFERS'?

    4. With compiling SEGGER_RTT.c
    'SEGGER_RTT_CONFIG_MAX_NUM_UP_BUFFERS' undeclared here (not in a function); did you mean 'SEGGER_RTT_MAX_NUM_UP_BUFFERS'?
    'SEGGER_RTT_CONFIG_MAX_NUM_DOWN_BUFFERS' undeclared here (not in a function); did you mean 'SEGGER_RTT_MAX_NUM_DOWN_BUFFERS'?
    'SEGGER_RTT_CONFIG_BUFFER_SIZE_UP' undeclared here (not in a function); did you mean 'SEGGER_RTT_PRINTF_BUFFER_SIZE'?
    'SEGGER_RTT_CONFIG_BUFFER_SIZE_DOWN' undeclared here (not in a function); did you mean 'SEGGER_RTT_PRINTF_BUFFER_SIZE'?
    'SEGGER_RTT_CONFIG_DEFAULT_MODE' undeclared (first use in this function); did you mean 'SEGGER_RTT_MODE_DEFAULT'?

    And I have compiled these example in Keil with no problem at all, But I don't have enough money to buy Keil since I am student Disappointed

Children
Related