Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 05:30 02 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : MMBasic on ARM, worth the effort?

     Page 2 of 4    
Author Message
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1132
Posted: 12:24pm 21 Feb 2015
Copy link to clipboard 
Print this post

Has any one links to a good set of up-to-date instructions for setting up a nice IDE for ST Discovery or Nucleo dev boards? I spent months off and on trying to get a Linux box to work, with minimal success. Now I've got a mostly working Win7 setup using Eclipse (following the instructions here (click 'prev' to go to the next installment) ) but so far I can't get the OpenOCD debugger to work.
Visit Vegipete's *Mite Library for cool programs.
 
darthmite

Senior Member

Joined: 20/11/2011
Location: France
Posts: 240
Posted: 02:46pm 21 Feb 2015
Copy link to clipboard 
Print this post

My god ! , you made yourself your life harder
If you just start , use Cocoox (CoIDE).
I try that on the stm32f407 last year and it was not bad so long you don't try
to debug too deep
When you get more familiar with ARM chip , then you can try Keil MDK who 'for me'
is one of the best around.
And they are 2 primary libs set for STM32 ...
The Standard Peripheral Library and ... the CubeMX Library ...
If you can ... use the 1st one , the CubeMX is still in dev and full of bugs

Cheers.

PS : and this is out of Topic !
Topic: MMBasic on ARM, worth the effort? <- everything new worth an effort

Theory is when we know everything but nothing work ...
Practice is when everything work but no one know why ;)
 
plasma
Guru

Joined: 08/04/2012
Location: Germany
Posts: 437
Posted: 11:33pm 21 Feb 2015
Copy link to clipboard 
Print this post

So much People with much knowlege around the Stm here.
I think we need a Community Project for this.
But how to handle ? A secret forum which can only read by People which have a "ok" from geoff
and a Passwort and email auth?

if anyone have a good idea about this and Geoff agreed with this i think we can build some cool.

gtx
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 12:28am 22 Feb 2015
Copy link to clipboard 
Print this post

UPDATE

I've created a RAM array that pretends to the code it is the flash memory. This means that I can now load programs from MMEDIT using xmodem up to 32K in length. EDIT, NEW, CLEAR, MEMORY, XMODEM, RUN, ctrl-C all work together with all the normal BASIC language including TIMER and PAUSE. PAUSE now accepts an integer number of milliseconds rather than a float.

The only difference from the Micromite is that the program is lost following a reset.

The next step is to try and replace the RAM array with the STM flash. From the docs it looks like STM flash is easier to handle than Microchip other than the fact it can only be erased in large chunks.

Once I've got this working it would be great if a group could work on the code. My idea is that we could allocate the various peripherals to individuals so that one person could work on I2C, another on SPI etc. As these are all handled in separate source files it shouldn't be too difficult to coordinate the development.

There are lots of example programs out there so getting each individual type of hardware to work should be easy enough. The challenge will be bringing it all together under the flexible pin allocation "SETPIN" umbrella.

One key area is getting timers other than settick working as these are used for many of the special hardware devices (DS18B20, IR, DHT22, HC-SR04)

I haven't thought about Cfunctions yet but obviously these would be essential if the port is to be of any use in high speed applications.

They would need G8JCF to help with a new version of CFuncGen that could handle the ARM elf file.

I'll PM Geoff to ask permission to work in this way and also Peter (G8JCF) to get his comments.

Please PM me if you would like to be involved

Edited by matherp 2015-02-23
 
pito
Newbie

Joined: 09/06/2011
Location:
Posts: 25
Posted: 05:21am 22 Feb 2015
Copy link to clipboard 
Print this post

