-
Notifications
You must be signed in to change notification settings - Fork 131
String declaration for variables will freeze the code on the STM32 f103 #944
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Logfile with all verbose data on the original Arduino IDE 1.8,5 |
i dont know where the verbose paramter is. i hope thats enough debug info. if not, please let me know |
Very strange behaviour indeed. Unfortunately the Arduino IDE log only contains the compile of the .ino file but still there is a differences that may explain the different behaviour. Best regards As an independent open source project we value your submission, but we ask for support, either by helping us out coding (yeah, we do understand it does require time) or a Patreon contribution (starting from as low as 1$ a month): this allows us to support people who support us back! |
Hello Jantje. I found an extra verbose option inside the Arduino Ide preferences.txt config file. So I installed Arduino IDE new, into the standard Path. And i installed a fresh Sloeber to C:/Sloeber, because you wrote about different pathes. I added my private hardwarepath and the .json file. And i switched to the 2018.2.26 in Sloeber. Unfortunely the Sting command will freeze the code on the microcontroller, exactly when the command is executed. Maybe you have 5 Minutes to check it with the STM32 F103 C8T8 board. (The C8T8 is introduced with 64kb, but in reallity they all have 128kb flash) If you are interested, i can send you 10$ and you order it on ebay. My test skript is fast uploaded, and the LED is onboard. The only thing you need is a FTDA Serial adapter connected to PA9+PA10+GND and a Microusb cable only for the 5V Power, or you can power it over the FTDI. Thank you very much, and i am a new, small Jantje patreon supporter. :-) |
Arduino LOG, extra verbose |
Thanks for becoming a patron |
okay. one moment. i think the debug is same, like before. only the path may changed. Sloeber log: https://pastebin.com/EEhCa611 |
Os versus Og can make a difference I'll look into why that difference exists |
maybe i change the path in soeber to the arduino IDE compiler? if we can not find any solution, did you think about my 10$ idea? i can send it to you by paypal or patreon. so you can order one of this microcontrollers on ebay, to check what wents wrong. now, i am on a point where i need the eclipse IDE. my source is now over 1000 lines and without the outline feature it is a torture... ;'-) i can copy the source fom eclipse to arduino ide, but this not as good as using your great plugin. :-) |
Og is no optimisation and is when you select debug. |
I see there are lots of S files. This might be a duplicate of #660 |
I read threat #660, maybe it helps? is it possible to change the path from the sloeber compiler to the arduino compiler? make this sense? |
I cant find any .s or .asm files, like threat #660 |
Maybe you have to many libraries. Can you delete all the libraries in the libraries folder? If they are needed they will reappear (some builds may be required) |
i found an interesting thing... Maybe this helps to find the failure. Maybe its inside the string class? ** Why the word CHAR is purple highlighted and BOLD, and the word STRING is green and not bold?? |
The string is green here with me as well. |
Hello Jantje, thanks for fast reply. |
i`ve shorten this threat, by uploading all LOGs to pastebin. My Samsung Tablet has frozen, if i go inside this threat :-) I took a new LOG capture, with my new 32 bit sloeber on drive E:/, see next posting. |
new Sloeber freezing LOG at pastebin: https://pastebin.com/hjfhQhyb new Sloeber freezing LOG at pastebin: |
Don't do this. ever!! |
okay, i got this from stm32duino site. |
If you refer to these http://wiki.stm32duino.com/index.php?title=Arduino_with_Eclipse installation instructions... the last update is from 2016!!!! And even then they were outdated. |
I'm not sure what you are doing but you miss Sloeber basics. |
now i am more then 5 days installing sloeber, over and over and over. more then 30 times... now i installed a fresh windows into VM-Ware, and it does work....., like before. now i have seen a lot of your movies and it teaches me a lot of deeply hidden features. |
Not sure why you want to use a vm as sloeber runs on windows mac and linux
This is not needed
This sounds like it should be.
I think that is a good idea. As we have seen, Sloeber uses the same build commands as Arduino IDE so there must be a problem with "files that should not be part of the build" or linking problems. There should be more knowledge about that on the stm32 forums.
I have been wrong before but at this point in time I agree with this. This is also why I think me having the same hardware will not help and why I think the stm32 forums is the place to ask questions. |
According to this stackoverflow post running natively doesn't work due to incompatible java runtime https://stackoverflow.com/questions/7352493/failed-to-load-the-jni-shared-library-jdk
As all json downloads fail I assume you have told windows that the java runtime is not allowed to access the internet/ You could disable your firewall and start sloeber to see if that assumption is true. Note that the stable contains a jre folder. This is the java runtime included with sloeber and when you have a jre subfolder that one gets used.
IMHO you have been trying to many things and missed some basic things. Add to that the "security features" of windows 10 and 32bit versus 64 bit; and the tool providers are off for "sitting with a blind man trying to describe yellow". Not a nice place for any of us ;-) |
the java works, and here are no firewall restrictions. and i am not a noob :-) only with C... i do not have experience with gcc and c, but i have more then 30 years expirence with 6510 assembler, basic, html, php, mysql, apache, ms dos+batch, win 3.1, win95, win 2000, win7, win8, win10, small linux, photoshop, and now i am learning c and microcontroller programming. its not my first rodeo. "sitting with a blind man trying to describe yellow" hurts and insults me. "My advice: stick to one version (like sloeber V4.2 stable 64 bit on windows native) to get it running. " |
i found an other board definition package, copyright seems directly from stm for arduino. 19:33:24 **** Build of configuration Release for project clock **** 19:33:25 Build Finished (took 948ms) Arduino working compile log, to compare: its very interesting, how much errors i can produce, with a full automatic tool. :-)) |
after viewing the esp32 movie, and following all the steps, my ESP32 compiles well. then i decided to remove all my added arduino related .json files and i do it the .git way. 05:07:04 **** Build of configuration Release for project stmduinotest1 **** 05:07:05 Build Finished (took 983ms) |
the bluepill thing is issue #927 I'm not sure which repository you used for the esp32 (which has a json by now as well) but in the one I use in the video platform.txt contains following line |
hello Jantje, your hint with sketch/build_opt.h works. now it compiles the source. great. unbeleavable. for real, how could i imagine to insert a blank textfile into a not existing folder? FINALY, IT WORKS! String declaration WORKS. YOU ARE THE BEST no more freezing. in short: but after compiling, the build_opt.h is gone... |
the command line states
Sloeber assumes everything in the release folder to be "created resources" as such these get deleted when Sloeber or CDT thinks it is necessary.
Which explain the existence of this file in the gcc command. There is also to work around this: add following command to project properties->C/C++build->settings->build steps->pre build steps->command |
Automatic install and import in the project is only supported by for libraries that have a foldername = includename-.h |
thank you so much for your assitance. great. actually the adafruits importing, only the DHT makes a bit trouble, but i follow your manual. |
hello jantje. my batch started from inside the project directory and works. its not the coolest, but a working way. actually i am fighting with the libs. the optimized STM32 libs, for using DMA GFX lib, calls something that is not inside the <SPI.h>. tested with 3 different SPI.h libs ... later i search deeper inside the libs for the dependencies and calls. best regards, |
I tested it here and it did work for me. It is pure CDT functionality (nothing to do with Sloeber) heavily used by lots of users.
|
its unbeleavable, here it worked one time, too. i have nothing changed. 22:50:19 **** Build of configuration Release for project STM32coreTest1 **** 22:50:20 Build Finished (took 978ms) its funny. i dont have to understand this. :-) |
apropos not linked in... at the end of installing the .json repo, a error occours.... this is the .json link: |
I created issue #951 for the ln issue |
It would be cool to see if the nightly fixes you String issue now 951 is fixed. |
the problem is, i tried 3 different STM32duino projects... all has problems. STM32 Arduino PROJECT 1 https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json after reading your last posting, i reinstalled the .json, the error occours like before. (-)STM32 Arduino PROJECT 2 there is one more arduino stm git... 23:33:43 Build Finished (took 559ms) here it could not find the path of ......... ???? may this works, but i cant compile... STM32 Arduino PROJECT 3 (THIS IS THE .JSON REPO I WOULD PREFER) http://dan.drown.org/stm32duino/package_STM32duino_index.json with this stm32duino .json repo i startet on arduno ide, and it worked perfectly. works with hSPI, DMA optimzed GFX llibs. |
i think i make a couple of days a break with the bluepill... i need blue pills for my headache. |
Bleading edge feelings ;-) |
its a bit offtopic, sorry. 'Building target: ESP32_myHumi' its compiled as a release build. |
@ORGATHM As an independent open source project we value your submission, but we ask for support, either by helping us out coding (yeah, we do understand it does require time) or a Patreon contribution (starting from as low as 1$ a month): this allows us to support people who support us back! |
This issue has been fixed by #1005. * at least I tried the given Blink.ino.txt on a bluepill and it now works fine. I'm sure that the String object was using a malloc/_brk from the newlib instead of the variant wirish/syscalls.c |
Thanks for the info. |
Hello.
I got a strange problem. I startet a project in the original Arduino IDE. It works great. After hundrets of rows coding and a dozend of functions, i feel annoyed about the bad arduino IDE.
So i searched for a better IDE. After a couples of hours i found the great Sloeber Eclipse mod.
So far so good, I inserted the board extension for STM32 (F103C8T8), STM32duino:
http://dan.drown.org/stm32duino/package_STM32duino_index.json
Some sample Scripts are running well. For example, the Analog Clock over SPI ILI9341 Display.
Only my own Project freezes. The Debuglog shows a couple of yellow and one red bugs, but with this bugs the Analog Clock demo skripts works. That was not the real Problem.
The real problem is not marked as a probem... if the programm comes to this lines onto the microcontroller, it freezes.
For better understanding and replicating the problem, i modded the "blink" skript.
So everybody can check it by himself.
I used the String definition for Variables, a couple of times I used it to push static Text into my functions.
Both will run with ardiono original IDE, but not with Sloeber.
`/*
Blink by Scott Fitzgerald
Modified by Roger Clark. www.rogerclark.net for Maple mini 25th April 2015 , where the LED is on PC13
Modified by DOMin8or for "String" type variables problem demonstration.
same freezing with function definition like
void myFunction(String inputText)
{;}
*/
#include "Arduino.h"
// #include "header.h"
// #include <string.h>
void setup() {
// initialize digital pin PC13 (internal led from STM32 F103) as an output.
pinMode(PC13, OUTPUT);
}
void loop() { // The 5 rounds loop will work
for(byte xi=0;xi<5;xi++)
{
digitalWrite(PC13, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(PC13, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
String text="test"; // this is the bad boy, that freezes the code
for(byte xi=0;xi<10;xi++) // this code will NOT start. the LED is now ON
{ // this fast blink loop will not start.
digitalWrite(PC13, HIGH); // (turn the LED on (HIGH is the voltage level)
delay(200); // (wait for 200ms)
digitalWrite(PC13, LOW); // (turn the LED off by making the voltage LOW)
delay(200); // (wait for 200ms)
}
}
`
BlinkTest.ino.txt
I make some log files, after finding the verbose options in both IDE´s .
The text was updated successfully, but these errors were encountered: