I want to do more embedded ada development. I had setup alr on my laptop to build and push on an stm32 device. But having three terminals open just to develop and debug the device has become tiresome. And I also want to develop on the go and on my desktop.
My current plan is to setup a raspberry pi where I would only have to ssh into. The stm32 device is connected to the pi, the pi has a camera to get a live feed of the device+peripherals and a code editor. I would ssh into the pi where I code and push the build and watch the device from the camera
Does anyone have a setup like this, tips, tricks or guides to similar setups?
I would guess that there is already something that does this but I haven’t been able to find it.
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;