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 : Pico Board makers - give me your options
Page 1 of 3 | |||||
Author | Message | ||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9114 |
In the next release of the various Pico firmware versions I'm going to include a new option OPTION PLATFORM name This will configure all required options for a board from the basis of the defaults for the relevant variant of the firmware So: OPTION PLATFORM CMM1.5 will effectively do the equivalent of: option reset option pico off option heartbeat off option system i2c gp14,gp15 option sdcard gp13,gp10,gp11,gp12 option vga pins gp23,gp18 option audio gp16,gp17 This sits on top of the PicoMiteVGAUSB firmware defaults which already configure OPTION SERIAL CONSOLE GP8,GP9 OPTION CPUSPEED 252000 If you would like your board supported in this way please post on this thread the name you would like - please make this specific rather than a general name that could apply to multiple configurations, the firmware variant to which your board is targetted, and the options you want set over and above the defaults for the relevant version of the firmware This offer only applies to open source PCB designs available to all not one-off breadboard setups. NB: for Mick - keep the numbers down!!! Edited 2024-03-19 02:45 by matherp |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4037 |
I have reservations Peter. You already introduced OPTION PLATFORM to just set a string that could be retrieved via MM.INFO$. With what you propose now you can't set that string independently of "messing" with other OPTIONs which will make testing harder and also challenge those who want to stray from a particular design's default pin assignment. Perhaps OPTION PLATFORM "foo" could just set the platform constant (as it does now) whereas OPTION CONFIG PLATFORM "foo" could do the full magic you are proposing ... or alternatively since you have overcome the command token limit, perhaps just CONFIGURE [AS] "foo". Best wishes, Tom Edited 2024-03-19 03:15 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6786 |
Hehe... I'm going to have to think hard about this one! :) I assume that if OPTION PLATFORM isn't used the OPTIONS are set individually as usual. This one doesn't support USB. ================================ OPTION PLATFORM VGA BASIC option reset option vga pins GP16, GP18 option sdcard GP14, GP13, GP15, GP12 option audio GP6, GP7 option system i2c GP26, GP27 ================================ These do support USB ================================ OPTION PLATFORM PICOGAME 4 option reset option vga pins GP10, GP4 option system i2c GP12, GP13 option sdcard GP27, GP15, GP28, GP14 option audio VS1053 GP18, GP19, GP20, GP17, GP21, GP22, GP16 ================================ ================================ OPTION PLATFORM PICOGAME 4-PWM option reset option vga pins GP10, GP4 option system i2c GP12, GP13 option sdcard GP27, GP15, GP28, GP14 option audio GP18, GP19 ================================ I'm not sure if any of the others are worth doing. Most are a bit specialised or outdated really. EDIT: Good point, Tom. Edited 2024-03-19 03:20 by Mixtel90 Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9114 |
Forget the name - could be anything OPTION PCB, OPTION BOARD or whatever and, of course you can ignore it or use it then unset/change things as you wish Edited 2024-03-19 04:02 by matherp |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4228 |
Here are my 5 cents... OPTION BOARD VGAMite (your design 1.4 and 1.7) OPTION SYSTEM I2C GP14,GP15 OPTION COLOURCODE ON OPTION KEYBOARD US OPTION CPUSPEED 252000 OPTION SDCARD GP13, GP10, GP11, GP12 OPTION AUDIO GP6,GP7' OPTION BOARD GEEK OPTION SYSTEM SPI GP10,GP11,GP24 OPTION COLOURCODE ON OPTION HEARTBEAT OFF OPTION PICO OFF OPTION CPUSPEED 252000 OPTION LCDPANEL ST7789_135, LANDSCAPE,GP8,GP12,GP9,GP25 OPTION SDCARD GP23, GP18, GP19, GP20 1/I love it when OPTIONS are pre-configured, but they should be upgradable (and that may not as easy as it sounds). i.e. OPTION KEYBOARD US should be upgradable to OPTION KEYBOARD US,0,1,0,0 without having to enter all options. 2/ I would love it when disabling options would always use the same keyword. i.e all options would be disabled with OPTION xxx RESET. Historically there have been various keywords to disable options. Regardless, I love the idea of setting various options with one board definition. Volhout Edited 2024-03-19 05:01 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4037 |
Let's not add BOARD and PCB to the mix, it's confusing enough with DEVICE and PLATFORM; and before anyone says "But Tom, you asked for PLATFORM", I didn't, I was happily using an "A:/.config" file . If you don't want to add a new CONFIGURE command then I suggest overloading OPTION LOAD so that some names are (case-insensitively) recognised as "special" whilst unrecognised ones are treated as filenames. Best wishes, Tom Edited 2024-03-19 05:38 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Amnesie Guru Joined: 30/06/2020 Location: GermanyPosts: 396 |
Hmmm... I rather like to enter all options by hand. This way I have full control for all my own PicoMite interations. I mean how often do you really change the options? Okay.. some after firmware update. On the other hand, it is good for anyone whos new to the Mite-Family and don't want to look up all those specified options for this individual board. I think as long as one can enter these options manually too, it's a nice addition. Greetings Daniel |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2135 |
A similar idea would be for board designers to publish a BOARD_XXX.OPT file with their designs. The length of .OPT files is Xmodem compatible so is easy to transfer to A: after the .UF2. Edit. Or more than 1 .opt if several configurations are possible on that board. Edited 2024-03-19 07:57 by phil99 |
||||
karlelch Senior Member Joined: 30/10/2014 Location: GermanyPosts: 172 |
Hi, I‘d also vote for a config file on A: that is automatically loaded on boot. If that could be edited using the build in editor, that would give full control. It could be combined with the idea with which Peter started this thread: setting the board/pcb/contraption option could automatically create a default config file. Cheers Thomas |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4037 |
We've been here before. The .opt file format isn't stable enough over firmware changes to be used in this way and there are some options that need to be known before the PicoMite gets to the point it can read from A:/ FWIW I think Peter's idea is an improvement provided it doesn't break the existing "PLATFORM as an independent string property" behaviour but my preference given the known limitations would be to have the ability to use a human readable .opt file that has to be explicitly OPTION LOADed. YMMV, Tom Edited 2024-03-19 08:56 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
EDNEDN Senior Member Joined: 18/02/2023 Location: United StatesPosts: 118 |
This is a good idea. It probably warrants a full discussion of the benefits and drawbacks. I especially like the idea of a default config file being automatically populated. Edited 2024-03-19 09:11 by EDNEDN |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2135 |
Have not tried the latest Betas, has the automatic creation of A: been removed? In any case if the .OPT format changes the idea of using .OPT files is dead, though so far I haven't had a problem using them after upgrading firmware. |
||||
robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2350 |
the idea of a plain-text .opt (or .cfg) file stored on A: has been raised in the past, more than once. this would remove the conundrum of the file being in a format that changed between versions, as well as allowing said file to be edited using mmbasic's inbuilt editor. the .cfg file would then replace all persistent options from the perspective of the user, being read in and acted upon automatically when mmbasic starts up. unfortunately, Peter dismissed the idea as being too complicated for him to be able to implement. i fear that now at the moment we are heading down the slippery slope of over-configurability. but with the "picomite VGA+USB" variant at least, we can guarantee that mmbasic has access to a (USB) keyboard for input. if the existing standardized use of GP16-21 for VGA output is fixed in stone, then we also have guarantee VGA output. given these two, the user will always have access to an A:OPTIONS.CFG file. remember, with the MX170 et al Geoff fixed various pin configurations, and nobody suffered excessive hardship as a result. cheers, rob :-) Edited 2024-03-19 12:11 by robert.rozee |
||||
Malibu Senior Member Joined: 07/07/2018 Location: AustraliaPosts: 228 |
My 2-bob's worth... and I'm just a casual user on any of the mite variants. Any improvement is usually an improvement, so if you want to go down the "easy to configure" path, why not, if it makes life easy for majority of people I'm not sure I'd use it because I rarely enter any OPTION commands... first time in setting up for sure, but after that - it stays like that until I do an O/S upgrade, or some other radical design change. (Rarely) I could see it being a benefit to anyone that chops and changes regularly, but for long term working on a project, where's the saving? (Apart from a few minutes in setting initial OPTIONs) Besides, I like full control in set-ups, so I'm happy to do it all manually. If you're open to other suggestions for future functions in the language, I've got a few that I could toss into the cauldron that may end up with a better O/S (Don't want to hijack the thread and go off-topic here...) John |
||||
Frank N. Furter Guru Joined: 28/05/2012 Location: GermanyPosts: 828 |
Peter, these are the settings for my tiny "DREAMCOMPUTER": > option list PicoMite MMBasic USB Edition 5.09.00b7 OPTION SERIAL CONSOLE COM2,GP8,GP9 OPTION SYSTEM SPI GP18,GP19,GP16 OPTION SYSTEM I2C GP6,GP7 OPTION COLOURCODE ON OPTION KEYBOARD GR, 0, 0, 600, 150 OPTION CPUSPEED 252000 'KHz OPTION LCDPANEL CONSOLE 7 OPTION DISPLAY 40, 80 OPTION LCDPANEL ILI9488, LANDSCAPE,GP15,GP14,GP13,GP2 OPTION TOUCH GP12,GP11,GP10 GUI CALIBRATE 0, 3969, 3900, -1228, -848 OPTION SDCARD GP22 OPTION AUDIO GP0,GP1', ON PWM CHANNEL 0 OPTION RTC AUTO ENABLE OPTION DEFAULT FONT 7, 1 |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9114 |
God, you try and make things easier and people wade in trying to make fundamental changes Let me explain how options work: When you set an option it writes the value to an area of flash memory and then reboots. The first thing the firmware does on startup is to read that area of memory to configure itself. This sets things like clocks and pin usage. Without a significant re-write, which isn't going to happen, it isn't possible to read in options in whatever format from the A: drive as part of the bootup sequence. I re-iterate, OPTIONS ARE SET BEFORE TRIGGERING A REBOOT. Remember also, that an option like setting the modbuffer kills the A: drive Also, do you really want to brick your device requiring a complete nuke by mistyping an option in an ascii file? Is anyone volunteering to write a fully comprehensive option parser and checker to ensure this doesn't happen? I don't care what the format of any new command is. If Tom prefers a new command "CONFIGURE" and that is OK with most people then that is fine but the basic concept I propose is how it is going to work (or not if I don't implement it). |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3801 |
One problem with an options file in flash memory is it's erased on a re-flash of MMBasic. A short command that auto-configures looks good, especially if LIST options (at any time, quite possibly weeks later) shows what happened - quick way to see which pins are used/set for what. John |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4037 |
Everyone has to have a hobby , but seriously though I think you are making a rod for your own back with this change, for a start as you've already observed the only thing that happens faster than you adding features is (UK) Mick designing PicoMite PCBs. Ask a silly question, here you go, though it probably won't do you much good as it is for MMB4L: https://github.com/thwill1000/mmb4l/blob/main/src/common/options.h https://github.com/thwill1000/mmb4l/blob/main/src/common/options.c Note that I don't expect you to incorporate this, I'm just showing off . In the language of requirements engineering, in my opinion: It MUST still be possible to set the existing PLATFORM option without that affecting any other options. A command OPTION foo blah blah blah SHOULD manipulate only option "foo" and not any other option (existing OPTION DISK LOAD/SAVE, etc. excluded). My view, having slept upon it and reviewed the existing OPTION syntax is that you should consider overloading OPTION RESET: OPTION RESET [, <board>] And that <board> should be case-insensitive. YMMV, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9114 |
Yes, I like that (no comma) |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4037 |
Excellent! This is what the configuration for the classic Game*Mite would look like: OPTION PLATFORM "Game*Mite" OPTION SYSTEM SPI GP6,GP3,GP4 OPTION CPUSPEED 252000 OPTION LCDPANEL ILI9341,RLANDSCAPE,GP2,GP1,GP0 OPTION TOUCH GP5,GP7 OPTION SDCARD GP22 OPTION AUDIO GP20,GP21 OPTION MODBUFF ENABLE 192 It also has OPTION AUTORUN 1,NORESET ... but does that make sense until after the splash program (FLASH 1) has been loaded ? Best wishes, Tom Edited 2024-03-19 19:52 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Page 1 of 3 |
Print this page |