Permalink
Browse files

NXP-IoT-RPK: Hello world

Signed-off-by: J. German Rivera <jgrivera67@gmail.com>
  • Loading branch information...
jgrivera67 committed Aug 17, 2018
1 parent 7d09ee8 commit 21231531d6ac7adf909845d9261a0a7ecf3b9cb9
Showing with 15,743 additions and 427 deletions.
  1. +26 −6 .../microcontroller-arm_cortex_m.adb → arch_specific/arm_cortex_m/microcontroller-arch_specific.adb}
  2. +9 −4 .../microcontroller-arm_cortex_m.ads → arch_specific/arm_cortex_m/microcontroller-arch_specific.ads}
  3. +180 −0 building_blocks/board_specific/hexiwear/microcontroller_clocks.adb
  4. +56 −0 building_blocks/board_specific/nxp_iot_rpk/color_led-board_specific_private.ads
  5. +265 −0 building_blocks/board_specific/nxp_iot_rpk/low_level_debug.adb
  6. +171 −0 building_blocks/board_specific/nxp_iot_rpk/microcontroller_clocks.adb
  7. +3 −2 building_blocks/cpu_specific/arm_cortex_m4/microcontroller-cpu_specific.ads
  8. +154 −0 building_blocks/mcu_specific/freedom_e310/memory_layout.ld
  9. +255 −0 building_blocks/mcu_specific/nxp_kinetis_k64f/cpu_exception_handlers.adb
  10. +46 −0 building_blocks/mcu_specific/nxp_kinetis_k64f/cpu_exception_handlers.ads
  11. +65 −0 building_blocks/mcu_specific/nxp_kinetis_k64f/kinetis_k64f-gpio.ads
  12. +183 −0 building_blocks/mcu_specific/nxp_kinetis_k64f/kinetis_k64f-mcg.ads
  13. +290 −0 building_blocks/mcu_specific/nxp_kinetis_k64f/kinetis_k64f-mpu.ads
  14. +69 −0 building_blocks/mcu_specific/nxp_kinetis_k64f/kinetis_k64f-osc.ads
  15. +102 −0 building_blocks/mcu_specific/nxp_kinetis_k64f/kinetis_k64f-pmc.ads
  16. +107 −0 building_blocks/mcu_specific/nxp_kinetis_k64f/kinetis_k64f-port.ads
  17. +100 −0 building_blocks/mcu_specific/nxp_kinetis_k64f/kinetis_k64f-rcm.ads
  18. +1,763 −0 building_blocks/mcu_specific/nxp_kinetis_k64f/kinetis_k64f-scs.ads
  19. +212 −0 building_blocks/mcu_specific/nxp_kinetis_k64f/kinetis_k64f-sim.ads
  20. +242 −0 building_blocks/mcu_specific/nxp_kinetis_k64f/kinetis_k64f-uart.ads
  21. +90 −0 building_blocks/mcu_specific/nxp_kinetis_k64f/kinetis_k64f-wdog.ads
  22. +192 −0 building_blocks/mcu_specific/nxp_kinetis_k64f/kinetis_k64f.ads
  23. +217 −0 building_blocks/mcu_specific/nxp_kinetis_k64f/memory_layout.ld
  24. +1,498 −0 building_blocks/mcu_specific/nxp_kinetis_k64f/memory_protection.adb
  25. +1,510 −0 building_blocks/mcu_specific/nxp_kinetis_k64f/memory_protection.adb.old
  26. +367 −0 building_blocks/mcu_specific/nxp_kinetis_k64f/memory_protection.ads
  27. +2 −2 building_blocks/mcu_specific/nxp_kinetis_k64f/microcontroller-mcu_specific.adb
  28. +10 −1 building_blocks/mcu_specific/nxp_kinetis_k64f/microcontroller-mcu_specific.ads
  29. +42 −0 building_blocks/mcu_specific/nxp_kinetis_k64f/microcontroller_clocks.ads
  30. +244 −0 building_blocks/mcu_specific/nxp_kinetis_k64f/startup.adb
  31. +44 −0 building_blocks/mcu_specific/nxp_kinetis_k64f/startup.ads
  32. +88 −0 building_blocks/mcu_specific/nxp_kinetis_k64f/watchdog_timer.adb
  33. +33 −0 building_blocks/mcu_specific/nxp_kinetis_k64f/watchdog_timer.ads
  34. +55 −53 building_blocks/portable/color_led.adb
  35. +16 −22 building_blocks/portable/color_led.ads
  36. +35 −32 building_blocks/portable/last_chance_handler.adb
  37. +56 −0 building_blocks/portable/low_level_debug.ads
  38. +113 −2 building_blocks/portable/memory_utils.adb
  39. +17 −3 building_blocks/portable/memory_utils.ads
  40. +3 −41 building_blocks/portable/microcontroller.ads
  41. +3 −1 building_blocks/portable/number_conversion_utils.ads
  42. +130 −0 building_blocks/portable/reset_counter.adb
  43. +53 −0 building_blocks/portable/reset_counter.ads
  44. +63 −68 building_blocks/portable/serial_console.adb
  45. +0 −2 building_blocks/portable/serial_console.ads
  46. +8 −7 building_blocks/portable/stack_trace_capture.adb
  47. +111 −0 drivers/board_specific/nxp_iot_rpk/uart_driver-board_specific_private.ads
  48. +3 −3 drivers/mcu_specific/nxp_kinetis_k64f/devices-mcu_specific.ads
  49. +3 −2 drivers/mcu_specific/nxp_kinetis_k64f/gpio_driver-mcu_specific_private.ads
  50. +3 −4 drivers/mcu_specific/nxp_kinetis_k64f/pin_mux_driver-mcu_specific_private.ads
  51. +3 −2 drivers/portable/devices.ads
  52. +108 −110 drivers/portable/gpio_driver.adb
  53. +6 −6 drivers/portable/gpio_driver.ads
  54. +3 −2 drivers/portable/pin_mux_driver.adb
  55. +0 −1 drivers/portable/pin_mux_driver.ads
  56. +2 −1 hexiwear_gnat_runtime_test/hexiwear_gnat_runtime_test.gpr
  57. +126 −0 nxp_iot_rpk_watch/app_configuration.adb
  58. +68 −0 nxp_iot_rpk_watch/app_configuration.ads
  59. +41 −0 nxp_iot_rpk_watch/app_parameters.ads
  60. +824 −0 nxp_iot_rpk_watch/command_parser.adb
  61. +41 −0 nxp_iot_rpk_watch/command_parser.ads
  62. +102 −0 nxp_iot_rpk_watch/main.adb
  63. +319 −0 nxp_iot_rpk_watch/mpu_tests.adb
  64. +45 −0 nxp_iot_rpk_watch/mpu_tests.ads
  65. +1,440 −0 nxp_iot_rpk_watch/watch.adb
  66. +203 −0 nxp_iot_rpk_watch/watch.ads
  67. +132 −0 nxp_iot_rpk_watch/watch.gpr
  68. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-adc.ads
  69. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-aips.ads
  70. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-axbs.ads
  71. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-can0.ads
  72. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-cau.ads
  73. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-cmp.ads
  74. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-cmt.ads
  75. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-dac.ads
  76. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-dma.ads
  77. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-dmamux.ads
  78. +3 −2 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-enet.ads
  79. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-ewm.ads
  80. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-fb.ads
  81. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-fmc.ads
  82. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-ftfe.ads
  83. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-ftfe_flashconfig.ads
  84. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-ftm.ads
  85. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-gpio.ads
  86. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-i2c.ads
  87. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-i2s0.ads
  88. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-llwu.ads
  89. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-lptmr0.ads
  90. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-mcg.ads
  91. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-mcm.ads
  92. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-mpu.ads
  93. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-nvic.ads
  94. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-osc.ads
  95. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-pdb0.ads
  96. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-pit.ads
  97. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-pmc.ads
  98. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-port.ads
  99. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-rcm.ads
  100. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-rfsys.ads
  101. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-rfvbat.ads
  102. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-rng.ads
  103. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-rtc.ads
  104. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-sdhc.ads
  105. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-sim.ads
  106. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-smc.ads
  107. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-spi.ads
  108. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-systemcontrol.ads
  109. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-systick.ads
  110. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-uart.ads
  111. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-usb0.ads
  112. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-usbdcd.ads
  113. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-vref.ads
  114. +1 −1 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12-wdog.ads
  115. +2 −2 { → third_party}/SVD/nxp_kinetis_k64f/mk64f12.ads
  116. 0 { → third_party}/SVD/nxp_kinetis_kl25z/mkl25z4-adc0.ads
  117. 0 { → third_party}/SVD/nxp_kinetis_kl25z/mkl25z4-cmp0.ads
  118. 0 { → third_party}/SVD/nxp_kinetis_kl25z/mkl25z4-dac0.ads
  119. 0 { → third_party}/SVD/nxp_kinetis_kl25z/mkl25z4-dma.ads
  120. 0 { → third_party}/SVD/nxp_kinetis_kl25z/mkl25z4-dmamux0.ads
  121. 0 { → third_party}/SVD/nxp_kinetis_kl25z/mkl25z4-fgpio.ads
  122. 0 { → third_party}/SVD/nxp_kinetis_kl25z/mkl25z4-ftfa.ads
  123. 0 { → third_party}/SVD/nxp_kinetis_kl25z/mkl25z4-ftfa_flashconfig.ads
  124. 0 { → third_party}/SVD/nxp_kinetis_kl25z/mkl25z4-gpio.ads
  125. 0 { → third_party}/SVD/nxp_kinetis_kl25z/mkl25z4-i2c.ads
  126. 0 { → third_party}/SVD/nxp_kinetis_kl25z/mkl25z4-llwu.ads
  127. 0 { → third_party}/SVD/nxp_kinetis_kl25z/mkl25z4-lptmr0.ads
  128. 0 { → third_party}/SVD/nxp_kinetis_kl25z/mkl25z4-mcg.ads
  129. 0 { → third_party}/SVD/nxp_kinetis_kl25z/mkl25z4-mcm.ads
  130. 0 { → third_party}/SVD/nxp_kinetis_kl25z/mkl25z4-mtb.ads
  131. 0 { → third_party}/SVD/nxp_kinetis_kl25z/mkl25z4-mtbdwt.ads
  132. 0 { → third_party}/SVD/nxp_kinetis_kl25z/mkl25z4-osc0.ads
  133. 0 { → third_party}/SVD/nxp_kinetis_kl25z/mkl25z4-pit.ads
  134. 0 { → third_party}/SVD/nxp_kinetis_kl25z/mkl25z4-pmc.ads
  135. 0 { → third_party}/SVD/nxp_kinetis_kl25z/mkl25z4-port.ads
  136. 0 { → third_party}/SVD/nxp_kinetis_kl25z/mkl25z4-rcm.ads
  137. 0 { → third_party}/SVD/nxp_kinetis_kl25z/mkl25z4-rom.ads
  138. 0 { → third_party}/SVD/nxp_kinetis_kl25z/mkl25z4-rtc.ads
  139. 0 { → third_party}/SVD/nxp_kinetis_kl25z/mkl25z4-sim.ads
  140. 0 { → third_party}/SVD/nxp_kinetis_kl25z/mkl25z4-smc.ads
  141. 0 { → third_party}/SVD/nxp_kinetis_kl25z/mkl25z4-spi.ads
  142. 0 { → third_party}/SVD/nxp_kinetis_kl25z/mkl25z4-tpm.ads
  143. 0 { → third_party}/SVD/nxp_kinetis_kl25z/mkl25z4-tsi0.ads
  144. 0 { → third_party}/SVD/nxp_kinetis_kl25z/mkl25z4-uart.ads
  145. 0 { → third_party}/SVD/nxp_kinetis_kl25z/mkl25z4-uart0.ads
  146. 0 { → third_party}/SVD/nxp_kinetis_kl25z/mkl25z4-usb0.ads
  147. 0 { → third_party}/SVD/nxp_kinetis_kl25z/mkl25z4.ads
  148. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-adc0.ads
  149. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-cau0.ads
  150. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-cmp.ads
  151. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-crc.ads
  152. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-dac0.ads
  153. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-dma0.ads
  154. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-dmamux0.ads
  155. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-emvsim0.ads
  156. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-fgpioa.ads
  157. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-flexio0.ads
  158. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-ftfa.ads
  159. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-ftfa_flashconfig.ads
  160. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-gpio.ads
  161. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-i2s0.ads
  162. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-intmux0.ads
  163. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-llwu0.ads
  164. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-lpi2c.ads
  165. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-lpit0.ads
  166. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-lpspi.ads
  167. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-lptmr.ads
  168. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-lpuart.ads
  169. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-mcm0.ads
  170. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-mmdvsq0.ads
  171. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-mscm.ads
  172. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-mtb0.ads
  173. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-mtb0_dwt.ads
  174. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-mtb0_rom.ads
  175. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-nvic0.ads
  176. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-pcc.ads
  177. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-pmc.ads
  178. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-port.ads
  179. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-rcm.ads
  180. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-rfsys.ads
  181. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-rtc.ads
  182. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-scg.ads
  183. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-sim.ads
  184. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-smc.ads
  185. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-systemcontrol.ads
  186. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-systick.ads
  187. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-tpm.ads
  188. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-trgmux.ads
  189. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-trng.ads
  190. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-tsi0.ads
  191. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-tstmr0.ads
  192. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-usb0.ads
  193. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-vref.ads
  194. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7-wdog0.ads
  195. 0 { → third_party}/SVD/nxp_kinetis_kl28z/mkl28z7.ads
  196. 0 { → third_party}/SVD/stm32f40x/stm32_svd-adc.ads
  197. 0 { → third_party}/SVD/stm32f40x/stm32_svd-can.ads
  198. 0 { → third_party}/SVD/stm32f40x/stm32_svd-crc.ads
  199. 0 { → third_party}/SVD/stm32f40x/stm32_svd-dac.ads
  200. 0 { → third_party}/SVD/stm32f40x/stm32_svd-dbg.ads
  201. 0 { → third_party}/SVD/stm32f40x/stm32_svd-dcmi.ads
  202. 0 { → third_party}/SVD/stm32f40x/stm32_svd-dma.ads
  203. 0 { → third_party}/SVD/stm32f40x/stm32_svd-ethernet.ads
  204. 0 { → third_party}/SVD/stm32f40x/stm32_svd-exti.ads
  205. 0 { → third_party}/SVD/stm32f40x/stm32_svd-flash.ads
  206. 0 { → third_party}/SVD/stm32f40x/stm32_svd-fsmc.ads
  207. 0 { → third_party}/SVD/stm32f40x/stm32_svd-gpio.ads
  208. 0 { → third_party}/SVD/stm32f40x/stm32_svd-i2c.ads
  209. 0 { → third_party}/SVD/stm32f40x/stm32_svd-iwdg.ads
  210. 0 { → third_party}/SVD/stm32f40x/stm32_svd-nvic.ads
  211. 0 { → third_party}/SVD/stm32f40x/stm32_svd-pwr.ads
  212. 0 { → third_party}/SVD/stm32f40x/stm32_svd-rcc.ads
  213. 0 { → third_party}/SVD/stm32f40x/stm32_svd-rng.ads
  214. 0 { → third_party}/SVD/stm32f40x/stm32_svd-rtc.ads
  215. 0 { → third_party}/SVD/stm32f40x/stm32_svd-sdio.ads
  216. 0 { → third_party}/SVD/stm32f40x/stm32_svd-spi.ads
  217. 0 { → third_party}/SVD/stm32f40x/stm32_svd-syscfg.ads
  218. 0 { → third_party}/SVD/stm32f40x/stm32_svd-tim.ads
  219. 0 { → third_party}/SVD/stm32f40x/stm32_svd-usart.ads
  220. 0 { → third_party}/SVD/stm32f40x/stm32_svd-usb_otg_fs.ads
  221. 0 { → third_party}/SVD/stm32f40x/stm32_svd-usb_otg_hs.ads
  222. 0 { → third_party}/SVD/stm32f40x/stm32_svd-wwdg.ads
  223. 0 { → third_party}/SVD/stm32f40x/stm32_svd.ads
  224. 0 { → third_party}/SVD/stm32f46_79x/stm32_svd-adc.ads
  225. 0 { → third_party}/SVD/stm32f46_79x/stm32_svd-can.ads
  226. 0 { → third_party}/SVD/stm32f46_79x/stm32_svd-crc.ads
  227. 0 { → third_party}/SVD/stm32f46_79x/stm32_svd-cryp.ads
  228. 0 { → third_party}/SVD/stm32f46_79x/stm32_svd-dac.ads
  229. 0 { → third_party}/SVD/stm32f46_79x/stm32_svd-dbg.ads
  230. 0 { → third_party}/SVD/stm32f46_79x/stm32_svd-dcmi.ads
  231. 0 { → third_party}/SVD/stm32f46_79x/stm32_svd-dma.ads
  232. 0 { → third_party}/SVD/stm32f46_79x/stm32_svd-dma2d.ads
  233. 0 { → third_party}/SVD/stm32f46_79x/stm32_svd-dsi.ads
  234. 0 { → third_party}/SVD/stm32f46_79x/stm32_svd-ethernet.ads
  235. 0 { → third_party}/SVD/stm32f46_79x/stm32_svd-exti.ads
  236. 0 { → third_party}/SVD/stm32f46_79x/stm32_svd-flash.ads
  237. 0 { → third_party}/SVD/stm32f46_79x/stm32_svd-fsmc.ads
  238. 0 { → third_party}/SVD/stm32f46_79x/stm32_svd-gpio.ads
  239. 0 { → third_party}/SVD/stm32f46_79x/stm32_svd-hash.ads
  240. 0 { → third_party}/SVD/stm32f46_79x/stm32_svd-i2c.ads
  241. 0 { → third_party}/SVD/stm32f46_79x/stm32_svd-iwdg.ads
  242. 0 { → third_party}/SVD/stm32f46_79x/stm32_svd-ltdc.ads
  243. 0 { → third_party}/SVD/stm32f46_79x/stm32_svd-nvic.ads
  244. 0 { → third_party}/SVD/stm32f46_79x/stm32_svd-pwr.ads
  245. 0 { → third_party}/SVD/stm32f46_79x/stm32_svd-quadspi.ads
  246. 0 { → third_party}/SVD/stm32f46_79x/stm32_svd-rcc.ads
  247. 0 { → third_party}/SVD/stm32f46_79x/stm32_svd-rng.ads
  248. 0 { → third_party}/SVD/stm32f46_79x/stm32_svd-rtc.ads
  249. 0 { → third_party}/SVD/stm32f46_79x/stm32_svd-sai.ads
  250. 0 { → third_party}/SVD/stm32f46_79x/stm32_svd-sdio.ads
  251. 0 { → third_party}/SVD/stm32f46_79x/stm32_svd-spi.ads
  252. 0 { → third_party}/SVD/stm32f46_79x/stm32_svd-syscfg.ads
  253. 0 { → third_party}/SVD/stm32f46_79x/stm32_svd-tim.ads
  254. 0 { → third_party}/SVD/stm32f46_79x/stm32_svd-usart.ads
  255. 0 { → third_party}/SVD/stm32f46_79x/stm32_svd-usb_otg_fs.ads
  256. 0 { → third_party}/SVD/stm32f46_79x/stm32_svd-usb_otg_hs.ads
  257. 0 { → third_party}/SVD/stm32f46_79x/stm32_svd-wwdg.ads
  258. 0 { → third_party}/SVD/stm32f46_79x/stm32_svd.ads
  259. BIN third_party/portable_minimal_ada_rts/.ada_source_path.swo
  260. BIN third_party/portable_minimal_ada_rts/.rts.gpr.swo
  261. +27 −0 third_party/portable_minimal_ada_rts/README
  262. +2 −0 third_party/portable_minimal_ada_rts/ada_object_path
  263. +2 −0 third_party/portable_minimal_ada_rts/ada_source_path
  264. +2 −0 third_party/portable_minimal_ada_rts/ada_source_path.dontuse
  265. +24 −0 third_party/portable_minimal_ada_rts/common/a-unccon.ads
  266. +23 −0 third_party/portable_minimal_ada_rts/common/a-uncdea.ads
  267. +20 −0 third_party/portable_minimal_ada_rts/common/ada.ads
  268. +96 −0 third_party/portable_minimal_ada_rts/common/g-souinf.ads
  269. +37 −0 third_party/portable_minimal_ada_rts/common/gnat.ads
  270. +184 −0 third_party/portable_minimal_ada_rts/common/interfac.ads
  271. +51 −0 third_party/portable_minimal_ada_rts/common/s-assert.ads
  272. +36 −0 third_party/portable_minimal_ada_rts/common/s-atacco.adb
  273. +63 −0 third_party/portable_minimal_ada_rts/common/s-atacco.ads
  274. +131 −0 third_party/portable_minimal_ada_rts/common/s-maccod.ads
  275. +131 −0 third_party/portable_minimal_ada_rts/common/s-stoele.adb
  276. +119 −0 third_party/portable_minimal_ada_rts/common/s-stoele.ads
  277. +215 −0 third_party/portable_minimal_ada_rts/common/s-unstyp.ads
  278. +98 −0 third_party/portable_minimal_ada_rts/extra/interfaces-bit_types.ads
  279. +49 −0 third_party/portable_minimal_ada_rts/fpu/s-fatflt.ads
  280. +901 −0 third_party/portable_minimal_ada_rts/fpu/s-fatgen.adb
  281. +117 −0 third_party/portable_minimal_ada_rts/fpu/s-fatgen.ads
  282. +89 −0 third_party/portable_minimal_ada_rts/rts.gpr
  283. +41 −0 third_party/portable_minimal_ada_rts/runtime.xml.dontuse
  284. +85 −0 third_party/portable_minimal_ada_rts/zfp/a-except.adb
  285. +70 −0 third_party/portable_minimal_ada_rts/zfp/a-except.ads
  286. +103 −0 third_party/portable_minimal_ada_rts/zfp/i-c.ads
  287. +45 −0 third_party/portable_minimal_ada_rts/zfp/s-assert.adb
  288. +161 −0 third_party/portable_minimal_ada_rts/zfp/system.ads
