Page 2 of 4
Re: Starting from scratch again... On SW4STM32 now
Posted: Fri Sep 23, 2016 1:36 pm
by Chudik
steved wrote:It's necessary to change some of the linked variable definitions (in particular CHIBIOS - the root of the Chibi directories, and possibly others) and re-import demo projects (if you want them available).
Also necessary to change paths in the startup batch files.
I found it useful being able to compare properties/setup with an installation on C:\ to make sure I hadn't missed anything.
Well, I can put it to root of the other drive/partition in my system or use subst command and spend another day (hopefully only one) to replace all related paths. Besides, for any new version I'll probably need to do it again. I don't like the idea of having a monster size directory for the Studio with all its insides together with bunch of demo projects and my future projects that must to be located inside Chibios directory.
While I understand that for Giovanni it is easy way to handle his project

Re: Starting from scratch again... On SW4STM32 now
Posted: Fri Sep 23, 2016 1:43 pm
by Giovanni
You don't need to replace paths, just remove the projects from workspace and re-import then.
You also need:
1) Change paths in the launch batch file.
2) Change the workspace variable CHIBIOS (in eclipse) to point to the new ChibiOS path.
Giovanni
Re: Starting from scratch again... On SW4STM32 now
Posted: Sun Sep 25, 2016 3:51 am
by Chudik
steved wrote:It's necessary to change some of the linked variable definitions (in particular CHIBIOS - the root of the Chibi directories, and possibly others) and re-import demo projects (if you want them available).
Also necessary to change paths in the startup batch files.
Tried all this with moving to E: drive (where I have all my non system programs installed)
Demo compiled showing no problems, but when I open the main - it shows a lot of errors: can't find types, functions definitions etc, etc...
And it does not provide any choice of debug interfaces...
May be you could share your Chibistudio version with all your changes for drive D? I have SSD as my drive C: and would not like to write extra stuff on it.
Re: Starting from scratch again... On SW4STM32 now
Posted: Tue Sep 27, 2016 3:52 am
by Chudik
One more day of trying switching to SW4STM32.
Exported one demo project from ChibiStudio and imported to SW4STM32.
Finally, after some manipulations I was able to compile the demo project without errors and warnings.
Here I have a big question: Where are OpenOCD driver defined? I guess, they should be described in some file that need to be copied to some directory.
Where?
Re: Starting from scratch again... On SW4STM32 now
Posted: Tue Sep 27, 2016 7:51 am
by Giovanni
It is that .launch file in the project, I am not sure if it requires changes for that toolchain. I recommend following their guides for flashing devices.
Giovanni
Re: Starting from scratch again... On SW4STM32 now
Posted: Tue Sep 27, 2016 7:59 am
by Chudik
Both IDEs based on Eclipse. That means, the toolchain should be very similar.
I don't know which way might be easy for the project imported from ChibiStudio - implement the same technique or try to combine with their technique.
Re: Starting from scratch again... On SW4STM32 now
Posted: Thu Sep 29, 2016 8:03 am
by Chudik
I have now two sets:
1. In the office where I'm trying to transfer a project to SW4...
2. At home, where I do the opposite way - trying to run the ChibiStudio on drive different than C:
In both cases I was able to configure the projects properties that can compile without errors and warnings.
Later I will put here a list of things that need to be done for my office case. It is a tad tricky, requires changes in the Makefile and copy some files from ChibiStudio tools directories to the SW4 tools.
Here, what should be done for moving ChibiStudio to another drive (useful if drive C is SSD)
- Change paths in <Drive>:\ChibiStuio\*.bat files
- Links to the bats in ChibiStudio directory. Change in their parameters C: to <Drive>: as well. You might want to change their icons as well, get them from <Drive>:\ChibiStudio\eclipse
- In file <Drive>:\ChibiStudio\eclipse\configuration\.settings\org.eclipse.ui.ide.prefs change paths in the following string RECENT_WORKSPACES=C\:\\ChibiStudio\\workspace161\nC\:\\ChibiStudio\\workspace26\nC\:\\ChibiStudio\\workspace_trunk\nC\:\\ChibiStudio\\workspace30
to
RECENT_WORKSPACES=<Drive>\:\\ChibiStudio\\workspace161\n<Drive>\:\\ChibiStudio\\workspace26\n<Drive>\:\\ChibiStudio\\workspace_trunk\n<Drive>\:\\ChibiStudio\\workspace30
After that the whole ChibiStudio located in correct place and when you start it shows all available projects. However, to open any particular one you have to delete it from the list and import again.
The problem after compiling - it again won't debug the project. You choose the correct debug interface (ST LinkV2-1 for the Nucleo board), choose correct .launch file from the debug directory and get the following messages (may be it will ring a bell)
Code: Select all
symbol-file E:\\ChibiStudio\\chibios161\\demos\\STM32\\RT-STM32L152RE-NUCLEO\\build\\ch.elf
Reading symbols from E:\ChibiStudio\chibios161\demos\STM32\RT-STM32L152RE-NUCLEO\build\ch.elf...done.
set remotetimeout 20
monitor reset init
"monitor" command not supported by this target.
monitor sleep 50
"monitor" command not supported by this target.
load E:\\ChibiStudio\\chibios161\\demos\\STM32\\RT-STM32L152RE-NUCLEO\\build\\ch.elf
You can't do that when your target is `None'
tbreak main
Cannot access memory at address 0x8000836
continue
The program is not being run.
Re: Starting from scratch again... On SW4STM32 now
Posted: Thu Sep 29, 2016 8:29 am
by steved
Probably not the way it was intended, but I create a project-specific batch file which I use to start the debugger, prior to launching a debug configuration:
Code: Select all
D:
cd \ChibiStudio\workspace161\DDF1014_Graphics_Cont
D:\ChibiStudio\tools\openocd\bin\openocd.exe -s "D:\ChibiStudio\tools\openocd\scripts" -f stm32f4discovery.cfg -f add_rtos.cfg
(add_rtos.cfg is a small file which enables the Chibi-specific features of openocd:
Code: Select all
$_TARGETNAME configure -rtos ChibiOS
)
Re: Starting from scratch again... On SW4STM32 now
Posted: Thu Sep 29, 2016 6:14 pm
by Chudik
steved
Do you run this .bat file once or each time before pressing debugging button?
Re: Starting from scratch again... On SW4STM32 now
Posted: Thu Sep 29, 2016 8:38 pm
by steved
Chudik wrote:steved
Do you run this .bat file once or each time before pressing debugging button?
Just the once. It leaves a command line window open (and you can actually see some of the debugging activity).
Then close the window once finished for the day.
Occasionally things get confused (starting with my brain, usually) and I have to close the window (ctrl-C) and restart.