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

Hi , can anyone say how to convert the driver and library for mpu 6050 from sdk 11 to sdk 13..??

Am a beginner to this platform , i don't know how to made the conversion . can anyone help me

Parents
  • Hello Reeshma

    We have made an updated version of the nrf5-ble-mpu-simple project found on Martins Github github.com/.../sdk13

    So the mpu-simple project should now work with SDK13. Please note there have been some changes in the "how to use" section, be sure to read through it and follow the instructions there.

    EDIT 28.04.17:

    Makefile for the nrf-ble-mpu-simple project added.

    Make sure the path to the project folder is: [SDK folder]\examples\nrf5-mpu-examples-sdk13\nrf5-ble-mpu-simple\

    Make sure to place the two files at path: [SDK folder]\examples\nrf5-mpu-examples-sdk13\nrf5-ble-mpu-simple\pca10040\s132\armgcc

    A modification must be made to the file ble_mpu.h: Add a second set of braces around the BLE_UUID_BASE_UUID initializer, it should read

    #define BLE_UUID_BASE_UUID              {{0x23, 0xD1, 0x13, 0xEF, 0x5F, 0x78, 0x23, 0x15, 0xDE, 0xEF, 0x12, 0x12, 0x00, 0x00, 0x00, 0x00}} // 128-bit base UUID
    

    When written with a single set of braces I received an error due to armgcc being picky. This workaround was described here devzone.nordicsemi.com/.../

    With these files I was able to compile the project in windows.

    Makefile

    ble_app_template_gcc_nrf52.ld

    Best regards

    Jørn Frøysa

Reply
  • Hello Reeshma

    We have made an updated version of the nrf5-ble-mpu-simple project found on Martins Github github.com/.../sdk13

    So the mpu-simple project should now work with SDK13. Please note there have been some changes in the "how to use" section, be sure to read through it and follow the instructions there.

    EDIT 28.04.17:

    Makefile for the nrf-ble-mpu-simple project added.

    Make sure the path to the project folder is: [SDK folder]\examples\nrf5-mpu-examples-sdk13\nrf5-ble-mpu-simple\

    Make sure to place the two files at path: [SDK folder]\examples\nrf5-mpu-examples-sdk13\nrf5-ble-mpu-simple\pca10040\s132\armgcc

    A modification must be made to the file ble_mpu.h: Add a second set of braces around the BLE_UUID_BASE_UUID initializer, it should read

    #define BLE_UUID_BASE_UUID              {{0x23, 0xD1, 0x13, 0xEF, 0x5F, 0x78, 0x23, 0x15, 0xDE, 0xEF, 0x12, 0x12, 0x00, 0x00, 0x00, 0x00}} // 128-bit base UUID
    

    When written with a single set of braces I received an error due to armgcc being picky. This workaround was described here devzone.nordicsemi.com/.../

    With these files I was able to compile the project in windows.

    Makefile

    ble_app_template_gcc_nrf52.ld

    Best regards

    Jørn Frøysa