@@ -26,7 +26,7 @@
--
with System.Machine_Code; use System.Machine_Code;
package body Microcontroller.Arm_Cortex_M is
package body Microcontroller.Arch_Specific is
-----------------------------
-- Are_Interrupts_Disabled --
@@ -94,6 +94,17 @@ package body Microcontroller.Arm_Cortex_M is
-- Disable_Cpu_Interrupts --
----------------------------
procedure Disable_Cpu_Interrupts is
begin
Asm ("cpsid i" & ASCII.LF &
"isb" & ASCII.LF,
Volatile => True, Clobber => "memory");
end Disable_Cpu_Interrupts;
----------------------------
-- Disable_Cpu_Interrupts --
----------------------------
function Disable_Cpu_Interrupts return Word is
Reg_Value : Word;
begin
@@ -106,6 +117,18 @@ package body Microcontroller.Arm_Cortex_M is
return Reg_Value;
end Disable_Cpu_Interrupts;
---------------------------
-- Enable_Cpu_Interrupts --
---------------------------
procedure Enable_Cpu_Interrupts is
begin
Asm ("isb" & ASCII.LF &
"cpsie i" & ASCII.LF,
Clobber => "memory",
Volatile => True);
end Enable_Cpu_Interrupts;
--------------------------
-- Get_Control_Register --
--------------------------
@@ -281,10 +304,7 @@ package body Microcontroller.Arm_Cortex_M is
procedure Restore_Cpu_Interrupts (Old_Primask : Word) is
begin
if (Old_Primask and 16#1#) = 0 then
Asm ("isb" & ASCII.LF &
"cpsie i" & ASCII.LF,
Clobber => "memory",
Volatile => True);
Enable_Cpu_Interrupts;
end if;
end Restore_Cpu_Interrupts;
@@ -302,4 +322,4 @@ package body Microcontroller.Arm_Cortex_M is
return To_Address (Value - Bl_Instruction_Size);
end Return_Address_To_Call_Address;
end Microcontroller.Arm_Cortex_M;
end Microcontroller.Arch_Specific;
@@ -30,8 +30,9 @@ with Interfaces.Bit_Types;
--
-- @summary ARM Cortex-M declarations
--
package Microcontroller.Arm_Cortex_M is
pragma Preelaborate;
package Microcontroller.Arch_Specific with
No_Elaboration_Code_All
is
use Interfaces.Bit_Types;
Bl_Instruction_Size : constant := 4;
@@ -138,12 +139,16 @@ package Microcontroller.Arm_Cortex_M is
-- ** --
procedure Disable_Cpu_Interrupts with Inline;
function Disable_Cpu_Interrupts return Word;
--
-- Disable interrupts in the CPU and retrun the previous value of the
-- Disable interrupts in the CPU and return the previous value of the
-- Primask register
--
procedure Enable_Cpu_Interrupts with Inline;
procedure Restore_Cpu_Interrupts (Old_Primask : Word);
-- Restore interrupts enable state from Old_Primask
@@ -270,4 +275,4 @@ package Microcontroller.Arm_Cortex_M is
procedure Nop;
-- Nop machine instruction
end Microcontroller.Arm_Cortex_M;
end Microcontroller.Arch_Specific;
@@ -0,0 +1,180 @@
--
-- Copyright (c) 2016, German Rivera
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- * Redistributions of source code must retain the above copyright notice,
-- this list of conditions and the following disclaimer.
--
-- * Redistributions in binary form must reproduce the above copyright notice,
-- this list of conditions and the following disclaimer in the documentation
-- and/or other materials provided with the distribution.
--
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-- POSSIBILITY OF SUCH DAMAGE.
--
with Kinetis_K64F.PORT;
with Kinetis_K64F.MCG;
with Kinetis_K64F.SIM;
with Kinetis_K64F.PMC;
with Kinetis_K64F.OSC;
with Interfaces.Bit_Types;
package body Microcontroller_Clocks is
use Kinetis_K64F;
use Interfaces.Bit_Types;
--
-- Iniitalize the microcontroller clocks
--
procedure Initialize is
procedure Pll_Init;
procedure Pll_Init is
-- Initialize PLL
--
-- NOTE: PLL will be the source for MCG CLKOUT so the core, system,
-- and flash clocks are derived from it
REGSC_Value : PMC.REGSC_Type;
SOPT2_Value : SIM.SOPT2_Type;
SOPT1_Value : SIM.SOPT1_Type;
SCGC5_Value : SIM.SCGC5_Type;
PCR_Value : PORT.PCR_Type;
C7_Value : MCG.C7_Type;
C4_Value : MCG.C4_Type;
CLKDIV2_Value : SIM.CLKDIV2_Type;
begin
-- If ACKISO is set you must clear ackiso before initializing the
-- PLL:
REGSC_Value := PMC.Registers.REGSC;
if REGSC_Value.ACKISO /= 0 then
-- Clear bit by setting it (w1c):
REGSC_Value.ACKISO := 1;
PMC.Registers.REGSC := REGSC_Value;
end if;
-- Select PLL as a clock source for various peripherals:
SOPT2_Value := SIM.Registers.SOPT2;
SOPT2_Value.PLLFLLSEL := 1;
SIM.Registers.SOPT2 := SOPT2_Value;
-- LPO 1kHz oscillator drives 32 kHz clock for various peripherals
SOPT1_Value := SIM.Registers.SOPT1;
SOPT1_Value.OSC32KSEL := 3;
SIM.Registers.SOPT1 := SOPT1_Value;
-- Enable GPIO port A clock (Pin PTA18 is used as EXTAL0):
SCGC5_Value := SIM.Registers.SCGC5;
SCGC5_Value.PORTA := 1;
SIM.Registers.SCGC5 := SCGC5_Value;
PCR_Value := PORT.PortA_Registers.PCR (18);
PCR_Value.ISF := 0;
PCR_Value.MUX := 0;
PORT.PortA_Registers.PCR (18) := PCR_Value;
-- Switch to FBE Mode
MCG.Registers.C2 := (C2_RANGE => 2, EREFS => 1, others => 0);
OSC.Registers.CR := (ERCLKEN => 1, others => 0);
C7_Value := MCG.Registers.C7;
C7_Value.OSCSEL := 0;
MCG.Registers.C7 := C7_Value;
-- Select external reference clock
MCG.Registers.C1 := (CLKS => 2, FRDIV => 5, IRCLKEN => 1,
others => 0);
C4_Value := MCG.Registers.C4;
C4_Value.DMX32 := 0;
C4_Value.DRST_DRS := 0;
MCG.Registers.C4 := C4_Value;
MCG.Registers.C5 := (PRDIV0 => 16#03#, others => 0);
MCG.Registers.C6 := (VDIV0 => 16#10#, others => 0);
-- Check that the source of the FLL reference clock is the external
-- reference clock:
loop
exit when MCG.Registers.S.IREFST = 0;
end loop;
-- Wait until external reference clock is selected as MCG output:
loop
exit when MCG.Registers.S.CLKST = 2#10#;
end loop;
-- Switch to PBE Mode:
MCG.Registers.C6 := (PLLS => 1, VDIV0 => 16#10#, others => 0);
-- Wait until external reference clock is selected as MCG output:
loop
exit when MCG.Registers.S.CLKST = 2#10#;
end loop;
-- Wait until locked:
loop
exit when MCG.Registers.S.LOCK0 /= 0;
end loop;
-- Switch to PEE Mode:
MCG.Registers.C1 := (FRDIV => 5, IRCLKEN => 1, CLKS => 0,
others => 0);
-- Wait until output of the PLL is selected:
loop
exit when MCG.Registers.S.CLKST = 2#11#;
end loop;
-- Set USB input clock to 48MHz:
CLKDIV2_Value := SIM.Registers.CLKDIV2;
CLKDIV2_Value.USBDIV := 4;
CLKDIV2_Value.USBFRAC := 1;
SIM.Registers.CLKDIV2 := CLKDIV2_Value;
end Pll_Init;
SCGC5_Value : SIM.SCGC5_Type;
begin -- Initialize
-- Disable all of the GPIO port clocks:
SCGC5_Value := SIM.Registers.SCGC5;
SCGC5_Value.PORTA := 0;
SCGC5_Value.PORTB := 0;
SCGC5_Value.PORTC := 0;
SCGC5_Value.PORTD := 0;
SCGC5_Value.PORTE := 0;
SIM.Registers.SCGC5 := SCGC5_Value;
-- Set the system dividers:
--
-- Core clock: MCG CLKOUT divided by OUTDIV1
-- System clock: MCG CLKOUT divided by OUTDIV1
-- Bus clock: MCG CLKOUT divided by OUTDIV2
--
-- NOTE: To see which clocks are used for which devices see table 5-2,
-- page 191, section 5.7, K64 Sub-Family Reference Manual
SIM.Registers.CLKDIV1 := (OUTDIV1 => 0, -- divided by 1
OUTDIV2 => 1, -- divided by 2
OUTDIV3 => 2, -- divided by 3
OUTDIV4 => 4 -- divided by 5
);
Pll_Init;
end Initialize;
end Microcontroller_Clocks;
@@ -0,0 +1,56 @@
--
-- Copyright (c) 2016, German Rivera
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- * Redistributions of source code must retain the above copyright notice,
-- this list of conditions and the following disclaimer.
--
-- * Redistributions in binary form must reproduce the above copyright notice,
-- this list of conditions and the following disclaimer in the documentation
-- and/or other materials provided with the distribution.
--
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-- POSSIBILITY OF SUCH DAMAGE.
--
with Devices.MCU_Specific;
with Pin_Mux_Driver;
--
-- @summary Board-specific Multi-color LED declarations
--
private package Color_Led.Board_Specific_Private is
use Devices.MCU_Specific;
Rgb_Led_Pins : aliased constant Rgb_Led_Pins_Type :=
(Red_Pin => (Pin_Info =>
(Pin_Port => PIN_PORT_C,
Pin_Index => 8,
Pin_Function => Pin_Mux_Driver.PIN_FUNCTION_ALT1),
Is_Active_High => False),
Green_Pin => (Pin_Info =>
(Pin_Port => PIN_PORT_E,
Pin_Index => 7,
Pin_Function => Pin_Mux_Driver.PIN_FUNCTION_ALT1),
Is_Active_High => False),
Blue_Pin => (Pin_Info =>
(Pin_Port => PIN_PORT_C,
Pin_Index => 9,
Pin_Function => Pin_Mux_Driver.PIN_FUNCTION_ALT1),
Is_Active_High => False));
end Color_Led.Board_Specific_Private;
Oops, something went wrong.

0 comments on commit 2123153

Please sign in to comment.