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

MPU6050 with NRF52832 in segger

Hi,

I am working on MPU-6050 sensor.

I have downloaded the NRF5-MPU-EXAMPLE  from this link

in that there is no SES file.

How to create a SES file to work this code in segger..

Parents
  • Hi,

    I would recommend that you copy a SES project from another example in the same SDK version and modify this with the paths and source files required for the MPU examples. This video tutorial should show you how to add files into the SES project.

    For instance, if you want to use nrf5-ble-mpu-data-ready-interrupts example on a PCA10040 board, you should copy the ses folder from examples\ble_peripheral\ble_app_uart\pca10040\s132\ into examples\nrf5-mpu-examples\nrf5-ble-mpu-data-ready-interrupts\pca10040\s132\ and then add the required MPU library files.

    Best regards,
    Jørgen

Reply
  • Hi,

    I would recommend that you copy a SES project from another example in the same SDK version and modify this with the paths and source files required for the MPU examples. This video tutorial should show you how to add files into the SES project.

    For instance, if you want to use nrf5-ble-mpu-data-ready-interrupts example on a PCA10040 board, you should copy the ses folder from examples\ble_peripheral\ble_app_uart\pca10040\s132\ into examples\nrf5-mpu-examples\nrf5-ble-mpu-data-ready-interrupts\pca10040\s132\ and then add the required MPU library files.

    Best regards,
    Jørgen

Children
  • Hi,

    i am trying to alternate  " ble_app_uart_pca10040_s132 "   segger solution to work in this MPU-6050  library

    for that i also got the error  #error "No MPU defined. Please define MPU in Target Options C/C++ Defines"

    and more error like

    Rebuilding ‘ble_app_uart_pca10040_s132 - MPU’ from solution ‘ble_app_uart_pca10040_s132 - MPU’ in configuration ‘Release’
      Assembling ‘thumb_crt0.s’
      Compiling ‘nrf_log_backend_rtt.c’
      Compiling ‘nrf_log_backend_serial.c’
      Compiling ‘nrf_log_default_backends.c’
      Compiling ‘nrf_log_frontend.c’
      Compiling ‘nrf_log_str_formatter.c’
      Compiling ‘app_button.c’
      Compiling ‘app_error.c’
      Compiling ‘app_error_handler_gcc.c’
      Compiling ‘app_error_weak.c’
      Compiling ‘app_fifo.c’
      Compiling ‘app_scheduler.c’
      Compiling ‘app_timer.c’
      Compiling ‘app_uart_fifo.c’
      Compiling ‘app_util_platform.c’
      Compiling ‘hardfault_implementation.c’
      Compiling ‘nrf_assert.c’
      Compiling ‘nrf_atfifo.c’
      Compiling ‘nrf_atflags.c’
      Compiling ‘nrf_atomic.c’
      Compiling ‘nrf_balloc.c’
      Compiling ‘nrf_fprintf.c’
      Compiling ‘nrf_fprintf_format.c’
      Compiling ‘nrf_memobj.c’
      Compiling ‘nrf_pwr_mgmt.c’
      Compiling ‘nrf_ringbuf.c’
      Compiling ‘nrf_section_iter.c’
      Compiling ‘nrf_strerror.c’
      Compiling ‘retarget.c’
      Assembling ‘ses_startup_nrf52.s’
      Assembling ‘ses_startup_nrf_common.s’
      Compiling ‘system_nrf52.c’
      Compiling ‘boards.c’
      Compiling ‘nrf_drv_clock.c’
      Compiling ‘nrf_drv_uart.c’
      Compiling ‘nrfx_clock.c’
      Compiling ‘nrfx_gpiote.c’
      Compiling ‘nrfx_power_clock.c’
      Compiling ‘nrfx_prs.c’
      Compiling ‘nrfx_uart.c’
      Compiling ‘nrfx_uarte.c’
      Compiling ‘bsp.c’
      Compiling ‘bsp_btn_ble.c’
      Compiling ‘nrf_drv_mpu_spi.c’
      Compiling ‘nrf_drv_mpu_twi.c’
      Compiling ‘main.c’
        app_mpu.h: No such file or directory
      Compiling ‘app_mpu.c’
        app_mpu.c
        #error "No MPU defined. Please define MPU in Target Options C/C++ Defines"
        app_mpu.c
        #error "No/unknown MPU defined"
        app_mpu.c
        #elif with no expression
        'MPU_REG_SMPLRT_DIV' undeclared (first use in this function)
        each undeclared identifier is reported only once for each function it appears in
        'MPU_REG_INT_PIN_CFG' undeclared (first use in this function)
        'MPU_REG_INT_ENABLE' undeclared (first use in this function)
        'MPU_REG_SIGNAL_PATH_RESET' undeclared (first use in this function)
        'MPU_REG_PWR_MGMT_1' undeclared (first use in this function)
        'MPU_REG_ACCEL_XOUT_H' undeclared (first use in this function)
        'MPU_REG_GYRO_XOUT_H' undeclared (first use in this function)
        'MPU_REG_TEMP_OUT_H' undeclared (first use in this function)
        'MPU_REG_INT_STATUS' undeclared (first use in this function)
      Compiling ‘ble_mpu.c’
        ble_mpu.h
        ble_mpu.c
        #error "No MPU defined. Please define MPU in Target Options C/C++ Defines"
        ble_mpu.h
        ble_mpu.c
        #error "No/unknown MPU defined"
      Compiling ‘SEGGER_RTT.c’
    Build failed

  • You need to define the symbols (in project preprocessor symbold), configuring what device you are using. This is specified in the "How to use" section of the GitHub repository page.

  • I am sorry, i don't know how to config the file please help me i need to work in MPU-6050 with TWI protocol

  • while in a code itself we need to select MPU-6050..? and TWI..?

Related