• AVR Freaks

Hot!Minibasic for Pic32

Page: < 12345.. > >> Showing page 5 of 11
Author
JasonK
Super Member
  • Total Posts : 3406
  • Reward points : 0
  • Joined: 2003/11/14 09:49:40
  • Location: Microchip Technology in Arizona, USA
  • Status: offline
RE: Minibasic for Pic32 2007/12/10 14:00:58 (permalink)
0
I just recorded the "plain char being treated as unsigned char" issue in our C32 bug-tracking database. Thanks for the report.  C32-128



Jason Kajita
 Follow me on Twitter
http://support.microchip.com for urgent questions
#81
DarioG
Allmächtig.
  • Total Posts : 54081
  • Reward points : 0
  • Joined: 2006/02/25 08:58:22
  • Location: Oesterreich
  • Status: offline
RE: Minibasic for Pic32 2007/12/10 17:00:48 (permalink)
0
Thank you Jason!

GENOVA :D :D ! GODO
#82
profdc9
New Member
  • Total Posts : 19
  • Reward points : 0
  • Joined: 2007/12/06 18:54:13
  • Location: 0
  • Status: offline
RE: Minibasic for Pic32 2007/12/11 08:34:36 (permalink)
0
So I have been doing some more work on minibasic-ARM and I have made it reentrant, that is, I made it so that it keeps no global data, it keeps all of its data on the heap or on the stack.  I was wondering if coroutines would be a useful addition to Minibasic?   I was also thinking of adding local variables and subroutines, but I have not decided how to do that and not increase the size too much.

I have made the reentrant feature a compile-time feature as it does add about 500-600 bytes to the program after compiling (needed to pass around a state structure pointer).  However it does made the source code a little more confusing as I have some exotic macros to make this compile time feature optional.

Any pointers? (arf arf)

Dan

#83
DarioG
Allmächtig.
  • Total Posts : 54081
  • Reward points : 0
  • Joined: 2006/02/25 08:58:22
  • Location: Oesterreich
  • Status: offline
RE: Minibasic for Pic32 2007/12/11 08:44:25 (permalink)
0
Yeah, the reentrant thing is always good, I agree on the style.
I'm not sure if it is a good choice on a Microcontroller, sure it would not be on PIC18  Smile but as for PIC32 or Arm it may be nice indeed.

As for Locals variables, well...
I don't know. Sure, they are useful. But in the end the "target" of such a Basic language should be analyzed: is it for beginners (i.e. Keep it Simple) or for experts (who prefer C anyway) ?

For the sake of experimenting, you can do that, sure - I wondered about fancy PROC called by name and Locals and so on...
But I'm not sure if it is going to be really useful.

Anyway, good job Dan !

GENOVA :D :D ! GODO
#84
DarioG
Allmächtig.
  • Total Posts : 54081
  • Reward points : 0
  • Joined: 2006/02/25 08:58:22
  • Location: Oesterreich
  • Status: offline
RE: Minibasic for Pic32 2007/12/11 10:20:50 (permalink)
0
Hmmm, how do we Register C32 ?? Smile

I can't find it in my Install...

GENOVA :D :D ! GODO
#85
JasonK
Super Member
  • Total Posts : 3406
  • Reward points : 0
  • Joined: 2003/11/14 09:49:40
  • Location: Microchip Technology in Arizona, USA
  • Status: offline
RE: Minibasic for Pic32 2007/12/11 10:32:16 (permalink)
0
Hmmm, how do we Register C32 ??

The easiest way to get the full 64-KB edition is to enter your license key (obtained from the C32 webpage) when you install the compiler. If you have already installed the compiler, you can run the Upgrader.exe program installed in your C32 directory.

Jason Kajita
 Follow me on Twitter
http://support.microchip.com for urgent questions
#86
DarioG
Allmächtig.
  • Total Posts : 54081
  • Reward points : 0
  • Joined: 2006/02/25 08:58:22
  • Location: Oesterreich
  • Status: offline
RE: Minibasic for Pic32 2007/12/11 14:02:51 (permalink)
0
Well, I 've done that, got the key... and still no luck!
Shall I pick some specific MPU or won't matter?

Thank you Jason.

