I need to work with the RAK framework for the RAK3172 module.
I wanted to avoid the Arduino IDE.
Is it possible to manage this framework with Platform IO?
That module seems to be just a STM32WLE5CC. Meaning, the platform-ststm32 platform and the Arduino_Core_STM32 will probably cover this device. There’s also a topic about LoRaWAN with that module here and a special board variant for it here.
There seems to be a more specific RAK3172 Arduino core available, do you mean this one? Or where do I find that “RAK framework”?
https://github.com/RAKWireless/RAK-STM32-RUI
https://github.com/RAKWireless/RAKwireless-Arduino-BSP-Index
Ok so you tell me to use PlatformIO with the STM platform platform-ststm32 and then install the specific part for RAK.
In my application I use a RAK3172 module with the RUI3 libraries.
Do you think I can use the stm32duino code and then add the RUI3 libraries?
To do this I have to make changes to the Platform-IO configuration files?
bye thanks
Adriano
If you already use the RUI3 libraries, then that will require the RAK-STM32-RUI Arduino core, too. When using the standard Arduino Core STM32, you would have to rewrite your application with the code and libraries available there.
Let me see if I can’t add build support for the RAK-STM32-RUI core into PlatformIO / platform-ststm32.
Ok many thanks if you can do that that would be great!!
Just FYI, I’m working on a PlatformIO integration, but it’s not finished yet. I can get a simple test sketch to compile for a RAK3172 Evaluation Board. I’ve also added the ymodem uploader.
Can you check if this compiles and can be uploaded to your board? (Upload + Monitor)
Works by adding a builder script and platform modifications.
I tried to compile the project.
It downloaded some archives then produced an error
of which I send you the log
* Executing task: C:\Users\adria\.platformio\penv\Scripts\platformio.exe run --environment rak3172_evalboard
Processing rak3172_evalboard (platform: https://github.com/maxgerhardt/platform-ststm32.git#rak3172; board: rak3172_evalboard; framework: arduino)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------Tool Manager: Installing https://github.com/maxgerhardt/RAK-STM32-RUI/archive/refs/heads/main.zip
Unpacking [#########################-----------] 71% 00:00:08
Unpacking...
FileNotFoundError: Traceback (most recent call last):
File "C:\Users\adria\.platformio\penv\Lib\site-packages\platformio\package\manager\_install.py", line 37, in unpack
return fu.unpack(dst, with_progress=with_progress)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\adria\.platformio\penv\Lib\site-packages\platformio\package\unpack.py", line 200, in unpack
self._archiver.extract_item(item, dest_dir)
File "C:\Users\adria\.platformio\penv\Lib\site-packages\platformio\package\unpack.py", line 49, in extract_item
self._afo.extract(item, dest_dir)
File "C:\Users\adria\.platformio\python3\Lib\zipfile.py", line 1664, in extract
return self._extract_member(member, path, pwd)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\adria\.platformio\python3\Lib\zipfile.py", line 1735, in _extract_member
open(targetpath, "wb") as target:
^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\adria\\.platformio\\.cache\\tmp\\pkg-installing-1a4j59j4\\RAK-STM32-RUI-main\\cores\\STM32WLE\\external\\STM32CubeWL\\Projects\\NUCLEO-WL55JC\\Examples_LL\\ADC\\ADC_ContinuousConversion_TriggerSW_LowPower_Init\\EWARM\\ADC_ContinuousConversion_TriggerSW_LowPower_Init.ewd'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\adria\.platformio\penv\Lib\site-packages\platformio\__main__.py", line 103, in main
cli() # pylint: disable=no-value-for-parameter
^^^^^
File "C:\Users\adria\.platformio\penv\Lib\site-packages\click\core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\adria\.platformio\penv\Lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "C:\Users\adria\.platformio\penv\Lib\site-packages\platformio\cli.py", line 85, in invoke
return super().invoke(ctx)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\adria\.platformio\penv\Lib\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\adria\.platformio\penv\Lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\adria\.platformio\penv\Lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\adria\.platformio\penv\Lib\site-packages\click\decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\adria\.platformio\penv\Lib\site-packages\platformio\run\cli.py", line 145, in cli
process_env(
File "C:\Users\adria\.platformio\penv\Lib\site-packages\platformio\run\cli.py", line 208, in process_env
).process()
^^^^^^^^^
File "C:\Users\adria\.platformio\penv\Lib\site-packages\platformio\run\processor.py", line 81, in process
install_project_env_dependencies(
File "C:\Users\adria\.platformio\penv\Lib\site-packages\platformio\package\commands\install.py", line 132, in install_project_env_dependencies
_install_project_env_platform(project_env, options),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\adria\.platformio\penv\Lib\site-packages\platformio\package\commands\install.py", line 149, in _install_project_env_platform
PlatformPackageManager().install(
File "C:\Users\adria\.platformio\penv\Lib\site-packages\platformio\package\manager\platform.py", line 62, in install
p.install_required_packages(force=force)
File "C:\Users\adria\.platformio\penv\Lib\site-packages\platformio\platform\_packages.py", line 76, in install_required_packages
self.install_package(name, force=force)
File "C:\Users\adria\.platformio\platforms\ststm32\platform.py", line 119, in install_package
pkg = super().install_package(name, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\adria\.platformio\penv\Lib\site-packages\platformio\platform\_packages.py", line 70, in install_package
return self.pm.install(spec or self.get_package_spec(name), force=force)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\adria\.platformio\penv\Lib\site-packages\platformio\package\manager\_install.py", line 47, in install
pkg = self._install(spec, skip_dependencies=skip_dependencies, force=force)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\adria\.platformio\penv\Lib\site-packages\platformio\package\manager\_install.py", line 97, in _install
pkg = self.install_from_uri(spec.uri, spec)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\adria\.platformio\penv\Lib\site-packages\platformio\package\manager\_install.py", line 191, in install_from_uri
self.unpack(dl_path, tmp_dir)
File "C:\Users\adria\.platformio\penv\Lib\site-packages\platformio\package\manager\_install.py", line 42, in unpack
return fu.unpack(dst, with_progress=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\adria\.platformio\penv\Lib\site-packages\platformio\package\unpack.py", line 178, in unpack
self._archiver.extract_item(item, dest_dir)
File "C:\Users\adria\.platformio\penv\Lib\site-packages\platformio\package\unpack.py", line 49, in extract_item
self._afo.extract(item, dest_dir)
File "C:\Users\adria\.platformio\python3\Lib\zipfile.py", line 1664, in extract
return self._extract_member(member, path, pwd)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\adria\.platformio\python3\Lib\zipfile.py", line 1735, in _extract_member
open(targetpath, "wb") as target:
^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\adria\\.platformio\\.cache\\tmp\\pkg-installing-1a4j59j4\\RAK-STM32-RUI-main\\cores\\STM32WLE\\external\\STM32CubeWL\\Projects\\NUCLEO-WL55JC\\Examples_LL\\ADC\\ADC_ContinuousConversion_TriggerSW_LowPower_Init\\EWARM\\ADC_ContinuousConversion_TriggerSW_LowPower_Init.ewd'
============================================================
An unexpected error occurred. Further steps:
* Verify that you have the latest version of PlatformIO using
`python -m pip install -U platformio` command
* Try to find answer in FAQ Troubleshooting section
https://docs.platformio.org/page/faq/index.html
* Report this problem to the developers
https://github.com/platformio/platformio-core/issues
============================================================
The file paths are getting too long. You need to have Long NTFS filepaths enabled in Windows; It’s also good to have them enabled in git
, too.
Try to follow Step 1,2 and 3 from this guide:
https://arduino-pico.readthedocs.io/en/latest/platformio.html#step-1-enabling-long-paths-in-git
Ok . With the long names changed I compile and download the example correctly
So the “Upload and Monitor” works? The expected output appears in the serial monitor?
Yes I tried the serial monitor and it prints the message correctly