KICS! brainstorming

Daniel Gutson daniel.gutson at tallertechnologies.com
Tue Jul 22 18:05:37 UTC 2014


Hi,

   we are working in a very RAM constrained board, and noticed that
some symbols could be moved to ROM by declaring them const.

I have a slight idea about creating a consts-candidate detector tool
"KICS!" (Keep It Const, St.! :) ), and wanted to hear some other
people ideas.

Initial thoughts:
  - one approach could be a gdb script, in which we first read all the
RAM memory of global objects after initialization (#1), and compare
the memory at the end (#2), see what remained unchanged; this could
throw many false positives but would be a starting point.

  - another, I think tougher, is some pointer-tracking static analysis
as a gcc plugin (not sure if it is even possible).

Other ideas?



(#1) after bsp_start? after rtems_initialize_data_structures?

(#2) for some user-definition of "end", and/or after
rtems_shutdown_executive or alike?

Thanks!

   Daniel.

-- 

Daniel F. Gutson
Chief Engineering Officer, SPD


San Lorenzo 47, 3rd Floor, Office 5

Córdoba, Argentina


Phone: +54 351 4217888 / +54 351 4218211

Skype: dgutson


More information about the devel mailing list