seeedjp / arduino_core_stm32 Goto Github PK
View Code? Open in Web Editor NEWThis project forked from stm32duino/arduino_core_stm32
STM32 core support for Arduino
License: Other
This project forked from stm32duino/arduino_core_stm32
STM32 core support for Arduino
License: Other
DFU begin
dyld: Library not loaded: /opt/local/lib/libusb-1.0.0.dylib
DFU end
Referenced from: /Users/x/Library/Arduino15/packages/SeeedJP/tools/stm32_dfu_upload_tool/1.0.0/macosx/dfu-util/dfu-util
Reason: image not found
/Users/eiichirho/Library/Arduino15/packages/SeeedJP/tools/stm32_dfu_upload_tool/1.0.0/macosx/dfu_upload: line 5: 15607 Abort trap: 6 $(dirname $0)/dfu-util/dfu-util -d $2 -a $1 -D $3 -s $4 -R
platform packageに同封のdfu-utilが、libusbをダイナミックリンクできていない模様。(アーキテクチャの差異)
Arduino IDE 2.0.4にSeeedJP STM32 Boards by Seeed K.K.をインストールできない。
Downloading packages
SeeedJP:[email protected]
Installing platform SeeedJP:[email protected]
Failed to install platform: SeeedJP:stm32.
Error: 13 INTERNAL: Cannot install platform: installing platform SeeedJP:[email protected]: searching package root dir: no unique root dir in archive, found 'C:\Users\takashi\AppData\Local\arduino15\tmp\package-349504246\cores' and 'C:\Users\takashi\AppData\Local\arduino15\tmp\package-349504246\libraries'
Wio3G(STM32F439VI)を使用しています.
I2Cの受信時に,マイコン全体の動作が停止するので調査をお願いします.
ESP32-WROOM-32(Master)とWIO3G(slave)を,I2Cで接続.
ボード(Arduino IDE)
esp32 by Espressif Systems - 2.0.3
SeedJP STM32 Boards by Seed.K.K - 1.8.0
(ライブラリ)
WioCellLibforArduino -1.7.0
以下のプログラムを実行する,
ESP32-WROOM-32(Master)
#include <Wire.h>
#define I2C_ADDR 2
byte x = 0;
void setup()
{
Wire.begin(); // join i2c bus (address optional for master)
Serial.begin(9600); // start serial for output
}
void loop()
{
// Serial.println(11111);
// Wire.requestFrom(I2C_ADDR, 6); // request 6 bytes from slave device
//
// while(Wire.available()) // slave may send less than requested
// {
// char c = Wire.read(); // receive a byte as character
// Serial.print(c); // print the character
// }
// Serial.println();
delay(10);
Wire.beginTransmission(I2C_ADDR); // transmit to device
Wire.write("x is "); // sends five bytes
Wire.write(x); // sends one byte
Wire.endTransmission(); // stop transmitting
x++;
delay(500);
}
WIO3G(slave)
#include <WioCellLibforArduino.h>
#define I2C_ADDR 2
void setup()
{
Wire.begin(I2C_ADDR); // join i2c bus with address SeeedJP/SeeedJP_STM32F4#4
Wire.onRequest(requestEvent); // register event
Wire.onReceive(receiveEvent); // register event
SerialUSB.begin(9600); // start serial for output
}
void loop()
{
delay(90);
SerialUSB.println(111111);
}
// function that executes whenever data is received from master
// this function is registered as an event, see setup()
void receiveEvent(int howMany)
{
while(1 < Wire.available()) // loop through all but the last
{
char c = Wire.read(); // receive byte as a character
SerialUSB.printf("%c",c); // print the character
}
int x = Wire.read(); // receive byte as an integer
SerialUSB.printf("%d\n",x); // print the integer
}
//
// function that executes whenever data is requested by master
// this function is registered as an event, see setup()
void requestEvent()
{
delay(50);
Wire.write("hello\n"); // respond with message of 6 bytes
// as expected by master
}
slaveのloop内のdelayを小さくすると止まりやすくなります,
止まる瞬間は,receiveEvent()コールバックが呼び出される前であり,その後Loopにも処理が返ってこないため,I2Cを受信した際の割り込みのライブラリ内でハングアップしてると考えています.
止まっている時のI2Cの波形を確認したところ,masterはアドレスを送信するものの,slaveがAckを返さないというところまでは確認できました.
なお,このコードでは確認していませんが,別のコードでI2C通信を行なっている時USBserial出力を全て消しても数日-数週間後には停止しました.
逆に,masterのコメントアウトを外してrequestFromだけを送信する場合は,確認した限りでは停止していません.(タイミングの問題かもしれません)
We become indebted to. My name is Matsuoka from SBKK.
In the environment settings when developing Seeed Wio LTE M1 / NB1 (BG96) with Arduino IDE
When installing the board definition from the board manager
An error will occur at https://azureboard.azureedge.net/toolchain/openocd-0.10.0-32zip.
It seems that the https://azureboard.azureedge.net site is down.
I would appreciate it if you could teach me how to deal with it.
症状
http://www.seeed.co.jp/package_SeeedJP_index.json をボードマネージャのURLに追加したArduino IDE で SeeedJP STM32 Boards バージョン 1.3.0 のインストールに失敗します。
失敗時のエラーの内容は次のとおりです。
CRCが一致しません。ファイルが壊れています。一時的な問題かもしれませんので、もう一度試してみてください。
java.lang.RuntimeException: java.lang.Exception: CRCが一致しません。ファイルが壊れています。一時的な問題かもしれませんので、もう一度試してみてください。
at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onInstallPressed$2(ContributionManagerUI.java:175)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.Exception: CRCが一致しません。ファイルが壊れています。一時的な問題かもしれませんので、もう一度試してみてください。
at cc.arduino.contributions.DownloadableContributionsDownloader.download(DownloadableContributionsDownloader.java:105)
at cc.arduino.contributions.DownloadableContributionsDownloader.download(DownloadableContributionsDownloader.java:60)
at cc.arduino.contributions.packages.ContributionInstaller.install(ContributionInstaller.java:113)
at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onInstallPressed$2(ContributionManagerUI.java:172)
... 1 more
調べて見たところ、779,780行目と786,787行目に誤りがありました。
差分は次のとおりです。
--- a/package_SeeedJP_index.json
+++ b/package_SeeedJP_index.json
@@ -776,15 +776,15 @@
"host": "i686-linux-gnu",
"url": "https://azureboard.blob.core.windows.net/toolchain/openocd-0.10.0.zip",
"archiveFileName": "openocd-0.10.0.zip",
- "checksum": "MD5:3648e4cd6af88ae4e3a59e068723a1d7",
- "size": "10406262"
+ "checksum": "MD5:e2b41d2279b08fb002ecfd13c8764725",
+ "size": "2784537"
},
{
"host": "x86_64-pc-linux-gnu",
"url": "https://azureboard.blob.core.windows.net/toolchain/openocd-0.10.0.zip",
"archiveFileName": "openocd-0.10.0.zip",
- "checksum": "MD5:3648e4cd6af88ae4e3a59e068723a1d7",
- "size": "10406262"
+ "checksum": "MD5:e2b41d2279b08fb002ecfd13c8764725",
+ "size": "2784537"
},
{
"host": "i686-mingw32",
環境
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.