Permalink
Browse files

Merge branch 'tmaster' into future

This branch should work for F1 and F4 devices.  It has currently been tested
with F1 value line, (a VL discovery board) programmed via gdb via both an
stlinkv1 and an stlinkv2.

F4 has _not_ yet been tested on this branch

Conflicts:
	.gitignore
	doc/tutorial/tutorial.pdf
	example/blink/main.c
	gdbserver/Makefile
	gdbserver/gdb-server.c
	src/stlink-common.c
	src/stlink-common.h
	src/stlink-usb.c
  • Loading branch information...
karlp committed Nov 15, 2011
2 parents 794a560 + 5e1e150 commit 83a5eb2ed34ed78edacd92a69f366b89728ac5d0
Showing with 98,721 additions and 184 deletions.
  1. +593 −0 .cproject
  2. +5 −1 .gitignore
  3. +81 −0 .project
  4. +2 −0 AUTHORS
  5. +1 −1 Makefile
  6. +1 −0 README
  7. BIN doc/tutorial/tutorial.pdf
  8. +5 −1 example/blink/main.c
  9. +31 −0 example/blink_flash/main.c
  10. +31 −0 example/stm32f4/Projects/IO_Toggle/Makefile
  11. +142 −0 example/stm32f4/Projects/IO_Toggle/main.c
  12. +91 −0 example/stm32f4/Projects/IO_Toggle/readme.txt
  13. +509 −0 example/stm32f4/Projects/IO_Toggle/startup_stm32f4xx.s
  14. +170 −0 example/stm32f4/Projects/IO_Toggle/stm32_flash.ld
  15. +158 −0 example/stm32f4/Projects/IO_Toggle/stm32f4_discovery.h
  16. +94 −0 example/stm32f4/Projects/IO_Toggle/stm32f4xx_conf.h
  17. +167 −0 example/stm32f4/Projects/IO_Toggle/stm32f4xx_it.c
  18. +54 −0 example/stm32f4/Projects/IO_Toggle/stm32f4xx_it.h
  19. +545 −0 example/stm32f4/Projects/IO_Toggle/system_stm32f4xx.c
  20. +61 −0 example/stm32f4/Projects/discovery_demo/Makefile
  21. +151 −0 example/stm32f4/Projects/discovery_demo/Release_Notes.html
  22. +508 −0 example/stm32f4/Projects/discovery_demo/main.c
  23. +62 −0 example/stm32f4/Projects/discovery_demo/main.h
  24. +808 −0 example/stm32f4/Projects/discovery_demo/selftest.c
  25. +41 −0 example/stm32f4/Projects/discovery_demo/selftest.h
  26. +509 −0 example/stm32f4/Projects/discovery_demo/startup_stm32f4xx.s
  27. +170 −0 example/stm32f4/Projects/discovery_demo/stm32_flash.ld
  28. +94 −0 example/stm32f4/Projects/discovery_demo/stm32f4xx_conf.h
  29. +320 −0 example/stm32f4/Projects/discovery_demo/stm32f4xx_it.c
  30. +54 −0 example/stm32f4/Projects/discovery_demo/stm32f4xx_it.h
  31. +566 −0 example/stm32f4/Projects/discovery_demo/system_stm32f4xx.c
  32. +382 −0 example/stm32f4/Projects/discovery_demo/usb_bsp.c
  33. +252 −0 example/stm32f4/Projects/discovery_demo/usb_conf.h
  34. +2,187 −0 example/stm32f4/Projects/discovery_demo/usb_core.c
  35. +408 −0 example/stm32f4/Projects/discovery_demo/usb_core.h
  36. +93 −0 example/stm32f4/Projects/discovery_demo/usbd_conf.h
  37. +313 −0 example/stm32f4/Projects/discovery_demo/usbd_desc.c
  38. +114 −0 example/stm32f4/Projects/discovery_demo/usbd_desc.h
  39. +238 −0 example/stm32f4/Projects/discovery_demo/usbd_usr.c
  40. +60 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/build/Makefile
  41. +35 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/core_support/arm_common_tables.h
  42. +7,051 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/core_support/arm_math.h
  43. +665 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/core_support/core_cm0.h
  44. +784 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/core_support/core_cm3.c
  45. +1,236 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/core_support/core_cm3.h
  46. +1,378 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/core_support/core_cm4.h
  47. +701 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/core_support/core_cm4_simd.h
  48. +609 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/core_support/core_cmFunc.h
  49. +585 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/core_support/core_cmInstr.h
  50. +158 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/device_support/stm32f4_discovery.h
  51. +7,017 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/device_support/stm32f4xx.h
  52. +100 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/device_support/system_stm32f4xx.h
  53. +172 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/misc.h
  54. +643 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_adc.h
  55. +638 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_can.h
  56. +77 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_crc.h
  57. +338 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_cryp.h
  58. +298 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_dac.h
  59. +103 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_dbgmcu.h
  60. +306 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_dcmi.h
  61. +603 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_dma.h
  62. +177 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_exti.h
  63. +334 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_flash.h
  64. +669 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_fsmc.h
  65. +406 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_gpio.h
  66. +244 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_hash.h
  67. +692 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_i2c.h
  68. +125 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_iwdg.h
  69. +163 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_pwr.h
  70. +509 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_rcc.h
  71. +114 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_rng.h
  72. +875 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_rtc.h
  73. +530 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_sdio.h
  74. +537 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_spi.h
  75. +173 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_syscfg.h
  76. +1,144 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_tim.h
  77. +412 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_usart.h
  78. +105 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_wwdg.h
  79. +243 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/src/misc.c
  80. +1,742 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_adc.c
  81. +1,698 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_can.c
  82. +127 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_crc.c
  83. +850 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_cryp.c
  84. +638 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_cryp_aes.c
  85. +291 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_cryp_des.c
  86. +308 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_cryp_tdes.c
  87. +701 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dac.c
  88. +174 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dbgmcu.c
  89. +534 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dcmi.c
  90. +1,283 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dma.c
  91. +306 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_exti.c
  92. +1,054 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_flash.c
  93. +982 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_fsmc.c
  94. +561 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_gpio.c
  95. +700 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_hash.c
  96. +314 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_hash_md5.c
  97. +317 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_hash_sha1.c
  98. +1,395 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_i2c.c
  99. +263 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_iwdg.c
  100. +638 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_pwr.c
  101. +1,811 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rcc.c
  102. +399 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rng.c
  103. +2,733 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rtc.c
  104. +1,004 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_sdio.c
  105. +1,290 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_spi.c
  106. +204 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_syscfg.c
  107. +3,349 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_tim.c
  108. +1,462 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_usart.c
  109. +303 −0 example/stm32f4/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_wwdg.c
  110. +158 −0 example/stm32f4/STM32_USB_Device_Library/Class/audio/inc/usbd_audio_core.h
  111. +117 −0 example/stm32f4/STM32_USB_Device_Library/Class/audio/inc/usbd_audio_out_if.h
  112. +665 −0 example/stm32f4/STM32_USB_Device_Library/Class/audio/src/usbd_audio_core.c
  113. +318 −0 example/stm32f4/STM32_USB_Device_Library/Class/audio/src/usbd_audio_out_if.c
  114. +137 −0 example/stm32f4/STM32_USB_Device_Library/Class/cdc/inc/usbd_cdc_core.h
  115. +45 −0 example/stm32f4/STM32_USB_Device_Library/Class/cdc/inc/usbd_cdc_if_template.h
  116. +811 −0 example/stm32f4/STM32_USB_Device_Library/Class/cdc/src/usbd_cdc_core.c
  117. +202 −0 example/stm32f4/STM32_USB_Device_Library/Class/cdc/src/usbd_cdc_if_template.c
  118. +187 −0 example/stm32f4/STM32_USB_Device_Library/Class/dfu/inc/usbd_dfu_core.h
  119. +79 −0 example/stm32f4/STM32_USB_Device_Library/Class/dfu/inc/usbd_dfu_mal.h
  120. +49 −0 example/stm32f4/STM32_USB_Device_Library/Class/dfu/inc/usbd_flash_if.h
  121. +46 −0 example/stm32f4/STM32_USB_Device_Library/Class/dfu/inc/usbd_mem_if_template.h
  122. +43 −0 example/stm32f4/STM32_USB_Device_Library/Class/dfu/inc/usbd_otp_if.h
  123. +1,046 −0 example/stm32f4/STM32_USB_Device_Library/Class/dfu/src/usbd_dfu_core.c
  124. +281 −0 example/stm32f4/STM32_USB_Device_Library/Class/dfu/src/usbd_dfu_mal.c
  125. +221 −0 example/stm32f4/STM32_USB_Device_Library/Class/dfu/src/usbd_flash_if.c
  126. +133 −0 example/stm32f4/STM32_USB_Device_Library/Class/dfu/src/usbd_mem_if_template.c
  127. +120 −0 example/stm32f4/STM32_USB_Device_Library/Class/dfu/src/usbd_otp_if.c
  128. +110 −0 example/stm32f4/STM32_USB_Device_Library/Class/hid/inc/usbd_hid_core.h
  129. +460 −0 example/stm32f4/STM32_USB_Device_Library/Class/hid/src/usbd_hid_core.c
  130. +147 −0 example/stm32f4/STM32_USB_Device_Library/Class/msc/inc/usbd_msc_bot.h
  131. +72 −0 example/stm32f4/STM32_USB_Device_Library/Class/msc/inc/usbd_msc_core.h
  132. +98 −0 example/stm32f4/STM32_USB_Device_Library/Class/msc/inc/usbd_msc_data.h
  133. +106 −0 example/stm32f4/STM32_USB_Device_Library/Class/msc/inc/usbd_msc_mem.h
  134. +189 −0 example/stm32f4/STM32_USB_Device_Library/Class/msc/inc/usbd_msc_scsi.h
  135. +393 −0 example/stm32f4/STM32_USB_Device_Library/Class/msc/src/usbd_msc_bot.c
  136. +490 −0 example/stm32f4/STM32_USB_Device_Library/Class/msc/src/usbd_msc_core.c
  137. +128 −0 example/stm32f4/STM32_USB_Device_Library/Class/msc/src/usbd_msc_data.c
  138. +722 −0 example/stm32f4/STM32_USB_Device_Library/Class/msc/src/usbd_msc_scsi.c
  139. +179 −0 example/stm32f4/STM32_USB_Device_Library/Class/msc/src/usbd_storage_template.c
  140. +78 −0 example/stm32f4/STM32_USB_Device_Library/Core/inc/usbd_conf_template.h
  141. +114 −0 example/stm32f4/STM32_USB_Device_Library/Core/inc/usbd_core.h
  142. +149 −0 example/stm32f4/STM32_USB_Device_Library/Core/inc/usbd_def.h
  143. +115 −0 example/stm32f4/STM32_USB_Device_Library/Core/inc/usbd_ioreq.h
  144. +102 −0 example/stm32f4/STM32_USB_Device_Library/Core/inc/usbd_req.h
  145. +135 −0 example/stm32f4/STM32_USB_Device_Library/Core/inc/usbd_usr.h
  146. +476 −0 example/stm32f4/STM32_USB_Device_Library/Core/src/usbd_core.c
  147. +237 −0 example/stm32f4/STM32_USB_Device_Library/Core/src/usbd_ioreq.c
  148. +868 −0 example/stm32f4/STM32_USB_Device_Library/Core/src/usbd_req.c
  149. +195 −0 example/stm32f4/STM32_USB_HOST_Library/Class/HID/inc/usbh_hid_core.h
  150. +122 −0 example/stm32f4/STM32_USB_HOST_Library/Class/HID/inc/usbh_hid_keybd.h
  151. +114 −0 example/stm32f4/STM32_USB_HOST_Library/Class/HID/inc/usbh_hid_mouse.h
  152. +640 −0 example/stm32f4/STM32_USB_HOST_Library/Class/HID/src/usbh_hid_core.c
  153. +338 −0 example/stm32f4/STM32_USB_HOST_Library/Class/HID/src/usbh_hid_keybd.c
  154. +155 −0 example/stm32f4/STM32_USB_HOST_Library/Class/HID/src/usbh_hid_mouse.c
  155. +221 −0 example/stm32f4/STM32_USB_HOST_Library/Class/MSC/inc/usbh_msc_bot.h
  156. +141 −0 example/stm32f4/STM32_USB_HOST_Library/Class/MSC/inc/usbh_msc_core.h
  157. +163 −0 example/stm32f4/STM32_USB_HOST_Library/Class/MSC/inc/usbh_msc_scsi.h
  158. +613 −0 example/stm32f4/STM32_USB_HOST_Library/Class/MSC/src/usbh_msc_bot.c
  159. +559 −0 example/stm32f4/STM32_USB_HOST_Library/Class/MSC/src/usbh_msc_core.c
  160. +186 −0 example/stm32f4/STM32_USB_HOST_Library/Class/MSC/src/usbh_msc_fatfs.c
  161. +674 −0 example/stm32f4/STM32_USB_HOST_Library/Class/MSC/src/usbh_msc_scsi.c
  162. +94 −0 example/stm32f4/STM32_USB_HOST_Library/Core/inc/usbh_conf_template.h
  163. +289 −0 example/stm32f4/STM32_USB_HOST_Library/Core/inc/usbh_core.h
  164. +280 −0 example/stm32f4/STM32_USB_HOST_Library/Core/inc/usbh_def.h
  165. +125 −0 example/stm32f4/STM32_USB_HOST_Library/Core/inc/usbh_hcs.h
  166. +140 −0 example/stm32f4/STM32_USB_HOST_Library/Core/inc/usbh_ioreq.h
  167. +148 −0 example/stm32f4/STM32_USB_HOST_Library/Core/inc/usbh_stdreq.h
  168. +842 −0 example/stm32f4/STM32_USB_HOST_Library/Core/src/usbh_core.c
  169. +253 −0 example/stm32f4/STM32_USB_HOST_Library/Core/src/usbh_hcs.c
  170. +419 −0 example/stm32f4/STM32_USB_HOST_Library/Core/src/usbh_ioreq.c
  171. +551 −0 example/stm32f4/STM32_USB_HOST_Library/Core/src/usbh_stdreq.c
  172. +941 −0 example/stm32f4/STM32_USB_OTG_Driver/Release_Notes.html
  173. +97 −0 example/stm32f4/STM32_USB_OTG_Driver/inc/usb_bsp.h
  174. +287 −0 example/stm32f4/STM32_USB_OTG_Driver/inc/usb_conf_template.h
  175. +408 −0 example/stm32f4/STM32_USB_OTG_Driver/inc/usb_core.h
  176. +158 −0 example/stm32f4/STM32_USB_OTG_Driver/inc/usb_dcd.h
  177. +121 −0 example/stm32f4/STM32_USB_OTG_Driver/inc/usb_dcd_int.h
  178. +244 −0 example/stm32f4/STM32_USB_OTG_Driver/inc/usb_defines.h
  179. +102 −0 example/stm32f4/STM32_USB_OTG_Driver/inc/usb_hcd.h
  180. +126 −0 example/stm32f4/STM32_USB_OTG_Driver/inc/usb_hcd_int.h
  181. +94 −0 example/stm32f4/STM32_USB_OTG_Driver/inc/usb_otg.h
  182. +1,206 −0 example/stm32f4/STM32_USB_OTG_Driver/inc/usb_regs.h
  183. +200 −0 example/stm32f4/STM32_USB_OTG_Driver/src/usb_bsp_template.c
  184. +2,187 −0 example/stm32f4/STM32_USB_OTG_Driver/src/usb_core.c
  185. +472 −0 example/stm32f4/STM32_USB_OTG_Driver/src/usb_dcd.c
  186. +886 −0 example/stm32f4/STM32_USB_OTG_Driver/src/usb_dcd_int.c
  187. +256 −0 example/stm32f4/STM32_USB_OTG_Driver/src/usb_hcd.c
  188. +832 −0 example/stm32f4/STM32_USB_OTG_Driver/src/usb_hcd_int.c
  189. +175 −0 example/stm32f4/STM32_USB_OTG_Driver/src/usb_otg.c
  190. +151 −0 example/stm32f4/Utilities/STM32F4-Discovery/Release_Notes.html
  191. +257 −0 example/stm32f4/Utilities/STM32F4-Discovery/stm32f4_discovery.c
  192. +158 −0 example/stm32f4/Utilities/STM32F4-Discovery/stm32f4_discovery.h
  193. +1,651 −0 example/stm32f4/Utilities/STM32F4-Discovery/stm32f4_discovery_audio_codec.c
  194. +304 −0 example/stm32f4/Utilities/STM32F4-Discovery/stm32f4_discovery_audio_codec.h
  195. +504 −0 example/stm32f4/Utilities/STM32F4-Discovery/stm32f4_discovery_lis302dl.c
  196. +772 −0 example/stm32f4/Utilities/STM32F4-Discovery/stm32f4_discovery_lis302dl.h
  197. +2 −1 flash/main.c
  198. +41 −30 gdbserver/gdb-server.c
  199. +328 −144 src/stlink-common.c
  200. +20 −4 src/stlink-common.h
  201. +2 −2 src/test_usb.c
