mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 04:00:28 +01:00
qemu-arm: Rework to run bare-metal on boards with Cortex-M CPUs.
Adds support for 3 Cortex-M boards, selectable via "BOARD" in the Makefile: - microbit, Cortex-M0 via nRF51822 - netduino2, Cortex-M3 via STM32F205 - mps2-an385, Cortex-M3 via FPGA netduino2 is the default board because it's supported by older qemu versions (down to at least 2.5.0).
This commit is contained in:
@@ -15,15 +15,14 @@
|
||||
#include "tinytest.h"
|
||||
#include "tinytest_macros.h"
|
||||
|
||||
#define HEAP_SIZE (128 * 1024)
|
||||
STATIC void *heap;
|
||||
#define HEAP_SIZE (100 * 1024)
|
||||
|
||||
#include "genhdr/tests.h"
|
||||
|
||||
int main() {
|
||||
mp_stack_ctrl_init();
|
||||
mp_stack_set_limit(10240);
|
||||
heap = malloc(HEAP_SIZE);
|
||||
static uint32_t heap[HEAP_SIZE / sizeof(uint32_t)];
|
||||
upytest_set_heap(heap, (char*)heap + HEAP_SIZE);
|
||||
int r = tinytest_main(0, NULL, groups);
|
||||
printf("status: %d\n", r);
|
||||
@@ -34,8 +33,7 @@ void gc_collect(void) {
|
||||
gc_collect_start();
|
||||
|
||||
// get the registers and the sp
|
||||
jmp_buf env;
|
||||
setjmp(env);
|
||||
// TODO get registers
|
||||
volatile mp_uint_t dummy;
|
||||
void *sp = (void*)&dummy;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user