Search found 171 matches

by gray
Mon Jan 15, 2024 9:45 am
Forum: Cortex-M0, M3, M4 and M7
Topic: RP2040: Library & Tools for Astrobe Available
Replies: 19
Views: 1453262

RP2040: Library & Tools for Astrobe Available

Today, I have made available a first set of Oberon modules to program the RP2040 using Astrobe for Cortex-M0, v9.0.3. There's also a tool to transmogrify Astrobe '.bin' file to the contents and UF2 format for the RP2040. The library contains as of today: 1) Basics to get off the ground: clocks, rese...
by gray
Wed Dec 27, 2023 1:54 am
Forum: Archive
Topic: SYSTEM.EMITH Problem
Replies: 1
Views: 10516

SYSTEM.EMITH Problem

This test code MODULE TestEMITH; IMPORT SYSTEM; CONST SEV = 0BF40H; BEGIN SYSTEM.EMITH(SEV) END TestEMITH. results in a compiler exception (Astrobe for M0, v9.0.3): System.IndexOutOfRangeException: Index was outside the bounds of the array. at Decode.Decode.Op16IfThen(Int32 instr) at Decode.Decode.D...
by gray
Mon Dec 25, 2023 1:28 pm
Forum: Archive
Topic: SYSTEM.BIT Problem
Replies: 1
Views: 10678

SYSTEM.BIT Problem

Consider this code snippet REPEAT UNTIL SYSTEM.BIT(MCU.XOSC_STATUS, 31) and the corresponding assembly code: . 158 09EH 04808H ldr r0,[pc,#32] -> 192 . 160 0A0H 06801H ldr r1,[r0] . 162 0A2H 0D5FCH bpl.n -8 -> 158 . 192 <Const: 040024004H 040024004H> The procedure hangs at that point, unsurprisingly...
by gray
Mon Dec 18, 2023 1:37 pm
Forum: Astrobe for ARM Cortex-M0, M3, M4 and M7
Topic: Buffer Address for DMA
Replies: 3
Views: 110998

Re: Buffer Address for DMA

Interesting. Yes, this works, again a) checking the code and b) running a test program. Surprising though. The Astrobe docs about module system say: ADR returns the absolute address of the given variable. Now, that SYSTEM.ADR of a VAR procedure parameter would return the actual address of the argume...
by gray
Mon Dec 18, 2023 10:13 am
Forum: Astrobe for ARM Cortex-M0, M3, M4 and M7
Topic: Buffer Address for DMA
Replies: 3
Views: 110998

Buffer Address for DMA

To avoid busy-waiting at a serial output peripheral (USART), I am implementing buffered text output to a terminal. The intention is to use the DMA peripheral on the M0. Among other configuration, the DMA channel expects 1) a memory address of the buffer, and 2) the number of data items to transfer f...
by gray
Mon Dec 11, 2023 11:44 pm
Forum: Archive
Topic: Traps.GetName Misses Last Procedure
Replies: 0
Views: 14498

Traps.GetName Misses Last Procedure

I have been working on catching run-time errors in module bodies during the start-up of programs. To test, I have injected artificial errors, such as 'ASSERT(FALSE)', and the first obvious place was Main.Init, right at the end, after module Traps and the Terminal output have been initialised. Which ...
by gray
Mon Dec 04, 2023 9:03 am
Forum: Archive
Topic: Module Storage (1)
Replies: 3
Views: 14102

Re: Module Storage (1)

I suggest to replace the above quoted code with

Code: Select all

stackLimit := heapLimit;
Or remove it and amend 'Storage.StackAvailable()' accordingly, also removing VAR 'stackLimit' from the module.
by gray
Sun Dec 03, 2023 5:03 am
Forum: Archive
Topic: SYSTEM.ALIGN
Replies: 2
Views: 11778

Re: SYSTEM.ALIGN

Thanks for the fixes and updates with v9.0.3.
by gray
Sun Dec 03, 2023 4:24 am
Forum: Archive
Topic: Module Storage (2)
Replies: 1
Views: 9665

Module Storage (2)

The Astrobe docs say about module Storage: However, you must not change the interface definition of the module as the compiler expects it to be as shown above. I am a bit confused here. As per the documentation about module MAU, each 'NEW' call is converted into a call to MUA.New, and for 'DISPOSE' ...
by gray
Sun Dec 03, 2023 4:19 am
Forum: Archive
Topic: Module Storage (1)
Replies: 3
Views: 14102

Module Storage (1)

I need to write my own heap memory allocator, and I am studying module Storage, which of course is a good starting point. I have trouble understanding this part in the module initialisation: IF heapLimit = 0 THEN stackLimit := 0 ELSE (* Separate heap / stack *) stackLimit := 010000200H END; As far a...