1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-30 08:24:11 +01:00
LibrePilot/flight/CopterControl/System
Mathieu Rondonneau c95b199166 OP-423 do the arch specific stuff (in reset vector) to hide this from portable code:
- switch back to MSP stack before starting the scheduler so that the sheduler can use the IRQ stack (when/if needed).
 - call the C portable function in heap1 to claim some stack back (the number to claim is taken from linker file).
 - start the scheduler from reset vector (I move this here from main because it make sense to not go back to C (so that I don't need to copy the rolled stack in case the sheduler returns). This make it more clean.
 - Also I have added the call to the mem manager if sheduler return. that way, we don't reset indefinitely if memory runs out. We will go to this handler and figure things out (right now, it's just looping but at least not rebooting. Probably trap NMI would be better (later improvement).

The part missing for this part is the weak attribute for the function in heap1.c so that we don't have to update everything with empty stub.
I think the weak atrribute for C function called in assembly is arch dependent so I am not sure if this is possible (will look into it, maybe somebody outthere nows).
Right now, it's heap1 dependent and won't work with heap2. I will clean that up the next couple of days.

I did some test and it looks good.
this is without init code re-organization so we don't free as much as we will be it's good starts.

This compile with sim_posix (since it does not affect portable code) so this is really clean.
I only tested this with CC. I will port it for OP when I will work on heap2.
2011-06-13 21:49:17 -07:00
..
inc OP-423 Step-1: split system stack and implement water mark for IRQstack: 2011-06-12 20:23:00 -07:00
alarms.c do not force telemetry update when alarm is changed - this was bypassing the MetaData of the UAVObject and seem to be a relict from times where no metadata existed - now doing it the MetaData way with onchange as updatemode - see http://forums.openpilot.org/topic/4208-systemalarms-bypassing-updatemode-from-metadata/ and OP-431 2011-04-24 03:43:05 +02:00
coptercontrol.c OP-423 do the arch specific stuff (in reset vector) to hide this from portable code: 2011-06-13 21:49:17 -07:00
pios_board_posix.c OP-265 Flight reorganization of UAVObjects and Modules up a directory 2011-01-14 01:38:19 +00:00
pios_board.c Spektrum rtc supervisor working, tested on CC and all outputs are activated. Needs review and testing before merge. 2011-05-29 14:52:22 +03:00
pios_usb_hid_desc.c Should fix CopterControl showing as Openpilot on DropDown box. 2011-04-29 21:42:59 +01:00
taskmonitor.c OP-265 Flight reorganization of UAVObjects and Modules up a directory 2011-01-14 01:38:19 +00:00