View
593 .cproject

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -6,4 +6,8 @@ doc/tutorial/*.aux
libstlink.a
test_usb
test_sg
-gdbserver/st-utils
+gdbserver/st-util
+flash/flash
+*.log
+example/*/*.bin
+example/*/*.elf
View
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>stlink</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+ <triggers>clean,full,incremental,</triggers>
+ <arguments>
+ <dictionary>
+ <key>?children?</key>
+ <value>?name?=outputEntries\|?children?=?name?=entry\\\\\\\|\\\|\||</value>
+ </dictionary>
+ <dictionary>
+ <key>?name?</key>
+ <value></value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.append_environment</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.autoBuildTarget</key>
+ <value>all</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildArguments</key>
+ <value></value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildCommand</key>
+ <value>make</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
+ <value>clean</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.contents</key>
+ <value>org.eclipse.cdt.make.core.activeConfigSettings</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableAutoBuild</key>
+ <value>false</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableCleanBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableFullBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.fullBuildTarget</key>
+ <value>all</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.stopOnError</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
+ <value>true</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.cdt.core.cnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+ </natures>
+</projectDescription>
View
@@ -10,3 +10,5 @@ bon@elektron.ikp.physik.tu-darmstadt.de
nelsonjm@macpod.neta
ned@bike-nomad.com
csamuelson@swingpal.com
+bravikov@gmail.com
+jnosky - codegrinder69@hotmail.com
View
@@ -49,6 +49,6 @@ flash:
$(MAKE) -C flash
gdbserver:
- $(MAKE) -C gdbserver
+ $(MAKE) -C gdbserver CONFIG_USE_LIBSG="$(CONFIG_USE_LIBSG)"
.PHONY: clean all flash gdbserver
View
1 README
@@ -110,6 +110,7 @@ If you would link your executable to 0x08000000 and then do
(gdb) load firmware.elf
then it would be written to the memory.
+
FAQ
===
View
Binary file not shown.
View
@@ -49,6 +49,9 @@ static inline void setup_leds(void)
#define LED_RED (1 << 14) /* port D, pin 14 */
#define LED_BLUE (1 << 15) /* port D, pin 15 */
+void _tmain(void) {
+ main();
+}
static inline void setup_leds(void)
{
*(volatile uint32_t*)GPIOD_MODER |= (1 << (12 * 2)) | (1 << (13 * 2)) |
@@ -76,7 +79,8 @@ do { \
__asm__ __volatile__ ("nop\n\t":::"memory"); \
} while (0)
-static void __attribute__((naked)) __attribute__((used)) main(void)
+/* static void __attribute__((naked)) __attribute__((used)) main(void) */
+void main(void)
{
setup_leds();
View
@@ -69,6 +69,37 @@ static inline void switch_leds_off(void)
GPIO_LOW(LD_GPIO_PORT, LD_BLUE_GPIO_PIN);
}
+#elif CONFIG_STM32F4_DISCOVERY
+
+//#define GPIOD 0x40020C00 /* port D */
+# define GPIOD_MODER (GPIOD + 0x00) /* port mode register */
+# define GPIOD_ODR (GPIOD + 0x14) /* port output data register */
+
+# define LED_GREEN (1 << 12) /* port B, pin 12 */
+# define LED_ORANGE (1 << 13) /* port B, pin 13 */
+# define LED_RED (1 << 14) /* port B, pin 14 */
+# define LED_BLUE (1 << 15) /* port B, pin 15 */
+
+void _tmain(void) {
+ main();
+}
+static inline void setup_leds(void)
+{
+ *(volatile uint32_t*)GPIOD_MODER |= (1 << (12 * 2)) | (1 << (13 * 2)) |
+ (1 << (13 * 2)) | (1 << (14 * 2)) | (1 << (15 * 2));
+}
+
+
+static inline void switch_leds_on(void)
+{
+ *(volatile uint32_t*)GPIOD_ODR = LED_GREEN | LED_RED ;
+}
+
+static inline void switch_leds_off(void)
+{
+ *(volatile uint32_t*)GPIOD_ODR = 0;
+}
+
#endif /* otherwise, error */
@@ -0,0 +1,31 @@
+EXECUTABLE=IO_Toggle.elf
+BIN_IMAGE=IO_Toggle.bin
+
+CC=arm-none-eabi-gcc
+OBJCOPY=arm-none-eabi-objcopy
+
+CFLAGS=-g -O2 -mlittle-endian -mthumb
+CFLAGS+=-mcpu=cortex-m4
+CFLAGS+=-ffreestanding -nostdlib
+
+# to run from FLASH
+CFLAGS+=-Wl,-T,stm32_flash.ld
+
+# stm32f4_discovery lib
+CFLAGS+=-I../../STM32F4xx_StdPeriph_Driver/inc
+CFLAGS+=-I../../STM32F4xx_StdPeriph_Driver/inc/device_support
+CFLAGS+=-I../../STM32F4xx_StdPeriph_Driver/inc/core_support
+
+all: $(BIN_IMAGE)
+
+$(BIN_IMAGE): $(EXECUTABLE)
+ $(OBJCOPY) -O binary $^ $@
+
+$(EXECUTABLE): main.c system_stm32f4xx.c startup_stm32f4xx.s stm32f4xx_it.c
+ $(CC) $(CFLAGS) $^ -o $@ -L../../STM32F4xx_StdPeriph_Driver/build -lSTM32F4xx_StdPeriph_Driver
+
+clean:
+ rm -rf $(EXECUTABLE)
+ rm -rf $(BIN_IMAGE)
+
+.PHONY: all clean
@@ -0,0 +1,142 @@
+/**
+ ******************************************************************************
+ * @file IO_Toggle/main.c
+ * @author MCD Application Team
+ * @version V1.0.0
+ * @date 19-September-2011
+ * @brief Main program body
+ ******************************************************************************
+ * @attention
+ *
+ * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+ * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
+ * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
+ * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
+ * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
+ * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+ *
+ * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
+ ******************************************************************************
+ */
+/* Includes ------------------------------------------------------------------*/
+#include "stm32f4_discovery.h"
+#include "stm32f4xx_conf.h"
+
+/** @addtogroup STM32F4_Discovery_Peripheral_Examples
+ * @{
+ */
+
+/** @addtogroup IO_Toggle
+ * @{
+ */
+
+/* Private typedef -----------------------------------------------------------*/
+GPIO_InitTypeDef GPIO_InitStructure;
+
+/* Private define ------------------------------------------------------------*/
+/* Private macro -------------------------------------------------------------*/
+/* Private variables ---------------------------------------------------------*/
+/* Private function prototypes -----------------------------------------------*/
+void Delay(__IO uint32_t nCount);
+/* Private functions ---------------------------------------------------------*/
+
+/**
+ * @brief Main program
+ * @param None
+ * @retval None
+ */
+int main(void)
+{
+ /*!< At this stage the microcontroller clock setting is already configured,
+ this is done through SystemInit() function which is called from startup
+ file (startup_stm32f4xx.s) before to branch to application main.
+ To reconfigure the default setting of SystemInit() function, refer to
+ system_stm32f4xx.c file
+ */
+
+ /* GPIOD Periph clock enable */
+ RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOD, ENABLE);
+
+ /* Configure PD12, PD13, PD14 and PD15 in output pushpull mode */
+ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_12 | GPIO_Pin_13| GPIO_Pin_14| GPIO_Pin_15;
+ GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
+ GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
+ GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
+ GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
+ GPIO_Init(GPIOD, &GPIO_InitStructure);
+
+ while (1)
+ {
+ /* PD12 to be toggled */
+ GPIO_SetBits(GPIOD, GPIO_Pin_12);
+
+ /* Insert delay */
+ Delay(0x3FFFFF);
+
+ /* PD13 to be toggled */
+ GPIO_SetBits(GPIOD, GPIO_Pin_13);
+
+ /* Insert delay */
+ Delay(0x3FFFFF);
+
+ /* PD14 to be toggled */
+ GPIO_SetBits(GPIOD, GPIO_Pin_14);
+
+ /* Insert delay */
+ Delay(0x3FFFFF);
+
+ /* PD15 to be toggled */
+ GPIO_SetBits(GPIOD, GPIO_Pin_15);
+
+ /* Insert delay */
+ Delay(0x7FFFFF);
+
+ GPIO_ResetBits(GPIOD, GPIO_Pin_12|GPIO_Pin_13|GPIO_Pin_14|GPIO_Pin_15);
+
+ /* Insert delay */
+ Delay(0xFFFFFF);
+ }
+}
+
+/**
+ * @brief Delay Function.
+ * @param nCount:specifies the Delay time length.
+ * @retval None
+ */
+void Delay(__IO uint32_t nCount)
+{
+ while(nCount--)
+ {
+ }
+}
+
+#ifdef USE_FULL_ASSERT
+
+/**
+ * @brief Reports the name of the source file and the source line number
+ * where the assert_param error has occurred.
+ * @param file: pointer to the source file name
+ * @param line: assert_param error line source number
+ * @retval None
+ */
+void assert_failed(uint8_t* file, uint32_t line)
+{
+ /* User can add his own implementation to report the file name and line number,
+ ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
+
+ /* Infinite loop */
+ while (1)
+ {
+ }
+}
+#endif
+
+/**
+ * @}
+ */
+
+/**
+ * @}
+ */
+
+/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
Oops, something went wrong.

0 comments on commit 83a5eb2

Please sign in to comment.