GENOVA :D :D ! GODO
#87
Kiwi Mike AZ
Super Member
  • Total Posts : 2056
  • Reward points : 0
  • Status: offline
RE: Minibasic for Pic32 2007/12/11 14:39:20 (permalink)
0
As long as you have picked a device with at least 64K it shouldnt matter.

Also - recheck your linker and compiler settings.... images below

Project-> Built options -> Project

Attached Image(s)

#88
Kiwi Mike AZ
Super Member
  • Total Posts : 2056
  • Reward points : 0
  • Status: offline
RE: Minibasic for Pic32 2007/12/11 14:40:06 (permalink)
0
And the compiler settings....

Attached Image(s)

#89
Kiwi Mike AZ
Super Member
  • Total Posts : 2056
  • Reward points : 0
  • Status: offline
RE: Minibasic for Pic32 2007/12/11 14:42:21 (permalink)
0
Dario, Is your current code uploaded?

I may have time again later today, or tommorrow..... when I have finished moving.


Mike
#90
DarioG
Allmächtig.
  • Total Posts : 54081
  • Reward points : 0
  • Joined: 2006/02/25 08:58:22
  • Location: Oesterreich
  • Status: offline
RE: Minibasic for Pic32 2007/12/11 14:59:19 (permalink)
0
Yes, it is. No work on it today Smile I may work on it tomorrow morning, I wanted to restructure the Keyword matching code, something like Dan had done in his code as well.

Have you checked the index.htm for minibasic? I used it as a reference...

PS: I also took the liberty to place your email into it... if you don't want it because of spam, do remove it!

GENOVA :D :D ! GODO
#91
DarioG
Allmächtig.
  • Total Posts : 54081
  • Reward points : 0
  • Joined: 2006/02/25 08:58:22
  • Location: Oesterreich
  • Status: offline
RE: Minibasic for Pic32 2007/12/11 15:15:18 (permalink)
0
ORIGINAL: mimemike

As long as you have picked a device with at least 64K it shouldnt matter.


Yeah, only those "H" parts don't have TRISA...


Also - recheck your linker and compiler settings.... images below

Project-> Built options -> Project



It was the Linker, GRRR! [:@] "Generate 16bit code" in the Linker... I did not consider that, after placing -mips16 in the Compiler!

Thank you Mike.

GENOVA :D :D ! GODO
#92
DarioG
Allmächtig.
  • Total Posts : 54081
  • Reward points : 0
  • Joined: 2006/02/25 08:58:22
  • Location: Oesterreich
  • Status: offline
RE: Minibasic for Pic32 2007/12/12 16:09:18 (permalink)
0
Added some more keywords and added support for I2C/SPI DACs, and something else.
Plus a re-write of the Keywords Parser, in a similar manner to Dan's one (thanks!)

http://www.pic32.org/minibasic/index.html


GENOVA :D :D ! GODO
#93
lauer
Starting Member
  • Total Posts : 38
  • Reward points : 0
  • Joined: 2003/11/07 12:35:15
  • Status: offline
RE: Minibasic for Pic32 2007/12/12 22:07:06 (permalink)
0
Dario,
I finally got the package compiled and linked. I tried the simulator, for some reason it always wants to rebuild (project out of date) even after a complete build. I dont get to far yet on the simulation, but I'm trying.
Peter
#94
DarioG
Allmächtig.
  • Total Posts : 54081
  • Reward points : 0
  • Joined: 2006/02/25 08:58:22
  • Location: Oesterreich
  • Status: offline
RE: Minibasic for Pic32 2007/12/13 02:36:13 (permalink)
0
You're talking about C18 or C32?

I noticed that file dates get somewhat scrambled between my timezone and Mike's ... where are you located Peter?
This may cause the "make" utility inside MPLAB to get fooled by files "coming from the future"...

GENOVA :D :D ! GODO
#95
lauer
Starting Member
  • Total Posts : 38
  • Reward points : 0
  • Joined: 2003/11/07 12:35:15
  • Status: offline
RE: Minibasic for Pic32 2007/12/13 07:53:34 (permalink)
0
I'm playing with the C32 version. I'll check the dates on the files. I'm in the US (central time)
Peter
#96
DarioG
Allmächtig.
  • Total Posts : 54081
  • Reward points : 0
  • Joined: 2006/02/25 08:58:22
  • Location: Oesterreich
  • Status: offline
