I have got a 16-bit MPU wich is different from x86_16 in size of size_t
, ptrdiff_t
etc. Can anybody give me details and clear instructions about how to customise machine dependency in Frama-C for my MPU?
相关问题
- what's the meaning of the circle node in pdgs
- Understanding Frama-C slicer results
- frama-c malloc Neon-20140301 fatal error
- Frama-C-Plugin: Set value of variable in plugin
- Adding Code of missing functions in frama-c
相关文章
- Understanding Frama-C slicer results
- frama-c malloc Neon-20140301 fatal error
- Frama-C-Plugin: Set value of variable in plugin
- Adding Code of missing functions in frama-c
- How do I prove code with a real axiomatic in Frama
- Dynamic array with Frama-C and Eva
- Syntax error in Frama-C due to custom machdep
- frama-c mingw __restrict__ keyword
There is currently no way to do that directly from the command line: you have to write a small OCaml script that will essentially define a new
Cil_types.mach
(a record containing the necessary information about your architecture) and register it throughFile.new_machdep
. Assuming you have a filemy_machdep.ml
looking like that:You will then be able to launch Frama-C that way to use the new machdep:
If you want to have the new machdep permanently available, you can make it a Frama-C plugin. For that, you need a
Makefile
of the following form:FRAMAC_SHARE:=$(shell frama-c -print-share-path)
my_machdep
must be the name of your.ml
file. Be sure to choose a different name forPLUGIN_NAME
. Then, create an emptyCustom_machdep.mli
file (touch Custom_machdep.mli
should do the trick). Afterwards,make && make install
should compile and install the plug-in so that it will be automatically loaded by Frama-C. You can verify this by launchingframa-c -machdep help
that should outputmy_machdep
among the list of known machdeps.UPDATE If you are using some headers from Frama-C's standard library, you will also have to update
$(frama-c -print-share-path)/libc/__fc_machdep.h
in order to define appropriate macros (related tolimits.h
andstdint.h
mostly).