Keil uVision V5 Legacy Nordic Project Compile Errors

Hello,

I am trying to compile a legacy Nordic Project for evaluation purposes and I am getting some compile errors. The details are as follows:

Project: https://github.com/NordicPlayground/nrf52-ble-image-transfer-demo

Keil: uVision V5.38.0.0 MDK-Lite

ARM Compiler: V5.06 Update 6 (Build 750)

Nordic SDK: v16.0.0.

Nordic SoftDevice: S132 v7.0.1

Keil nRF_DeviceFamilyPack: 8.44.1

Other settings:

The compile errors I am getting as as follows:

linking...
.\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nrf_drv_ppi_init (referred from main.o).
.\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nrfx_ppi_channel_alloc (referred from main.o).
.\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nrfx_ppi_channel_assign (referred from main.o).
.\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nrfx_ppi_channel_enable (referred from main.o).
.\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nrfx_saadc_buffer_convert (referred from main.o).
.\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nrfx_saadc_channel_init (referred from main.o).
.\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nrfx_saadc_init (referred from main.o).
.\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nrfx_saadc_sample_task_get (referred from main.o).
.\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nrfx_timer_enable (referred from main.o).
.\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nrfx_timer_extended_compare (referred from main.o).
.\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nrfx_timer_init (referred from main.o).
Not enough information to list image symbols.
Not enough information to list load addresses in the image map.

I removed the default ..\nRF5SDK160098a08e2\modules\nrfx\mdk folder from the C/C++ include table and replaced it with ..\Arm\Packs\NordicSemiconductor\nRF_DeviceFamilyPack\8.44.1\Device\Include folder

I noticed that in the apply_old_config.h file all of the drivers seem to be disabled even though in the sdk_config.h file, the necessary drivers are enabled.

I am sure I am doing something wrong in the file structures or some configurations.

Please advise.

Thanks,

Adnan

  • Hi Adnan

    These errors make it seem like the project isn't in the correct folder in your SDK, so that it's not able to find the driver/header files where these functions are defined. Where is the project located, and what is the relative path in your preprocessor definitions set to?

    If you're just doing evaluation, please note that we generally recommend new designs to use the nRF Connect SDK instead of the nRF5 SDK. More information in the nRF Connect SDK statement here.

    It's also worth noting that if you're using the nRF5 SDK, SEGGER Embedded Studio is in our opinion a better IDE to use for development, as you get a free license when using Nordic products, and our expertise in SES is generally better than with Keil.

    Best regards,

    Simon

  • Hello Simon,

    Thank you for getting back to me on this.

    I did initially start with the new nRF Connect SDK but unfortunately the camera requirement and time constraint for our eval process forced me to get this legacy sample up and running.

    I can switch to the SEGGER Emb. Studio if necessary.

    Currently the file structure is as follows:

    Project itself:

    C:\TPR-Nordicsemi-Sources\Keil\Projects\nrf52-ble-image-transfer-demo-master

    Nordic SDK + SoftDevice:

    C:\Nordic\sdk\nRF5SDK160098a08e2

    C:\Nordic\sdk\s132nrf52701

    Keil Device Family Pack:

    C:\Users\NOVA-00002\AppData\Local\Arm\Packs\NordicSemiconductor\nRF_DeviceFamilyPack\8.44.1

    For the Keil Install. I used the defaults paths as per the installation process.

    Please advise.

    Thanks,

    Adnan

  • Okay, can you try making sure the relative paths in your project (both to driver/library files and DeviceFamilyPack) are long enough with the same amount of "..\..\" that it is to the root of your path. It could be an issue with the Device Family Pack you're using as well, as we had some issues with them in some of the later SDK versions on the nRF5 SDK side. If you're not able to figure out the issue from editing the paths I would suggest trying out SEGGER Embedded Studios to see if you can build/flash the project there.

    Best regards,

    Simon

  • Hello Simon,

    Thank you for the follow up. I took your advise and switched to Segger Embedded Studio over the weekend. I managed to get the project setup and had to modify the common include paths and paths in the .emProject file but now the project compiles and am able to download it onto the nRF52 DK eval board. So thank you for your guidance on this issue.

    The issue I am now having is that I get the following error on the J-Link RTT Viewer:

    00> <error> app: ERROR 8 [NRF_ERROR_INVALID_STATE] at C:\Nordic\sdk\nRF5SDK160098a08e2\examples\nrf52-ble-image-transfer-demo-master_segger\main.c:463
    00> PC at: 0x0002786D
    00> <error> app: End of error report

    The line number points to the following function:

    /**@brief Function for the SoftDevice initialization.
    *
    * @details This function initializes the SoftDevice and the BLE event interrupt.
    */
    static void ble_stack_init(void)
    {
    ret_code_t err_code;

    err_code = nrf_sdh_enable_request();
    APP_ERROR_CHECK(err_code);

    // Configure the BLE stack using the default settings.
    // Fetch the start address of the application RAM.
    uint32_t ram_start = 0;
    err_code = nrf_sdh_ble_default_cfg_set(APP_BLE_CONN_CFG_TAG, &ram_start);
    APP_ERROR_CHECK(err_code);

    // Enable BLE stack.
    err_code = nrf_sdh_ble_enable(&ram_start);
    APP_ERROR_CHECK(err_code);

    // Register a handler for BLE events.
    NRF_SDH_BLE_OBSERVER(m_ble_observer, APP_BLE_OBSERVER_PRIO, ble_evt_handler, NULL);
    }

    I am wondering if the SoftDevice needs to be configured as I have not done anything with respect to that.

    Please advise and thanks!

    Adnan

  • Hi Adnan

    Yes, you need to configure the SoftDevice as well. First off, make sure that the Additional Load File [0] in your Loader (in project options) points to the correct place where your SoftDevice is located, as well as the preprocessor definitions include the following defines:

    NRF_SD_BLE_API_VERSION=6

    S140

    SOFTDEVICE_PRESENT

    Lastly, you should check out this RAM and Flash adjustment guide to make sure your applications RAM and Flash is configured to fit the SoftDevice you're using as well:  Adjustment of RAM and Flash memory 

    Best regards,
    Simon 

Related