|
Forum Index : Microcontroller and PC projects : simpleArrayFuncGen
| Author | Message | ||||
| Nathan Regular Member Joined: 10/01/2016 Location: GermanyPosts: 49 |
Hi, I just finished an enhanced version of my string array generation program. I made some major changes the new version is not compatible with the old version any more. Also it is not limited to strings anymore. Therefore I opened an new topic. The following arrays are supported: strings, integer and floating point numbers. 2018-02-11_072515_stringArrayFunGen.zip .\simpleArrayFuncGen.exe -help simpleArrayFuncGen.exe V0.9.21 Copyright 2018 by Nathan WARNING: ***** unstable evaluation version ***** Usage: simpleArrayFuncGen.exe < <-cfgin <file>> <-progout <file> > | < -..example <file> > [-help] -(c)fgin <file> read ascii input config file -(p)rogout <file> write basic function file -(i)ntegerexample <file> create integer array example cFunction file -(I)ntegerexample <file> create integer array example cSub file -(f)loatexample <file> create float array example cFunction file -(F)loatexample <file> create float array example cSub file -(s)tringexample <file> create string array example cFunction file -(S)tringexample <file> create string array example cSub file -help show this page .... license ... Get started: 1.) The following call generates an example for an integer cFunction array: >simpleArrayFuncGen.exe -integerexample CfunctionInt.cfg 2.) Next you convert the config file into an .bas file. simpleArrayFuncGen.exe -cfgin CfunctionInt.cfg -progout CfunctionInt.bas 3.) transfer the .bas file to your chip and run it. 4.) make your own config files The Example data should contain all required information for starting. Please open the files and study it. For every supported array type an example is available. Take care: >> extreme cpus are not supported, yet. << Please take care, this is still a test version, so please carefully check the results of the generated arrays. Development and testing was done on a 44pin cpu. Any feedback and testing is welcome, especially for the other cpus. If you find a problem or bug, please report it. Have fun, Nathan |
||||
| panky Guru Joined: 02/10/2012 Location: AustraliaPosts: 1116 |
@Nathan, There is only one file in your zip file and it is called stringArrayFunGen.exe and is version 0.9 Should there be other sample files or a later version of your program? panky ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
| Nathan Regular Member Joined: 10/01/2016 Location: GermanyPosts: 49 |
Hello Panky, sorry you are right, seems I had copied the wrong file >> Hi Gizmo can you delete the link to the wrong version?? << The following is the correct one. 2018-02-11_195400_simpleArrayFuncGen.zip you get the example files by the following calls: (i,I) please take care lower first character Cfunction upper first character Csub simpleArrayFuncGen.exe -integerexample CfunctionInt.cfg simpleArrayFuncGen.exe -Integerexample CSubInt.cfg ... Sorry, Nathan |
||||
| Nathan Regular Member Joined: 10/01/2016 Location: GermanyPosts: 49 |
really no feedback |
||||
| disco4now Guru Joined: 18/12/2014 Location: AustraliaPosts: 1044 |
Hi Nathan, I have run it and looked at the examples. It took me a while to understand but can see what is for now. If I get it, when you have a large amount of data to include in a program it needs to be stored firstly in the program code (take up space) and then uses the actual data memory to store the arrays when the program is run. The generation of the CFunction/Sub means you only require the actual space for the arrays, plus the once of overhead of the new routines to access the data. I have stored its existence away for when I need it. Regards Gerry F4 H7FotSF4xGT |
||||
| disco4now Guru Joined: 18/12/2014 Location: AustraliaPosts: 1044 |
I have had a further play with this and compared loading an array of 900 integers (say some sort of lookup table) using simpleArrayGenerator and the traditional DATA statement and READ method. A summary of memory results is below. The simpleArrayGenerator array is readonly and is stored in the flash memory inside a CFunction (net 2K extra used above the traditional method), instead of in RAM where the same array takes 8K using the traditional method, so 8K of RAM is saved. There are probably some situations where this could be very useful. I would expect string arrays would give similar results. i.e. Significant RAM saved for a small increase in Flash used. '================================================================================================ 'MEMORY SUMMARY simpleArrayGenerator vs Tradional DATA and READ for array of 900 integers ' simpleArrayGeneration CFUNCTION Traditional DATA and READ method ' ------------------------------- --------------------------------- 'Flash: Flash: ' 1K ( 1%) Program (24 lines) 3K ( 3%) Program (51 lines) ' 4K ( 4%) Library ' 95K (95%) Free 97K (97%) Free ' 'RAM: RAM: ' 1K ( 1%) 8 Variables 9K ( 8%) 9 Variables ' 0K ( 0%) General 0K ( 0%) General ' 102K (99%) Free 94K (92%) Free ' 'Array is stored in CFUNCTION No CFUNCTION but code for DATA statements 'takes 4K but reduces code size uses 2K of flash. 'in flash by 2K.So net 2K extra. 'Array is not in RAM so 8K of Array is in RAM and takes 8K 'RAM saved. ' '================================================================================================ Regards Gerry F4 H7FotSF4xGT |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |