RAK online compiler for you to compile your customized firmware based on RUI

Hi Fomi, I would like to apply for the online compiller
Name : Wisang
My email : [email protected]
node : RAK811

@All
The build server has been upgraded.

Hi @tasla, @wisang1999,

I’ve just sent an email to you, please check.

Hi,

Compilation works now.
I look at the API - I need to have the definition of the following:

  • RUI_GPIO_ST
  • RUI_I2C_ST
  • RUI_IF_READ_WRITE
    etc

as used in:

  • uint32_t rui_adc_init(RUI_GPIO_ST *rui_gpio);
  • uint32_t rui_adc_get(RUI_GPIO_ST rui_gpio, uint16_t value);
  • uint32_t rui_i2c_init(RUI_I2C_ST *rui_i2c);
  • uint32_t rui_iic_rw(RUI_IF_READ_WRITE rw, uint8_t devAddr, uint16_t regAddr, uint8_t* data, uint16_t len)

Could you open up the relevant header files or point me to where I can get the definition?
Otherwise I couldn’t code…

Thanks and regards
Boh Lim

Hi @bohlimsim,

Please check them here:
https://doc.rakwireless.com/developer-tools/developer-tools/rui-interface-general-format

Hi,

Thanks for the info.

I have compiled the unchanged codes in Products_practice_based_on_RUI-master\based on RAK811\app_5205. When I flashed stm_xxx.bin into RAK5205 board, there is nothing shown up in the serial putty screen - empty.

So I added some printing at the main(), but still, nothing got printed out.

Did I missed out anything?

Thanks and regards
Boh Lim

Hi,

The original binary in the purchased RAK5205 has the following printouts

Thanks and regards
Boh Lim

You need to update BootLoader first, and then try again, because our BootLoader has been updated.You can refer to the documentation:
Get_Start_with_RAK5205_WisTrio.pdf
BootLoader:Firmware
image

Hi,

I have flashed in the new bootloader. I can see “Boot Mode” in the serial port tool.
Next I want to flash the compiled binary. Unfortunately the link in the pdf doc is broken

So I use the FlashLoaderDemonstrater.exe - can I use this tool?

But the result is still the same - empty screen in putty.

I have upgraded the bootloader successfully. What is missing?

(Note, if I burn the previously backup Firmware (unmodified from the newly purchased RAK5020 board), I can see all the printouts again)

Thanks and regards
Boh Lim

Hi @bohlimsim,

The upgrade tool can be downloaded here:
https://downloads.rakwireless.com/en/LoRa/Tools/RAK_Upgrade_Tool_V1.0.rar

Hi,

Yes, after this procedure, it is printing now… Thank you so much!
Question: When should we use the RAK_Upgrade_Tool and the STM FlashLoaderDemonstrater Tool?

There is still issue printed on the printouts - the Initialization errors - this part of the codes are untouched… Is there anything missing in my steps?

Thanks and regards
Boh Lim

Hi @bohlimsim,

As i mentioned in the RAK5205 document:
https://doc.rakwireless.com/rak5205-wistrio-lora-tracker/installing-the-firmware
If you want to flash the bootloader, you should use " STM32CubeProgrammer" (or STM FlashLoaderDemonstrater), but if you want to upgrade/flash the firmware, you should use RAK Upgrade Tool.

For the issue you share, it is that I2C hasn’t been inited successfully. We’ll confirm and debug it later.

Hi,

I have used STM32CubeProgrammer to load the latest bootloader - success
Then I use the RAK_Upgrade_Tool to upgrage the Firmware - success

But if I tried to upgrade the same Firmware again (or any new firmware) using RAK_Upgrade_Tool - it won’t work - see the complaint below

image

I can never flash in the same firmware again (the unmodified 5205 code from your git, or any new firmware) - tried many times.

But it will work until I repeat the whole process again:

  • use STM32CubeProgrammer to erase entire flash and load the latest bootloader
  • then use the RAK_Upgrade_Tool to upgrage the Firmware

Is there any error or issues here? Do I need to reflash the latest bootloader again everytime I need to upgrade my firmware?

Thanks and regards
Boh Lim

Hi @bohlimsim,

If you want to upgrade the firmware, you should set the device/module to work in the BOOT mode firstly.

When you flash the bootloader again, it will work in the BOOT mode by defualt. But if you have flash a bootloader and a firmware, then you want to upgrade a new or same firmware, you should send an AT command to let the device/module working in BOOT mode.

More details, please have a look at this document:
https://doc.rakwireless.com/rak5205-wistrio-lora-tracker/burning-the-firmware-into-the-device

@All

The rui.h file is not included in the RUI framework.
Please obtain the corresponding rui.h at https://github.com/RAKWireless/Products_practice_based_on_RUI according to the node model.

Hi,

If you want to upgrade the firmware, you should set the device/module to work in the BOOT mode firstly.

With this step, it is working now! Thanks.

Thanks and Regards
Boh Lim

Hi,

Let me know if this is the correct forum to ask this question:

I saw in rui.h:

#define I2C_REG_MAGIC 0xAA
typedef struct RUI_I2C_ST {
uint32_t INSTANCE_ID;
uint32_t PIN_SDA; // SDA pin num
uint32_t PIN_SCL; // SCL pin num
uint32_t FREQUENCY;
uint32_t REG_NULL; // if no reg , should be 0xAA
} RUI_I2C_ST;

uint32_t rui_i2c_rw(RUI_I2C_ST rui_i2c,RUI_IF_READ_WRITE rw, uint8_t devAddr, uint16_t regAddr, uint8_t data, uint16_t len);

Question:
What does REG_NULL=0xAA means? Does it mean the parameter regAddr in rui_i2c_rw() will be ignored? I am asking this because my I2C device, during read, does not need the regAddr.

Thanks and regards
Boh Lim

Hi @bohlimsim,

That’s a good question about “if this is the correct forum to ask this question”. :slight_smile:
I think we should have a special forum or catalog for RUI and customizing firmware.
I’ve created a new catalog in this forum named RUI, and we can discuss all about RUI in this catalog:
https://forum.rakwireless.com/c/RUI

Can you please public this question in that catalog?

Can you please public this question in that catalog?

Done! Thanks!

Hey I would also like to apply for the Online compiler

Name: sanni
Email:[email protected]
Module used: RAK811 & RAK811 Breakboard