Hutorny said:Is there anything I can do to make you changing your mind?
Probably not?, is there any reason you want me to?.
BTW, what was the response from the compiler writers to this specific 'problem'?.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Hutorny said:Is there anything I can do to make you changing your mind?
eblc1388 said:I doubt they should.
eblc1388 said:When one uses the name of a control bit to refer to it, and use the proper "include" file during assembly, why should the assembler complaints of any errors?
Nigel Goodwin said:Probably not?, is there any reason you want me to?.
Nigel Goodwin said:BTW, what was the response from the compiler writers to this specific 'problem'?.
Hutorny said:For example, in PIC16F690 ADFM bit is defined on ADCON0 register, while in PIC16F88 it is on ADCON1. Thus when changing the device I have to
1. Manually compare datasheets and find all features of this kind
2. Search the code and repalce
bsf ADCON0, ADFM
with something better.
Now guess how I have figured out this difference?
eblc1388 said:OK. I see your point.
But, if one changes to for another processor, one would expect registers will not in the same memory space or containing the same bit meaning, until it is confirmed otherwise. Therefore a complete match without user intervention/change is a gift and not something to be taken for granted.
Sorry I still think sorting this out is the responsibility of the programmer other than by the assembler.
eblc1388 said:Or if you wish, the problem can be tackled via some #define statements or macro in an include file of your own, which you can then associate the correct register with the control bit name.
Hutorny said:And I have failed to implement interfaces because SDCC, PICC, and mikroPascal for PIC14 family do not generate proper code to work with function pointers.
Paul Obrien said:This sounds a lot like JAVA ie not MCU specific etc
Oznog said:Duh. You shouldn't use function pointers, it's near impossible to support them on PIC hardware.
PICs do not have a stack and use an Overlay methodology for reusing the same memory in different functions by evaluating the tree of what functions can be called from what places, and prohibiting recursive function calls.
Once you turn a function into a pointer, there is no longer any reliable way to decipher the possible calling tree (thus a lot of Overlay elements have to be made Static and the memory usage goes to hell) and protect against recursive calls.
Papabravo said:Starting from scratch, to achieve incremental improvement, is either folly or hubris. I can't decide which.
Papabravo said:You're going to need better justification to generate any enthusiasm.
The problem with working on tools is that there is no economic incentive. In the beginning we create tools because there are none. Once they achieve a certain level of functionality we move on to the problems with an economic benefit.
People on this forum complain about the cost of tools. They are expensive because they are hard to develop, debug, support, and maintain. There are freeware tools out there but they are generally poor cousins to the commercial offerings.
Hutorny said:I still can implement my design in assembelr, thus I think it is a compiler limitation.
Papabravo said:Starting from scratch, to achieve incremental improvement, is either folly or hubris. I can't decide which. You're going to need better justification to generate any enthusiasm.
The problem with working on tools is that there is no economic incentive. In the beginning we create tools because there are none. Once they achieve a certain level of functionality we move on to the problems with an economic benefit.
People on this forum complain about the cost of tools. They are expensive because they are hard to develop, debug, support, and maintain. There are freeware tools out there but they are generally poor cousins to the commercial offerings.
Nigel Goodwin said:Personally I'm extremely doubtful about such claims?, but in any case have you started writing such a compiler?.
These are common starting points for every compiler design since the first FORTRAN and COBOL compilers from the late fifties and early sixties. Nothing new here and I'm with Nigel on the dubious nature of the claims. I hope you can prove me wrong but there is an awful lot of experience and knowledge wrapped up in our current tools. These are not stupid or incompetent people, they are giants in this field. The nature of the task is an epic undertaking.Hutorny said:I envision the following benefits of using e#
Elaboration on these benefits can be found in this post
- It will allow writing better quality code in shorter time
- It will reduce maintenance cost by providing abilities for regression testing (on a simulator or in-circuit debugger)
- It will reduce impact of migrating to another device/platform
Papabravo said:These are common starting points for every compiler design since the first FORTRAN and COBOL compilers from the late fifties and early sixties. Nothing new here and I'm with Nigel on the dubious nature of the claims. I hope you can prove me wrong but there is an awful lot of experience and knowledge wrapped up in our current tools. These are not stupid or incompetent people, they are giants in this field. The nature of the task is an epic undertaking.
Hutorny said:My believe is that defining MCU model in the same language as the program is written will open up possibilities hardly achievable in the current tools.
Nigel Goodwin said:No disrespect, but that looks like 'marketing speak'?, and has no meaning in the real world.
As I see it, what you're wanting to do is write a language that's fully functional on any processor it's applied to? - so you can take a program from any processor and transfer it to any other, with no changes or limitations.
Nigel Goodwin said:It's a nice idea, and it's perfectly possible, BUT it means crippling the language to the limitations of ALL the processors - this would make it a completely useless language, and rather than adding the parts you think current languages lack, it would do the complete opposite and simply remove them all together.
Nigel Goodwin said:In any case, you don't appear to have even started such a compiler, nor even given any real thought to it? - and, to be honest, as you seem to want a language that completely 'spoon feeds you', I'm doubtful that you could write a compiler anyway?.
Hutorny said:Not quite correct. If your program is written for a specific MCU and uses MCU features not available in other MCUs - you would have to make changes.