Mind the access to the external sram/sdram is at least 6x slower (or more with slower memories) than to the internal sram with stm32f4xx. On the other hand it has got SDIO (pic32 does not posses it) so 10MB/sec r/w to an sdcard is real (with 32k buffers). Also single precision FPU math calcs are 10-15x faster. I would highly recommend to have double precision (64bit) floating point as well (or more with bcdfp bignumber library thus the users may use it as a scientific programmable). I would use the internal sram for various buffers (for serial, video, sdcard, etc.), while the Basic itself would reside in the external sram/sdram (ie 512kx16bit 10-55ns). In the result such config would be _many_ (20-50x ??) times faster than my old Atari 1024ST with Basic.
So today the stm32f4xx are the best candidates when talking DIY, still-hand-solderable-Basic kits.Edited by pito 2015-02-23
 
plasma
Guru

Joined: 08/04/2012
Location: Germany
Posts: 437
Posted: 09:34am 22 Feb 2015
Copy link to clipboard 
Print this post

let us use the coide because keil isnt really cheap for a hoby progger ( like me)
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 05:58am 23 Feb 2015
Copy link to clipboard 
Print this post

Geoff has kindly agreed that we can proceed with the STM32 Micromite development on the basis I proposed in my last post.

The current development group is matherp, plasma, darthmite, G8JCF and TZadvantage.

If anyone else would like to be involved please PM me, requirements are purchase of a $15 development board and a willingness to get down and very dirty in C with the ARM peripheral hardware.

Current status is as follows:
MMBasic is fully working
Programs are now correctly stored in flash and run from flash
Interaction with MMEdit works properly
XMODEM, EDIT, NEW, CLEAR, ctrlC, CONTINUE, VAR SAVE, VAR RESTORE, OPTION AUTORUN ON/OFF all work
TIMER and PAUSE both work (PAUSE now accepts an integer number of msec rather than a float)

No peripherals other than the 1msec SYSTICK timer have yet been configured


 
darthmite

Senior Member

Joined: 20/11/2011
Location: France
Posts: 240
Posted: 06:41am 23 Feb 2015
Copy link to clipboard 
Print this post

Great
I was sure Geoff will say yes
@TZadvantage : the ST429 Disco is on his way to your country ...

I will do the PS2 KB (as i helped for it on the pic32 MM and i know how it work)
The mod player is done here for the st429
SD Card driver (tough SPI) is done too
Full Graphics driver done (800 x 480 16bits)...
Wii joystick driver (I2C) done...
For the mouse is one another story , i put a stm32f0 in a PS2 mouse (4 pin from UC like
the schematic from this page : mouse protocol ) and output clk/dat to my main board.
Driver for dual SDRAM chip done ....
Well allot of the driver are ready , now it's just some adaptation to do for the
interpreter

I hope that the matherp CoIde project will not be the hell to adapt for Keil ... will see ...

Cheers.


Theory is when we know everything but nothing work ...
Practice is when everything work but no one know why ;)
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 01:07pm 23 Feb 2015
Copy link to clipboard 
Print this post

If this seems to be the way that things are now heading, have the 470's been dropped in favor of the ST's?

Does not bother me if the answer is "Yes".

But, if this is the way things are heading, perhaps I could start work on a preliminary ARM MicroMite PCB layout?

...unless the $15 development board has everything that will be needed anyway...

What do the ST chips sell for by themselves, and can someone link me to the part, so I can see what it's footprint is?

Unfortunately, I cannot help with this code development - C is not my area!

@ darthmite - how are the graphics done? HDMI? DVI? VGA?
Smoke makes things work. When the smoke gets out, it stops!
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 01:26pm 23 Feb 2015
Copy link to clipboard 
Print this post

  Quote  have the 470's been dropped in favor of the ST's


Certainly not from my perspective - we don't even know if it will work out. Remember Geoff's experience with the MZ.
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 01:31pm 23 Feb 2015
Copy link to clipboard 
Print this post

My feeling is that the 470 is a good idea and in effect here now (nearly). Looks like Geoff is in favour, with just some details to be firmed up.

An ARM chip is almost certainly another good idea but will take some time.

And may or may not be an ST - and if an ST may be the 407 or 429 or ... (who knows).

I suspect Geoff will decide when more is known.

A choice of chips and a choice of makes must be good for the longer term.

