Search found 100 matches

by gray
Fri May 03, 2024 1:44 am
Forum: Astrobe for ARM Cortex-M0, M3, M4 and M7
Topic: Procedure Calling Convention
Replies: 0
Views: 7

Procedure Calling Convention

The ARM Architecture Procedure Call Standard (AAPCS) stipulates that, upon calling a procedure 1) registers r0 to r3, and r12, are "caller saved", ie. the called procedure is free to mutate them. 2) registers r4 to r11 are "callee saved", ie. the called procedure must save and restore these register...
by gray
Fri May 03, 2024 1:27 am
Forum: Astrobe for ARM Cortex-M0, M3, M4 and M7
Topic: Exception Handlers: Save/Restore r4 to r7 with SYSTEM.LDREG
Replies: 1
Views: 8

Exception Handlers: Save/Restore r4 to r7 with SYSTEM.LDREG

Compiling this exception handler PROCEDURE h[0]; BEGIN SYSTEM.LDREG(4, 13) END h; generates this code PROCEDURE h[0]; BEGIN . 1584 0630H 0B500H push { lr } SYSTEM.LDREG(4, 13) END h; . 1586 0632H 0200DH movs r0,#13 . 1588 0634H 04604H mov r4,r0 . 1590 0636H 0BD00H pop { pc } That is, register r4 is ...
by gray
Sat Apr 27, 2024 6:32 am
Forum: Bug Reports
Topic: RECORD Fields with Identical Identifier
Replies: 1
Views: 62

RECORD Fields with Identical Identifier

Via a typo I have come across this (Astrobe for Cortex-M0v 9.1): MODULE M; TYPE R = RECORD x: INTEGER; x: INTEGER; y: INTEGER END; PROCEDURE p; VAR r: R; BEGIN r.x := 13; r.y := 17 END p; END M. Looking at the assembly code for 'p': PROCEDURE p; VAR r: R; BEGIN . 24 018H 0B500H push { lr } . 26 01AH...
by gray
Thu Apr 25, 2024 11:12 am
Forum: Cortex-M0, M3, M4 and M7
Topic: RP2040: Library & Tools for Astrobe Available
Replies: 9
Views: 8147

Re: RP2040: Library & Tools for Astrobe Available

Latest update and changes: https://oberon-rtk.org/description/changes-2024-04-25/ New library module Alarms. Example programs to evaluate a test module Alarms and the library module Alarms: https://oberon-rtk.org/examples/alarmeval/ and https://oberon-rtk.org/examples/alarmtest/. Example program to ...
by gray
Tue Apr 16, 2024 6:19 am
Forum: Cortex-M0, M3, M4 and M7
Topic: RP2040: Library & Tools for Astrobe Available
Replies: 9
Views: 8147

Re: RP2040: Library & Tools for Astrobe Available

Latest update and changes: https://oberon-rtk.org/description/changes-2024-04-16/ New example program to introduce the micro-seconds tasking system, with measurements and evaluations of minimum set-up time and minimum time between consecutive tasks, run from flash memory or SRAM: https://oberon-rtk....
by gray
Tue Apr 09, 2024 9:09 am
Forum: Astrobe for ARM Cortex-M0, M3, M4 and M7
Topic: CONST Definition Question
Replies: 1
Views: 456

CONST Definition Question

Compiling MODULE TestConst; CONST C = 07FFFFFFFH + 1; END TestConst. results in Line Col 2 28 Error: compiler exception System.OverflowException: Arithmetic operation resulted in an overflow. at ORG.ORG.AddOp(Int32 op, Item& x, Item& y) at ORP.ORP.SimpleExpression(Item& x) at ORP.ORP.expression(Item...
by gray
Thu Apr 04, 2024 9:44 am
Forum: Cortex-M0, M3, M4 and M7
Topic: RP2040: Library & Tools for Astrobe Available
Replies: 9
Views: 8147

Re: RP2040: Library & Tools for Astrobe Available

Latest updates and changes: https://oberon-rtk.org/description/changes-2024-04-04/ Astrobe for Cortex-M0 v9.1 is now the required baseline. New example program to measure code loading times from Flash, with and without caching, and from SRAM: https://oberon-rtk.org/examples/codeloading/ GitHub repo:...
by gray
Thu Apr 04, 2024 9:43 am
Forum: Astrobe for ARM Cortex-M0, M3, M4 and M7
Topic: Copying a Procedure to RAM
Replies: 2
Views: 376

Re: Copying a Procedure to RAM

This is for the RP2040. I am aware that Astrobe for Cortex-M0 does not yet officially support this MCU. Background, concepts, solution approach, as well as measurements and results related to my use case are described here: https://oberon-rtk.org/examples/codeloading/ In a nutshell, interrupt handle...
by gray
Sun Mar 31, 2024 11:04 am
Forum: Astrobe for ARM Cortex-M0, M3, M4 and M7
Topic: Copying a Procedure to RAM
Replies: 2
Views: 376

Copying a Procedure to RAM

What is the best way to copy a procedure, eg. from Flash memory to RAM? For example: MODULE M; PROCEDURE p0; END p0; PROCEDURE p1; END P1; END M. Getting the procedure's starting address is straight forward, but how to detect its ending address? Scanning for 'pop' is not safe, as any relevant consta...
by gray
Sun Mar 17, 2024 11:39 am
Forum: Bug Reports
Topic: SET Parameter Problem
Replies: 1
Views: 5245

SET Parameter Problem

Test code (Astrobe v9.1 for Cortex-M0): MODULE M; PROCEDURE p(s: SET); END p; PROCEDURE run; VAR k: INTEGER; BEGIN p({k}); p({13}) END run; END M. Partial assembly code: PROCEDURE run; VAR k: INTEGER; BEGIN . 12 0CH 0B500H push { lr } . 14 0EH 0B081H sub sp,#4 p({k}); . 16 010H 09800H ldr r0,[sp] . ...