Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 20:30 11 May 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 : Armmite H7: Full release & documentation

     Page 4 of 13    
Author Message
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 2139
Posted: 02:56pm 25 Sep 2018
Copy link to clipboard 
Print this post

ah! sorry - our posts crossed.

a memory leak perhaps? given the consistency of the fail?Edited by CaptainBoing 2018-09-27
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 2139
Posted: 03:18pm 25 Sep 2018
Copy link to clipboard 
Print this post

In the meantime...

I have converted the pin labels from TassyJims spreadsheet into a block of Consts so the pins on the nucleo board can be programmed using the labels in your code (and the Arduino ones too).

You can now program any pin using either the ST terminology, the arduino terminology or the Morpho connector and pin. You'll still need to use eother Jim's spreadsheet for a detailed description of function or the Microcontroller PDF (which is heavier fodder) to decide which pins are best suited to your project.

use these just as normal, e.g.

SetPin PE2,DIN,PULLUP

x=Pin(CN11_46)

etc


Const PE2=1,D56=1,CN9_14=1,CN11_46=1
Const PE3=2,D60=2,CN9_22=2,CN11_47=2
Const PE4=3,D57=3,CN9_16=3,CN11_48=3
Const PE5=4,D58=4,CN9_18=4,CN11_50=4
Const PE6=5,D59=5,CN9_20=5,CN11_62=5
Const PC13=7,CN11_23=7
Const PC14=8,CN11_25=8
Const PC15=9,CN11_27=9
Const PF0=10,D68=10,CN9_21=10,CN11_53=10
Const PF1=11,D69=11,CN9_19=11,CN11_51=11
Const PF2=12,D70=12,CN9_17=12,CN11_52=12
Const PF3=13,A3=13,CN9_7=13,CN12_58=13
Const PF4=14,A8=14,CN10_11=14,CN12_38=14
Const PF5=15,A4=15,CN9_9=15,CN12_36=15
Const PF6=18,CN11_9=18
Const PF7=19,D62=19,CN9_26=19,CN11_11=19
Const PF8=20,CN11_54=20
Const PF9=21,D63=21,CN9_28=21,CN11_56=21
Const PF10=22,A5=22,CN9_11=22,CN12_42=22
Const PH0=23,CN11_29=23
Const PH1=24,CN11_31=24
Const PC0=26,A1=26,CN9_3=26,CN11_38=26
Const PC1=27,CN11_36=27
Const PC2=28,A7=28,CN10_9=28,CN11_35=28
Const PC3=29,A2=29,CN9_5=29,CN11_37=29
Const PA0=34,D32=34,CN10_29=34,CN11_28=34
Const PA1=35,CN11_30=35
Const PA2=36,CN12_35=36
Const PA3=37,A0=37,CN9_1=37,CN12_37=37
Const PA4=40,D24=40,CN7_17=40,CN11_32=40
Const PA5=41,D13=41,CN7_10=41,CN12_11=41
Const PA6=42,D12=42,CN7_12=42,CN12_13=42
Const PA7=43,D11=43,CN7_14=43,CN12_15=43
Const PC4=44,CN12_34=44
Const PC5=45,CN12_6=45
Const PB0=46,D33=46,CN10_31=46,CN11_34=46
Const PB1=47,A6=47,CN10_7=47,CN12_24=47
Const PB2=48,D27=48,CN10_15=48,CN12_22=48
Const PF11=49,CN12_62=49
Const PF12=50,D8=50,CN7_20=50,CN12_59=50
Const PF13=53,D7=53,CN10_2=53,CN12_57=53
Const PF14=54,D4=54,CN10_8=54,CN12_50=54
Const PF15=55,CN12_60=55
Const PG0=56,CN11_59=56
Const PG1=57,D64=57,CN9_30=57,CN11_58=57
Const PE7=58,D41=58,CN10_20=58,CN12_44=58
Const PE8=59,D42=59,CN10_18=59,CN12_40=59
Const PE9=60,D6=60,CN10_4=60,CN12_52=60
Const PE10=63,D40=63,CN10_24=63,CN12_47=63
Const PE11=64,D5=64,CN10_6=64,CN12_56=64
Const PE12=65,D39=65,CN10_26=65,CN12_49=65
Const PE13=66,D3=66,CN10_12=66,CN12_55=66
Const PE14=67,D38=67,CN10_28=67,CN12_51=67
Const PE15=68,CN12_53=68
Const PB10=69,D36=69,CN10_32=69,CN12_25=69
Const PB11=70,D35=70,CN10_34=70,CN12_18=70
Const PB12=73,D19=73,CN7_7=73,CN12_16=73
Const PB13=74,D18=74,CN7_5=74,CN12_30=74
Const PB14=75,CN12_28=75
Const PB15=76,D17=76,CN7_3=76,CN12_26=76
Const PD8=77,CN12_10=77
Const PD9=78,CN11_69=78
Const PD10=79,CN12_65=79
Const PD11=80,D30=80,CN10_23=80,CN12_45=80
Const PD12=81,D29=81,CN10_21=81,CN12_43=81
Const PD13=82,D28=82,CN10_19=82,CN12_41=82
Const PD14=85,D10=85,CN7_16=85,CN12_46=85
Const PD15=86,D9=86,CN7_18=86,CN12_48=86
Const PG2=87,D49=87,CN8_14=87,CN11_42=87
Const PG3=88,D50=88,CN8_16=88,CN11_44=88
Const PG4=89,CN12_69=89
Const PG5=90,CN12_68=90
Const PG6=91,CN12_70=91
Const PG7=92,CN12_67=92
Const PG8=93,CN12_66=93
Const PC6=96,D16=96,CN7_1=96,CN12_4=96
Const PC7=97,D21=97,CN7_11=97,CN12_19=97
Const PC8=98,D43=98,CN8_2=98,CN12_2=98
Const PC9=99,D44=99,CN8_4=99,CN12_1=99
Const PA8=100,CN12_23=100
Const PA9=101,CN12_21=101
Const PA10=102,CN12_33=102
Const PA11=103,CN12_14=103
Const PA12=104,CN12_12=104
Const PA13=105,CN11_13=105
Const PA14=109,CN11_15=109
Const PA15=110,D20=110,CN7_9=110,CN11_17=110
Const PC10=111,D45=111,CN8_6=111,CN11_1=111
Const PC11=112,D46=112,CN8_8=112,CN11_2=112
Const PC12=113,D47=113,CN8_10=113,CN11_3=113
Const PD0=114,D67=114,CN9_25=114,CN11_57=114
Const PD1=115,D66=115,CN9_27=115,CN11_55=115
Const PD2=116,D48=116,CN8_12=116,CN11_4=116
Const PD3=117,D55=117,CN9_10=117,CN11_40=117
Const PD4=118,D54=118,CN9_8=118,CN11_39=118
Const PD5=119,D53=119,CN9_6=119,CN11_41=119
Const PD6=122,D52=122,CN9_4=122,CN11_43=122
Const PD7=123,D51=123,CN9_2=123,CN11_45=123
Const PG9=124,D0=124,CN10_16=124,CN11_63=124
Const PG10=125,CN11_66=125
Const PG11=126,CN11_70=126
Const PG12=127,CN11_65=127
Const PG13=128,CN11_68=128
Const PG14=129,D1=129,CN10_14=129,CN12_61=129
Const PG15=132,CN11_64=132
Const PB3=133,D23=133,CN7_15=133,CN12_31=133
Const PB4=134,D25=134,CN7_19=134,CN12_27=134
Const PB5=135,D22=135,CN7_13=135,CN12_29=135
Const PB6=136,D26=136,CN10_13=136,CN12_17=136
Const PB7=137,CN11_21=137
Const PB8=139,D15=139,CN7_2=139,CN12_3=139
Const PB9=140,D14=140,CN7_4=140,CN12_5=140
Const PE0=141,D34=141,CN10_33=141,CN12_64=141
Const PE1=142,CN11_61=142


