added mx Project for the machine
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
|
||||
This is a new Cortex-M project created from STM32CubeIDE.
|
||||
Its purpose is only to give the framework.
|
||||
It does not use any resources, only starting the co-processor:
|
||||
|
||||
|
||||
int main() {
|
||||
int i=0;
|
||||
|
||||
for(i=0;i<100;i++);
|
||||
|
||||
while(1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
To load it run :
|
||||
./fw_cortex_m4.sh start
|
||||
|
||||
|
||||
To stop it :
|
||||
./fw_cortex_m4.sh stop
|
||||
|
||||
|
||||
It can be enriched and debugged from the IDE ;-)
|
||||
Have fun!
|
||||
@@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
|
||||
rproc_class_dir="/sys/class/remoteproc/remoteproc0"
|
||||
fmw_dir="/lib/firmware"
|
||||
fmw_name="VRPMDV-Mon_CM4.elf"
|
||||
|
||||
cd $(/usr/bin/dirname $(/usr/bin/readlink -f $0))
|
||||
|
||||
if [ $1 == "start" ]
|
||||
then
|
||||
# Start the firmware
|
||||
if [ -f /lib/firmware/$fmw_name ]; then
|
||||
/bin/rm -f /lib/firmware/$fmw_name
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
/bin/ln -s $PWD/lib/firmware/$fmw_name $fmw_dir
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
/bin/echo -n "$fmw_name" > $rproc_class_dir/firmware
|
||||
/bin/echo -n start > $rproc_class_dir/state
|
||||
fi
|
||||
|
||||
if [ $1 == "stop" ]
|
||||
then
|
||||
# Stop the firmware
|
||||
/bin/echo -n stop > $rproc_class_dir/state
|
||||
fi
|
||||
Reference in New Issue
Block a user