Question

I need to know if it is possible to compile any high level programming language for use with an eeprom. I know it is possible to strip a header from a compiled binary, but I am unsure how addresses will be effected.

Please do not mark this as "not a question." I get a lot of guff on this site from people who can't tell the difference between a stupid question, and something which is not a question.

Can I compile any high level language for use with eeprom?

(EDIT) I have a Winbond 27C512 EEPROM in my sights.

Was it helpful?

Solution

If you have a C compiler for the processor in question, then there's no reason why you couldn't compile C code so that it could be placed in EEPROM (though, as is usual with embedded programming, you cannot use any of the libc functions, so you will have to implement a lot of it yourself). C also interoperates well with assembly code, so you can write your bootstrap routines in assembly before transitioning over to higher-level code written in C.

A typical C linker (e.g. GNU ldd) can be scripted so that it generates addresses compatible with your EEPROM; this is a common requirement for embedded development and other "bare-metal" applications. You can use objcopy to format the compiled binary in several different formats. With the GNU toolchain, you can probably also pull this off with a restricted subset of C++.

You are not likely to be able to do this with a lot of other popular high-level languages, though, because few languages have the sort of support for low-level constructs (such as direct pointer addressing) required for embedded development.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top