(Also, maybe Microchip will see that the MZ needs more effort to make it better - don't let's assume it won't be.)

Grogster - if you fancy a go at an ARM PCB... hey why not! In case it may help I think there are some creative commons or OSHW type ones available from Olimex for Allwinner and perhaps for ST ARM chips. They might be of some interest.

JohnEdited by JohnS 2015-02-24
 
pito
Newbie

Joined: 09/06/2011
Location:
Posts: 25
Posted: 02:43pm 23 Feb 2015
Copy link to clipboard 
Print this post

407 does support sram, does not support sdram
42x does support sdram
16MBx16 sdram costs $1.50, the same in sram would be 100x more expensive
407 costs $10-$15 single q.
42x costs $15-$20 single q.
So basically twice the pic32MX/MZ
PS: do not use SPI but SDIO for the SDcard
Edited by pito 2015-02-25
 
darthmite

Senior Member

Joined: 20/11/2011
Location: France
Posts: 240
Posted: 04:00am 24 Feb 2015
Copy link to clipboard 
Print this post

  Grogster said  
@ darthmite - how are the graphics done? HDMI? DVI? VGA?


I have done up to 640 x 480 in 16bits on VGA Screen.(old board)
Now i do 400 x 240 or 800 x 480 in 16bits at 112 fps on my new board with LCD.
For VGA you need a R2R DAC to convert the 16bits digital to 5R 6G 5B analog.
you can get all info for that on my 'discontinued' page here :
old board
schematic from v1 and v2 board at bottom of the page.
I have do in the past 320 x 240 8bits VGA with a stm32f407 , but is a little too restrictive , better directly use the st429 for doing sexy things like that

Cheers.


Theory is when we know everything but nothing work ...
Practice is when everything work but no one know why ;)
 
boss

Senior Member

Joined: 19/08/2011
Location: Canada
Posts: 268
Posted: 11:16am 25 Feb 2015
Copy link to clipboard 
Print this post

STM32F4 is an old horse but still good enough for MMBasic project
I personally suggest to focus our effort on the latest pin and instruction backward compatible chip STM32F7

Bo
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 11:30am 25 Feb 2015
Copy link to clipboard 
Print this post

When it's conveniently & cheaply available - but it's not is it?

John
 
boss

Senior Member

Joined: 19/08/2011
Location: Canada
Posts: 268
Posted: 11:45am 25 Feb 2015
Copy link to clipboard 
Print this post

@JohnS
Their promises say Q2 2015 in US/Canada and the price should be close or the same as F4.
But they are Frenchmen, aren't they?

So we will see.

Bo
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 01:21pm 25 Feb 2015
Copy link to clipboard 
Print this post

If/when that happens I'm likely to be keen. Right now I'd rather stick to what's available :)

John
 
boss

Senior Member

Joined: 19/08/2011
Location: Canada
Posts: 268
Posted: 01:39pm 25 Feb 2015
Copy link to clipboard 
Print this post

@JohnS
I fully agree with you. I have a couple of F4 demo boards from ST Canada and I'm eager to try MMBasic running on it. Together with SSD1963 shield with DVI output it might be nice gadget.

I hope the final version will run on F7 as well. They proclaim pin and code compatibility with F4.



 
plasma
Guru

Joined: 08/04/2012
Location: Germany
Posts: 437
Posted: 10:52pm 26 Feb 2015
Copy link to clipboard 
Print this post

Any Progress ?
At the Moment i test some libs without the
Mmbasic port to become a feeling for the Stm32.

@darthmite. Look like i can help .
 
darthmite

Senior Member

Joined: 20/11/2011
Location: France
Posts: 240
Posted: 11:29pm 26 Feb 2015
Copy link to clipboard 
Print this post

Yea , it progress slowly
From more than 200 warning and 150 error in compilation (Coocox and Keil don't like each other) i reduced this to 62 warning and 7 errors (damn pointer) ...
I think that it probably soon can interpret on st429 too.
But i'm not alone for this work

Cheers.

Theory is when we know everything but nothing work ...
Practice is when everything work but no one know why ;)
 
     Page 2 of 4    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025