enjoyEdited by CaptainBoing 2018-09-27
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10067
Posted: 03:50pm 25 Sep 2018
Copy link to clipboard 
Print this post

  Quote  I have converted the pin labels from TassyJims spreadsheet into a block of Consts so the pins on the nucleo board can be programmed using the labels in your code (and the Arduino ones too).


I'll include this in the manual if that is OK?
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10067
Posted: 04:17pm 25 Sep 2018
Copy link to clipboard 
Print this post

This should fix the string bug. The interesting thing is that the relevant code was identical to the MM2, MM+, MMX and Pi-cromite. All of the Pi-cromite, MMX and the Armmite have the problem. Common factors are they all have a memory cache and they all use later versions of the GCC compiler than the one used by Geoff - not sure what is causing the problem but a variable updated in one routine was being used incorrectly in another despite declaring it "volatile" which should cause the compiler to avoid optimising access to it.

2018-09-26_021728_Armmite1.3.zip

2018-09-26_022332_Armmite_H7_Manual.pdf Edited by matherp 2018-09-27
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 2139
Posted: 05:59pm 25 Sep 2018
Copy link to clipboard 
Print this post

  matherp said  

I'll include this in the manual if that is OK?


absolutely
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 2139
Posted: 06:27pm 25 Sep 2018
Copy link to clipboard 
Print this post

  matherp said   This should fix the string bug. *snip*


