Default behaviour is to run to end of main

This commit is contained in:
Toby Jaffey 2025-12-09 01:19:09 +00:00
parent 7b7b08e626
commit 3cdc9ae0ca
7 changed files with 12 additions and 19 deletions

View file

@ -1,4 +1,3 @@
#define USE_MAIN
#include "uvm32_target.h"
void main(void) {

View file

@ -1,4 +1,3 @@
#define USE_MAIN
#include "uvm32_target.h"
void write(int n) {

View file

@ -1,4 +1,3 @@
#define USE_MAIN
#include "uvm32_target.h"
void main(void) {

View file

@ -1,4 +1,3 @@
#define USE_MAIN
#include "uvm32_target.h"
// https://github.com/shastro/CodeGolf-Lissajous/blob/master/lissa.c

View file

@ -1,6 +1,4 @@
#define USE_MAIN
#include "uvm32_target.h"
#include "uvm32.h"
#include "../common/uvm32_common_custom.h"

View file

@ -1,5 +1,10 @@
#include "uvm32_target.h"
// provide main, with setup()/loop() flow
void setup(void);
bool loop(void);
uint32_t count;
bool loop(void) {
@ -16,3 +21,10 @@ void setup(void) {
}
void main(void) {
setup();
while(loop()) {
yield();
}
}

View file

@ -59,16 +59,3 @@ static uint32_t syscall(uint32_t id, uint32_t param) {
#include "uvm32_common_custom.h"
// provide main, with setup()/loop() flow
void setup(void);
bool loop(void);
#ifndef USE_MAIN
void main(void) {
setup();
while(loop()) {
yield();
}
}
#endif