<html><body><div style="color:#000; background-color:#fff; font-family:tahoma, new york, times, serif;font-size:12pt"><div><div>Hi,</div><div><br></div><div>Let me volunteer suggestions to at some of your questions.</div><div><br></div><div>> Also (unrelated to the patch), somethings that I think should be</div><div>> discussed/addressed soon are:</div><div>> </div><div>> - How we will handle the boards in nuttx (including variants like</div><div>> US/EU version of the same phone)</div><div><br></div><div>Nuttx is designed to support a hiearchical configuration:  processor family, chips in the family, boards that host the chips, and board software configurations.</div><div><br></div><div>NuttX is configured with .config file.  In that file you specify the family (ARM), the chip (Calypso), and the board (also Calypso now?).  The family corresponds to a directory under arch/ (arch/arm) and the chip corresponds to
 sub-directories under arch/arm/src and arch/arm/include (arch/arm/src/calypso and arch/arm/include/calypso).</div><div><ul class=""><li>arch/arm/include holds general ARM header files<br></li><li>arch/arm/include/calypso holds calypso specific header files<br></li><li>arch/arm/src/calypso holds calypso specific source files<br></li></ul></div><div>Boards are represented by directories under configs/.  Right now, I think there is only a configs/compal_e99.<br></div><div><ul class=""><li>configs/compal_e99/include holds Compal E99 specific header files<br></li><li>configs/compal_e99/src holds Compal E99 specific header files<br></li></ul></div><div>Other directories under configs/compal_e99 can hold different software configurations for the same board.  For example, configs/compal_e99/ostest holds the make logic for the OS test; configs/compal_e99/nsh would hold the NuttShell (NSH) make configuration files, etc.  The .config file, for
 example, is on of the software configuration files in those directories (it is call defconfig before it is copied to the top-level directory as .config).<br></div><div><br></div><div>You can see these settings in the .config/defconfig file:</div></div><blockquote class="webkit-indent-blockquote" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><div><div><font class="Apple-style-span" face="'Courier New', courier, monaco, monospace, sans-serif">CONFIG_ARCH=arm</font></div></div><div><div><font class="Apple-style-span" face="'Courier New', courier, monaco, monospace, sans-serif">CONFIG_ARCH_ARM=y</font></div></div><div><div><font class="Apple-style-span" face="'Courier New', courier, monaco, monospace, sans-serif">CONFIG_ARCH_ARM7TDMI=y</font></div></div><div><div><font
 class="Apple-style-span" face="'Courier New', courier, monaco, monospace, sans-serif">CONFIG_ARCH_CHIP=calypso</font></div></div><div><div><font class="Apple-style-span" face="'Courier New', courier, monaco, monospace, sans-serif">CONFIG_ARCH_CHIP_CALYPSO=y</font></div></div><div><div><font class="Apple-style-span" face="'Courier New', courier, monaco, monospace, sans-serif">CONFIG_ARCH_BOARD=compal_e99</font></div></div><div><div><font class="Apple-style-span" face="'Courier New', courier, monaco, monospace, sans-serif">CONFIG_ARCH_BOARD_COMPALE99=y</font></div></div></blockquote><div><div>When the OS is configured, the top-level Makefile uses these definitions to create symbolic links:<br></div><div><ul class=""><li>arch/arm/src/chip will refer to arch/arm/src/calypso<br></li><li>arch/arm/include/chip will refer to arch/arm/include/calypso<br></li><li>arch/arm/include/board will refer to configs/compal_e99/include<br></li><li>arch/arm/src/board will
 refer to configs/compal_e99/src.<br></li></ul></div><div>And<br></div><div><ul><li>include/arch will refer to to arch/arm/include<br></li></ul></div><div>So you can include ARM general header, calypso-specific, and board-specific header files like:<br></div></div><blockquote class="webkit-indent-blockquote" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><div><div><font class="Apple-style-span" face="'Courier New', courier, monaco, monospace, sans-serif">#include <arch/arch.h>        // architecture (ARM) specific header files</font></div></div><div><div><font class="Apple-style-span" face="'Courier New', courier, monaco, monospace, sans-serif">#include <arch/chip/chip.h>   // Chip (calypso) specific header
 files</font></div></div><div><div><font class="Apple-style-span" face="'Courier New', courier, monaco, monospace, sans-serif">#include <arch/board/board.h> // Board specific header files</font></div></div></blockquote><div><div>So, if you want to support the same processor (calypso) on a different board, say boardX, you could create a directory:<br></div></div><blockquote class="webkit-indent-blockquote" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><div><div><font class="Apple-style-span" face="'Courier New', courier, monaco, monospace, sans-serif">configs/boardX</font></div></div></blockquote><div><div>And put boardX specific header files and source files in:<br></div></div><blockquote class="webkit-indent-blockquote" style="border-top-style: none;
 border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><div><div><font class="Apple-style-span" face="'Courier New', courier, monaco, monospace, sans-serif">configs/boardX/include</font></div></div><div><div><font class="Apple-style-span" face="'Courier New', courier, monaco, monospace, sans-serif">configs/boardX/src</font></div></div></blockquote><div><div>And put boardX software configurations under<br></div></div><blockquote class="webkit-indent-blockquote" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><div><div><font class="Apple-style-span" face="'Courier New', courier, monaco, monospace,
 sans-serif">config/boardX/configY</font></div></div></blockquote><div><div>> - How we will handle our different ram config (boot from ram / flash),<br></div><div>> can we use the loader to load part of the SDRAM if we don't fit in</div><div>> SRAM completely ?</div><div><br></div><div>I would think that these would correspond to different software build configuration directories under configs/BoardX.</div><div><br></div><div>You also ask several memory related questions that I can't really answer.  I think there may be some additional memory management requirements here:</div><div> </div><div>> - How we will handle the memory zones (SRAM / SDRAM / Flash / XIP from</div><div>> flash (or just .rodata ?))</div><div>> - Memory allocator (handling zones ...). I think that'd be something</div><div>> very useful. Currently we can only allocate msgb and that's a little</div><div>> limiting.</div><div><br></div><div>Right now,
 the memory allocator can handle multiple, discontinuous regions of memory.  There is an interface called mm_addregion() that can always add a new block of memory to the memory pool.</div><div><br></div><div>But there is mechanism now to select which region memory will be allocated from.  malloc() is the only allocator for user programs.  It will allocate memory only from the best fitting free memory chunk, but does not take into account any properties of the memory.</div><div><br></div><div>Greg</div><div style="font-family: tahoma, 'new york', times, serif; font-size: 12pt; "><br></div></div></div></body></html>