Well, there is ARM7/9/11 and PowerPC. How the other RTOS supported in OpenOCD solve this problem?
Giovanni
ChibiOS OpenOCD support
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: ChibiOS OpenOCD support
Abhishek wrote:Looking forward to see it up very soon. However there is OpenOCD v0.6.1 - Right now they are planning a maintenance bugfix release. If you complete it soon, I hope you could send on to the OpenOCD mailing list. At least an announcement should be sufficient.
Hi Abhishek,
I've written an email to Evan Hunter @ broadcom who is the initial author of openocd rtos support. Judging from his mailing list posts he is very enthusiastic about adding new operating systems. I hope to get some feedback from him and how best to continue pushing it upstream.
But before pushing it, I'd very much like to get feedback from my fellow chibios users.
Hopefully tomorrow I finish the guide and you all have to give it some testing
Re: ChibiOS OpenOCD support
Giovanni wrote:Well, there is ARM7/9/11 and PowerPC. How the other RTOS supported in OpenOCD solve this problem?
Giovanni
The register maping from stack is automatically selected depending on the target platform. All one has to do is provide an appropriated definition in the openocd source. Currently there is only cortex-m defined for all other rtos'es. But it's just a matter of adding those mappings to the struct definitions. If you would like to test them I can add those too.
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: ChibiOS OpenOCD support
You may just create the required abstractions in the code, the actual support may come at a later point.
The fact is that nowadays it is mostly Cortex-M even if I have high hopes for e200z Power cores for some reason
Giovanni
The fact is that nowadays it is mostly Cortex-M even if I have high hopes for e200z Power cores for some reason
Giovanni
Re: ChibiOS OpenOCD support
Giovanni wrote:You may just create the required abstractions in the code, the actual support may come at a later point.
The fact is that nowadays it is mostly Cortex-M even if I have high hopes for e200z Power cores for some reason
The abstraction is already there. All what's needed is the sequence with which the registers are saved on the stack.
Have a look at https://github.com/mabl/openocd_chibios/blob/rtos_chibios/src/rtos/ChibiOS.c#L90 and https://github.com/mabl/openocd_chibios/blob/rtos_chibios/src/rtos/rtos_chibios_stackings.c for the stack definitions. All is very generic.
Re: ChibiOS OpenOCD support
Giovanni wrote:mabl wrote:I'm back from holidays and looking at OpenOCD support again. Have you found a solution to the dropping of ch_root? If so, it is not included in the most recent SVN, right?
I forgot about thatI will do something in the evening.
Hi Giovanni,
I do not want to annoy you - but I'm really eager to get this into a usable state. Any progress on this front?
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: ChibiOS OpenOCD support
I'll try in the evening, I am very busy with a secret project that will affect ChibiOS and change the destiny of humanity 
Giovanni
Giovanni
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: ChibiOS OpenOCD support
OK, the destiny can wait for a little bit, I added persistence to the object, note now it is named ch_debug instead of ch_root.
About the FPU flag, can you detect it at runtime by looking at the SCB_FPCCR or SCB_FPCCR registers? see crt0.c for an example.
Giovanni
About the FPU flag, can you detect it at runtime by looking at the SCB_FPCCR or SCB_FPCCR registers? see crt0.c for an example.
Giovanni
Re: ChibiOS OpenOCD support
Giovanni, are you sure your code works?
With disabled GC, I see the symbol:
but not without it:
I'll look into the FPU stuff.
With disabled GC, I see the symbol:
Code: Select all
# arm-none-eabi-nm build/ch.elf | grep ch_debug | wc -l
1but not without it:
Code: Select all
# arm-none-eabi-nm build/ch.elf | grep ch_debug | wc -l
0
I'll look into the FPU stuff.
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: ChibiOS OpenOCD support
I saw the symbol in the map file, I'll check again. I'd hate to have to waste a pointer to point there.
Giovanni
Giovanni