Nvm. I just bodged something together.
The only thing missing now is an editor. But I dont think that installing an entire editor is practical. Will have to look into integrating an editor using ssh somehow.
Btw. Here is some code I threw together. It now compiles and works!
with STM32F303; use STM32F303;
with STM32F303.RCC; use STM32F303.RCC;
with STM32F303.TIMs; use STM32F303.TIMs;
with STM32F303.GPIO; use STM32F303.GPIO;
with HAL; use HAL;
procedure Main is
Counter_Value : HAL.UInt16;
Wait_Time : HAL.UInt16;
begin
-- Init LED PB0
RCC_Periph.AHBENR0.IOPBEN := True;
GPIOB_Periph.MODER0.MODER0 := HAL.UInt2 (2#01#);
-- Init Timer
RCC_Periph.APB1ENR0.TIM7EN := True;
TIM7_Periph.PSC0.PSC :=
7_999; -- Prescaler: 8 MHz / (7999+1) = 1 kHz (1ms per tick)
TIM7_Periph.ARR0.ARR := 1_000; -- Auto-reload value: 1000 ms = 1 sec
TIM7_Periph.CR10.CEN := True; -- Enable TIM7
-- Set Wait Timer
Wait_Time := 1000;
while True loop
-- set LED on
GPIOB_Periph.ODR0.ODR0 := True;
-- wait 500 milliseconds
TIMs.TIM7_Periph.EGR0.UG := True; --update event
loop
Counter_Value := TIMs.TIM7_Periph.CNT0.CNT;
exit when Counter_Value >= Wait_Time; -- Wait for the desired time
end loop;
-- set LED off
GPIOB_Periph.ODR0.ODR0 := False;
-- wait 500 milliseconds
TIMs.TIM7_Periph.EGR0.UG := True; --update event
loop
Counter_Value := TIMs.TIM7_Periph.CNT0.CNT;
exit when Counter_Value >= Wait_Time; -- Wait for the desired time
end loop;
end loop;
end Main;
using startup_gen and svd2ada