Help getting started - my project goals

Post details of your projects here.
Post Reply
Chris Boss
Posts: 2
Joined: Thu Feb 06, 2020 3:11 am

Help getting started - my project goals

Post by Chris Boss »

Hello Coridium,

I am a new user to your ARM boards. I am a consultant for a client who will eventually build his own ARM boards and probably purchase the $500 license version of your BASIC compiler. There are some projects which we have to get up and running in the next few months.

To get started I have purchased the following:

ARM stamp - LPC11U37
https://www.coridium.us/coridium/shop/boards/bd05-stamp

PROstart - LPC1114
https://www.coridium.us/coridium/shop/b ... 0-prostart


LPC54005 with LCD evaluation kit
https://www.coridium.us/coridium/shop/b ... 10lpc54005

Working with boards like yours is new to me and I also have to get up to speed with your BASIC compiler.

That said, I am not new to programming. My electronics experiences is a bit limited, but as far as programming I am a professional. I started programming in BASIC back in 1975. In the 1980's I learned programming in BASIC for CPM, Commodore 64 (used Abacus compiler) and even learned 6502 machine language and wrote my own BASIC compiler for the C64. When IBM compatibles came around I switched to QBasic, then QuickBasic and later Microsoft Professional Basic 7.1 and wrote custom software for businesses for a number of years. When Windows came around I moved on to Visual Basic 1.0, 2.0 and 5.0 Pro.

Finally I came across Powerbasic for Windows. Powerbasic came from Borland International's famous Turbo Basic. I then learned the low level WIN32 API for Windows and have been a WIN32 programmer for the last 20 years or so. My business created one of the few existing GUI frameworks for Windows which is based on the WIN32 (not dot.net). I have sold my GUI framework development tool for Powerbasic to Powerbasic programmers for a couple decades now.