Thanks Peter, that seems to have sorted it. I left it spinning with a screen scroll-back of 20K lines and waited for it to fill then did the same with the original test prog that is a degree more complex all with no errors.

u da bes'
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 2139
Posted: 08:05pm 25 Sep 2018
Copy link to clipboard 
Print this post

I have had a couple of hang-ups from the terminal session during testing which I put down to USB problems, dodgy cables getting nudged etc. seen it all before. But tonight I have determined these are actually crashes.

I set a test program running and left it and when I came back the console was non-responsive. This time I closed and re-opened and the terminal connected OK which discounted any USB problem (it would have complained about "COMx not available").

So I set the test program to toggle the red LED and after a power cycle set it going, this time if it dropped off I could tell if the program was still running despite the unresponsive console.

Sorry to say the LED stops flashing as the terminal goes away so it looks like I am getting a system crash. Oddly, it requires a complete power cycle - The reset button doesn't bring it out of the coma. Even taking GND to the NRST pin on CN11 or direct to pin 25 on the processor doesn't work, only a power cycle. Some corruption that stops a warm boot from working?

Any ideas? Anyone else getting this or does it stay up for days for you?

regards

h

EDIT: Forgot to attach the code if anyone else wants to try

2018-09-26_060652_code.zip Edited by CaptainBoing 2018-09-27
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6220
Posted: 09:10pm 25 Sep 2018
Copy link to clipboard 
Print this post

One thing I had noticed is the occasional character being sent to the console gets converted to a backspace. I thought it was just MMEdit but the same random thing happens with teraterm. What you see will depend on how the terminal program handles backspace characters.

It appears at random intervals.
Haven't tried the latest firmware yet.

Jim
VK7JH
MMedit
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1833
Posted: 10:31pm 25 Sep 2018
Copy link to clipboard 
Print this post

  CaptainBoing said   In the meantime...

I have converted the pin labels from TassyJims spreadsheet into a block of Consts so the pins on the nucleo board can be programmed using the labels in your code (and the Arduino ones too).

You can now program any pin using either the ST terminology, the arduino terminology or the Morpho connector and pin. You'll still need to use eother Jim's spreadsheet for a detailed description of function or the Microcontroller PDF (which is heavier fodder) to decide which pins are best suited to your project.


Thank you, that will be a great help to me in these early stages. I'm also having trouble reading the board pins, I searched for a large clear connector pin-out layout but haven't found any as yet, I'm just going to take a photo of the board, enlarge it and print it, seems to be all I can come up with for now.

Al least my simple LED flasher and user button interrupt are working correctly with autorun playing along now.

Thanks to all.

NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1833
Posted: 10:56pm 25 Sep 2018
Copy link to clipboard 
Print this post

Is my memory going?

I thought pressing the reset button used to display the MM.BASIC copyright notices?



NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9491
Posted: 12:28am 26 Sep 2018
Copy link to clipboard 
Print this post

It does. If everything is working OK.

EDIT: [Quote=CaptainBoing]I have converted the pin labels from TassyJims spreadsheet into a block of Consts so the pins on the nucleo board can be programmed using the labels in your code (and the Arduino ones too).

You can now program any pin using either the ST terminology, the arduino terminology or the Morpho connector and pin. You'll still need to use eother Jim's spreadsheet for a detailed description of function or the Microcontroller PDF (which is heavier fodder) to decide which pins are best suited to your project.[/Quote]

Marvellous. Thanks. You've just saved me a heap of work, as I was about to do something similar so I could find the correct pins for things. Edited by Grogster 2018-09-27
Smoke makes things work. When the smoke gets out, it stops!
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1833
Posted: 01:17am 26 Sep 2018
Copy link to clipboard 
Print this post

  Grogster said   It does. If everything is working OK.


? Stopped after the latest release was loaded from a few post back, and now no mm.basic copyright info. I'll go back and do a verify and see it something happened, otherwise I'll reload it and try again.

I can't get out to get the required headers to connect anything up, I'll have to wait for my wife to get them tomorrow - sigh!

NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1833
Posted: 01:26am 26 Sep 2018
Copy link to clipboard 
Print this post

Found the problem - try turning autorun on and pressing reset, in mine NO info is returned, turn autorun off and info returns when reset is pressed.
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6220
Posted: 01:51am 26 Sep 2018
Copy link to clipboard 
Print this post

  TassyJim said   One thing I had noticed is the occasional character being sent to the console gets converted to a backspace.
