View previous topic :: View next topic |
Author |
Message |
Wattsy
Joined: 21 Nov 2005 Posts: 102 Location: Finistere (on the beach)
|
Posted: Sat Jan 20, 2018 11:13 am Post subject: Leave the old CFG file ? |
|
|
Hi there,
When I grab an existing project file and use the 'Save As...' option in the File menu (usually as the basis for a modified / new version), I always get asked 'Leave the old CFG file ?'.
I have no idea what this means or what the differences there are between 'Yes' and 'No'.
I cant find a reference to it in the manual / google... Would someone enlighten me please ?
Thanks a mil. & have a great weekend.
Regards.
(BASCOM-AVR version : 2.0.7.9 , Latest : 2.0.8.1 ) _________________ and there it was... gone !
Bascom Full Version 2.0.8.1
STK300 IDE |
|
Back to top |
|
|
EDC
Joined: 26 Mar 2014 Posts: 971
|
Posted: Sat Jan 20, 2018 3:28 pm Post subject: |
|
|
For example when code from Internet is for "$regfile = "m8def.dat" and I want to test it with "$regfile = "m328pdef.dat" then I always "save it as" and answear "No"
You can open *.cfg file in the corresponding *.bas file folder with Notepad/Notepad++ and look what data it holds.
I think it is worth to create new *.cfg file everytime you change the chip/regfile. |
|
Back to top |
|
|
MWS
Joined: 22 Aug 2009 Posts: 2262
|
Posted: Sat Jan 20, 2018 4:55 pm Post subject: |
|
|
The *.cfg holds IDE's configuration data.
For example, if no $regfile = ... exists within code, settings from the IDE --> options --> compiler --> chip apply.
Having saved the current file with "chip = ATTiny25" as 'test.bas', while changing IDE-settings to ATTiny85 after, then 'Save As test1.bas' together with 'Leave the old CFG file ? = Yes' will result in a copy of old 'test.cfg' named 'test1.cfg'.
This 'test1.cfg' contains the former IDE settings, i.e. 'chip = ATTiny25'.
If 'No' is selected, then current settings of the IDE apply and are stored into a new 'test1.cfg', which in this example would mean 'chip = ATTiny85'.
Every compiler directive '$...' within code overrides its correlating IDE- and *.cfg-settings. |
|
Back to top |
|
|
Wattsy
Joined: 21 Nov 2005 Posts: 102 Location: Finistere (on the beach)
|
Posted: Sun Jan 21, 2018 7:39 pm Post subject: |
|
|
Great stuff - thanks both !
To clarify : answer 'NO' in order to the 'Leave old Config file ?' question to ensure a new config file is generated / saved along with the new ('Save as...') file.
Your examples are *exactly* why I was asking: I had originally written some code for a ATTiny2313 but then found I needed to upgrade to a chip with more memory. All I wanted to do was change the $regfile for in my existing code for the new (more 'powerful', say ATmega8) chip and save my project with a matching 'Mega8' file name...
Works perfectly and clears up some 'issues' I'd been experiencing.
Thanks a mil. _________________ and there it was... gone !
Bascom Full Version 2.0.8.1
STK300 IDE |
|
Back to top |
|
|
olhexy
Joined: 03 Apr 2011 Posts: 192 Location: Tilburg, Netherlands
|
Posted: Tue Mar 06, 2018 8:06 pm Post subject: |
|
|
@EDC, @MWS, @Wattsy
I read this 7x times.
For me the question is ambiguous. Or even the opposite of what is meant. I associate 'leave' with beginning something new. So leaving old CFG file means a new CFG file then. Intuitively I could then agree and select 'Yes' if I wanted to save with latest or newest CFG, but... (if I understand it correctly):
'Leave the old CFG file ?' (Yes)
Means for Bascom
'Leave the CFG file as it was? (=Yes)
'Keep the old CFG file? (Yes)
Select 'No' if you want to save with the latest actual CFG. |
|
Back to top |
|
|
MWS
Joined: 22 Aug 2009 Posts: 2262
|
Posted: Tue Mar 06, 2018 9:13 pm Post subject: |
|
|
olhexy wrote: | I associate 'leave' with beginning something new. |
If you leave a file (alone) then you keep the file unaltered.
As well the cfg-file exists multiple times within the file system - one for each project - the cfg-file in question is the one and only cfg-file of the new project.
It's a pure technical issue that the compiler creates a copy of the cfg-file, but actually it is the previous file and the compiler left it for you, if 'Yes' is clicked.
And that's the context here, the true meaning lies in its context because 'leave' has double use in English.
There's an use for 'leave' as 'keep' and there's one for 'travel away'.
While you can keep a file, it's very unusual that you travel away from it. How would you do that, walk away from your house while the cfg-file still sits on your computer's hard-disk?
Quote: | So leaving old CFG file means a new CFG file then. |
No. |
|
Back to top |
|
|
olhexy
Joined: 03 Apr 2011 Posts: 192 Location: Tilburg, Netherlands
|
Posted: Tue Mar 06, 2018 10:47 pm Post subject: |
|
|
I have to agree, because we talk in Bascom here. It's a special language.
If I am left I feel disposed. I don't know how a file feels that.
But it's for sure now that an old Bascom CFG file will stay in the forefront of attention when you leave it. |
|
Back to top |
|
|
MWS
Joined: 22 Aug 2009 Posts: 2262
|
Posted: Wed Mar 07, 2018 12:01 am Post subject: |
|
|
The 'leave' is not only correct because of Bascom use, it is correct because its a normal use of English language.
Another story is, how the user understands about what this dialog effectly does.
Had to test myself to know about the exact functionality.
Imho the cfg file had more effect, as the IDE had more influence, for example for stack and chip declaration.
But most of this stuff is declared within source code right now, so I do not see much use of it.
Anyway, it could be more understandable, if the question would read like that:
'Leave IDE-configuration data from previous project Yes/No?''
Or, more to your like:
'Copy IDE-configuration data from previous project Yes/No?'' |
|
Back to top |
|
|
|