Children
  • Really thanks alot sir, i will try it with the above code

  • hi sir , am compiling it in embedded linux using the arm gcc , i cannot able to find the make file for the nrf -ble-mpu-simple- , eventhough i have tried alot to make a makefile , but it throws only an error...how can i create the make file..?? sorry am a beginner to this platform , can anyone please help me..

  • Hello

    Could you please copy and paste the entire error message you receive here?

  • In file included from ../../../main.c:44:0: ../../../app_mpu.h:26:6: error: #error "No MPU defined. Please define MPU in Target Options C/C++ Defines" #error "No MPU defined. Please define MPU in Target Options C/C++ Defines" ^~~~~ In file included from ../../../main.c:44:0: ../../../app_mpu.h:193:6: error: #error "No/unknown MPU defined" #error "No/unknown MPU defined" ^~~~~ ../../../main.c: In function 'timers_init': ../../../main.c:226:16: error: too few arguments to function 'app_timer_init' err_code = app_timer_init(); ^~~~~~~~~~~~~~ In file included from ../../../main.c:28:0: ../../../../../../components/libraries/timer/app_timer.h:189:10: note: declared here uint32_t app_timer_init(uint32_t prescaler, ^~~~~~~~~~~~~~ ../../../main.c: In function 'conn_params_init': ../../../main.c:323:46: error: macro "APP_TIMER_TICKS" requires 2 arguments, but only 1 given cp_init.first_conn_params_update_delay = FIRST_CONN_PARAMS_UPDATE_DELAY; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../main.c:65:41: error: 'APP_TIMER_TICKS' undeclared (first use in this function) #define FIRST_CONN_PARAMS_UPDATE_DELAY APP_TIMER_TICKS(5000) /< Time from initiating event (connect or start of notification) to first time sd_ble_gap_conn_param_update is called (5 seconds). */ ^ ../../../main.c:323:46: note: in expansion of macro 'FIRST_CONN_PARAMS_UPDATE_DELAY' cp_init.first_conn_params_update_delay = FIRST_CONN_PARAMS_UPDATE_DELAY; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../main.c:65:41: note: each undeclared identifier is reported only once for each function it appears in #define FIRST_CONN_PARAMS_UPDATE_DELAY APP_TIMER_TICKS(5000) /< Time from initiating event (connect or start of notification) to first time sd_ble_gap_conn_param_update is called (5 seconds). */ ^ ../../../main.c:323:46: note: in expansion of macro 'FIRST_CONN_PARAMS_UPDATE_DELAY' cp_init.first_conn_params_update_delay = FIRST_CONN_PARAMS_UPDATE_DELAY; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../main.c:324:46: error: macro "APP_TIMER_TICKS" requires 2 arguments, but only 1 given cp_init.next_conn_params_update_delay = NEXT_CONN_PARAMS_UPDATE_DELAY; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../main.c: In function 'on_ble_evt': ../../../main.c:415:59: error: macro "APP_TIMER_TICKS" requires 2 arguments, but only 1 given err_code = app_timer_start(m_timer_accel_update_id, TIMER_INTERVAL_ACCEL_UPDATE, NULL); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../main.c:91:41: error: 'APP_TIMER_TICKS' undeclared (first use in this function) #define TIMER_INTERVAL_ACCEL_UPDATE APP_TIMER_TICKS(1000) // 1000 ms intervals ^ ../../../main.c:415:59: note: in expansion of macro 'TIMER_INTERVAL_ACCEL_UPDATE' err_code = app_timer_start(m_timer_accel_update_id, TIMER_INTERVAL_ACCEL_UPDATE, NULL); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../main.c: In function 'ble_stack_init': ../../../main.c:533:16: error: implicit declaration of function 'softdevice_app_ram_start_get' [-Werror=implicit-function-declaration] err_code = softdevice_app_ram_start_get(&ram_start); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../main.c:537:5: error: unknown type name 'ble_cfg_t' ble_cfg_t ble_cfg; ^~~~~~~~~ ../../../main.c:540:12: error: request for member 'common_cfg' in something not a structure or union ble_cfg.common_cfg.vs_uuid_cfg.vs_uuid_count = 1; ^ ../../../main.c:541:16: error: implicit declaration of function 'sd_ble_cfg_set' [-Werror=implicit-function-declaration] err_code = sd_ble_cfg_set(BLE_COMMON_CFG_VS_UUID, &ble_cfg, ram_start); ^~~~~~~~~~~~~~ ../../../main.c:541:31: error: 'BLE_COMMON_CFG_VS_UUID' undeclared (first use in this function) err_code = sd_ble_cfg_set(BLE_COMMON_CFG_VS_UUID, &ble_cfg, ram_start); ^~~~~~~~~~~~~~~~~~~~~~ ../../../main.c:546:12: error: request for member 'gap_cfg' in something not a structure or union ble_cfg.gap_cfg.role_count_cfg.periph_role_count = BLE_GAP_ROLE_COUNT_PERIPH_DEFAULT; ^ ../../../main.c:546:57: error: 'BLE_GAP_ROLE_COUNT_PERIPH_DEFAULT' undeclared (first use in this function) ble_cfg.gap_cfg.role_count_cfg.periph_role_count = BLE_GAP_ROLE_COUNT_PERIPH_DEFAULT; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../main.c:547:12: error: request for member 'gap_cfg' in something not a structure or union ble_cfg.gap_cfg.role_count_cfg.central_role_count = 0; ^ ../../../main.c:548:12: error: request for member 'gap_cfg' in something not a structure or union ble_cfg.gap_cfg.role_count_cfg.central_sec_count = 0; ^ ../../../main.c:549:31: error: 'BLE_GAP_CFG_ROLE_COUNT' undeclared (first use in this function) err_code = sd_ble_cfg_set(BLE_GAP_CFG_ROLE_COUNT, &ble_cfg, ram_start); ^~~~~~~~~~~~~~~~~~~~~~ ../../../main.c:553:34: error: passing argument 1 of 'softdevice_enable' from incompatible pointer type [-Werror=incompatible-pointer-types] err_code = softdevice_enable(&ram_start); ^ In file included from ../../../main.c:27:0: ../../../../../../components/softdevice/common/softdevice_handler/softdevice_handler.h:220:10: note: expected 'ble_enable_params_t * {aka struct }' but argument is of type 'uint32_t * {aka long unsigned int }' uint32_t softdevice_enable(ble_enable_params_t * p_ble_enable_params); ^~~~~~~~~~~~~~~~~ ../../../main.c: In function 'buttons_leds_init': ../../../main.c:690:58: error: passing argument 2 of 'bsp_init' makes integer from pointer without a cast [-Werror=int-conversion] err_code = bsp_init(BSP_INIT_LED | BSP_INIT_BUTTONS, bsp_event_handler); ^~~~~~~~~~~~~~~~~ In file included from ../../../main.c:33:0: ../../../../../../components/libraries/bsp/bsp.h:188:10: note: expected 'uint32_t {aka long unsigned int}' but argument is of type 'void ()(bsp_event_t) {aka void ()(enum )}' uint32_t bsp_init(uint32_t type, uint32_t ticks_per_100ms, bsp_event_callback_t callback); ^~~~~~~~ ../../../main.c:690:16: error: too few arguments to function 'bsp_init' err_code = bsp_init(BSP_INIT_LED | BSP_INIT_BUTTONS, bsp_event_handler); ^~~~~~~~ In file included from ../../../main.c:33:0: ../../../../../../components/libraries/bsp/bsp.h:188:10: note: declared here uint32_t bsp_init(uint32_t type, uint32_t ticks_per_100ms, bsp_event_callback_t callback); ^~~~~~~~ ../../../main.c: In function 'mpu_setup': ../../../main.c:719:33: error: implicit declaration of function 'MPU_DEFAULT_CONFIG' [-Werror=implicit-function-declaration] mpu_config_t p_mpu_config = MPU_DEFAULT_CONFIG(); // Load default values ^~~~~~~~~~~~~~~~~~ ../../../main.c:719:33: error: invalid initializer cc1: all warnings being treated as errors ../../../../../../components/toolchain/gcc/Makefile.common:134: recipe for target '_build/nrf52832_xxaa_main.c.o' failed make: *** [_build/nrf52832_xxaa_main.c.o] Error 1

    These are the errors am gettting,

  • hi sir , can you give me the make file of armgcc ,then i can able to know , where i have did the mistake

Related