Search found 64 matches

by gray
Mon Feb 17, 2020 3:06 am
Forum: Bug Reports
Topic: v7.1: Type Tests (revisited)
Replies: 1
Views: 1114

v7.1: Type Tests (revisited)

I usually use pointers for all my extended types, and type tests work as specified. For a configuration record similar to GPIO's PortConfiguration I used an extended record, and ran into a problem with type testing in leaf procedures. I have a procedure that returns the data for a specific device, e...
by gray
Sat Jan 25, 2020 9:06 am
Forum: Bug Reports
Topic: Pointer Type Aliasing
Replies: 1
Views: 833

Pointer Type Aliasing

I have run into the issue with an aliased pointer type, as outlined as minimal test case below. I checked the docs and the Report, but I could not find any limitation that I am violating, but I might have missed something. I think the code is grammatically correct, and it compiles just fine. However...
by gray
Mon Jan 20, 2020 6:46 am
Forum: Astrobe for ARM Cortex-M3, M4 and M7
Topic: Configuring Buffer Sizes
Replies: 2
Views: 824

Re: Configuring Buffer Sizes

You are right, I had come to the same conclusion. To actually see what the type complexity entails, down to the interrupt handler and so on, I implemented the module, and it results in roughly doubling the code size: about 4k for the "complex" version, about 2k for a version along the lines you sugg...
by gray
Sat Jan 18, 2020 1:48 pm
Forum: Astrobe for ARM Cortex-M3, M4 and M7
Topic: Configuring Buffer Sizes
Replies: 2
Views: 824

Configuring Buffer Sizes

I am struggling with an seemingly straightforward problem. I am re-implementing my channels for input and output. Channels are abstractions of actual devices, such as serials. For a buffered implementation I need, well, buffers. I would like to have different buffer sizes for the different serials i...
by gray
Wed Jan 08, 2020 1:31 pm
Forum: Astrobe for ARM Cortex-M3, M4 and M7
Topic: I2C.mod for STM32F207 issue?
Replies: 1
Views: 726

I2C.mod for STM32F207 issue?

I think the procedure 'Read' in I2C.mod for the STM32F207 is not correct for read data > 2 bytes. Consider the "big" IF-statement, for the count > 2 case: 1) ACK should get enabled to implement the protocol as per the timing diagram in the reference manual. 2) the index 'i' into data is ahead by one...
by gray
Sat Dec 28, 2019 4:54 am
Forum: Astrobe for ARM Cortex-M3, M4 and M7
Topic: push {}
Replies: 20
Views: 8299

Re: push {}

FWIW, I enable the handlers from my Exceptions.Init, which corresponds to your Traps.Init, both called from Main.mod, ie. right before the application code starts. At this point, I can simply write to SCB_SHCSR. CONST SCB_SHCSR = MCU.NVICBase + 0D24H; MEMFAULTENA = 16; BUSFAULTENA = 17; USGFAULTENA ...
by gray
Fri Dec 27, 2019 12:11 pm
Forum: Astrobe for ARM Cortex-M3, M4 and M7
Topic: push {}
Replies: 20
Views: 8299

Re: push {}

Thanks! Which reminds me of a question I had meant to ask for some time: Traps.mod has handlers for faults such as mem fault or bus fault, but I cannot find the location where the corresponding system handlers get enabled (register SCB_SHCSR, defaults to handlers disabled). Is this by design, or do ...
by gray
Fri Dec 27, 2019 10:38 am
Forum: Astrobe for ARM Cortex-M3, M4 and M7
Topic: push {}
Replies: 20
Views: 8299

Re: push {}

In the code snippet, is id.addr still set to the same value as with the current Astrobe version, ie. the return address as pushed by the processor upon exception entry? And does the compiler/linker still write the source code line number as four byte value at the address right after the svc instruct...
by gray
Thu Dec 26, 2019 11:49 am
Forum: Astrobe for ARM Cortex-M3, M4 and M7
Topic: push {}
Replies: 20
Views: 8299

Re: push {}

The stack trace code I had described here does not work with leaf procedures. The procedure calling the leaf procedure is not detected as the leaf procedure does not create its own stack frame. I have yet been unable to come up with a solution as I fail to find a reliable method to detect a leaf pro...
by gray
Sun Dec 22, 2019 8:49 am
Forum: Bug Reports
Topic: Export of Variables
Replies: 3
Views: 1434

Re: Export of Variables

Does anything change if I use a pointer? MODULE M30; TYPE S* = POINTER TO SD; SD* = RECORD s*: SET; a*: ARRAY 8 OF INTEGER END; VAR sd*: S; BEGIN NEW(sd) END M30. MODULE M31; IMPORT M30; BEGIN INCL(M30.sd.s, 0); END M31 This counts (in analogy) as read-only with pointers as procedure parameters, ie....