RE: Minibasic for Pic32 2007/12/13 11:49:09 (permalink)
0
For the record:
I tried C32 simulator: When Program is RUN, it always stops at the "outd" function - which is of course not called by the software! with an "out of writable memory" exception or such. When I place a breakpoint at the beginning, it stops there: but when I try to "step over", it will always step into otherwise... making so almost impossible to trace the possible error...

Looks like the SIM is not working that much on my Win98 /MPLAB 8 system. With C18, it's okay.

GENOVA :D :D ! GODO
#97
lauer
Starting Member
  • Total Posts : 38
  • Reward points : 0
  • Joined: 2003/11/07 12:35:15
  • Status: offline
RE: Minibasic for Pic32 2007/12/13 13:56:33 (permalink)
0
so how do you test the software?
I have the starterkit, but have to implement the DPPRINTF() / DBGETC() to do something with it.
 
you still use win98? waiting for the 10 year aniversary? I run XP.
 
Peter
#98
DarioG
Allmächtig.
  • Total Posts : 54081
  • Reward points : 0
  • Joined: 2006/02/25 08:58:22
  • Location: Oesterreich
  • Status: offline
RE: Minibasic for Pic32 2007/12/13 15:34:10 (permalink)
0
I've only tested C18 version. But the C code "minibasic.c" is the same, with conditional compiling across platforms. Only changes are in peripheral handling.

And, yeah, I'm using Win98 'cause I don't like something like XP doing its own business when not wanted winkSmile - I actually have one PC (always on - the web/domotic server) with Win2000, and one with 98. And a notebook with XP.

GENOVA :D :D ! GODO
#99
xiaofan
Super Member
  • Total Posts : 6247
  • Reward points : 0
  • Joined: 2005/04/14 07:05:25
  • Location: Singapore
  • Status: offline
RE: Minibasic for Pic32 2007/12/13 19:50:02 (permalink)
0
I need an extra trick to get Mike's MiniBasic32 port built with C32.
 
From:
http://forum.microchip.com/tm.aspx?m=302007
 
In Project Build options / project /MPLAB  PIC32 linker /Category General,   
Tick   >Remove unused sections<
 
