1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-02 10:24:11 +01:00
LibrePilot/flight/PiOS/STM32F10x
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
..
Libraries OP-423 do the arch specific stuff (in reset vector) to hide this from portable code: 2011-06-13 21:49:17 -07:00
link_stm32f10x_HD.ld Directory re-structuring. Doesn't compile yet, need to commit first. 2009-12-01 14:04:30 +00:00
link_stm32f10x_MD.ld build: convert all app loads to require bootloaders 2011-05-08 12:40:29 -04:00
link_STM3210E_INS_BL_sections.ld build: remove all remaining use of -DUSE_BOOTLOADER 2011-05-23 18:21:42 -04:00
link_STM3210E_INS_memory.ld build: refactor fw, bl and bu rules 2011-05-23 18:21:42 -04:00
link_STM3210E_INS_sections.ld link: Use alternate declaration of pios_board_info_blob 2011-05-23 18:21:42 -04:00
link_STM3210E_OP_BL_sections.ld build: remove all remaining use of -DUSE_BOOTLOADER 2011-05-23 18:21:42 -04:00
link_STM3210E_OP_memory.ld build: add pios_board_info_blob struct to bootloader flash image 2011-05-16 08:30:30 -04:00
link_STM3210E_OP_sections.ld OP-423 also add changes to OP. (I can not test it because I don't have a board so only compile test) 2011-06-13 17:10:14 -07:00
link_STM32103CB_AHRS_BL_sections.ld build: remove all remaining use of -DUSE_BOOTLOADER 2011-05-23 18:21:42 -04:00
link_STM32103CB_AHRS_memory.ld build: add pios_board_info_blob struct to bootloader flash image 2011-05-16 08:30:30 -04:00
link_STM32103CB_AHRS_sections.ld link: Use alternate declaration of pios_board_info_blob 2011-05-23 18:21:42 -04:00
link_STM32103CB_CC_Rev1_BL_sections.ld build: remove all remaining use of -DUSE_BOOTLOADER 2011-05-23 18:21:42 -04:00
link_STM32103CB_CC_Rev1_memory.ld build: add pios_board_info_blob struct to bootloader flash image 2011-05-16 08:30:30 -04:00
link_STM32103CB_CC_Rev1_sections.ld OP-423 do the arch specific stuff (in reset vector) to hide this from portable code: 2011-06-13 21:49:17 -07:00
link_STM32103CB_PIPXTREME_BL_sections.ld build: remove all remaining use of -DUSE_BOOTLOADER 2011-05-23 18:21:42 -04:00
link_STM32103CB_PIPXTREME_memory.ld build: add support for EE bank on pipx boards 2011-05-24 01:10:40 -04:00
link_STM32103CB_PIPXTREME_sections.ld link: Use alternate declaration of pios_board_info_blob 2011-05-23 18:21:42 -04:00
pios_adc.c CC-8: Move the queue registration into the ADC PIOS driver to allow other 2011-02-03 02:42:43 +00:00
pios_debug.c Small fix to PIOS_DEBUG_PinValue8Bit(), was also influencing other IO pins 2011-03-05 12:53:52 +00:00
pios_delay.c Extend PiOS DELAY to allow querying the time value in uS 2011-05-26 12:19:04 -05:00
pios_exti.c OP-377 PiOS/BMP085 Update BMP085 driver to be FreeRTOS agnostic 2011-04-14 09:53:04 +00:00
pios_gpio.c Flight/PiOS: Whitespace changes 2010-09-27 07:28:45 +00:00
pios_i2c.c OP-326 Long I2C messages starve the other drivers 2011-03-09 17:12:18 +00:00
pios_irq.c Flight/PiOS: Whitespace changes 2010-09-27 07:28:45 +00:00
pios_led.c Flight/PiOS: Whitespace changes 2010-09-27 07:28:45 +00:00
pios_ppm.c PPM driver cleanup 2011-03-08 18:52:50 +00:00
pios_pwm.c OP-256 PIOS/PWM: Converting PWM input to use standard driver structure. 2011-01-24 07:51:45 +00:00
pios_rtc.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_servo.c Remove un-used code 2011-06-02 20:21:26 -07:00
pios_spektrum.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_spi.c hwinit: Convert SPI drivers to dynamic init 2011-02-12 22:19:50 +00:00
pios_sys.c OP-509: fix for ld symbol reference (also fixes build with 4.5.2 gcc) 2011-06-01 00:31:27 +03:00
pios_usart.c hwinit: Convert COM and USART to dynamic init 2011-02-12 22:19:43 +00:00
pios_usb_hid_desc.c Flight/HID: NAK instead of stall USB bus (former was mistake) and change 2010-10-20 05:21:25 +00:00
pios_usb_hid_istr.c Flight/PiOS: Whitespace changes 2010-09-27 07:28:45 +00:00
pios_usb_hid_prop.c Flight/PiOS: Whitespace changes 2010-09-27 07:28:45 +00:00
pios_usb_hid_pwr.c Flight/PiOS: Whitespace changes 2010-09-27 07:28:45 +00:00
pios_usb_hid.c hwinit: Convert COM and USART to dynamic init 2011-02-12 22:19:43 +00:00
pios_wdg.c PIOS/WDG: Add back the returned delay for code that wants to clear WDG more 2011-01-13 19:01:33 +00:00
startup_stm32f10x_HD_OP.S OP-423 also add changes to OP. (I can not test it because I don't have a board so only compile test) 2011-06-13 17:10:14 -07:00
startup_stm32f10x_HD.S OP-21: Made changes to OpenPilot makefile too allow building for bootloader and non-bootloader targets. Use "USE_BOOTLOADER = YES" to build for the OpenPilot Bootloader. 2010-03-13 20:01:31 +00:00
startup_stm32f10x_MD_CC.S OP-423 do the arch specific stuff (in reset vector) to hide this from portable code: 2011-06-13 21:49:17 -07:00
startup_stm32f10x_MD.S Changes to PiOS to be compatible with the AHRS. 2010-05-11 13:36:13 +00:00