beegee-tokyo / WisBlock-Sensor-For-LoRaWAN

Firmware for RAKwireless WisBlock RAK4631 Core module.
9 stars 0 forks source link

Compile Error #1

Closed deepc2020 closed 1 year ago

deepc2020 commented 1 year ago

Hello, i try to get your code running on an RAK11300 but get this compile error.

Ich changed default_envs:

[platformio]
default_envs = 
    ; rak4631-debug
    ; rak4631-epd-4.2
    ; rak4631-epd-2.13
    ; rak4631-release
    ; wiscore_rak11200
    rak11300 

The Patch for rak11300 is installed and all Updates are applied to all libs.

Now i get this error message about type SemaphoreHandle_t

Compiling .pio\build\rak11300\src\RAK12040_temp_array.cpp.o
In file included from .pio\libdeps\rak11300\RAKwireless RAK12034\src/Rak_BMX160.h:4,
                 from src\RAK12034_9dof.cpp:12:
.pio\libdeps\rak11300\RAKwireless RAK12034\src/DFRobot_BMX160.h:16: warning: "LITTLE_ENDIAN" redefined
   16 | #define LITTLE_ENDIAN 1
      |
In file included from c:\users\renen\.platformio\packages\toolchain-gccarmnoneeabi\arm-none-eabi\include\sys\types.h:67,
                 from c:\users\renen\.platformio\packages\toolchain-gccarmnoneeabi\arm-none-eabi\include\stdio.h:61,
                 from C:\Users\renen\.platformio\packages\framework-arduino-mbed\cores\arduino/api/Print.h:22,
                 from C:\Users\renen\.platformio\packages\framework-arduino-mbed\cores\arduino/api/ArduinoAPI.h:31,
                 from C:\Users\renen\.platformio\packages\framework-arduino-mbed\cores\arduino/Arduino.h:27,
                 from src\app.h:32,
                 from src\RAK12034_9dof.cpp:11:
c:\users\renen\.platformio\packages\toolchain-gccarmnoneeabi\arm-none-eabi\include\machine\endian.h:17: note: this is the location of the previous definition
   17 | #define LITTLE_ENDIAN _LITTLE_ENDIAN
      |
In file included from src\app.h:153,
                 from src\RAK12003_fir.cpp:12:
src\module_handler.h:259:8: error: 'SemaphoreHandle_t' does not name a type
  259 | extern SemaphoreHandle_t i2c_lock;
      |        ^~~~~~~~~~~~~~~~~
In file included from src\app.h:153,
                 from src\RAK12004_gas.cpp:11:
src\module_handler.h:259:8: error: 'SemaphoreHandle_t' does not name a type

Can you help me with this problem please?

beegee-tokyo commented 1 year ago

Support for the RAK11310 is still work in progress.

Easiest way to fix this is to look for i2c_lock and delete all code parts that use it.

In RAK12039_pm.cpp delete lines 21 & 22 => https://github.com/beegee-tokyo/WisBlock-Sensor-For-LoRaWAN/blob/9404d529c9e345c3c1b6e31c8c12c39a6e1616b4/PlatformIO/src/RAK12039_pm.cpp#L21

In module_handler.h delete line 259 => https://github.com/beegee-tokyo/WisBlock-Sensor-For-LoRaWAN/blob/9404d529c9e345c3c1b6e31c8c12c39a6e1616b4/PlatformIO/src/module_handler.h#L259

But there might be other errors popping up. It is difficult to have the example running on both RAK4631 and RAK11310 because the RAK11310 BSP is missing the FreeRTOS functions I used.

beegee-tokyo commented 1 year ago

@deepc2020 https://github.com/beegee-tokyo/WisBlock-Sensor-For-LoRaWAN/commit/95e884f36b38def1bed1e0eab01b8dd8bdddc3a4 should fix the RAK11310 problems