BasicMicroUK - Forums

www.basicmicro.co.uk
It is currently Sun Nov 18, 2018 11:25 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: More wish list items
PostPosted: Sat Dec 19, 2009 1:50 am 
Offline
Master

Joined: Tue Nov 21, 2006 5:34 pm
Posts: 662
I have lots of different wish list items. I will put a couple of simple ones here:

1) On BAP28 I wish I can use HSERIAL or HSERIAL2 for the one set of hardware serial port. That way I can write code using HSERIAL2 that runs on the TTL level hardware serial port on both BAP28 and BAP40.

2) Wish there were some standardized defines that you can #ifdef your code for both BAP28 and Bap40. I have used #ifdef TMA and works... (defined on 28 not on 40). Likewise a processor speed definition would be nice especially if newer versions run at different speeds...

3) Wish for a way to know how many characters that were transfered as part of a serin. This is interesting in both cases of reading in strings with termination characters or if a timeout happens. Could be as simple as some system variable gets set. Could be optional parameter, could be returned by serin...

Some more complex ones:
4)Wish there was more parameter testing going to gosubs. If you don't pass in the right number you will probably fault sooner or later.

5) wish there was some form of scope for variables. Ie I wish we had local variables in functions (this one is probably more complex.

Would be nice to also add commands for things that are used in several different programs, like support for PS2, Xbee, etc. Maybe define a way to add commands externally.

That is all for now.
Kurt


Top
 Profile  
 
 Post subject: Re: More wish list items
PostPosted: Wed Mar 03, 2010 1:49 am 
Offline
Master

Joined: Tue Nov 21, 2006 5:34 pm
Posts: 662
Wish You could build a longtable with addresses of other variables. Should be able to do it as the addresses are know at compile time. What I would like to be be able to do directly is something like:

Code:
_TT1      bytetable    "RR Hip Hor", 0
_TT2      bytetable   "RR Hip Vert",0
_TT3      bytetable   "RR Knee", 0
...
TT_TABLE   longtable   @_TT1, @_TT2, @_TT3, ...
...
p      var      POINTER

; To print out a index number
p = TT_TABLE(i)
serout s_out, i9600, [str @p20\0]

Note it would be even better if there was a pointertable... But above works.

Note: I have emulated reasonably, at the end of my defines I put in:
Code:
goto AfterTable
BEGINASMSUB
ASM{
TT_TABLE:
   .long (_TT1 + 0x20000)
   .long (_TT2 + 0x20000)
   .long (_TT3 + 0x20000)
...
}
ENDASMSUB
AfterTable:

I put the goto and label in as the compiler put in some code stuff and it wanted to fall through to run the table as code. Also the compiler did not know what TT_TABLE was so it did not like indexing it like an array. I have assembly code to emulate an array lookup.
Code:
      ; Need to get to text name for servo
      xor.l   er0, er0   ; zero out the whole thing
      mov.b   @I, r0l
      shal.l   er0
      shal.l   er0            ; multiply by 4 bytes per...
      mov.l   #TT_TABLE:24, er1
      add.l   er0, er1         ; should have the address now
      mov.l   @er1, er0
      mov.l   er0, @P


Probably not a high priority, but would make table driven things work a little better.

Kurt


Top
 Profile  
 
 Post subject: Re: More wish list items
PostPosted: Fri Mar 19, 2010 11:00 pm 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 7:00 pm
Posts: 1316
Location: Temecula, CA
Anything defined in ASM is NOT know about in the compiler which is why it didn't know anything about TT_TABLE.

4 and 5 are not going to happen anytime soon. They would require a major re-write of the compiler.

1 to 3 are in my list and I'll try to implement them.

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: Re: More wish list items
PostPosted: Sat Jul 03, 2010 5:04 pm 
Offline
Master

Joined: Tue Nov 21, 2006 5:34 pm
Posts: 662
An Alternative to #1. I wish the basic would allow me to abstract away which way the IO is happening without having to change APIS for each call! That is, I wish for example serout might allow me to specify a hardware port/mode and it would automatically redirect to the underlying API. For example if a pin of -1 implies Hardware serial port and -2 implies Hardware serial port 2. Then one could simply have some quick defines at the start of the program and the rest of the code goes unchanged. You could in this case either ignore the baudmode or compares it to the last one and if it changes does a call to sethserial, probably defaulting to 8 bit, no parity, 1 stop bit...


Top
 Profile  
 
 Post subject: Re: More wish list items
PostPosted: Sat Dec 11, 2010 6:38 pm 
Offline
Master

Joined: Tue Nov 21, 2006 5:34 pm
Posts: 662
A quick update on this wish list to Santa.

#1 - Cleanup of Hserial/Hserial2 - done :)
#2 - Standard defines to know what you are compiling for done (BASICATOMPRO28) :)
Except wish this also happened for compiling C programs

#3 - Know how many characters were received on serin/hserin. Still wish for. But it was helped some with the input with STR\count\terminator transferring the terminator... So you can now now for example if you have str\80\13, you can scan for the CR without having to preload the array with something... Would be sufficient if some system variable was set with the last serin count...

#4 and #5 - Parameter testing and scoping - Probably wont happen - can live with...

Others maybe not in this list.
#6 - A better way to handle debug text output on multiple platforms (ie bap28 vs Arc32). IE I want a better way to do something like:
Code:
#ifdef HSP_DEBUG         
hserout HSP_DEBUG, [bin8 bPacket(PKT_BTNHI)\8, bin8 bPacket(PKT_BTNLOW)\8, " "]
#else            
serout S_OUT, i9600, [bin8 bPacket(PKT_BTNHI)\8, bin8 bPacket(PKT_BTNLOW)\8, " "]
#endif

Could be some simple MACRO system, that allows me to define things like:
Code:
#ifdef BASICATOMPRO28
#define Debugout = Serout s_out, i9600
#else
#define Debugout = hserout HSP_DEBUG
;...
DebugOut, [bin8 bPacket(PKT_BTNHI)\8, bin8 bPacket(PKT_BTNLOW)

Could use special characters or the like in the code to tell system to do substitution or the like...

Alternative an update to the actual Basic commands that abstracts out the underlying mechanism... (Probably much harder and I know not likely to happen)

#7 Better support for building C/C++ libraries. Also ways to define project specific settings, color coding... And/or better support for integrating with other IDES such as KPIT's Eclipse... Would probably need a binary conversion utility...

#8 Know when files are changed externally... Example: I compile and I have assembly language embedded and I get an error in this code. So I open the ASM, find the error and try to fix it in the basic program. I recompile and it finds the next error, so I click back on the ASM file, but it is still showing the old file. Have to close and reopen...

Added
#9 - I wish the downloads to the Arc32 and other FTDI based boards/adapters was much faster. Yes I have delay set to 1... But downloads using FTDI are probably twice as slow as other boards/adapters I have.

I can probably always find more things to want :lol:
Kurt


Top
 Profile  
 
 Post subject: Re: More wish list items
PostPosted: Mon Dec 13, 2010 7:26 pm 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 7:00 pm
Posts: 1316
Location: Temecula, CA
#6 and #8 are definitely in my todo list.

#7 would be pretty difficult(parts of it anyway). We use the COFF GNU toolchain. Most others are using the ELF toolchain, so you would need to do binary conversions(not sure if you can do that with a library or not).

*9. You and me both. FTDI chips are great for consistently working unlike other chips we've used, but that minimum 1ms latency really hits the programming time. The only way to get around it would be to change the bootloaders completely a block of data was sent and then verified. Currently its byte by byte.

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: Re: More wish list items
PostPosted: Wed Dec 15, 2010 12:22 am 
Offline
Master

Joined: Tue Nov 21, 2006 5:34 pm
Posts: 662
Acidtech wrote:
#7 would be pretty difficult(parts of it anyway). We use the COFF GNU toolchain. Most others are using the ELF toolchain, so you would need to do binary conversions(not sure if you can do that with a library or not).

I am not sure. I know on some platforms you can do conversions of different objfiles, but I am not sure here. Sometimes you can do it with the linker and sometimes with utilities like objcopy. Obviously a nice solution would to have the support for libraries, per project parameters... Native to the IDE.

In addition it would be great to having the working directory set to the directory of the current project (unless it is explicitly set to something else, so commands like Make could be added... And a real bonus would be if you could somehow pipe the outputs of a command that is run from the tool menu such that the outputs show up in the build window (or equivalent)

Acidtech wrote:
*9. You and me both. FTDI chips are great for consistently working unlike other chips we've used, but that minimum 1ms latency really hits the programming time. The only way to get around it would be to change the bootloaders completely a block of data was sent and then verified. Currently its byte by byte.
Have you tried multiple byte versions to see how they perform? It sure would be nice not having to play a game of freecell when I do a compile :lol:

Kurt


Top
 Profile  
 
 Post subject: Re: More wish list items
PostPosted: Thu Dec 16, 2010 4:11 pm 
Offline
Master

Joined: Tue Nov 21, 2006 5:34 pm
Posts: 662
10) Updates to the setup program. I wish that the setup program would detect that you already have studio installed with a previous version and give you an option to update, instead of Modify and Repair.

Alternatively: Wish that uninstall had option to preserve user settings, such that each time I install a new build I don't have to resetup everything...

Side Notes: Need better way to announce new builds. Modifying an existing post, does not send out any forum notifications or show up when you ask to "View New Posts". I did not notice that 2.0.0.7 came out, until someone on LM mentioned he installed it.

Second side note: 2.0.0.7 appears to still install my old marked up version of the Syntax manual and not the latest stuff....

Kurt

P.S. - It sure is nice that 115200 is working!!!! Thanks


Top
 Profile  
 
 Post subject: Re: More wish list items
PostPosted: Fri Dec 17, 2010 12:14 am 
Offline
Master
User avatar

Joined: Tue Jul 07, 2009 5:06 pm
Posts: 120
Location: Wisconsin USA
I use "Repair", and it updates, i've nad no trouble with that.

Repair simply installs the new version over the old. Though it's not foolproof as some no longer needed files may be kept, i haven't had any issues with that yet.
I'll do a full uninstall/reinstall if the update notes hint to any major changes.

Though i wouldn't mind a foolproof update option that uninstalls the old, installs the new, while keeping user settings.
A simple way of doing it would be to have the installer check for the studio's folder, and if it already exist, then to delete everything except any configuration files, and then run the install.
It would add maybe 3-5 seconds to the install.

_________________
Image
Basic Micro Blog
Universal Robot Controller


Top
 Profile  
 
 Post subject: Re: More wish list items
PostPosted: Fri Dec 17, 2010 3:59 am 
Offline
Master

Joined: Mon Aug 18, 2008 1:26 am
Posts: 799
Location: CA bay Area
Some months ago I had problems with a new release (pre-2000) in early spring. I reinstalled a couple times, but no joy. Eventually I found out from Nathan (AcidTech) that the uninstaller in the Studio package was no good, and I should use Window's uninstaller in Control Panel. I guess we need the final word from Nathan here.

_________________
kenjj
http://blog.basicmicro.com/
http://kjennejohn.wordpress.com/


Top
 Profile  
 
 Post subject: Re: More wish list items
PostPosted: Mon Dec 20, 2010 7:44 pm 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 7:00 pm
Posts: 1316
Location: Temecula, CA
The is only one uninstaller in Studio 2.0. You have to uninstall from the control panel. If you install over an old version(which shouldn't happen in Studio 2.0) then you can end up removing installer files that make it impossible to uninstall via the control panel. If that happens all you can do is delete the BasicMicro folder in Program Files. All our install files go there. Then install the new version.

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: Re: More wish list items
PostPosted: Wed Jan 19, 2011 5:51 pm 
Offline
Citizen

Joined: Wed Oct 29, 2008 11:47 am
Posts: 21
Hi,

I just wanted to shoot in a little wish about the Studio IDE. From the LM forum:

kurte wrote:
zenta wrote:
Another thing I've been thinking on: With all the #ifdef's in the code, I wish that the Studio IDE had a better way to display what part of the code that was active under compiling. Maybe the non-active code could be grayed out? Is that possible? Just a thought..

Yep, that would be nice. At times the variables mentioned in the ifdef will be color coded showing if it is defined or not, but I find when it goes to multiple files or if the define is defined within an ifdef that accurate, especially in multi-file projects... Maybe Nathan could do something...


Is it possible to do something with this?


Top
 Profile  
 
 Post subject: Re: More wish list items
PostPosted: Wed Jan 19, 2011 7:02 pm 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 7:00 pm
Posts: 1316
Location: Temecula, CA
Maybe. Some of that would require realtime compiling. Personally I've seen VisualStudio doing it, but it messes up as much as it gets it right, so I'm not really keen on adding that kind of functionality.

In an ifdef, if the ifdef argument isn't defined, it won't be color coded, which is a good indicator that section of the ifdef isnt active. That won't work with #if conditionals though since they must use defined variables/expressions to evaluate.

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: Re: More wish list items
PostPosted: Wed Jan 19, 2011 8:23 pm 
Offline
Citizen

Joined: Sat Jan 15, 2011 6:01 pm
Posts: 16
Hi all
I havnt started using the Studio serious just jet, still waiting for my stuff from Lynxmotion
But one thing i really miss, and i think it is really easy to fix:

Ctrl-Ins and Shift-Ins for copy and paste

Yes, i know it whent out of standard for at least 5 yeas ago, but it still works in allmost all windowsprograms, and as long as it donst conflict whith any other functions, whould it be really nice to have them working

pleasepleaseplease ! :cry:

_________________
PS
As i am both dyslectic AND Swedish, you may laugh at my spelling and grammar, but please please don’t comment it if you understand what i mean
DS


Top
 Profile  
 
 Post subject: Re: More wish list items
PostPosted: Wed Jan 19, 2011 9:19 pm 
Offline
Citizen

Joined: Wed Oct 29, 2008 11:47 am
Posts: 21
Acidtech wrote:
In an ifdef if the ifdef argument isn't defined it won't be color coded which is a good indicator that section of the ifdef isnt active.

I'm aware of that, but would it be hard make all text within the #ifdef to be non-color coded?

PappaNiklas: I did also use the old ctrl/shift-ins method before, but to be honest I find the Ctrl+C, Ctrl+V and Ctrl+X easier to use when you first get used to it. ;) Simply because some keyboard has different layout when it comes to the Insert button, the Ctrl+XCV are always on the same place.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

phpBB SEO