Hello @PeraZver , welcome to the forum.
The RAK4600 is not (officially) a WisBlock Core module, so we did not include it in the guide how to use PlatformIO. And it needs several changes to have the RAK4600 supported in PIO:
These are the steps (assuming you use Windows):
-
Install the Nordic nRF52 platform in PIO
You might need to compile a simple project first because some parts of the BSP are only installed when you compile a project.
-
Create the board support JSON file with the name wiscore_rak4600.json in C:\Users<YOUR_USER_NAME>.platformio\platforms\nordicnrf52\boards with this content:
{
"build": {
"arduino":{
"ldscript": "nrf52832_s132_v6.ld"
},
"core": "nRF5",
"cpu": "cortex-m4",
"extra_flags": "-DNRF52832_XXAA -DNRF52",
"f_cpu": "64000000L",
"hwids": [
[
"0x239A",
"0x8029"
],
[
"0x239A",
"0x0029"
],
[
"0x239A",
"0x002A"
],
[
"0x239A",
"0x802A"
]
],
"usb_product": "WisDuo RAK4600",
"mcu": "nrf52832",
"variant": "WisCore_RAK4600_Board",
"bsp": {
"name": "adafruit"
},
"softdevice": {
"sd_flags": "-DS132",
"sd_name": "s132",
"sd_version": "6.1.1",
"sd_fwid": "0x00B7"
},
"zephyr": {
"variant": "WisCore_RAK4600_Board"
}
},
"connectivity": [
"bluetooth"
],
"debug": {
"jlink_device": "nRF52832_xxAA",
"svd_path": "nrf52.svd"
},
"frameworks": [
"arduino",
"zephyr"
],
"name": "RAKwireless WisDuo RAK4600",
"upload": {
"maximum_ram_size": 65536,
"maximum_size": 524288,
"require_upload_port": true,
"speed": 115200,
"protocol": "nrfutil",
"protocols": [
"jlink",
"nrfjprog",
"nrfutil",
"stlink",
"cmsis-dap",
"blackmagic"
]
},
"url": "https://docs.rakwireless.com/Product-Categories/WisDuo/RAK4600-Evaluation-Board/Overview",
"vendor": "RAKwireless"
}
-
Download the folder _** [WisCore_RAK4600_Board](WisCore_RAK4600_Board](RAK-nRF52-Arduino/variants at master · RAKWireless/RAK-nRF52-Arduino · GitHub) and place it in the PIO Packages Framework folder C:\Users<YOUR_USER_NAME>.platformio\packages\framework-arduinoadafruitnrf52\variants
-
Open adafruit.py in the folder C:\Users<YOUR_USER_NAME>.platformio\platforms\nordicnrf52\builder\frameworks\arduino
Look for
if env.subst("$BOARD") != "adafruit_feather_nrf52832":
and replace it with
if env.subst("$BOARD") != "adafruit_feather_nrf52832" and env.subst("$BOARD") != "wiscore_rak4600":
Save the file.
Then you can create a new project in PIO and select the RAK4600: