Forum Replies Created
-
AuthorPosts
-
JohananParticipant
I maneged to run the debug test OK. (see attached screen).
However when starting debug the GDB is halted, see attached screens and file. As you can see I waited the full 5 minutes as suggested in the generic GDB help page…
Thanks
Johanan
Attachments:
You must be logged in to view attached files.JohananParticipantThanks.
So easy if you know…
JohananParticipantGood to know.
I started an example with Arduino IDE (not a big fan), works after some efforts, mainly that this board creates 2 com ports, one for ESP32 and one for K210. However the K210 changes to a debug port, and I had to remove it, then I regained the correct com port, and was able to upload a file to the Maixdunio.
Once this worked, I tried to import the sketch to VisualGDB, but failed to setup the debugger, or com port.
FYI.
Regards
Johanan
Attachments:
You must be logged in to view attached files.JohananParticipantWell, After a long time I had to reduce code size, and found that stm32f1xx_hal_gpio.c is the only problematic one.
I remove optimization from it and now it works, my code size shrieked by about 30 %.
No idea what is the problem in that file, however.
Johanan
JohananParticipantIt looks a bit complex but workable.
However both PC running VS and PC running debugger are normally behined nat and not at all on the same network. I assume some dynmic DNS and port forwording is needed, or to establish a vpn for work. Which is the best? Can you advice on configuration?
Thanks.
JohananParticipantI wonder why do you need the bootloader while you debug your application.
I usually have a link file for debug, which starts at 0x8000000, and release link file which starts address is after the bootloader.
Bootloader is (and should be) a stable and not changed during application development, TMHO.
Johanan
JohananParticipantNo Joy.
Downloaded 5.5Preview 1, but it didnt work.
Tried to update the existing GCC 5.2.0 to 8.2.0 that according to site (https://gnutoolchains.com/esp32/) should support ESP-IDF4.0. But it didn’t work at all.
Tried to find esp-idf 4.0 manually, couldn’t find it. Found only esp-idf 4.0 beta 1 and esp-idf 4.0 beta 2. (unstable)Can you advice steps to install the VisualGDB working with esp-idf 4.0, what is needed to download, from where and which version?
Thanks- This reply was modified 5 years ago by Johanan.
JohananParticipantNow this looks OK.
Only thing that may be a concern to you is that when I set the Arduino IDE directory to correct path, then the project is not built correctly.
If I leave this setting empty, all is OK (and nothing is downloaded).
Regards
JohananParticipantWe are making progress.
If I clear the Arduino IDE directory ( 1.jpg), it compiles and run, but I am unable to see debugged source code. ( it does not download anything).
The break point is off (2.jpg) and it shows (3.jpg).
Using bluePill stm32F103C8, and STlink-V2
If I set the Arduino IDE directory to the correct value (C:\Program Files (x86)\Arduino) it make no difference.
Regards.
Johanan
Attachments:
You must be logged in to view attached files.JohananParticipantYes it is working now.
One of the longest blinking led project I ever did 🙂
Thanks for your support, that’s one more reason why I like VisualGDB so much.
Regards
Johanan
JohananParticipantI tried to add these 2 lines:
asm(“ldr r0, =0x20001FFF”);
asm(“mov sp,r0”);which changed the SP to 0x20001FFF, but it did not fix the problem.
I even tried 0x20000FFF, same problem.
So If the SP is decreased before anything is written, then 0x20002000 should be OK, and this is not the reason for the problem.
Johanan
- This reply was modified 5 years, 1 month ago by Johanan.
JohananParticipantWell, I think the SP is the problem.
In Keil it is initialized to RAMBASE+0x408.
With GDB it is initialized to RAMBASE + 0x2000
Whoever the chip ram is only 8Kbyte, and max adr should be RAMBASE+0X1FFF for the stack pointer. not 0x2000.
So the first call to a function creates the fault signal.
Can I just add
LDR R13 0x1FFF
somewhere ? (I am not familiar with arm assembly)
Thanks
Attachments:
You must be logged in to view attached files.JohananParticipantI did,
It really downloaded again all the libraries, but the problem is stubborn. It is the same.
In another post I have strange issues with simple STM32L05 device. Should I Uninstall VisualGDB, clean up and re-install it?
if Yes, please specify which directories should be deleted after uninstall, in order to leave no traces so I can make a very fresh install.
Thanks
JohananParticipantWell, I connected an external 3.3V power to the board, same result.
In order to check I used MXCube and generated a Blink project for Keil.
Build the project with Keil (limited to 32K, but more then enough for this blinking LED), works without problems.
Now I started a new project in VisualGDB, and imported that working Keil project. Build it and try to run.
same Hard fault, at the same __libc_init_array();
I think the conclusion is clear, something bad in the toolchain for this STM32L053R8 (64K Flash).
Any Ideas?
Thanks.
JohananParticipantHere it is:
—— Build started: Project: ArduinoProject1, Configuration: Debug Generic_STM32F103C_series ——
Launching Arduino builder…
VisualGDB: Run “C:\Program Files (x86)\Sysprogs\VisualGDB\Arduino\arduino-builder.exe -compile -logger=machine -fqbn=stm32duino:STM32F1:genericSTM32F103C:device_variant=STM32F103C8,upload_method=DFUUploadMethod,cpu_speed=speed_72mhz,opt=osstd -build-path C:\MyWork\ArduinoProjects\ArduinoProject1\Output\Generic_STM32F103C_series\Debug -unoptimize=sketch -hardware “C:\Program Files (x86)\Arduino/hardware” -hardware C:\Users\Johanan\AppData\Local/Arduino15/packages -tools “C:\Program Files (x86)\Arduino/tools-builder” -tools C:\Users\Johanan\AppData\Local/Arduino15/packages -built-in-libraries “C:\Program Files (x86)\Arduino/libraries” -libraries C:\Users\Johanan\Documents\Arduino\ -prefs=runtime.tools.stm32tools.path=C:\Users\Johanan\AppData\Local\Arduino15\packages\stm32duino\tools\stm32tools\2019.9.24 sketches/ArduinoProject1.ino” in directory “C:\MyWork\ArduinoProjects\ArduinoProject1” on local computer
error: ctags pattern is missing -
AuthorPosts