Haven't tried the latest firmware yet.

Jim

Problem fixed in V5.04.31

@keepIS
If you have autorun set, you wouldn't want the opening credits to be displayed. It would likely get in the way of any program output.

Jim
VK7JH
MMedit
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1833
Posted: 02:14am 26 Sep 2018
Copy link to clipboard 
Print this post

I'm used to the MM-Plus displaying that info when reset or power on is actioned, with or without autorun enabled, I have a CLS command at the start of every program for that. I'm quite happy to not see it with autorun enabled, just something I noticed.

Mike.
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
goc30

Guru

Joined: 12/04/2017
Location: France
Posts: 435
Posted: 02:27am 26 Sep 2018
Copy link to clipboard 
Print this post

Hi TassyJim

Can you know why MMedit stop download after 767 blocks (and micromite stop also)
with armite??
I have 67% free memory

(I have not tested with other card, because program is too big for them)

thank!
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6220
Posted: 04:04am 26 Sep 2018
Copy link to clipboard 
Print this post

  goc30 said   Hi TassyJim

Can you know why MMedit stop download after 767 blocks (and micromite stop also)
with armite??
I have 67% free memory

(I have not tested with other card, because program is too big for them)

thank!

I easily downloaded an image file with 1801 blocks to my armite SDcard.
I haven't tried loading a big program file direct into memory.

Can you give me a copy of the file you are having trouble with and I will have a look.

Jim
VK7JH
MMedit
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6220
Posted: 07:02am 26 Sep 2018
Copy link to clipboard 
Print this post

  goc30 said   Hi TassyJim

Can you know why MMedit stop download after 767 blocks (and micromite stop also)
with armite??

I have done some testing.
I loaded a file "lunar_eclipse" as it was the largest I had. It is 2000 lines or ~600 blocks.
It loaded with "load and run" successfully.
I then added 2000 comments to the file bringing it up to 132k or 1052 blocks.
With "load and run", it loaded fully the gave an error
All Done!

Saving program
Error: Not enough memory for Cfunction

I tried loading using AUTOSAVE and the same error occurred at the conclusion of the load.
I then transferred the file to the SD card (using XMODEM) and tried load "test.bas"

The same error:
> NEW

> load "temp.bas"
Error: Not enough memory for Cfunction
> memory
Flash:
128K (49%) Program (3737 lines)
128K (51%) Free

RAM:
0K ( 0%) 0 Variables
0K ( 0%) General
498K (100%) Free
>

There are no CFUNCTIONS in the code I was loading.
The file has 3993 lines but it has been truncated to 3737 lines.

It looks like 128k is the maximum size program, not 512k.

Jim
VK7JH
MMedit
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10067
Posted: 07:11am 26 Sep 2018
Copy link to clipboard 
Print this post

  Quote  It looks like 128k is the maximum size program, not 512k.


Check the manual for OPTION FLASHPAGES

  Quote  I searched for a large clear connector pin-out layout but haven't found any as yet,


The manual for the Nucleo has good diagrams. You need "UM1974 - User manual STM32-144 boards"

  Quote  If you have autorun set, you wouldn't want the opening credits to be displayed. It would likely get in the way of any program output.


I thought this was what all Micromites did - I remember it being discussed on the forum some time ago. I can change it to display the notice if required - views?

  Quote  Problem fixed in V5.04.31


This probably all relates to the bug fixed in 5.04.31. Geoff included an optimisation recently that massively speeded up MMBasic when strings were used in code. I'd included this in the MMX, Pi-cromite and Armmite but for reasons unknown (compiler issue or cacheing artifact) it doesn't work on these processors (they all use the same compiler, latest version of GCC). Basically every time the code used a temporary string it took a slot out of 1024 available. Once these were used up it crashed. I've replaced Geoff's optimisation with a different one that does work.

I've just run CaptainBoing's test code which hammers string handling all night and all was still working fine this morning.

Note, if you use an external 5V supply to the Nucleo (details in the manual) you can disconnect the ST-link USB connector and it will keep runnning. You can then also connect a USB/UART to the console pins (PD8,PD9) and communicate with the board like a normal Micromite.Edited by matherp 2018-09-27
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6220
Posted: 07:51am 26 Sep 2018
Copy link to clipboard 
Print this post

  matherp said  
  Quote  It looks like 128k is the maximum size program, not 512k.


Check the manual for OPTION FLASHPAGES

Yes, that explains it. I will have to wait to see if that was the original problem.
In the mean-time, I will read the manual.

Jim
VK7JH
MMedit
 
     Page 4 of 13    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025