If not, it will fail.
Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\Program Files\Microchip\MPLAB C32\bin\pic32-gcc.exe" -mprocessor=32MX360F512L -x c -c "minibasic.c" -o"minibasic.o" -MMD -MF"minibasic.d" -I"C:\Program Files\Microchip\MPLAB C32\pic32mx\include\peripheral" -I"C:\Program Files\Microchip\MPLAB C32\pic32mx\include" -I"C:\Programmi\Microchip\Source\MiniBasic32" -g -mips16 -Os
minibasic.c: In function `boolfactor':
minibasic.c:1408: warning: comparison is always false due to limited range of data type
minibasic.c:1417: warning: comparison is always true due to limited range of data type
minibasic.c: In function `stringdimvar':
minibasic.c:2627: warning: return discards qualifiers from pointer target type
minibasic.c: In function `stringvar':
minibasic.c:2645: warning: return discards qualifiers from pointer target type
minibasic.c:2648: warning: return discards qualifiers from pointer target type
minibasic.c: In function `tokenlen':
minibasic.c:2973: warning: passing arg 2 of `getvalue' from incompatible pointer type
minibasic.c:2978: warning: passing arg 3 of `getid' from incompatible pointer type
minibasic.c:2981: warning: passing arg 3 of `getid' from incompatible pointer type
minibasic.c: In function `strtol':
minibasic.c:3475: warning: assignment discards qualifiers from pointer target type
minibasic.c: In function `strtod':
minibasic.c:3496: warning: assignment discards qualifiers from pointer target type
minibasic.c: In function `mystrchrpgm':
minibasic.c:3508: warning: return discards qualifiers from pointer target type
Executing: "C:\Program Files\Microchip\MPLAB C32\bin\pic32-gcc.exe" -mprocessor=32MX360F512L -x c -c "io.c" -o"io.o" -MMD -MF"io.d" -I"C:\Program Files\Microchip\MPLAB C32\pic32mx\include\peripheral" -I"C:\Program Files\Microchip\MPLAB C32\pic32mx\include" -I"C:\Programmi\Microchip\Source\MiniBasic32" -g -mips16 -Os
Executing: "C:\Program Files\Microchip\MPLAB C32\bin\pic32-gcc.exe" -mprocessor=32MX360F512L -x c -c "salloc.c" -o"salloc.o" -MMD -MF"salloc.d" -I"C:\Program Files\Microchip\MPLAB C32\pic32mx\include\peripheral" -I"C:\Program Files\Microchip\MPLAB C32\pic32mx\include" -I"C:\Programmi\Microchip\Source\MiniBasic32" -g -mips16 -Os
Executing: "C:\Program Files\Microchip\MPLAB C32\bin\pic32-gcc.exe" -mprocessor=32MX360F512L -x c -c "iohw.c" -o"iohw.o" -MMD -MF"iohw.d" -I"C:\Program Files\Microchip\MPLAB C32\pic32mx\include\peripheral" -I"C:\Program Files\Microchip\MPLAB C32\pic32mx\include" -I"C:\Programmi\Microchip\Source\MiniBasic32" -g -mips16 -Os
iohw.c: In function `setpin':
iohw.c:41: warning: comparison is always false due to limited range of data type
iohw.c: In function `outd':
iohw.c:56: warning: comparison is always false due to limited range of data type
iohw.c: In function `tone':
iohw.c:84: warning: comparison is always false due to limited range of data type
iohw.c: In function `ind':
iohw.c:217: warning: comparison is always false due to limited range of data type
Executing: "C:\Program Files\Microchip\MPLAB C32\bin\pic32-gcc.exe" -mprocessor=32MX360F512L -x c -c "cpu.c" -o"cpu.o" -MMD -MF"cpu.d" -I"C:\Program Files\Microchip\MPLAB C32\pic32mx\include\peripheral" -I"C:\Program Files\Microchip\MPLAB C32\pic32mx\include" -I"C:\Programmi\Microchip\Source\MiniBasic32" -g -mips16 -Os
Executing: "C:\Program Files\Microchip\MPLAB C32\bin\pic32-gcc.exe" -mprocessor=32MX360F512L -x c -c "vic.c" -o"vic.o" -MMD -MF"vic.d" -I"C:\Program Files\Microchip\MPLAB C32\pic32mx\include\peripheral" -I"C:\Program Files\Microchip\MPLAB C32\pic32mx\include" -I"C:\Programmi\Microchip\Source\MiniBasic32" -g -mips16 -Os
Executing: "C:\Program Files\Microchip\MPLAB C32\bin\pic32-gcc.exe" -mprocessor=32MX360F512L "minibasic.o" "io.o" "salloc.o" "iohw.o" "cpu.o" "vic.o" -o"MiniBasic.elf" -Os -mips16 -Wl,-Map="MiniBasic.map"
C:\Program Files\Microchip\MPLAB C32\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9d086798 of MiniBasic.elf section .text is not within region kseg0_program_mem
C:\Program Files\Microchip\MPLAB C32\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: section .rodata [9d000000 -> 9d000357] overlaps section .text [9d000000 -> 9d086797]
C:\Program Files\Microchip\MPLAB C32\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: section .eh_frame [9d000358 -> 9d0003b7] overlaps section .text [9d000000 -> 9d086797]
C:\Program Files\Microchip\MPLAB C32\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: section .data [9d0003b8 -> 9d00050b] overlaps section .text [9d000000 -> 9d086797]
C:\Program Files\Microchip\MPLAB C32\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: section .sdata [9d00050c -> 9d00050f] overlaps section .text [9d000000 -> 9d086797]
C:\Program Files\Microchip\MPLAB C32\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: MiniBasic.elf: section .text lma 0x9d000000 overlaps previous sections
C:\Program Files\Microchip\MPLAB C32\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: MiniBasic.elf: section .eh_frame lma 0x9d000358 overlaps previous sections
Link step failed.
BUILD FAILED: Fri Dec 14 10:49:23 2007
 
 
Page: < 12345.. > >> Showing page 5 of 11
Jump to:
© 2020 APG vNext Commercial Version 4.5