Search found 60 matches

by gray
Wed Mar 27, 2019 12:32 pm
Forum: Astrobe for ARM Cortex-M3, M4 and M7
Topic: NEW(): ASSERT vs. Returning NIL
Replies: 3
Views: 3605

Re: NEW(): ASSERT vs. Returning NIL

Is NIL represented as 0 (zero), ie. does 'returning NIL' mean assigning zero to 'p' in Storage.Allocate()? (That's what I would infer from Storage.Deallocate().)
by gray
Wed Mar 27, 2019 3:57 am
Forum: Astrobe for ARM Cortex-M3, M4 and M7
Topic: NEW(): ASSERT vs. Returning NIL
Replies: 3
Views: 3605

NEW(): ASSERT vs. Returning NIL

The Oberon Report (2016) states for NEW(): "Failure of allocation results in p obtaining the value NIL." (6.4 Pointer Types). Storage.Allocate() has an ASSERT to check for heap overflow (which halts execution as per the standard Error module). Is Storage.Allocate() an exact representation of the com...
by gray
Wed Mar 13, 2019 11:49 am
Forum: Astrobe for ARM Cortex-M3, M4 and M7
Topic: Stack Frames
Replies: 3
Views: 3572

Re: Stack Frames

But I could write this, right? PROCEDURE NMITrap[0]; VAR trapAddr: INTEGER; BEGIN SYSTEM.GET(SYSTEM.SP + 68, trapAddr); ... Note the [0] and changed SP-offset, as on entry to a normal interrupt handler you also save the other eight registers R4 to R11, I think. I want to use this with SVCTrap to all...
by gray
Wed Mar 13, 2019 10:51 am
Forum: Astrobe for ARM Cortex-M3, M4 and M7
Topic: Stack Frames
Replies: 3
Views: 3572

Stack Frames

I try to figure out the structure of the stack frame for exception handlers (STM32F207 target, or M3 in general, I guess). The programming manual explains the "stacking", but is not specific regarding the order the listed items are put on the stack: R0-R3, return address, PSR, LR. Based on the code ...
by gray
Tue Mar 12, 2019 12:45 am
Forum: Astrobe for ARM Cortex-M3, M4 and M7
Topic: Storage.mod Question
Replies: 4
Views: 4858

Re: Storage.mod Question

Thanks.
cfbsoftware wrote: P.S. I had to remove your modules.zip attachment as it contained a significant amount of source code which can only be shared with other Astrobe Personal and Professional users.
Oops. Sorry about that.
by gray
Mon Mar 11, 2019 1:12 pm
Forum: Astrobe for ARM Cortex-M3, M4 and M7
Topic: Storage.mod Question
Replies: 4
Views: 4858

Re: Storage.mod Question

1. No, I have not modified Storage.mod. 2. The config is the stock one, aside from the library search paths. 3. When I run your program with the stock Main.mod, I get the same memory values as you. 4. However, I use a slightly modified Main.mod, as well as a modified Serial.mod (Serial2.mod, allowin...
by gray
Mon Mar 11, 2019 9:39 am
Forum: Astrobe for ARM Cortex-M3, M4 and M7
Topic: Storage.mod Question
Replies: 4
Views: 4858

Storage.mod Question

I am baffled by the following behaviour (Cortex M3, STM32F207 target). Here's a minimal test case, condensed and abstracted from my actual code. MODULE testalloc; IMPORT Main, Out; TYPE P = POINTER TO Pdesc; Pdesc = RECORD i: INTEGER END; VAR p: P; BEGIN NEW(p); p.i := 13; Out.Int(p.i, 0); Out.Ln EN...
by gray
Mon Mar 04, 2019 9:14 pm
Forum: Getting Started
Topic: Forward References
Replies: 1
Views: 3462

Forward References

I need to reference procedures that are defined further down in the program text. It's not possible to re-arrange the code in a way that this can be avoided (use case: a state machine, where each state is represented by a procedure, and certain state changes will require forward refs). (Astrobe) Obe...
by gray
Mon Mar 04, 2019 8:56 pm
Forum: Astrobe for ARM Cortex-M3, M4 and M7
Topic: IDE Terminal Output Behaviour
Replies: 1
Views: 2569

IDE Terminal Output Behaviour

The IDE terminal only shows output, eg. via 'Out.Char()', only after 'Out.Ln'. In comparison, if I connect to the board using PuTTY, each output shows immediately. Is there a way to configure/change this behaviour in Astrobe?
by gray
Wed Feb 27, 2019 2:38 am
Forum: Astrobe for ARM Cortex-M3, M4 and M7
Topic: Editor/IDE Questions
Replies: 3
Views: 3781

Re: Editor/IDE Questions

Follow-up question: say, I have a module, let's call it LED.mod, in my project directory. The programme compiles and links fine. Now I move LED.mod to a library directory (which is on the list of dirs to search), but (erroneously) leave LED.sym and LED.arm in the project directory. When I simply com...