Easy programming for the DSO Quad

--DSO203

Moderators: violet, jessie, jpa

paul.bartlett
Pre-kindergarten
Pre-kindergarten
Posts: 5
Joined: Mon Feb 17, 2014 7:10 pm

Re: Easy programming for the DSO Quad

Post by paul.bartlett » Thu Feb 20, 2014 6:53 pm

Hi all,
I'm not sure if this has been covered before, but I am having some issues with compiling .p and .pawn programs using Quincy. I am using the latest version of Quincy, and I have PAWN_011.hex loaded onto the quad. I can run the pre-compiled examples (.amx files) but I am getting problems compiling my own.
The following code compiles fine:-

#include <console>
main()
{
new a
new b
new c
a=22
b=7
c=a+b
printf("%d",c);
}

When loaded onto the DSO Quad and 'Run' I get:-

Loading of program SCRIPT1.AMX Failed:
Error 6: Invalid Instruction

If I try to compile some of the examples provided, like 'weekday.p' it compiles fine but when run on the DSO Quad I get the same Error 6 Failure.

Any help will be gratefully received...Thanks
Paul

jpa
Elementary-2
Elementary-2
Posts: 215
Joined: Wed Nov 02, 2011 4:06 am
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: DSO Quad

Re: Easy programming for the DSO Quad

Post by jpa » Thu Feb 20, 2014 10:16 pm

paul.bartlett wrote: Loading of program SCRIPT1.AMX Failed:
Error 6: Invalid Instruction
It sounds like you have wrong settings for the compiler.

Double-check that your settings are the same as listed here:
https://github.com/PetteriAimonen/QuadP ... n-programs

I really suggest to use the compiler from git repo (set the compiler path) because it is tested to work.

paul.bartlett
Pre-kindergarten
Pre-kindergarten
Posts: 5
Joined: Mon Feb 17, 2014 7:10 pm

Re: Easy programming for the DSO Quad

Post by paul.bartlett » Fri Feb 21, 2014 5:26 pm

Thanks jpa...that was the problem.. I hadn't picked up on the need to use the compiler in your Git repository..makes a big difference. Is there a list of commands for use with pawn for the DSO Quad?
Thx
Paul

jpa
Elementary-2
Elementary-2
Posts: 215
Joined: Wed Nov 02, 2011 4:06 am
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: DSO Quad

Re: Easy programming for the DSO Quad

Post by jpa » Fri Feb 21, 2014 10:31 pm

paul.bartlett wrote:Thanks jpa...that was the problem.. I hadn't picked up on the need to use the compiler in your Git repository..makes a big difference. Is there a list of commands for use with pawn for the DSO Quad?
You can find them along with documentation in the include files:
https://github.com/PetteriAimonen/QuadP ... er/include

default.inc lists the ones that are included by default, you need to add #include directives for the other libraries.

alaorjr
Pre-kindergarten
Pre-kindergarten
Posts: 1
Joined: Wed Jan 06, 2016 9:06 pm

Re: Easy programming for the DSO Quad

Post by alaorjr » Wed Jan 06, 2016 9:26 pm

Hello everybody,
I would like to contribute providing a icons builder for QuadPawn. It was written in C # and is a beta yet. I hope it is useful. Feedback is welcome.
Use the left and right mouse buttons (including drag) to draw.

DK8HI
Pre-kindergarten
Pre-kindergarten
Posts: 4
Joined: Sun Apr 17, 2016 4:07 am

Re: Easy programming for the DSO Quad

Post by DK8HI » Tue Apr 19, 2016 1:28 am

Hello jpa!
The programs are on the 2MB flash memory. There can be as many as can fit, probably about 20-40 because each app is about 50-100kB.

The programs are in the pawn bytecode. Pawn has a p-code interpreter for ARM that is written in assembler (written by someone else, not me). It is quite fast, only about 5-10 instructions per one emulated instruction.

The programs are loaded to RAM at runtime. However, Pawn has an 'overlay' mechanism that is kind of swap. It allows to load programs larger than 32kB. The interpreter will then reload functions from flash as needed, always keeping the most recent functions in RAM.

The program size is kind-of limited by the data size - because data memory is never swapped, you can only have about 20kB of data in order to leave enough space for functions. Of the programs I have done so far, only frequency response app requires the overlays. So I guess programs larger than frequency response have to be a bit careful about memory use.
Could you please tell me where exactly the PAWN programs will be loaded?
I would not like to corrupt the Wildcat firmware on the device.
The load addresses for the Wildcat and yours are different:
Yours (PAWN 11B):
08024000 - 0802B4D5
08044000 - 08045D43
and Wildcat 5.1:
0800C000 - 08023C9B
08048000 - 08057807
So I see no overlap in the load addresses for these two applications
and Wildcat would start at power-on and yours with power-on and button 4 pressed.
Would loading the PAWN apps overwrite the Wildcat application starting at 08048000?
Could you please verify that there will be no collisions?
Would your application run on a DSO203 hardware version 2.81?
Thanks in advance
DK8HI

DK8HI
Pre-kindergarten
Pre-kindergarten
Posts: 4
Joined: Sun Apr 17, 2016 4:07 am

Re: Easy programming for the DSO Quad

Post by DK8HI » Tue Apr 19, 2016 6:13 pm

Could you please verify that there will be no collisions?
Would your application run on a DSO203 hardware version 2.81?
Hello all!
To answer my own questions:
I loaded the PAWN11B into the DSO203, which already has the latest Wildcat 5.1 plus V1.1 FPGA installed.
Then I loaded the frequency response and the spectrum display PAWN applications.
PAWN starts with pressing button 4 while power on.
Everything works fine up to now!
DK8HI

Post Reply