AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Doxygen equations1/23/2024 ![]() That way dot is used in many other tools as visualization tool. The dot language makes it easy to create machine generated graphs too. This then will create the following graph (source: dot guide): small dot graph For example I can define a graph with following dot code (example from the dot guide): /** With the dot language I define nodes and edges, and the tool will place them automatically. Graphviz is open source software to create graphs using the dot language. Note the \todo with will automatically added to a ‘To Do’ list in the documentation: Todo List Graphviz The corresponding HTML documentation will look like this: LED_On() Documentation * \param Leds The set of LED to be switched on. It produces the following HTML output documentation: enum LED_Set HTML DocumentationĪnother example is to document functions with their parameters: /** & nbsp LED_3 = (1& lt & lt 3) /*& lt Bit3 of port for LED3 */ & nbsp LED_2 = (1& lt & lt 2), /*& lt Bit2 of port for LED2 */ & nbsp LED_1 = (1& lt & lt 1), /*& lt Bit1 of port for LED1 */ LED_0 = (1& lt & lt 0), /*& lt Bit0 of port for LED0 */ Make sure compiler treats enum's efficient (e.g. ![]() The bit number also indicates the port bit number. With this, the following source is compiled by Doxygen: /*! Masks for LEDs, this is an enum, and the values are power of two to make it The Doxygen documentation lists different commenting styles. But there are multiple ways of using special commenting styles to extend the information created. It supports many programming languages (C, C++, Java, …), and different output formats: HTML and PDF are very popular ones.ĭoxygen is able to generate documentation from standard sources. It is a compiler which compiles source (or text) files and extracts the embedded information. Doxygen is using the comments in the code to generate the documentation. With Doxygen my project sources *are* the documentation. ![]() If using CodeWarrior for MCU 10.x or 11.x (Eclipse 4.2 Juno based), then only use the 0.8 version: Installing Eclox Doxygen In Eclipse, use the menu Help > Install New Software or the Market Place ( ) and point to the directory where you have extracted the file. In case you still need the 0.8.0 or earlier version: I have them available on SourceForge: ĭoxygen is required, Graphviz highly recommended, and Mscgen is optional. As CW for MCU 11.0 and earlier use an older Eclipse version, do *not* upgrade doxygen to a later version: only use 0.8 version. For CodeWarrior for MCU I’m using the 0.8 version and that one works well. I recommend that you download the zip file from that site. NOTE: As of Feb 2018, the doxygen Eclox project has been moved to the following site. Here are the links to download the needed tools: And Eclox is an Eclipse plugin which integrates everything into Eclipse. Mscgen is similar to Graphviz, but simpler and optimized for message sequence diagrams. Graphviz is a package to draw diagrams and graphs. Why not using the my precious source documentation in the sources and use it for the ‘written’ documentation? This is where I use Doxygen, GraphViz, Mscgen and the Eclipse Eclox plugin, all of them open source.ĭoxygen is a compiler which generates documentation out of source files. It is already hard to write good documented code, and writing good source comments is an art on its own. And the user documentation will be easily out of sync too :-(. It even gets worse after a few maintenance cycles: it is very hard to keep the documentation in sync with the actual implementation and project sources. ![]() The problem starts with the fact, that rarely the implementation matches the initial design. Maintain and ship and again, and again, and ….Create a design, specify and document the API.In a traditional way the following flow is used: I’m a big fan of the ‘single source’ concept: information has to be in a single place, and not copied and distributed among different places. And it should solve the problem that the documentation does not match what has been implemented. Writing documentation for it should be fun too. Like many other engineers, I do not like to write documentation. It solves a typical engineering problem: “How to document my project? And how to keep it up-to-date?”. Yes, it is a single Eclipse plugin (Eclox) for Doxygen, and with two other powerful tools. The #1 award in my list goes to Eclox+Doxygen+Graphviz+Mscgen.
0 Comments
Read More
Leave a Reply. |