(see: http://cwsof.com/softdev/index.html
(see: https://www.youtube.com/user/ComputerWo ... _polymer=1

In recent years I have been doing R&D for clients in the embedded world. I have been working with making Powerbasic work with RTOS-32 (real time operating system) for x86 boards. One client is now interested in ARM boards like the ones made by Coridium and possibly some custom boards.

What I need right now is a "short version" of how to get started with the Coridium boards I listed above. I have the BASIC tolls installed, but it seems very foreign to what I am use to. I am sure with a few "insights" from experienced users that I can get up to speed with the software.

So where do i start ?

Any simple tutorials ?

Which boards is best for a beginner to your boards ?



basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: Help getting started - my project goals

Post by basicchip »

Well the help manual is really a language reference, though the hardware sections introduce some of the simple interfaces, like pin IO, serial IO, timers.

BASICtools has a pulldown menu Tools has a number of examples including blinky, timers, interrupts, even multi-tasking.

The BASIC itself follows most constructs of GWBASIC, or early Microsoft BASIC. Some differences change peek and poke to using pointers like C. That is how hardware registers of the chip are accessed. Why do you feel it's foreign? It won't have API calls as there is no underlying operating system.

Details on hardware features of the chip are in the user manuals from the chip manufacturers, we don't try to duplicate their documentation.

basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: Help getting started - my project goals

Post by basicchip »

PS there is a getting started section in the Help files, that gets you to a "Hello World" program, and also wiggling a pin.

Chris Boss
Posts: 2
Joined: Thu Feb 06, 2020 3:11 am

Re: Help getting started - my project goals

Post by Chris Boss »

When i said "foreign" to me, I simply meant the IDE wasn't familiar to me compared to IDE's I have been working with for years. For example with a windows compiler I simply compile and run. With ARM Basic the IDE has to recognize what device is connect to it and then compile, move to device and then run.

I had problems with selecting an external IDE from the BASIC Tools app. Normally you simply run an IDE which is the code editor. Your BASIC tools app has to call an external code editor of your choice, but when I tried to it gave me an error message.

If i select the "Choose Editor" option from the menus, I get an error message box which says:

"Error: couldn't change working directory to " ....

Even if I run the app as Administrator I still get the error message.

Another thing which was confusing was only a few of your boards are listed to select for a device, but I also bought one of your eval boards with LCD) which is not listed in the menus. I think i saw a reference to some library files in the library folder for that board, but the BASIC tools app didn't help me find that. I had to browse with Windows Explorer.

I am not being critical of your software, just that for me I was hoping it would be a little more intuitive and that things would be obvious for me when I first ran it. I am now walking through the help file, but it is huge and will take some time.

basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: Help getting started - my project goals

Post by basicchip »

What editor are you trying to run? Is it in the "Program Files" or "Program Files (x86)" directory or somewhere else?

What version of windows?

I recently changed editors myself (not a big change), but from the 32 bit version to the 64 bit version of Notepad++. I did have some issues trying to get that to take, and I did make some changes to the IDE selection process.

Win 10 makes it hard to choose files in the (x86) directory, so I force it to start there. But you can navigate to the 64 bit version from there, you just can't go back.

I know most IDEs give you an editor you are stuck with, which is one of my big pet peeves. Their editors normally don't have many features that I am use to using. I am writing in many different languages or systems, sometimes on a daily basis, and using a favored editor makes that easier.

The LPC54005 is from our "proto shop", not really a production unit yet, so help files may be a bit sketchy on it, but I work closely with people using it.

olzeke51
Posts: 414
Joined: Sat May 17, 2014 4:22 pm
Location: South Carolina

Re: Help getting started - my project goals

Post by olzeke51 »

Hello Chris - welcome aboard !
'
I'm more of a hardware guy, myself.
'
some hints - that might ease you into it all -
your projects are saved in the ./Documents/Coridium folder
I create subfolders for each board type, then for each project with that type.
'
- the compiler pulls standard lib files from your Documents/Coridium folder
as well as your project files -- if you change or add to the libs/examples,
it would be prudent to update the files in the Program Files(86)/Coridium folder also
'
1)#defines are case-sensitive, other names are not --part of the gcc compiler process
1a) CONST:: these are stored in Flash so they save RAM (issue with the 1114 chip)
2)if you choose to use 'global' variables - DIM them before they are used in the #include files
2a) a DIMmed variable inside a SUBroutine maintains it's last value;
it doesn't get re-initialized by the DIM the second time the SUB is called.
so...clean up/zero any variables that might be used 2nd time around !!
3)most everything is saved as 32bit Ints - but Bruce has recently added the
RD_WR_BYTE & _HALF words -- I do an ADDRESSOF the variable (ex. FLAGS)
then do RD_BYTE( pointer + offset) offset being 0,1,2,3 for the byte
position I want. [0 is not really needed - but it helps me identify]
3a) I haven't dealt much with the 32 Single/Floats
3b) 64 bit has just recently been added also
'
4) INTerrupts are usually done in two SUBs - one for the initial setup (called from Main:)
and then one for the actual code that the INT will handle
5)IFELSE structures - the first IFelse that qualifies will be done , (the others are skipped)
then it exits to the ENDIF, same with the SELECT/CASE scenario
6) reading digital IO ports -1 is considered 'NOT 0' meaning its a 'hi' not ground/0
I have started using ABS(pin) to get a positive 1 - I'm not a proficient programmer
7) compiler error messages - jjust tackle the first one or two, scan the rest for
perhaps an #include file with errors also -- a nested missing 'endif' can flag
an error further down your listing
8) 'print' uses the debug/programming port as well as 'debugin' command
there is no prompt on the 'debugin' - iirc no alpha/characters just numbers
8a) PRINT ; - immediately the next value , - tabbed over- so some space
8b) I use PRINT HEX(var) alot as the NXP docs use mostly HEX notation
9) no comments on a "Label:" line is allowed
10) a 'Label:' routine needs a RETURN iirc
'
this ought to gety you going -- Gary

basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: Help getting started - my project goals

Post by basicchip »

While Olzeke has been able to duplicate this (after many attempts) I have not been able to.

I put a couple changes to attempt to force choices away from root directory or program directory.

Seems to me, if you run any of the examples (from the Tools menu), the error would go away.

Post Reply