Comments (12)
I couldn't find a solution to the pins_arduino issue so I modified the example ones for the STM32, I am not sure if they work yet as
I still have issues with 'class' not being recognized in SPI.h, Wire.h, Print.h, Printable.h and Stream.h...
I have attached them to this post so maybe someone else can verify if they work?
pins_arduino.zip
from rtduino.
Somehow the 'class' error has fixed itself but now the modified pins_arduino.c is giving the following error:
../packages/RTduino-latest/core/pins_arduino.c:25:10: error: initializer element is not constant
this is referencing the first line where D0 is defined but the error applies to all lines..
I did not change the structure of the file just the pins.. here is the contents of the modified pins_arduino.c:
/*
* Copyright (c) 2006-2022, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2022-09-20 liYony first version
* 19/10/2023 Daniel Miles updated for RA6M3
*
*/
#include <Arduino.h>
#include "pins_arduino.h"
/*
* {Arduino Pin, RT-Thread Pin [, Device Name, Channel]}
* [] means optional
* Digital pins must NOT give the device name and channel.
* Analog pins MUST give the device name and channel(ADC, PWM or DAC).
* Arduino Pin must keep in sequence.
*/
const pin_map_t pin_map_table[]=
{
{D0, GET_PIN(P206), "uart1"}, /* Serial-Rx */
{D1, GET_PIN(P205), "uart1"}, /* Serial-Tx */
{D2, GET_PIN(P008)},
{D3, GET_PIN(P506)},
{D4, GET_PIN(P603), "pwm1", 1}, /* PWM */
{D5, GET_PIN(P604), "pwm1", 2}, /* PWM */
{D6, GET_PIN(P605), "pwm1", 3}, /* PWM */
{D7, GET_PIN(P208)},
{D8, GET_PIN(P207)}, /* LED_BUILTIN */
{D9, GET_PIN(P009), "adc1", 5}, /* ADC */
{D10, GET_PIN(P712), "pwm1", 4}, /* PWM */
{D11, GET_PIN(P512), "spi1"}, /* SPI-MOSI */
{D12, GET_PIN(P511), "spi1"}, /* SPI-MISO */
{D13, GET_PIN(P204), "spi1"}, /* SPI-SCK */
{D14, GET_PIN(P203), "i2c1"}, /* I2C-SDA (Wire) */
{D15, GET_PIN(P202), "i2c1"}, /* I2C-SCL (Wire) */
{D16, GET_PIN(P209), "led_user1"}, /* user LED 1 */
{D17, GET_PIN(P210), "led_user2"}, /* user LED 2 */
{D18, GET_PIN(P005), "btn_user0"}, /* user button 0 */
{D19, GET_PIN(P006), "btn_user1"}, /* user button 1 */
{D20, GET_PIN(P007), "btn_user2"}, /* user button 2 */
{A0, GET_PIN(P00), "adc1", 1}, /* ADC */
{A1, GET_PIN(P001), "adc1", 2}, /* ADC */
{A2, GET_PIN(P002), "adc1", 3}, /* ADC */
{A3, GET_PIN(P003), "adc1", 4}, /* ADC */
{A4, GET_PIN(P508)},
{A5, GET_PIN(P014), "adc1", 6}, /* ADC */
//{A6, RT_NULL, "adc1", RT_ADC_INTERN_CH_VREF}, /* ADC, On-Chip: internal reference voltage */
};
from rtduino.
Any help with this would be greatly appreciated..
This was part of my entry into the RT-Thread Embedded GUI Contest 2023 but I am unable to complete the project due to this error.
from rtduino.
@DansDesigns Hello, currently HMI-Board supports RTduino, you can go to RT-Thread cloning project.Please go to this link to view the RTduino usage documentation and close this issue
from rtduino.
Hi kurisaW,
Thank you for your response.
I followed the link you provided but all it gave me was this error:
404 - page not found
The
master
branch of
rt-thread
does not contain the path
bsp/renesas/ra6m3-hmi-board/board/rtduino/arduino_pinout/README.md.
The board folder does not contain a folder called rtduino??
I have been able to translate the Chinese Readme into English but it does not have any useful information about how to troubleshoot RTduino or the issue present in this and issue#79..
EDIT:
I started again and made a new RT-Thread Project, using the hmi-board-factory example.
enabled RTduino and the SPI and WIRE libraries, changed rw007 and lvgl version to "latest", saved the changes in RT-Thread Settings, rebuilt the project, updated packages, click build and the same errors appear..
from rtduino.
@DansDesigns Since yesterday's pr has not been merged, now you can check the specific use process through the above link, and please feedback to us if you have any questions in the future.
from rtduino.
Hi, sorry for the late respond. I am too busy, I have merged the PR, please check again.
from rtduino.
Hi @mysterywolf & @kurisaW, thank you for your replies,
I checked that link again and the readme is now present..
however when starting a new project (or updating an existing one) the errors still persist,
should i manually put the "pins_arduino" files into the correct folders??
Please see attached image for more info
Also i noticed that the I2C1 SCL and SDA are not referenced in the pins_arduino.c however they are already defined in rtconfig.. my hardware is already made to match those pins for I2C1.. is I2C1 usable in rtduino?
EDIT:
So i manually copied the contents of pins_arduino.c and pins_arduino.h from the readme linked above and the errors are reduced to just one:
arm-none-eabi-gcc "../board/ra6m3_it.c"
linking...
c:/rt-threadstudio/repo/extract/toolchain_support_packages/arm/gnu_tools_for_arm_embedded_processors/10.2.1/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: cannot open linker script file memory_regions.ld: No such file or directory
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:188: rtthread.elf] Error 1
"make -j4 all" terminated with exit code 2. Build might be incomplete.
I have run updates on all the required bits in the SDK Manager, I have even completely removed and reinstalled RT-Thread Studio but the error still remains. In SDK Manager i have the latest version of 10.2.1 of the gnu_tools_for_arm_embedded_processors??
from rtduino.
@DansDesigns In fact, you shouldn't select RTduino in the package, please clear all Rtduino-related configuration, and follow my next steps to enable RTduino:
- Open RT-Thread studio settings
- Select 'Hardware' from the Status bar
3.Onboard Peripheral Drivers
-->Compatible with Arduino Ecosystem (RTduino) (Enable this option) - Press ctrl+s to save the configuration, download the software package, and compile it
After the program is burned, open the msh terminal and use the 'list device' command, you should see that the following devices are registered and the RTduino thread's log information is automatically printed when activated
from rtduino.
hi @kurisaW,
Thank you for the great tutorial,
It would seem we are using something different as I have no option for "Onboard Peripheral Drivers"...
to be honest I am at the end of my rope. I have been struggling with this for over 2 months!
I am going to throw the board away as it is SO stressful getting a simple arduino layer working..
The difficulty i have had with this board has really put me off working on my own projects and I feel like never touching rtthread again..
Thank you for all your help, I hope other are able to get this working.
kind regards
from rtduino.
@DansDesigns A few points need to be made clear to you again:
- Please download the latest source code of the RT-Thread repository:
- It is recommended that you use RT-Thread's env tool:
Env to use at the same time please refer to the document center tutorial:
Here are some common commands for env:
scons-j8 // 8 core compiled source code
scons-c // Clear the build
scons --menuconfig // Opens the menu configuration interface, equivalent to settings in Studio
pkgs --update // Update and download the software package
- Directly go to the HMI-Board bsp directory for compilation, or import it to studio
Additional note: For developers, the use of RT-Thread is relatively easy to get started, but the new white need to learn more and draw on the development process of RT-Thread, once you are familiar with the development, I believe you will understand the convenience of RT-Thread
To answer your question above: "I have no option for "Onboard Peripheral Drivers"
This is because the adaptation PR of RTduino was merged yesterday, and you need to synchronize the master branch with git locally. You can refer to my above instructions again for the use configuration after that. If you have any other questions, please contact me!
from rtduino.
please try use env+vscode
from rtduino.
Related Issues (14)
- 需要注意的问题以及扩展功能 HOT 1
- BSP TODO
- TODO HOT 1
- AFIO -> GPIO
- 开发随记 HOT 1
- 警惕C++里的构造函数 HOT 1
- Arduino.h:43:26: fatal error: pins_arduino.h: No such file HOT 4
- ※对接Adafruit_Sensor和Adafruit_BusIO框架,以此来支持Adafruit的众多传感器库,接入Adafruit生态。
- After adding the bsp project to Rt Thread studio according to the tutorial, the changes made to rtthread settings cannot be saved.
- 已适配的BSP HOT 1
- TODO 2023 HOT 1
- 'class' not being recognized in SPI.h, Wire.h, Print.h, Printable.h and Stream.h... rtduino RA6M3 HMI-Board HOT 1
- After enabling the RTduino: Arduino Ecological Compatibility Layer, it cannot be built. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rtduino.