]> git.kernelconcepts.de Git - karo-tx-redboot.git/blobdiff - packages/hal/arm/mx27/karo/v1_0/cdl/hal_arm_tx27.cdl
unified MX27, MX25, MX37 trees
[karo-tx-redboot.git] / packages / hal / arm / mx27 / karo / v1_0 / cdl / hal_arm_tx27.cdl
index d8bcdc6f0dd5abcfe0872231fa2d566a196b7650..8e95415d7a12d620498425518bf0b420abd56b24 100644 (file)
@@ -57,6 +57,8 @@ cdl_package CYGPKG_HAL_ARM_TX27KARO {
     implements    CYGHWR_HAL_ARM_SOC_UART3
     implements    CYGHWR_HAL_ARM_SOC_UART4
 
+    requires {CYGBLD_BUILD_REDBOOT == 1}
+
     define_proc {
         puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H   <pkgconf/hal_arm.h>"
         puts $::cdl_system_header "#define CYGBLD_HAL_VARIANT_H  <pkgconf/hal_arm_soc.h>"
@@ -70,8 +72,8 @@ cdl_package CYGPKG_HAL_ARM_TX27KARO {
     cdl_component CYG_HAL_STARTUP {
         display       "Startup type"
         flavor        data
-        default_value {"ROMRAM"}
-        legal_values  {"ROMRAM"}
+        default_value { "ROMRAM" }
+        legal_values  { "ROMRAM" }
        no_define
         define -file system.h CYG_HAL_STARTUP
         description   "
@@ -111,7 +113,7 @@ cdl_package CYGPKG_HAL_ARM_TX27KARO {
     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
         display          "Debug serial port"
         active_if        CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
-        flavor data
+        flavor           data
         legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
         default_value    0
         description      "
@@ -121,26 +123,26 @@ cdl_package CYGPKG_HAL_ARM_TX27KARO {
      }
 
      cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT {
-         display      "Default console channel."
-         flavor       data
-         legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
-         calculated   0
+         display         "Default console channel."
+         flavor          data
+         legal_values    0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
+         calculated      0
      }
 
      cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
-         display          "Console serial port"
-         active_if        CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
+         display         "Console serial port"
+         active_if       CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
          flavor data
-         legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
-         default_value    CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT
-         description      "
+         legal_values    0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
+         default_value   CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT
+         description     "
             The TX27 provides access to three serial ports. This option
             chooses which port will be used for console output."
      }
 
     cdl_component CYGBLD_GLOBAL_OPTIONS {
-        display "Global build options"
-        flavor  none
+        display       "Global build options"
+        flavor        none
         no_define
         description   "
            Global build options including control over
@@ -150,20 +152,21 @@ cdl_package CYGPKG_HAL_ARM_TX27KARO {
         parent  CYGPKG_NONE
 
         cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
-            display "Global command prefix"
-            flavor  data
+            display       "Global command prefix"
+            flavor        data
             no_define
-            default_value { "arm-linux" }
-            description "
+            default_value { "arm-926ejs-linux-gnu" }
+            description   "
                 This option specifies the command prefix used when
                 invoking the build tools."
         }
 
         cdl_option CYGBLD_GLOBAL_CFLAGS {
-            display "Global compiler flags"
-            flavor  data
+            display       "Global compiler flags"
+            flavor        data
             no_define
-            default_value { "-mcpu=arm9 -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" }
+            requires CYGBLD_INFRA_CFLAGS_WARNINGS_AS_ERRORS
+            default_value { "-mcpu=arm9 -mabi=apcs-gnu -Wall -Wno-pointer-sign -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -O2 -ffunction-sections -fdata-sections -fno-exceptions -fvtable-gc -finit-priority -Werror -pipe" }
             description   "
                 This option controls the global compiler flags which are used to
                 compile all packages by default. Individual packages may define
@@ -171,8 +174,8 @@ cdl_package CYGPKG_HAL_ARM_TX27KARO {
         }
 
         cdl_option CYGBLD_GLOBAL_LDFLAGS {
-            display "Global linker flags"
-            flavor  data
+            display       "Global linker flags"
+            flavor        data
             no_define
             default_value { "-Wl,--gc-sections -Wl,-static -O2 -nostdlib" }
             description   "
@@ -180,18 +183,47 @@ cdl_package CYGPKG_HAL_ARM_TX27KARO {
                 packages may define options which override these global flags."
         }
     }
+
     cdl_component CYGPKG_HAL_ARM_TX27_OPTIONS {
         display "Ka-Ro electronics TX27 module build options"
-        flavor  none
+        flavor        none
         no_define
+        requires      { CYGBLD_REDBOOT_FLASH_BOOT_OFFSET == 0 }
         description   "
            Package specific build options including control over
            compiler flags used only in building this package,
            and details of which tests are built."
 
+        cdl_option CYGNUM_HAL_ARM_TX27_SDRAM_SIZE {
+            display       "SDRAM size"
+            flavor        data
+            legal_values  { 0x04000000 0x08000000 }
+            default_value { 0x04000000 }
+# This is what I would like to do, but define_proc currently does not allow for
+# accessing variables
+#            display       "SDRAM size in MiB"
+#            legal_values  { 64 128 }
+#            default_value { 64 }
+#            define_proc {
+#                puts $::cdl_header "#define CYGNUM_HAL_ARM_TX27_SDRAM_SIZE \
+#                      [format "0x%08x" [expr $CYGNUM_HAL_ARM_TX27_SDRAM_SIZE * 1048576]]"
+#            }
+            description   "
+                This option specifies the SDRAM size of the TX27 module."
+        }
+
+        cdl_option CYGOPT_HAL_ARM_TX27_DEBUG {
+            display "Enable low level debugging with LED"
+            flavor bool
+            default_value { false }
+            description   "
+                This option enables low level debugging by blink codes
+                of the LED on STK5."
+        }
+
         cdl_option CYGPKG_HAL_ARM_TX27_CFLAGS_ADD {
-            display "Additional compiler flags"
-            flavor  data
+            display       "Additional compiler flags"
+            flavor        data
             no_define
             default_value { "" }
             description   "
@@ -201,8 +233,8 @@ cdl_package CYGPKG_HAL_ARM_TX27KARO {
         }
 
         cdl_option CYGPKG_HAL_ARM_TX27_CFLAGS_REMOVE {
-            display "Suppressed compiler flags"
-            flavor  data
+            display       "Suppressed compiler flags"
+            flavor        data
             no_define
             default_value { "" }
             description   "
@@ -217,18 +249,14 @@ cdl_package CYGPKG_HAL_ARM_TX27KARO {
         display "Memory layout"
         flavor data
         no_define
-        calculated { (CYG_HAL_STARTUP == "RAM")    ? "arm_tx27_ram" :
-                     (CYG_HAL_STARTUP == "ROMRAM") ? "arm_tx27_romram" :
-                                                    "arm_tx27_rom" }
+        calculated { "arm_tx27_romram" }
 
         cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
             display "Memory layout linker script fragment"
             flavor data
             no_define
             define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
-            calculated { (CYG_HAL_STARTUP == "RAM") ?    "<pkgconf/mlt_arm_tx27_ram.ldi>" :
-                         (CYG_HAL_STARTUP == "ROMRAM") ? "<pkgconf/mlt_arm_tx27_romram.ldi>" :
-                                                         "<pkgconf/mlt_arm_tx27_rom.ldi>" }
+            calculated { "<pkgconf/mlt_arm_tx27_romram.ldi>" }
         }
 
         cdl_option CYGHWR_MEMORY_LAYOUT_H {
@@ -236,9 +264,7 @@ cdl_package CYGPKG_HAL_ARM_TX27KARO {
             flavor data
             no_define
             define -file system.h CYGHWR_MEMORY_LAYOUT_H
-            calculated { (CYG_HAL_STARTUP == "RAM")    ? "<pkgconf/mlt_arm_tx27_ram.h>" :
-                         (CYG_HAL_STARTUP == "ROMRAM") ? "<pkgconf/mlt_arm_tx27_romram.h>" :
-                                                         "<pkgconf/mlt_arm_tx27_rom.h>" }
+            calculated { "<pkgconf/mlt_arm_tx27_romram.h>" }
         }
     }
 
@@ -250,7 +276,7 @@ cdl_package CYGPKG_HAL_ARM_TX27KARO {
         requires      { CYG_HAL_STARTUP == "ROM" || CYG_HAL_STARTUP == "ROMRAM" }
         description   "
             Enable this option if this program is to be used as a ROM monitor,
-            i.e. applications will be loaded into RAM on the TX27, and this
+            i.e. applications will be loaded into RAM on the TX27 module, and this
             ROM monitor may process exceptions or interrupts generated from the
             application. This enables features such as utilizing a separate
             interrupt stack when exceptions are generated."
@@ -286,7 +312,7 @@ cdl_package CYGPKG_HAL_ARM_TX27KARO {
         description   "
             This option lists the target's requirements for a valid Redboot
             configuration."
-       
+
             compile -library=libextras.a redboot_cmds.c
 
         cdl_option CYGBLD_BUILD_REDBOOT_BIN {
@@ -302,6 +328,7 @@ cdl_package CYGPKG_HAL_ARM_TX27KARO {
                 $(OBJCOPY) --strip-debug $< $(@:.bin=.img)
                 $(OBJCOPY) -O srec $< $(@:.bin=.srec)
                 $(OBJCOPY) -O binary $< $@
+                $(COMMAND_PREFIX)nm $< | awk 'NF == 3 {print}' | sort > $(<:.elf=.map)
             }
         }
     }