Skip to main content
added 29 characters in body
Source Link
Basile Starynkevitch
  • 32.9k
  • 6
  • 90
  • 133

(I suggest to cross-compile on a Linux running on your laptop; it has lots of good tools helpful for cross-development)

The compile time parameters are probably best to be put in some header file with #define, but that header file could be generated (at build time) by some configuration script. (look perhaps into GNU autoconf for inspiration, but is is often enough to generate such configuration header by your own shell scripts).

The settings could indeed stay in a flash memory, and concretely you would access them as a single struct (containing all settable parameters). I'll probably suggest to have a setting facility which loads that  struct from flash to RAM, modify the data in RAM, and write out it in flash at end (BTW, most BIOSes on laptop or desktop PCs are doing that).

You might even use some metaprogramming techniques. You could generate (e.g. using some script in Guile or Python ...) at build time some C code for that struct, the accessing function, the help messages, etc...

Notice that recent versions GNU make are very configurable (even extensible with Guile), so your build procedure (i.e. your Makefile) can do some quite fancy things;in particular generate some of your C code (in generated header *.h files or generated *.c files)

(I suggest to cross-compile on a Linux running on your laptop; it has lots of good tools helpful for cross-development)

The compile time parameters are probably best to be put in some header file with #define, but that header file could be generated (at build time) by some configuration script. (look perhaps into GNU autoconf for inspiration, but is is often enough to generate such configuration header by your own shell scripts).

The settings could indeed stay in a flash memory, and concretely you would access them as a single struct (containing all settable parameters). I'll probably suggest to have a setting facility which loads that  struct from flash to RAM, modify the data in RAM, and write out it in flash at end (BTW, most BIOSes on laptop or desktop PCs are doing that).

You might even use some metaprogramming techniques. You could generate (e.g. using some script in Guile or Python ...) at build time some C code for that struct, the accessing function, the help messages, etc...

(I suggest to cross-compile on a Linux running on your laptop; it has lots of good tools helpful for cross-development)

The compile time parameters are probably best to be put in some header file with #define, but that header file could be generated (at build time) by some configuration script. (look perhaps into GNU autoconf for inspiration, but is is often enough to generate such configuration header by your own shell scripts).

The settings could indeed stay in a flash memory, and concretely you would access them as a single struct (containing all settable parameters). I'll probably suggest to have a setting facility which loads that  struct from flash to RAM, modify the data in RAM, and write out it in flash at end (BTW, most BIOSes on laptop or desktop PCs are doing that).

You might even use some metaprogramming techniques. You could generate (e.g. using some script in Guile or Python ...) at build time some C code for that struct, the accessing function, the help messages, etc...

Notice that recent versions GNU make are very configurable (even extensible with Guile), so your build procedure (i.e. your Makefile) can do some quite fancy things;in particular generate some of your C code (in generated header *.h files or generated *.c files)

added 29 characters in body
Source Link
Basile Starynkevitch
  • 32.9k
  • 6
  • 90
  • 133

(I suggest to cross-compile on a Linux running on your laptoplaptop; it has lots of good tools helpful for cross-development)

The compile time parameters are probably best to be put in some header file with #define, but that header file could be generated (at build time) by some configuration script. (look perhaps into GNU autoconf for inspiration, but is is often enough to generate such configuration header by your own shell scripts).

The settings could indeed stay in a flash memory, and concretely you would access them as a single struct (containing all settable parameters). I'll probably suggest to have a setting facility which loads that  struct from flash to RAM, modify the data in RAM, and write out it in flash at end (BTW, most BIOSes on laptop or desktop PCs are doing that).

You might even use some metaprogrammingmetaprogramming techniques. You could generate (e.g. using some script in Guile or Python ...) at build time some C code for that struct, the accessing function, the help messages, etc...

(I suggest to cross-compile on a Linux running on your laptop)

The compile time parameters are probably best to be put in some header file with #define, but that header file could be generated (at build time) by some configuration script. (look perhaps into GNU autoconf for inspiration, but is is often enough to generate such configuration header by your own shell scripts).

The settings could indeed stay in a flash memory, and concretely you would access them as a single struct (containing all settable parameters). I'll probably suggest to have a setting facility which loads that  struct from flash to RAM, modify the data in RAM, and write out it in flash at end (BTW, most BIOSes on laptop or desktop PCs are doing that).

You might even use some metaprogramming techniques. You could generate (e.g. using some script in Guile or Python ...) that struct, the accessing function, the help messages, etc...

(I suggest to cross-compile on a Linux running on your laptop; it has lots of good tools helpful for cross-development)

The compile time parameters are probably best to be put in some header file with #define, but that header file could be generated (at build time) by some configuration script. (look perhaps into GNU autoconf for inspiration, but is is often enough to generate such configuration header by your own shell scripts).

The settings could indeed stay in a flash memory, and concretely you would access them as a single struct (containing all settable parameters). I'll probably suggest to have a setting facility which loads that  struct from flash to RAM, modify the data in RAM, and write out it in flash at end (BTW, most BIOSes on laptop or desktop PCs are doing that).

You might even use some metaprogramming techniques. You could generate (e.g. using some script in Guile or Python ...) at build time some C code for that struct, the accessing function, the help messages, etc...

Source Link
Basile Starynkevitch
  • 32.9k
  • 6
  • 90
  • 133

(I suggest to cross-compile on a Linux running on your laptop)

The compile time parameters are probably best to be put in some header file with #define, but that header file could be generated (at build time) by some configuration script. (look perhaps into GNU autoconf for inspiration, but is is often enough to generate such configuration header by your own shell scripts).

The settings could indeed stay in a flash memory, and concretely you would access them as a single struct (containing all settable parameters). I'll probably suggest to have a setting facility which loads that  struct from flash to RAM, modify the data in RAM, and write out it in flash at end (BTW, most BIOSes on laptop or desktop PCs are doing that).

You might even use some metaprogramming techniques. You could generate (e.g. using some script in Guile or Python ...) that struct, the accessing function, the help messages, etc...