diff --git a/Kconfig b/Kconfig index d6eb138db1..5c96e16958 100644 --- a/Kconfig +++ b/Kconfig @@ -3,2733 +3,26 @@ # see the file kconfig-language.txt in the NuttX tools repository. # -mainmenu "NuttX/$ARCH Configuration" +mainmenu "NuttX Configuration" -config APPSDIR +config ARCH string - option env="APPSDIR" - -config APPSBINDIR - string - option env="APPSBINDIR" - ---help--- - Output path of Kconfig which dynamically generated by NuttX Apps - This option is consistent with the APPSDIR by default, and will - be changed when out-of-tree compilation is supported - -config BINDIR - string - option env="BINDIR" - ---help--- - Output path of Kconfig which dynamically generated by NuttX Kernel - This option is consistent with the TOPDIR by default, and will - be changed when out-of-tree compilation is supported + option env="ARCH" menu "License Setup" -config ALLOW_BSD_COMPONENTS - bool "Use components that have BSD licenses" - default n - ---help--- - When this option is enabled the project will allow the use - of components that have BSD licenses. - - NOTE: Please check that the license for each enabled - component matches your project license. - - NOTE: If this option is not set the following components - are not included in the setup menu: - Crypto - AES cypher support - FS - NFS client file system - SPIFFS File System - Wireless - Bluetooth LE support - -config ALLOW_GPL_COMPONENTS - bool "Use components that have GPL/LGPL licenses" - default n - ---help--- - When this option is enabled the project will allow the use - of components that have GPL/LGPL licenses. - - NOTE: Please check that the license for each enabled - component matches your project license. - -config ALLOW_MIT_COMPONENTS - bool "Use components that have MIT licenses" - default n - ---help--- - When this option is enabled the project will allow the use - of components that have MIT licenses. - - NOTE: Please check that the license for each enabled - component matches your project license. - -config ALLOW_BSDNORDIC_COMPONENTS - bool "Use components that have 5-Clause Nordic licenses" - depends on ARCH_CHIP_NRF52 || ARCH_CHIP_NRF53 || ARCH_CHIP_NRF91 - default n - ---help--- - When this option is enabled the project will allow the use - of components that have 5-Clause Nordic licenses. - - NOTE: Please check that the license for each enabled - component matches your project license. - -config ALLOW_ECLIPSE_COMPONENTS - bool "Use components that have Eclipse Public Licenses" - default n - ---help--- - When this option is enabled the project will allow the use - of components that have EPL licenses. - - NOTE: Please check that the license for each enabled - component matches your project license. - -config ALLOW_ICS_COMPONENTS - bool "Use components that have ICS license" - default n - ---help--- - When this option is enabled the project will allow the use - of components that have ICS licenses. - - NOTE: Please check that the license for each enabled - component matches your project license. - -endmenu # License Setup - -menu "Build Setup" - -config EXPERIMENTAL - bool "Show experimental options" - ---help--- - Some features and drivers are considered "experimental" or - development/work-in-progress status. By default, these options are - hidden in the Kconfig menus. Enabling "Show experimental options" - makes these options visible and makes it possible to enable them. - -config DEFAULT_SMALL - bool "Default to smallest size" - default n - ---help--- - When options are present, the default value for certain options will - be the one the results in the smallest size (at a loss of features). - The default is a fuller feature set at a larger size. - - NOTE: This option does not prevent you from overriding the default - to select another alternative. Nor does it affect the settings that - have already been selected in your configuration file. This applies - only to new settings that require a default value. - -choice - prompt "Build Host Platform" - default HOST_LINUX - -config HOST_LINUX - bool "Linux" - -config HOST_MACOS - bool "macOS" - -config HOST_WINDOWS - bool "Windows" - -config HOST_OTHER - bool "Other" - -endchoice # Build Host Platform - -config TOOLCHAIN_WINDOWS - bool - default n - depends on HOST_WINDOWS - ---help--- - Selected internally if the selected Windows environment is compatible - with the use of Windows native toolchains. - -config CYGWIN_WINTOOL - bool - default n - depends on WINDOWS_CYGWIN - ---help--- - Selected internally if Cygwin environment with the use of Windows - native toolchains. - -choice - prompt "Windows Build Environment" - default WINDOWS_CYGWIN - depends on HOST_WINDOWS - -config WINDOWS_NATIVE - bool "Windows Native" - select TOOLCHAIN_WINDOWS - depends on EXPERIMENTAL - ---help--- - Build natively in a CMD.exe environment with Windows style paths - (like C:\cygwin\home) - - The Windows native build is complete and available, but not often - used or verified. As a consequence, it cannot be assured to be - fully functional at any given time. Hence, it is marked here as - EXPERIMENTAL so that the end user will be aware of this state. - -config WINDOWS_CYGWIN - bool "Cygwin" - select TOOLCHAIN_WINDOWS - ---help--- - Build natively in a Cygwin environment with POSIX style paths (like - /cygdrive/c/Program Files) - -config WINDOWS_MSYS - bool "MSYS or MSYS2" - select TOOLCHAIN_WINDOWS - ---help--- - Build natively in a Cygwin environment with POSIX style paths (like - /cygdrive/c/cygwin/home) - -config WINDOWS_OTHER - bool "Windows POSIX-like environment" - select TOOLCHAIN_WINDOWS - ---help--- - Build natively in another POSIX-like environment. Additional - support may be necessary - -endchoice # Windows Build Environment - -config WINDOWS_MKLINK - bool "Use mklink" - default n - depends on WINDOWS_NATIVE - ---help--- - Use the mklink command to set up symbolic links when NuttX is - configured. Otherwise, configuration directories will be copied to - establish the configuration. - - If directories are copied, then some confusion can result ("Which - version of the file did I modify?"). In that case, it is recommended - that you re-build using 'make clean_context all'. That will cause the - configured directories to be recopied on each build. - - NOTE: This option also (1) that you have administrator privileges, (2) - that you are using Windows 2000 or better, and (3) that you are using - the NTFS file system. Select 'n' is that is not the case. - -menu "Build Configuration" - -config APPS_DIR - string "Application directory" - default "../apps" if !WINDOWS_NATIVE - default "..\apps" if WINDOWS_NATIVE - ---help--- - Identifies the directory that builds the - application to link with NuttX. Default: ../apps This symbol must - be assigned to the path to the application build directory - *relative* to the NuttX top build directory. If you had an - application directory and the NuttX directory each in separate - directory trees like this: - - build - |-nuttx - | | - | `- Makefile - `-application - | - `- Makefile - - Then you would set APPS_DIR=../application. - - The application direction must contain Makefile and this make - file must support the following targets: - - 1)libapps$(LIBEXT) (usually libapps.a). libapps.a is a static - library ( an archive) that contains all of application object - files. - - 2)clean. Do whatever is appropriate to clean the application - directories for a fresh build. - - 3)distclean. Clean everything -- auto-generated files, symbolic - links etc. -- so that the directory contents are the same as - the contents in your configuration management system. - This is only done when you change the NuttX configuration. - - 4)depend. Make or update the application build dependencies. - - When this application is invoked it will receive the setting TOPDIR like: - - $(MAKE) -C $(CONFIG_APPS_DIR) TOPDIR="$(TOPDIR)" - - TOPDIR is the full path to the NuttX directory. It can be used, for - example, to include makefile fragments (e.g., .config or Make.defs) - or to set up include file paths. - -config BASE_DEFCONFIG - string "Base Configuration" - default "" - ---help--- - This will be automatically be updated by the configuration - script. This is the base configuration file that was used to create the - current configuration. It is useful for getting the current configuration - on runtime. - -config MODULES - bool - option modules - ---help--- - Automatically selected if KERNEL build is selected. - This selection marks the implementation of Kconfig - to enable the module build function, and is used to - enable 'm' in the triate state. Its semantics are - consistent with Kernel. This selection also effects - the behavior of the 'make export' target and currently - has no effect unless you wish to build loadable applications - in a FLAT build. - -choice - prompt "Memory organization" - default BUILD_FLAT - -config BUILD_FLAT - bool "Flat address space" - ---help--- - Build NuttX as one large, executable "blob". All of the code - within the blob can interrupt with all of the other code within - the blob. There are no special privileges, protections, or - restraints. - -config BUILD_PROTECTED - bool "NuttX protected build" - depends on ARCH_USE_MPU - select LIB_SYSCALL - select BUILD_2PASS - ---help--- - Builds NuttX and selected applications as two "blobs": A protected, - privileged kernel blob and a separate unprivileged, user blob. This - requires use of the two pass build with each blob being build on - each pass. - - NOTE: This build configuration requires that the platform support - a memory protection unit (MPU). Support, however, may not be - implemented on all platforms. - -config BUILD_KERNEL - bool "NuttX kernel build" - depends on ARCH_USE_MMU && ARCH_ADDRENV - select LIB_SYSCALL - select MODULES - ---help--- - Builds NuttX as a separately compiled kernel. No applications are - built. All user applications must reside in a file system where - they can be loaded into memory for execution. - - NOTE: This build configuration requires that the platform support - a memory management unit (MMU) and address environments. Support, - however, may not be implemented on all platforms. - -endchoice # Build configuration - -config BUILD_PIC - bool "NuttX PIC build" - default n - ---help--- - Builds NuttX with position-independent code (PIC). This will allow - load NuttX into memory at any address and run it. - -config BUILD_2PASS - bool "Two pass build" - default n - ---help--- - Enables the two pass build options. - - Two-pass build options. If the 2 pass build option is selected, then these - options configure the make system build a extra link object. This link object - is assumed to be an incremental (relative) link object, but could be a static - library (archive) (some modification to this Makefile would be required if - PASS1_TARGET generates an archive). Pass 1 1ncremental (relative) link - objects should be put into the processor-specific source directory (where other - link objects will be created). If the pass1 object is an archive, it could - go anywhere. - -if BUILD_2PASS - -config PASS1_TARGET - string "Pass one target" - default "all" - ---help--- - The name of the first pass build target. This - can be specific build target, a special build target (all, default, etc.) - or may just be left undefined. - -config PASS1_BUILDIR - string "Pass one build directory" - default "build" - ---help--- - The path, relative to the top NuttX build - directory to directory that contains the Makefile to build the - first pass object. The Makefile must support the following targets: - The special target PASS1_TARGET (if defined) - and the usual depend, clean, and distclean targets. - -config PASS1_OBJECT - string "Pass one object" - default "" - ---help--- - May be used to include an extra, pass1 object - into the final link. This would probably be the object generated - from the PASS1_TARGET. It may be available at link time - in the arch//src directory. - -config NUTTX_USERSPACE - hex "Beginning of user-space blob" - default 0x0 - depends on BUILD_PROTECTED - ---help--- - In the kernel build, the NuttX kernel and the user-space blob are - built separately linked objects. NUTTX_USERSPACE provides the - address where the user-space blob is loaded into memory. NuttX will - expect to find and instance of struct userspace_s at this location. - -endif # Build 2-pass -endmenu # Build Setup - -menu "Binary Output Formats" - -config INTELHEX_BINARY - bool "Intel HEX binary format" - default n - ---help--- - Create the nuttx.hex in the Intel HEX binary format that is - used with many different loaders. This option will use the GNU objcopy - program and should not be selected if you are not using the GNU - toolchain. - -config MOTOROLA_SREC - bool "Motorola S-Record binary format" - default n - ---help--- - Create the nuttx.srec in the Motorola S-Record binary format that is - used with many different loaders. This option will use the GNU objcopy - program and should not be selected if you are not using the GNU - toolchain. - -config RAW_BINARY - bool "Raw binary format" - default n - ---help--- - Create the nuttx.bin in the raw binary format that is used with many - different loaders using the GNU objcopy program. This option - should not be selected if you are not using the GNU toolchain. - -config RAW_DISASSEMBLY - bool "Create a disassembly file" - default n - ---help--- - Create the nuttx.asm in the disassembly format using the objdump program. - -menuconfig UBOOT_UIMAGE - bool "U-Boot uImage" - select RAW_BINARY - depends on !WINDOWS_NATIVE - ---help--- - Create the uImage binary used with U-Boot. - -if UBOOT_UIMAGE - -config UIMAGE_LOAD_ADDRESS - hex "uImage load address" - default 0x0 - -config UIMAGE_ENTRY_POINT - hex "uImage entry point" - default 0x0 - -endif # UBOOT_UIMAGE - -menuconfig DFU_BINARY - bool "DFU binary format" - select RAW_BINARY - ---help--- - Create the dfu binary used with dfu-utils. - -if DFU_BINARY - -config DFU_BASE - hex "Address DFU image is loaded to" - -config DFU_VID - hex "VID to use for DFU image" - -config DFU_PID - hex "PID to use for DFU image" - -endif # DFU_BINARY - -config OUTPUT_STRIP_PATHS - bool "Strip absolute paths from binaries" - default y - depends on ARCH_TOOLCHAIN_GNU - ---help--- - Cmake build provide absolute paths to compile files. If __FILE__ - macros are used in the source code(ASSERT), the binary will contain - many invalid paths. - This saves some memory, stops exposing build systems locations in binaries, - make failure logs more deterministic and most importantly makes builds more - failure logs more deterministic and most importantly makes builds more - deterministic. - Debuggers usually have a path mapping feature to ensure the files are - still found. - -endmenu # Binary Output Formats - -menu "Customize Header Files" - -config ARCH_HAVE_STDINT_H - bool - default n - ---help--- - Selected by architecture specific logic if the architecture provides - a stdint.h header file. - -config ARCH_STDINT_H - bool "stdint.h" - default n - depends on ARCH_HAVE_STDINT_H - ---help--- - The stdint.h header file can be found at nuttx/include/stdint.h. - However, that header includes logic to redirect the inclusion of an - architecture specific header file like: - - #ifdef CONFIG_ARCH_STDINT_H - # include - #else - ... - #endif - - Recall that that include path, include/arch, is a symbolic link and - will refer to a version of stdint.h at nuttx/arch//include/stdint.h. - -config ARCH_HAVE_STDBOOL_H - bool - default n - ---help--- - Selected by architecture specific logic if the architecture provides - a stdbool.h header file. - -config ARCH_STDBOOL_H - bool "stdbool.h" - default n - depends on ARCH_HAVE_STDBOOL_H - ---help--- - The stdbool.h header file can be found at nuttx/include/stdbool.h. - However, that header includes logic to redirect the inclusion of an - architecture specific header file like: - - #ifdef CONFIG_ARCH_STDBOOL_H - # include - #else - ... - #endif - - Recall that that include path, include/arch, is a symbolic link and - will refer to a version of stdbool.h at nuttx/arch//include/stdbool.h. - -config ARCH_HAVE_MATH_H - bool - default n - ---help--- - Selected by architecture specific logic if the architecture provides - a math.h header file. - -config ARCH_MATH_H - bool "math.h" - depends on ARCH_HAVE_MATH_H - default n - ---help--- - There is also a re-directing version of math.h in the source tree. - However, it resides out-of-the-way at include/nuttx/lib/math.h because it - conflicts too often with the system math.h. If ARCH_MATH_H=y is - defined, however, the top-level makefile will copy the redirecting - math.h header file from include/nuttx/lib/math.h to include/math.h. math.h - will then include the architecture-specific version of math.h that you - must provide at nuttx/arch/>architecture - #endif - - So for the architectures that define ARCH_MATH_H=y, include/math.h - will be the redirecting math.h header file; for the architectures - that don't select ARCH_MATH_H, the redirecting math.h header file - will stay out-of-the-way in include/nuttx/. - -config ARCH_FLOAT_H - bool "float.h" - default n - ---help--- - The float.h header file defines the properties of your floating - point implementation. It would always be best to use your - toolchain's float.h header file but if none is available, a default - float.h header file will provided if this option is selected. However - there is no assurance that the settings in this float.h are actually - correct for your platform! - -config DISABLE_FLOAT - bool "Disable floating point" - default n - ---help--- - Disable floating point support in the compiler. This will reduce - code size and increase performance. This option is only available - on some architectures. - -config ARCH_HAVE_STDARG_H - bool - default n - ---help--- - Selected by architecture specific logic if the architecture provides - a math.h header file. - -config ARCH_STDARG_H - bool "stdarg.h" - depends on ARCH_HAVE_STDARG_H - default n - ---help--- - There is a redirecting version of stdarg.h in the source tree. It - resides out-of-the-way at include/nuttx/lib/stdarg.h. This is - because you should normally use your toolchain's stdarg.h file. But - sometimes, your toolchain's stdarg.h file may have other header - file dependencies and so may not be usable in the NuttX build - environment. In those cases, you may have to create a architecture- - specific stdarg.h header file at nuttx/arch//include/stdarg.h - - If ARCH_STDARG_H=y is defined, the top-level makefile will copy the - re-directing stdarg.h header file from include/nuttx/lib/stdarg.h to - include/stdarg.h. So for the architectures that cannot use their - toolchain's stdarg.h file, they can use this alternative by defining - ARCH_STDARG_H=y and providing. If ARCH_STDARG_H, is not defined, then - the stdarg.h header file will stay out-of-the-way in include/nuttx/. - -config ARCH_HAVE_SETJMP - bool - default n - -config ARCH_SETJMP_H - bool "setjmp.h" - default n - depends on ARCH_HAVE_SETJMP - ---help--- - There is a redirecting version of setjmp.h in the source tree. It - resides out-of-the-way at include/nuttx/lib/setjmp.h. This is - because you should normally use your toolchain's setjmp.h file. But - sometimes, your toolchain's setjmp.h file may have other header - file dependencies and so may not be usable in the NuttX build - environment. In those cases, you may have to create a architecture- - specific setjmp.h header file at nuttx/arch//include/setjmp.h - - If ARCH_SETJMP_H=y is defined, the top-level makefile will copy the - re-directing setjmp.h header file from include/nuttx/lib/setjmp.h to - include/setjmp.h. So for the architectures that cannot use their - toolchain's setjmp.h file, they can use this alternative by defining - ARCH_SETJMP_H=y and providing. If ARCH_SETJMP_H, is not defined, then - the setjmp.h header file will stay out-of-the-way in include/nuttx/. - -choice - prompt "debug.h selection" - default ARCH_NONE_DEBUG_H - -config ARCH_NONE_DEBUG_H - bool "None" - ---help--- - No debug.h under include/arch/ and include/arch/chip. - -config ARCH_DEBUG_H - bool "debug.h" - ---help--- - The debug.h under include/arch contains architecture dependent debugging primitives - -config ARCH_CHIP_DEBUG_H - bool "chip debug.h" - ---help--- - The debug.h under include/arch/chip contains architecture dependent debugging primitives - -config ARCH_BOARD_DEBUG_H - bool "board debug.h" - ---help--- - The debug.h under include/arch/board contains board dependent debugging primitives - -endchoice # debug.h selection - -endmenu # Customize Header Files - -menu "Debug Options" - -config FORTIFY_SOURCE - int "Fortify Source" - default 0 - range 0 3 - ---help--- - Detect overflows of buffers in common string and memory functions - where the compiler can determine and validate the buffer sizes. - 0 does not have any checks. - 1 will only check for out-of-bounds at compile time. - 2 will only perform out-of-bounds checks on stack variables. - 3 On the basis of 2, add an out-of-bounds check for dynamically allocated variables. - -config NDEBUG - bool "Define NDEBUG globally" - default !DEBUG_ASSERTIONS - -config ASSERTIONS_FILENAME - bool "Enable library call assert(3) show the file name" - default DEBUG_ASSERTIONS_FILENAME || !DEFAULT_SMALL - depends on !NDEBUG - ---help--- - This option can display the file information of the library call assert(3) - function when it is enabled. This option maybe will take up a lot - of space from applications. - -config DEBUG_ALERT - bool - default n - -config DEBUG_FEATURES - bool "Enable Debug Features" - default n - select DEBUG_ALERT - ---help--- - Enables built-in debug features. Selecting this option will (1) Enable - debug assertions in the code, (2) enable extended parameter testing in - many functions, and (3) enable support for debug output to the SYSLOG. - Note that enabling this option by itself does not produce debug output. - Debug output must also be selected on a subsystem-by-subsystem basis. - -if DEBUG_FEATURES - -comment "Debug SYSLOG Output Controls" - -config DEBUG_ERROR - bool "Enable Error Output" - default y - ---help--- - Enables output from [a-z]err() statements. Errors are significant system - exceptions that require immediate attention. - -config DEBUG_WARN - bool "Enable Warnings Output" - default y - depends on DEBUG_ERROR - ---help--- - Enables output from [a-z]warn() statements. Warnings are considered to - be various unexpected conditions, potential errors or errors that will - not have serious consequences. - -config DEBUG_INFO - bool "Enable Informational Debug Output" - default y - depends on DEBUG_WARN - ---help--- - Enables verbose "informational" debug output. If you enable - CONFIG_DEBUG_INFO, then very chatty (and often annoying) output - will be generated. - -config DEBUG_ASSERTIONS - bool "Enable Debug Assertions" - default n - ---help--- - Enables the DEBUGASSERT() macro. When CONFIG_DEBUG_ASSERTIONS is - defined, DEBUGASSERT() will cause the system to halt if the - assertion fails. If CONFIG_DEBUG_ASSERTIONS is not defined - DEBUGASSERT() compiled out of the system. In general, you would - set CONFIG_DEBUG_ASSERTIONS=y during debug, but disable the - assertions on a final, buckled up system. - -config DEBUG_ASSERTIONS_EXPRESSION - bool "Enable Debug Assertions show expression" - default n - depends on DEBUG_ASSERTIONS - ---help--- - This option can display the content information of the ASSERT() - function when it is triggered. This option maybe will take up a lot - of space. - -config DEBUG_ASSERTIONS_FILENAME - bool "Enable Debug Assertions show file name" - default !DEFAULT_SMALL - depends on DEBUG_ASSERTIONS - ---help--- - This option can display the file information of the ASSERT() - function when it is enabled. This option maybe will take up a lot - of space. - -comment "Subsystem Debug Options" - -config DEBUG_AUDIO - bool "Audio Device Debug Features" - default n - depends on AUDIO - ---help--- - Enable audio device debug features. - Enable low level debug features for the audio subsystem and for audio - device drivers. (disabled by default). Support for this debug option - is architecture-specific and may not be available for some MCUs. - -if DEBUG_AUDIO - -config DEBUG_AUDIO_ERROR - bool "Audio Device Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable audio device error output to SYSLOG. - -config DEBUG_AUDIO_WARN - bool "Audio Device Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable audio device warning output to SYSLOG. - -config DEBUG_AUDIO_INFO - bool "Audio Device Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable audio device informational output to SYSLOG. - -endif # DEBUG_AUDIO - -config DEBUG_BINFMT - bool "Binary Loader Debug Features" - default n - depends on !BINFMT_DISABLE || LIBC_ELF - ---help--- - Enable binary loader debug features. - -if DEBUG_BINFMT - -config DEBUG_BINFMT_ERROR - bool "Binary Loader Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable binary loader error output to SYSLOG. - -config DEBUG_BINFMT_WARN - bool "Binary Loader Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable binary loader warning output to SYSLOG. - -config DEBUG_BINFMT_INFO - bool "Binary Loader Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable binary loader informational output to SYSLOG. - -endif # DEBUG_BINFMT - -config DEBUG_CONTACTLESS - bool "Contactless Debug Features" - default n - depends on DRIVERS_CONTACTLESS - ---help--- - Enable debug features for contactless (aka RFID) subsystem. - -if DEBUG_CONTACTLESS - -config DEBUG_CONTACTLESS_ERROR - bool "Contactless Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable contactless (aka RFID) subsystem error output to - SYSLOG. - -config DEBUG_CONTACTLESS_WARN - bool "Contactless Warnings Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable contactless (aka RFID) subsystem warning output to - SYSLOG. - -config DEBUG_CONTACTLESS_INFO - bool "Contactless Informational Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable contactless (aka RFID) subsystem informational output - to SYSLOG. - -endif # DEBUG_CONTACTLESS - -config DEBUG_CRYPTO - bool "Crypto Debug Features" - default n - depends on CRYPTO - ---help--- - Enable cryptographic debug features. - -if DEBUG_CRYPTO - -config DEBUG_CRYPTO_ERROR - bool "Crypto Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable cryptographic error output to SYSLOG. - -config DEBUG_CRYPTO_WARN - bool "Crypto Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable cryptographic warning output to SYSLOG. - -config DEBUG_CRYPTO_INFO - bool "Crypto Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable cryptographic informational output to SYSLOG. - -endif # DEBUG_CRYPTO - -config DEBUG_FS - bool "File System Debug Features" - default n - ---help--- - Enable file system debug features. - -if DEBUG_FS - -config DEBUG_FS_ERROR - bool "File System Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable file system error output to SYSLOG. - -config DEBUG_FS_WARN - bool "File System Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable file system warning output to SYSLOG. - -config DEBUG_FS_INFO - bool "File System Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable file system informational output to SYSLOG. - -endif # DEBUG_FS - -config DEBUG_GRAPHICS - bool "Graphics Debug Features" - default n - ---help--- - Enable NX graphics subsystem debug features. - -if DEBUG_GRAPHICS - -config DEBUG_GRAPHICS_ERROR - bool "Graphics Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable NX graphics subsystem error output to SYSLOG. - -config DEBUG_GRAPHICS_WARN - bool "Graphics Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable NX graphics subsystem warning output to SYSLOG. - -config DEBUG_GRAPHICS_INFO - bool "Graphics Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable NX graphics subsystem informational output to SYSLOG. - -endif # DEBUG_GRAPHICS - -config DEBUG_LIB - bool "C Library Debug Features" - default n - ---help--- - Enable C library debug features. - -if DEBUG_LIB - -config DEBUG_LIB_ERROR - bool "C Library Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable C library error output to SYSLOG. - -config DEBUG_LIB_WARN - bool "C Library Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable C library warning output to SYSLOG. - -config DEBUG_LIB_INFO - bool "C Library Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable C library informational output to SYSLOG. - -config DEBUG_SYS_QUEUE - bool "Queue Debug option" - default n - ---help--- - Enable sys queue debug. - -endif # DEBUG_LIB - -config DEBUG_MM - bool "Memory Manager Debug Features" - default n - ---help--- - Enable memory management debug features. - -if DEBUG_MM - -config DEBUG_MM_ERROR - bool "Memory Manager Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable memory management error output to SYSLOG. - -config DEBUG_MM_WARN - bool "Memory Manager Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable memory management warning output to SYSLOG. - -config DEBUG_MM_INFO - bool "Memory Manager Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable memory management informational output to SYSLOG. - -endif # DEBUG_MM - -config DEBUG_SHM - bool "Shared Memory Debug Output" - default n - depends on MM_SHM - ---help--- - Enable shared memory management debug SYSLOG output (disabled by default) - -config DEBUG_NET - bool "Network Debug Features" - default n - depends on ARCH_HAVE_NET - ---help--- - Enable network debug features. - -if DEBUG_NET - -config DEBUG_NET_ERROR - bool "Network Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable network error output to SYSLOG. - -config DEBUG_NET_WARN - bool "Network Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable network warning output to SYSLOG. - -config DEBUG_NET_INFO - bool "Network Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable network informational output to SYSLOG. - -endif # DEBUG_NET - -config DEBUG_POWER - bool "Power-related Debug Features" - default n - ---help--- - Enable power-related debug features. - -if DEBUG_POWER - -config DEBUG_POWER_ERROR - bool "Power-related Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable power-related error output to SYSLOG. - -config DEBUG_POWER_WARN - bool "Power-related Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable power-related warning output to SYSLOG. - -config DEBUG_POWER_INFO - bool "Power-related Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable power-related informational output to SYSLOG. - -endif # DEBUG_POWER - -config DEBUG_BATTERY - bool "Battery-related Debug Features" - default n - ---help--- - Enable Battery-related debug features. - -if DEBUG_BATTERY - -config DEBUG_BATTERY_ERROR - bool "Battery-related Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable battery-related error output to SYSLOG. - -config DEBUG_BATTERY_WARN - bool "Battery-related Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable battery-related warning output to SYSLOG. - -config DEBUG_BATTERY_INFO - bool "Battery-related Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable battery-related informational output to SYSLOG. - -endif # DEBUG_BATTERY - -config DEBUG_WIRELESS - bool "Wireless Debug Features" - default n - depends on WIRELESS || DRIVERS_WIRELESS - ---help--- - Enable wireless debug features. - -if DEBUG_WIRELESS - -config DEBUG_WIRELESS_ERROR - bool "Wireless Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable wireless error output to SYSLOG. - -config DEBUG_WIRELESS_WARN - bool "Wireless Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable wireless warning output to SYSLOG. - -config DEBUG_WIRELESS_INFO - bool "Wireless Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable wireless informational output to SYSLOG. - -endif # DEBUG_WIRELESS - -config DEBUG_SCHED - bool "Scheduler Debug Features" - default n - depends on !SYSLOG_TIMESTAMP - ---help--- - Enable OS scheduler debug features. - -if DEBUG_SCHED - -config DEBUG_SCHED_ERROR - bool "Scheduler Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable OS scheduler error output to SYSLOG. - -config DEBUG_SCHED_WARN - bool "Scheduler Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable OS scheduler warning output to SYSLOG. - -config DEBUG_SCHED_INFO - bool "Scheduler Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable OS scheduler informational output to SYSLOG. - -endif # DEBUG_SCHED - -config DEBUG_SYSCALL - bool "SYSCALL Debug Features" - default n - depends on LIB_SYSCALL - ---help--- - Enable very low level features related to system calls. If SYSCAL - output is enabled, this gives you basically a poor man's version of - strace. - -if DEBUG_SYSCALL - -config DEBUG_SYSCALL_ERROR - bool "SYSCALL Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable OS SYSCALL error output to SYSLOG. - -config DEBUG_SYSCALL_WARN - bool "SYSCALL Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable OS SYSCALL warning output to SYSLOG. - -config DEBUG_SYSCALL_INFO - bool "SYSCALL Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable OS SYSCALL informational output to SYSLOG. - -endif # DEBUG_SYSCALL - -comment "OS Function Debug Options" - -config DEBUG_DMA - bool "DMA Debug Features" - default n - depends on ARCH_DMA - ---help--- - Enable DMA debug features. - - Support for this debug option is architecture-specific and may not - be available for some MCUs. - -if DEBUG_DMA - -config DEBUG_DMA_ERROR - bool "DMA Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable DMA error output to SYSLOG. - -config DEBUG_DMA_WARN - bool "DMA Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable DMA warning output to SYSLOG. - -config DEBUG_DMA_INFO - bool "DMA Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable DMA informational output to SYSLOG. - -endif # DEBUG_DMA - -config DEBUG_IRQ - bool "Interrupt Controller Debug Features" - default n - ---help--- - Enable interrupt controller debug features. - - Some (but not all) architectures support debug output to verify - interrupt controller logic. If supported, then option will enable - that output. This may interfere with normal operations! You - should *not* enable interrupt controller debug unless you suspect - that here is a problem with that logic. On some platforms, this - option may even cause crashes! Use with care! - -if DEBUG_IRQ - -config DEBUG_IRQ_ERROR - bool "Interrupt Controller Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable interrupt controller error output to SYSLOG. - -config DEBUG_IRQ_WARN - bool "Interrupt Controller Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable interrupt controller warning output to SYSLOG. - -config DEBUG_IRQ_INFO - bool "Interrupt Controller Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable interrupt controller informational output to SYSLOG. - -endif # DEBUG_IRQ - -config DEBUG_PAGING - bool "Paging Debug Features" - default n - depends on PAGING - ---help--- - Enable OS demand paging debug features. - -if DEBUG_PAGING - -config DEBUG_PAGING_ERROR - bool "Paging Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable OS demand paging error output to SYSLOG. - -config DEBUG_PAGING_WARN - bool "Paging Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable OS demand paging warning output to SYSLOG. - -config DEBUG_PAGING_INFO - bool "Paging Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable OS demand paging informational output to SYSLOG. - -endif # DEBUG_PAGING - -comment "Driver Debug Options" - -config DEBUG_LCD - bool "Low-level LCD Debug Features" - default n - depends on LCD || SLCD - ---help--- - Enable LCD driver debug features. - - Support for this debug option is board-specific and may not - be available for some boards. -if DEBUG_LCD - -config DEBUG_LCD_ERROR - bool "LCD Driver Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable LCD driver error output to SYSLOG. - -config DEBUG_LCD_WARN - bool "LCD Driver Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable LCD driver warning output to SYSLOG. - -config DEBUG_LCD_INFO - bool "LCD Driver Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable LCD driver informational output to SYSLOG. - -endif # DEBUG_LCD - -config DEBUG_LEDS - bool "Low-level LED Debug Features" - default n - depends on ARCH_HAVE_LEDS || WS2812 - ---help--- - Enable LED driver debug features. - - Support for this debug option is board-specific and may not - be available for some boards. - -if DEBUG_LEDS - -config DEBUG_LEDS_ERROR - bool "LED Driver Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable LED driver error output to SYSLOG. - -config DEBUG_LEDS_WARN - bool "LED Driver Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable LED driver warning output to SYSLOG. - -config DEBUG_LEDS_INFO - bool "LED Driver Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable LED driver informational output to SYSLOG. - -endif # DEBUG_LEDS - -config DEBUG_INPUT - bool "Input Device Debug Features" - default n - depends on INPUT - ---help--- - Enable input d. - Enable low level device debug features for the input device drivers - such as mice and touchscreens (disabled by default). Support for - this debug option is board-specific and may not be available for - some boards. - -if DEBUG_INPUT - -config DEBUG_INPUT_ERROR - bool "Input Device Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable input device error output to SYSLOG. - -config DEBUG_INPUT_WARN - bool "Input Device Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable input device warning output to SYSLOG. - -config DEBUG_INPUT_INFO - bool "Input Device Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable input device informational output to SYSLOG. - -endif # DEBUG_INPUT - -config DEBUG_ANALOG - bool "Analog Device Debug Features" - default n - depends on ANALOG - ---help--- - Enable analog device debug features. - Enable low level debug features the analog device drivers such as - A/D and D/A converters (disabled by default). Support for this - debug option is architecture-specific and may not be available for - some MCUs. - -if DEBUG_ANALOG - -config DEBUG_ANALOG_ERROR - bool "Analog Device Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable analog device error output to SYSLOG. - -config DEBUG_ANALOG_WARN - bool "Analog Device Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable analog device warning output to SYSLOG. - -config DEBUG_ANALOG_INFO - bool "Analog Device Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable CAN driver informational output to SYSLOG. - -endif # DEBUG_ANALOG - -config DEBUG_CAN - bool "CAN Debug Features" - default n - depends on CAN - ---help--- - Enable CAN driver debug features. - - Support for this debug option is architecture-specific and may not - be available for some MCUs. - -if DEBUG_CAN - -config DEBUG_CAN_ERROR - bool "CAN Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable CAN driver error output to SYSLOG. - -config DEBUG_CAN_WARN - bool "CAN Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable CAN driver warning output to SYSLOG. - -config DEBUG_CAN_INFO - bool "CAN Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable CAN driver informational output to SYSLOG. - -endif # DEBUG_CAN - -config DEBUG_GPIO - bool "GPIO Debug Features" - default n - ---help--- - Enable GPIO debug features. - - Support for this debug option is architecture-specific and may not - be available for some MCUs. - -if DEBUG_GPIO - -config DEBUG_GPIO_ERROR - bool "GPIO Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable GPIO error output to SYSLOG. - -config DEBUG_GPIO_WARN - bool "GPIO Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable GPIO warning output to SYSLOG. - -config DEBUG_GPIO_INFO - bool "GPIO Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable GPIO informational output to SYSLOG. - -endif # DEBUG_GPIO - -config DEBUG_I2C - bool "I2C Debug Features" - default n - depends on I2C - ---help--- - Enable I2C debug features. - - Support for this debug option is architecture-specific and may not - be available for some MCUs. - -if DEBUG_I2C - -config DEBUG_I2C_ERROR - bool "I2C Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable I2C driver error output to SYSLOG. - -config DEBUG_I2C_WARN - bool "I2C Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable I2C driver warning output to SYSLOG. - -config DEBUG_I2C_INFO - bool "I2C Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable I2C driver informational output to SYSLOG. - -endif # DEBUG_I2C - -config DEBUG_I2S - bool "I2S Debug Features" - default n - depends on I2S - ---help--- - Enable I2S debug features. - - Support for this debug option is architecture-specific and may not - be available for some MCUs. - -if DEBUG_I2S - -config DEBUG_I2S_ERROR - bool "I2S Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable I2S driver error output to SYSLOG. - - Support for this debug option is architecture-specific and may not - be available for some MCUs. - -config DEBUG_I2S_WARN - bool "I2S Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable I2S driver warning output to SYSLOG. - -config DEBUG_I2S_INFO - bool "I2S Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable I2S driver informational output to SYSLOG. - -endif # DEBUG_I2S - -config DEBUG_I3C - bool "I3C Debug Features" - default n - depends on I3C - ---help--- - Enable I3C debug features. - - Support for this debug option is architecture-specific and may not - be available for some MCUs. - -if DEBUG_I3C - -config DEBUG_I3C_ERROR - bool "I3C Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable I3C driver error output to SYSLOG. - - Support for this debug option is architecture-specific and may not - be available for some MCUs. - -config DEBUG_I3C_INFO - bool "I3C Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable I3C driver informational output to SYSLOG. - -endif # DEBUG_I3C - -config DEBUG_PWM - bool "PWM Debug Features" - default n - depends on PWM - ---help--- - Enable PWM debug features. - - Support for this debug option is architecture-specific and may not - be available for some MCUs. - -if DEBUG_PWM - -config DEBUG_PWM_ERROR - bool "PWM Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable PWM driver error output to SYSLOG. - - Support for this debug option is architecture-specific and may not - be available for some MCUs. - -config DEBUG_PWM_WARN - bool "PWM Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable PWM driver warning output to SYSLOG. - -config DEBUG_PWM_INFO - bool "PWM Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable PWM driver informational output to SYSLOG. - -endif # DEBUG_PWM - -config DEBUG_CAPTURE - bool "CAPTURE Debug Features" - default n - depends on CAPTURE - ---help--- - Enable CAPTURE debug features. - - Support for this debug option is architecture-specific and may not - be available for some MCUs. - -if DEBUG_CAPTURE - -config DEBUG_CAPTURE_ERROR - bool "CAPTURE Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable CAPTURE driver error output to SYSLOG. - - Support for this debug option is architecture-specific and may not - be available for some MCUs. - -config DEBUG_CAPTURE_WARN - bool "CAPTURE Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable CAPTURE driver warning output to SYSLOG. - -config DEBUG_CAPTURE_INFO - bool "CAPTURE Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable CAPTURE driver informational output to SYSLOG. - -endif # DEBUG_CAPTURE - -config DEBUG_RC - bool "RC Debug Features" - default n - depends on DRIVERS_RC - ---help--- - Enable RC debug features. - - Support for this debug option is architecture-specific and may not - be available for some MCUs. - -if DEBUG_RC - -config DEBUG_RC_ERROR - bool "RC Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable RC driver error output to SYSLOG. - - Support for this debug option is architecture-specific and may not - be available for some MCUs. - -config DEBUG_RC_WARN - bool "RC Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable RC driver warning output to SYSLOG. - -config DEBUG_RC_INFO - bool "RC Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable RC driver informational output to SYSLOG. - -endif # DEBUG_RC - -config DEBUG_REGMAP - bool "REGMAP Debug Features" - default n - depends on REGMAP - ---help--- - Enable REGMAP debug features. - - Support for this debug option is architecture-specific and may not - be available for some MCUs. - -if DEBUG_REGMAP - -config DEBUG_REGMAP_ERROR - bool "Regmap Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable regmap subsystems error output to SYSLOG. - -config DEBUG_REGMAP_WARN - bool "Regmap Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable regmap subsystems warning output to SYSLOG. - -config DEBUG_REGMAP_INFO - bool "Regmap Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable regmap subsystems informational output to SYSLOG. - -endif # DEBUG_REGMAP - -config DEBUG_RMT - bool "RMT Debug Features" - default n - depends on RMT - ---help--- - Enable RMT debug features. - - Support for this debug option is architecture-specific and may not - be available for some MCUs. - -if DEBUG_RMT - -config DEBUG_RMT_ERROR - bool "RMT Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable RMT driver error output to SYSLOG. - - Support for this debug option is architecture-specific and may not - be available for some MCUs. - -config DEBUG_RMT_WARN - bool "RMT Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable RMT driver warning output to SYSLOG. - -config DEBUG_RMT_INFO - bool "RMT Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable RMT driver informational output to SYSLOG. - -endif # DEBUG_RMT - -config DEBUG_RTC - bool "RTC Debug Features" - default n - depends on RTC - ---help--- - Enable RTC debug features. - - Support for this debug option is architecture-specific and may not - be available for some MCUs. - -if DEBUG_RTC - -config DEBUG_RTC_ERROR - bool "RTC Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable RTC driver error output to SYSLOG. - - Support for this debug option is architecture-specific and may not - be available for some MCUs. - -config DEBUG_RTC_WARN - bool "RTC Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable RTC driver warning output to SYSLOG. - -config DEBUG_RTC_INFO - bool "RTC Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable RTC driver informational output to SYSLOG. - -endif # DEBUG_RTC - -config DEBUG_MEMCARD - bool "Memory Card Driver Debug Features" - default n - depends on MMCSD - ---help--- - Enable MMC/SD memory card Driver debug features. - - Support for this debug option is architecture-specific and may not - be available for some MCUs. - -if DEBUG_MEMCARD - -config DEBUG_MEMCARD_ERROR - bool "Memory Card Driver Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable MMC/SD memory card driver error output to SYSLOG. - - Support for this debug option is architecture-specific and may not - be available for some MCUs. - -config DEBUG_MEMCARD_WARN - bool "Memory Card Driver Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable MMC/SD memory card driver warning output to SYSLOG. - -config DEBUG_MEMCARD_INFO - bool "Memory Card Driver Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable MMC/SD memory card driver informational output to SYSLOG. - -endif # DEBUG_MEMCARD - -config DEBUG_SENSORS - bool "Sensor Debug Features" - default n - depends on SENSORS - ---help--- - Enable sensor driver debug features. - - Support for this debug option is architecture-specific and may not - be available for some MCUs. - -if DEBUG_SENSORS - -config DEBUG_SENSORS_ERROR - bool "Sensor Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable sensor driver error output to SYSLOG. - -config DEBUG_SENSORS_WARN - bool "Sensor Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable sensor driver warning output to SYSLOG. - -config DEBUG_SENSORS_INFO - bool "Sensor Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable sensor driver informational output to SYSLOG. - -endif # DEBUG_SENSORS - -config DEBUG_SPI - bool "SPI Debug Features" - default n - depends on SPI - ---help--- - Enable SPI debug features. - - Support for this debug option is architecture-specific and may not - be available for some MCUs. - -if DEBUG_SPI - -config DEBUG_SPI_ERROR - bool "SPI Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable SPI error output to SYSLOG. - -config DEBUG_SPI_WARN - bool "SPI Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable SPI warning output to SYSLOG. - -config DEBUG_SPI_INFO - bool "SPI Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable SPI informational output to SYSLOG. - -endif # DEBUG_SPI - -config DEBUG_THERMAL - bool "Thermal Debug Features" - default n - ---help--- - Enable thermal debug features. - -if DEBUG_THERMAL - -config DEBUG_THERMAL_ERROR - bool "Thermal Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable thermal error output to SYSLOG. - -config DEBUG_THERMAL_WARN - bool "Thermal Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable thermal warning output to SYSLOG. - -config DEBUG_THERMAL_INFO - bool "Thermal Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable thermal informational output to SYSLOG. - -endif # DEBUG_THERMAL - -config DEBUG_TIMER - bool "Timer Debug Features" - default n - ---help--- - Enable timer debug features. - - Support for this debug option is architecture-specific and may not - be available for some MCUs. - -if DEBUG_TIMER - -config DEBUG_TIMER_ERROR - bool "Timer Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable timer error output to SYSLOG. - -config DEBUG_TIMER_WARN - bool "Timer Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable timer warning output to SYSLOG. - -config DEBUG_TIMER_INFO - bool "Timer Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable timer informational output to SYSLOG. - -endif # DEBUG_TIMER - -config DEBUG_USB - bool "USB Debug Features" - default n - depends on USBDEV || USBHOST - ---help--- - Enable USB debug features. - -if DEBUG_USB - -config DEBUG_USB_ERROR - bool "USB Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable USB error output to SYSLOG. - -config DEBUG_USB_WARN - bool "USB Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable USB warning output to SYSLOG. - -config DEBUG_USB_INFO - bool "USB Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable USB informational output to SYSLOG. - -endif # DEBUG_USB - -config DEBUG_WATCHDOG - bool "Watchdog Timer Debug Features" - default n - depends on WATCHDOG - ---help--- - Enable watchdog timer debug features. - - Support for this debug option is architecture-specific and may not - be available for some MCUs. - -if DEBUG_WATCHDOG - -config DEBUG_WATCHDOG_ERROR - bool "Watchdog Timer Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable watchdog time error output to SYSLOG. - -config DEBUG_WATCHDOG_WARN - bool "Watchdog Timer Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable watchdog time warning output to SYSLOG. - -config DEBUG_WATCHDOG_INFO - bool "Watchdog Timer Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable watchdog time informational output to SYSLOG. - -endif # DEBUG_WATCHDOG - -config DEBUG_MOTOR - bool "Motor Debug Features" - default n - depends on MOTOR - ---help--- - Enable motor debug features. - -if DEBUG_MOTOR - -config DEBUG_MOTOR_ERROR - bool "Motor Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable motor error output to SYSLOG. - -config DEBUG_MOTOR_WARN - bool "Motor Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable motor warning output to SYSLOG. - -config DEBUG_MOTOR_INFO - bool "Motor Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable motor informational output to SYSLOG. - -endif # DEBUG_MOTOR - -config DEBUG_STEPPER - bool "Stepper Motor Debug Features" - default n - depends on STEPPER - ---help--- - Enable motor debug features. - -if DEBUG_STEPPER - -config DEBUG_STEPPER_ERROR - bool "Stepper Motor Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable motor error output to SYSLOG. - -config DEBUG_STEPPER_WARN - bool "Stepper Motor Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable motor warning output to SYSLOG. - -config DEBUG_STEPPER_INFO - bool "Stepper Motor Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable motor informational output to SYSLOG. - -endif # DEBUG_STEPPER - - -config DEBUG_VIDEO - bool "Video Debug Features" - default n - depends on DRIVERS_VIDEO - ---help--- - Enable video debug features. - -if DEBUG_VIDEO - -config DEBUG_VIDEO_ERROR - bool "Video Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable video error output to SYSLOG. - -config DEBUG_VIDEO_WARN - bool "Video Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable video warning output to SYSLOG. - -config DEBUG_VIDEO_INFO - bool "Video Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable video informational output to SYSLOG. - -endif # DEBUG_VIDEO - -config DEBUG_VIRTIO - bool "Virtio Debug Features" - default n - depends on DRIVERS_VIRTIO - ---help--- - Enable virtio debug features. - -if DEBUG_VIRTIO - -config DEBUG_VIRTIO_ERROR - bool "Virtio Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable virtio error output to SYSLOG. - -config DEBUG_VIRTIO_WARN - bool "Virtio Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable virtio warning output to SYSLOG. - -config DEBUG_VIRTIO_INFO - bool "Virtio Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable virtio informational output to SYSLOG. - -endif # DEBUG_VIDEO - -config DEBUG_VHOST - bool "Vhost Debug Features" - default n - depends on DRIVERS_VHOST - ---help--- - Enable vhost debug features. - -if DEBUG_VHOST - -config DEBUG_VHOST_ERROR - bool "Vhost Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable vhost error output to SYSLOG. - -config DEBUG_VHOST_WARN - bool "Vhost Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable vhost warning output to SYSLOG. - -config DEBUG_VHOST_INFO - bool "Vhost Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable vhost informational output to SYSLOG. - -endif # DEBUG_VHOST - -config DEBUG_RESET - bool "RESET Debug Features" - default n - depends on RESET - ---help--- - Enable RESET debug features. - -if DEBUG_RESET - -config DEBUG_RESET_ERROR - bool "RESET Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable RESET driver error output to SYSLOG. - -config DEBUG_RESET_INFO - bool "RESET Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable RESET driver informational output to SYSLOG. - -endif # DEBUG_RESET - -config DEBUG_IPC - bool "IPC (Interprocessor communication) Debug Features" - default n - ---help--- - Enable IPC debug features. - -if DEBUG_IPC - -config DEBUG_IPC_ERROR - bool "IPC Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable IPC error output to SYSLOG. - -config DEBUG_IPC_WARN - bool "IPC Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable IPC warning output to SYSLOG. - -config DEBUG_IPC_INFO - bool "IPC Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable IPC informational output to SYSLOG. - -endif # DEBUG_IPC - -config DEBUG_PCI - bool "PCI Debug Features" - default n - depends on PCI - ---help--- - Enable PCI driver debug features. - - Support for this debug option is architecture-specific and may not - be available for some MCUs. - -if DEBUG_PCI - -config DEBUG_PCI_ERROR - bool "PCI Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable PCI driver error output to SYSLOG. - -config DEBUG_PCI_WARN - bool "PCI Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable PCI driver warning output to SYSLOG. - -config DEBUG_PCI_INFO - bool "PCI Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable PCI driver informational output to SYSLOG. - -endif # DEBUG_PCI - -config DEBUG_RPMSG - bool "RPMSG Debug Features" - default n - depends on RPMSG - ---help--- - Enable RPMSG driver debug features. - -if DEBUG_RPMSG - -config DEBUG_RPMSG_ERROR - bool "RPMSG Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable RPMSG driver error output to SYSLOG. - -config DEBUG_RPMSG_WARN - bool "RPMSG Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable RPMSG driver warning output to SYSLOG. - -config DEBUG_RPMSG_INFO - bool "RPMSG Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable RPMSG driver informational output to SYSLOG. - -endif # DEBUG_RPMSG - -config DEBUG_CORESIGHT - bool "Coresight Debug Features" - default n - depends on CORESIGHT - ---help--- - Enable coresight debug features. - -if DEBUG_CORESIGHT - -config DEBUG_CORESIGHT_ERROR - bool "Coresight Error Output" - default n - depends on DEBUG_ERROR - ---help--- - Enable coresight driver error output to SYSLOG. - -config DEBUG_CORESIGHT_WARN - bool "Coresight Warnings Output" - default n - depends on DEBUG_WARN - ---help--- - Enable coresight warning output to SYSLOG. - -config DEBUG_CORESIGHT_INFO - bool "Coresight Informational Output" - default n - depends on DEBUG_INFO - ---help--- - Enable coresight driver informational output to SYSLOG. - -endif # DEBUG_CORESIGHT - -endif # DEBUG_FEATURES - -config ARCH_PROTECT_ZERO_ADDRESS - bool "Protect address zero" - depends on ARCH_HAVE_DEBUG - default n - ---help--- - When the program accesses address 0, it will assert automatically. - Hardware support is required, such as ARM V8M DWT watchpoint - -config ARCH_HAVE_STACKCHECK - bool - default n - -config STACK_COLORATION - bool "Stack coloration" - default n - depends on ARCH_HAVE_STACKCHECK - ---help--- - Enable stack coloration to initialize the stack memory to the value - of STACK_COLOR and enable the stack checking APIs that can be used - to monitor the level of stack usage. - - Only supported by a few architectures. - -config STACK_CANARIES - bool "Compiler stack canaries" - depends on ARCH_HAVE_STACKCHECK - default n - ---help--- - This option enables compiler stack canaries. - If stack canaries are supported by the compiler, it will emit - extra code that inserts a canary value into the stack frame when - a function is entered and validates this value upon exit. - Stack corruption (such as that caused by buffer overflow) results - in a fatal error condition for the running entity. - Enabling this option can result in a significant increase - in footprint and an associated decrease in performance. - -config STACK_USAGE - bool "Generate stack usage information" - ---help--- - Generate an extra file that specifies the maximum amount of stack used, - on a per-function basis. Please use https://github.com/HBehrens/puncover - or tools/showstack.sh to generate the more useful report. - -config STACK_USAGE_WARNING - int "Detect use of large stack variables" - default 0 - ---help--- - Set the stack warning threshold, if the stack usage exceeds the - threshold, a warning will be generated - -config ARCH_HAVE_HEAPCHECK - bool - default n - -config HEAP_COLORATION - bool "Heap coloration" - default n - depends on ARCH_HAVE_HEAPCHECK - ---help--- - Enable heap coloration to check heap usage. Only supported by a few - architectures. - -config DEBUG_SYMBOLS - bool "Generate Debug Symbols" - default n - ---help--- - Build with debug symbols (needed for use with a debugger). - -config DEBUG_SYMBOLS_LEVEL - string "Custom symbols level" - depends on DEBUG_SYMBOLS - default "-g" - ---help--- - This string represents the custom symbol level that will be - used if DEBUG_SYMBOLS. - -config FRAME_POINTER - bool "Compile the NuttX with frame pointers" - default n - ---help--- - If you say Y here the resulting NuttX image will be slightly - larger and slower, but it gives very useful debugging information - in case of bugs. - -endmenu # Debug Options - -menuconfig TRACE - bool "Enable tracepoints" - default n - depends on SCHED_INSTRUMENTATION_DUMP - ---help--- - If this option is enabled, tracepoints at critical code in - the kernel will be enabled. - -if TRACE -config TRACE_APP - bool "Enable tracepoints in app" - default n - -config TRACE_ARCH - bool "Enable tracepoints in arch" - default n - -config TRACE_AUDIO - bool "Enable tracepoints in audio" - default n - -config TRACE_BOARDS - bool "Enable tracepoints in boards" - default n - -config TRACE_CRYPTO - bool "Enable tracepoints in crypto" - default n - -config TRACE_DRIVERS - bool "Enable tracepoints in drivers" - default n - -config TRACE_FS - bool "Enable tracepoints in fs" - default n - -if TRACE_FS -menu "Trace Fs Support" - -config TRACE_LITTLEFS_FS - bool "Enable tracepoints in littlefs" - default n - -config TRACE_ROMFS_FS - bool "Enable tracepoints in romfs" - default n - -config TRACE_RPMSGFS_FS - bool "Enable tracepoints in rpmsgfs" - default n - -endmenu # Trace Fs Support -endif - -config TRACE_GRAPHICS - bool "Enable tracepoints in graphics" - default n - -config TRACE_INPUT - bool "Enable tracepoints in input" - default n - -config TRACE_LIBS - bool "Enable tracepoints in libs" - default n - -config TRACE_MM - bool "Enable tracepoints in mm" - default n - -config TRACE_NET - bool "Enable tracepoints in net" - default n - -config TRACE_SCHED - bool "Enable tracepoints in sched" - default n - -config TRACE_VIDEO - bool "Enable tracepoints in video" - default n - -config TRACE_WIRELESS - bool "Enable tracepoints in wireless" - default n - -endif #TRACE - -config ARCH_HAVE_CUSTOMOPT - bool - default n - -choice - prompt "Optimization Level" - default DEBUG_NOOPT if DEBUG_SYMBOLS - default DEBUG_FULLOPT if !DEBUG_SYMBOLS - -config DEBUG_NOOPT - bool "Suppress Optimization" - ---help--- - Build without optimization. This is often helpful when debugging code. - -config DEBUG_CUSTOMOPT - bool "Custom Optimization" - depends on ARCH_HAVE_CUSTOMOPT - ---help--- - Select a custom debug level. This is often helpful if you suspect an - optimization level error and want to lower the level of optimization. - -config DEBUG_FULLOPT - bool "Normal, Full optimization" - ---help--- - Build full optimization. This is the normal case for production - firmware. - -endchoice # Optimization Level - -config DEBUG_OPTLEVEL - string "Custom Optimization Level" - default "/O2" if HOST_WINDOWS - default "-O2" - depends on DEBUG_CUSTOMOPT - ---help--- - This string represents the custom optimization level that will be - used if DEBUG_CUSTOMOPT. - -choice - prompt "Link Time Optimization (LTO)" - default LTO_NONE - ---help--- - This option enables Link Time Optimization (LTO), which allows the - compiler to optimize binaries globally. - - If unsure, select LTO_NONE. Note that LTO is very resource-intensive - so it's disabled by default. - -config LTO_NONE - bool "None" - ---help--- - Build the kernel normally, without Link Time Optimization (LTO). - -config LTO_FULL - bool "GNU Full LTO (EXPERIMENTAL)" - depends on ARCH_TOOLCHAIN_GNU - ---help--- - Link time optimization is implemented as a GCC front end for a bytecode - bytecode representation of GIMPLE that is emitted in special sections - of .o files. Currently, LTO support is enabled in most ELF-based systems, - as well as darwin, cygwin and mingw systems. - -config LTO_THIN - bool "Clang ThinLTO (EXPERIMENTAL)" - depends on ARCH_TOOLCHAIN_CLANG - ---help--- - This option enables Clang's ThinLTO, which allows for parallel - optimization and faster incremental compiles compared to the - CONFIG_LTO_FULL option. More information can be found - from Clang's documentation: - - https://clang.llvm.org/docs/ThinLTO.html - - If unsure, say Y. -endchoice - -config DEBUG_OPT_UNUSED_SECTIONS - bool "Optimization to eliminate the unused input sections" - default y - depends on ARCH_TOOLCHAIN_GNU - ---help--- - Use these options on systems where the linker can perform optimizations - to improve locality of reference in the instruction space. Most systems - using the ELF object format have linkers with such optimizations. - - Enable this option to optimization the unused input sections with the - linker by compiling with " -ffunction-sections -fdata-sections ", and - linking with " --gc-sections ". - -config DEBUG_LINK_WHOLE_ARCHIVE - bool "Force every object to be included in the resulting shared library." - default n - depends on DEBUG_OPT_UNUSED_SECTIONS - ---help--- - Selecting this option will pass "--whole-archive" to ld - when linking NuttX ELF. - -config DEBUG_LINK_MAP - bool "Generate link map file" - default y - ---help--- - Selecting this option will pass "-Map=$(TOPDIR)$(DELIM)nuttx.map" to ld - when linking NuttX ELF. That file can be useful for verifying - and debugging magic section games, and for seeing which - pieces of code get eliminated with DEBUG_OPT_UNUSED_SECTIONS. - -config CCACHE - bool "Use ccache" - default n - ---help--- - If enabled, ccache will be used during the build. - Build artifacts will be cached to a local storage, considerably - reducing build times. - -endmenu # Build Setup - -menu "System Type" -source "arch/Kconfig" +source "Kconfig.license" endmenu -menu "Board Selection" -source "boards/Kconfig" +menu "Build Setup" +source "Kconfig.setup" +endmenu + +menu "SOC" +source "soc/$(ARCH)/Kconfig" +endmenu + +menu "System Type" +source "arch/$(ARCH)/Kconfig" endmenu menu "RTOS Features" @@ -2741,14 +34,6 @@ menu "Device Drivers" source "drivers/Kconfig" endmenu -menu "Networking Support" -source "net/Kconfig" -endmenu - -menu "Crypto API" -source "crypto/Kconfig" -endmenu - menu "File Systems" source "fs/Kconfig" endmenu @@ -2762,17 +47,11 @@ menu "Memory Management" source "mm/Kconfig" endmenu -menu "Audio Support" +source "net/Kconfig" source "audio/Kconfig" -endmenu - -menu "Video Support" +source "crypto/Kconfig" source "video/Kconfig" -endmenu - -menu "Wireless Support" source "wireless/Kconfig" -endmenu menu "Binary Loader" source "binfmt/Kconfig" @@ -2788,20 +67,4 @@ endmenu menu "Open Asymmetric Multi Processing" source "openamp/Kconfig" -endmenu - -menu "Application Configuration" -source "$APPSBINDIR/Kconfig" -endmenu - -# Support optionally including external code -# into the OS build. EXTERNALDIR will be used -# to either point to 'nuttx/external' or -# 'nuttx/dummy', if 'nuttx/external' -# does not contain a Kconfig file - -config EXTERNALDIR - string - option env="EXTERNALDIR" - -source "$EXTERNALDIR/Kconfig" +endmenu \ No newline at end of file diff --git a/Kconfig.debug b/Kconfig.debug new file mode 100644 index 0000000000..6fb8f22429 --- /dev/null +++ b/Kconfig.debug @@ -0,0 +1,1917 @@ + +menu "Debug Options" + +config FORTIFY_SOURCE + int "Fortify Source" + default 0 + range 0 3 + ---help--- + Detect overflows of buffers in common string and memory functions + where the compiler can determine and validate the buffer sizes. + 0 does not have any checks. + 1 will only check for out-of-bounds at compile time. + 2 will only perform out-of-bounds checks on stack variables. + 3 On the basis of 2, add an out-of-bounds check for dynamically allocated variables. + +config NDEBUG + bool "Define NDEBUG globally" + default !DEBUG_ASSERTIONS + +config ASSERTIONS_FILENAME + bool "Enable library call assert(3) show the file name" + default DEBUG_ASSERTIONS_FILENAME || !DEFAULT_SMALL + depends on !NDEBUG + ---help--- + This option can display the file information of the library call assert(3) + function when it is enabled. This option maybe will take up a lot + of space from applications. + +config DEBUG_ALERT + bool + default n + +config DEBUG_FEATURES + bool "Enable Debug Features" + default n + select DEBUG_ALERT + ---help--- + Enables built-in debug features. Selecting this option will (1) Enable + debug assertions in the code, (2) enable extended parameter testing in + many functions, and (3) enable support for debug output to the SYSLOG. + Note that enabling this option by itself does not produce debug output. + Debug output must also be selected on a subsystem-by-subsystem basis. + +if DEBUG_FEATURES + +comment "Debug SYSLOG Output Controls" + +config DEBUG_ERROR + bool "Enable Error Output" + default y + ---help--- + Enables output from [a-z]err() statements. Errors are significant system + exceptions that require immediate attention. + +config DEBUG_WARN + bool "Enable Warnings Output" + default y + depends on DEBUG_ERROR + ---help--- + Enables output from [a-z]warn() statements. Warnings are considered to + be various unexpected conditions, potential errors or errors that will + not have serious consequences. + +config DEBUG_INFO + bool "Enable Informational Debug Output" + default y + depends on DEBUG_WARN + ---help--- + Enables verbose "informational" debug output. If you enable + CONFIG_DEBUG_INFO, then very chatty (and often annoying) output + will be generated. + +config DEBUG_ASSERTIONS + bool "Enable Debug Assertions" + default n + ---help--- + Enables the DEBUGASSERT() macro. When CONFIG_DEBUG_ASSERTIONS is + defined, DEBUGASSERT() will cause the system to halt if the + assertion fails. If CONFIG_DEBUG_ASSERTIONS is not defined + DEBUGASSERT() compiled out of the system. In general, you would + set CONFIG_DEBUG_ASSERTIONS=y during debug, but disable the + assertions on a final, buckled up system. + +config DEBUG_ASSERTIONS_EXPRESSION + bool "Enable Debug Assertions show expression" + default n + depends on DEBUG_ASSERTIONS + ---help--- + This option can display the content information of the ASSERT() + function when it is triggered. This option maybe will take up a lot + of space. + +config DEBUG_ASSERTIONS_FILENAME + bool "Enable Debug Assertions show file name" + default !DEFAULT_SMALL + depends on DEBUG_ASSERTIONS + ---help--- + This option can display the file information of the ASSERT() + function when it is enabled. This option maybe will take up a lot + of space. + +comment "Subsystem Debug Options" + +config DEBUG_AUDIO + bool "Audio Device Debug Features" + default n + depends on AUDIO + ---help--- + Enable audio device debug features. + Enable low level debug features for the audio subsystem and for audio + device drivers. (disabled by default). Support for this debug option + is architecture-specific and may not be available for some MCUs. + +if DEBUG_AUDIO + +config DEBUG_AUDIO_ERROR + bool "Audio Device Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable audio device error output to SYSLOG. + +config DEBUG_AUDIO_WARN + bool "Audio Device Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable audio device warning output to SYSLOG. + +config DEBUG_AUDIO_INFO + bool "Audio Device Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable audio device informational output to SYSLOG. + +endif # DEBUG_AUDIO + +config DEBUG_BINFMT + bool "Binary Loader Debug Features" + default n + depends on !BINFMT_DISABLE || LIBC_ELF + ---help--- + Enable binary loader debug features. + +if DEBUG_BINFMT + +config DEBUG_BINFMT_ERROR + bool "Binary Loader Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable binary loader error output to SYSLOG. + +config DEBUG_BINFMT_WARN + bool "Binary Loader Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable binary loader warning output to SYSLOG. + +config DEBUG_BINFMT_INFO + bool "Binary Loader Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable binary loader informational output to SYSLOG. + +endif # DEBUG_BINFMT + +config DEBUG_CONTACTLESS + bool "Contactless Debug Features" + default n + depends on DRIVERS_CONTACTLESS + ---help--- + Enable debug features for contactless (aka RFID) subsystem. + +if DEBUG_CONTACTLESS + +config DEBUG_CONTACTLESS_ERROR + bool "Contactless Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable contactless (aka RFID) subsystem error output to + SYSLOG. + +config DEBUG_CONTACTLESS_WARN + bool "Contactless Warnings Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable contactless (aka RFID) subsystem warning output to + SYSLOG. + +config DEBUG_CONTACTLESS_INFO + bool "Contactless Informational Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable contactless (aka RFID) subsystem informational output + to SYSLOG. + +endif # DEBUG_CONTACTLESS + +config DEBUG_CRYPTO + bool "Crypto Debug Features" + default n + depends on CRYPTO + ---help--- + Enable cryptographic debug features. + +if DEBUG_CRYPTO + +config DEBUG_CRYPTO_ERROR + bool "Crypto Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable cryptographic error output to SYSLOG. + +config DEBUG_CRYPTO_WARN + bool "Crypto Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable cryptographic warning output to SYSLOG. + +config DEBUG_CRYPTO_INFO + bool "Crypto Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable cryptographic informational output to SYSLOG. + +endif # DEBUG_CRYPTO + +config DEBUG_FS + bool "File System Debug Features" + default n + ---help--- + Enable file system debug features. + +if DEBUG_FS + +config DEBUG_FS_ERROR + bool "File System Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable file system error output to SYSLOG. + +config DEBUG_FS_WARN + bool "File System Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable file system warning output to SYSLOG. + +config DEBUG_FS_INFO + bool "File System Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable file system informational output to SYSLOG. + +endif # DEBUG_FS + +config DEBUG_GRAPHICS + bool "Graphics Debug Features" + default n + ---help--- + Enable NX graphics subsystem debug features. + +if DEBUG_GRAPHICS + +config DEBUG_GRAPHICS_ERROR + bool "Graphics Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable NX graphics subsystem error output to SYSLOG. + +config DEBUG_GRAPHICS_WARN + bool "Graphics Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable NX graphics subsystem warning output to SYSLOG. + +config DEBUG_GRAPHICS_INFO + bool "Graphics Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable NX graphics subsystem informational output to SYSLOG. + +endif # DEBUG_GRAPHICS + +config DEBUG_LIB + bool "C Library Debug Features" + default n + ---help--- + Enable C library debug features. + +if DEBUG_LIB + +config DEBUG_LIB_ERROR + bool "C Library Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable C library error output to SYSLOG. + +config DEBUG_LIB_WARN + bool "C Library Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable C library warning output to SYSLOG. + +config DEBUG_LIB_INFO + bool "C Library Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable C library informational output to SYSLOG. + +config DEBUG_SYS_QUEUE + bool "Queue Debug option" + default n + ---help--- + Enable sys queue debug. + +endif # DEBUG_LIB + +config DEBUG_MM + bool "Memory Manager Debug Features" + default n + ---help--- + Enable memory management debug features. + +if DEBUG_MM + +config DEBUG_MM_ERROR + bool "Memory Manager Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable memory management error output to SYSLOG. + +config DEBUG_MM_WARN + bool "Memory Manager Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable memory management warning output to SYSLOG. + +config DEBUG_MM_INFO + bool "Memory Manager Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable memory management informational output to SYSLOG. + +endif # DEBUG_MM + +config DEBUG_SHM + bool "Shared Memory Debug Output" + default n + depends on MM_SHM + ---help--- + Enable shared memory management debug SYSLOG output (disabled by default) + +config DEBUG_NET + bool "Network Debug Features" + default n + depends on ARCH_HAVE_NET + ---help--- + Enable network debug features. + +if DEBUG_NET + +config DEBUG_NET_ERROR + bool "Network Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable network error output to SYSLOG. + +config DEBUG_NET_WARN + bool "Network Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable network warning output to SYSLOG. + +config DEBUG_NET_INFO + bool "Network Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable network informational output to SYSLOG. + +endif # DEBUG_NET + +config DEBUG_POWER + bool "Power-related Debug Features" + default n + ---help--- + Enable power-related debug features. + +if DEBUG_POWER + +config DEBUG_POWER_ERROR + bool "Power-related Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable power-related error output to SYSLOG. + +config DEBUG_POWER_WARN + bool "Power-related Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable power-related warning output to SYSLOG. + +config DEBUG_POWER_INFO + bool "Power-related Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable power-related informational output to SYSLOG. + +endif # DEBUG_POWER + +config DEBUG_BATTERY + bool "Battery-related Debug Features" + default n + ---help--- + Enable Battery-related debug features. + +if DEBUG_BATTERY + +config DEBUG_BATTERY_ERROR + bool "Battery-related Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable battery-related error output to SYSLOG. + +config DEBUG_BATTERY_WARN + bool "Battery-related Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable battery-related warning output to SYSLOG. + +config DEBUG_BATTERY_INFO + bool "Battery-related Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable battery-related informational output to SYSLOG. + +endif # DEBUG_BATTERY + +config DEBUG_WIRELESS + bool "Wireless Debug Features" + default n + depends on WIRELESS || DRIVERS_WIRELESS + ---help--- + Enable wireless debug features. + +if DEBUG_WIRELESS + +config DEBUG_WIRELESS_ERROR + bool "Wireless Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable wireless error output to SYSLOG. + +config DEBUG_WIRELESS_WARN + bool "Wireless Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable wireless warning output to SYSLOG. + +config DEBUG_WIRELESS_INFO + bool "Wireless Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable wireless informational output to SYSLOG. + +endif # DEBUG_WIRELESS + +config DEBUG_SCHED + bool "Scheduler Debug Features" + default n + depends on !SYSLOG_TIMESTAMP + ---help--- + Enable OS scheduler debug features. + +if DEBUG_SCHED + +config DEBUG_SCHED_ERROR + bool "Scheduler Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable OS scheduler error output to SYSLOG. + +config DEBUG_SCHED_WARN + bool "Scheduler Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable OS scheduler warning output to SYSLOG. + +config DEBUG_SCHED_INFO + bool "Scheduler Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable OS scheduler informational output to SYSLOG. + +endif # DEBUG_SCHED + +config DEBUG_SYSCALL + bool "SYSCALL Debug Features" + default n + depends on LIB_SYSCALL + ---help--- + Enable very low level features related to system calls. If SYSCAL + output is enabled, this gives you basically a poor man's version of + strace. + +if DEBUG_SYSCALL + +config DEBUG_SYSCALL_ERROR + bool "SYSCALL Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable OS SYSCALL error output to SYSLOG. + +config DEBUG_SYSCALL_WARN + bool "SYSCALL Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable OS SYSCALL warning output to SYSLOG. + +config DEBUG_SYSCALL_INFO + bool "SYSCALL Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable OS SYSCALL informational output to SYSLOG. + +endif # DEBUG_SYSCALL + +comment "OS Function Debug Options" + +config DEBUG_DMA + bool "DMA Debug Features" + default n + depends on ARCH_DMA + ---help--- + Enable DMA debug features. + + Support for this debug option is architecture-specific and may not + be available for some MCUs. + +if DEBUG_DMA + +config DEBUG_DMA_ERROR + bool "DMA Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable DMA error output to SYSLOG. + +config DEBUG_DMA_WARN + bool "DMA Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable DMA warning output to SYSLOG. + +config DEBUG_DMA_INFO + bool "DMA Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable DMA informational output to SYSLOG. + +endif # DEBUG_DMA + +config DEBUG_IRQ + bool "Interrupt Controller Debug Features" + default n + ---help--- + Enable interrupt controller debug features. + + Some (but not all) architectures support debug output to verify + interrupt controller logic. If supported, then option will enable + that output. This may interfere with normal operations! You + should *not* enable interrupt controller debug unless you suspect + that here is a problem with that logic. On some platforms, this + option may even cause crashes! Use with care! + +if DEBUG_IRQ + +config DEBUG_IRQ_ERROR + bool "Interrupt Controller Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable interrupt controller error output to SYSLOG. + +config DEBUG_IRQ_WARN + bool "Interrupt Controller Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable interrupt controller warning output to SYSLOG. + +config DEBUG_IRQ_INFO + bool "Interrupt Controller Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable interrupt controller informational output to SYSLOG. + +endif # DEBUG_IRQ + +config DEBUG_PAGING + bool "Paging Debug Features" + default n + depends on PAGING + ---help--- + Enable OS demand paging debug features. + +if DEBUG_PAGING + +config DEBUG_PAGING_ERROR + bool "Paging Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable OS demand paging error output to SYSLOG. + +config DEBUG_PAGING_WARN + bool "Paging Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable OS demand paging warning output to SYSLOG. + +config DEBUG_PAGING_INFO + bool "Paging Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable OS demand paging informational output to SYSLOG. + +endif # DEBUG_PAGING + +comment "Driver Debug Options" + +config DEBUG_LCD + bool "Low-level LCD Debug Features" + default n + depends on LCD || SLCD + ---help--- + Enable LCD driver debug features. + + Support for this debug option is board-specific and may not + be available for some boards. +if DEBUG_LCD + +config DEBUG_LCD_ERROR + bool "LCD Driver Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable LCD driver error output to SYSLOG. + +config DEBUG_LCD_WARN + bool "LCD Driver Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable LCD driver warning output to SYSLOG. + +config DEBUG_LCD_INFO + bool "LCD Driver Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable LCD driver informational output to SYSLOG. + +endif # DEBUG_LCD + +config DEBUG_LEDS + bool "Low-level LED Debug Features" + default n + depends on ARCH_HAVE_LEDS || WS2812 + ---help--- + Enable LED driver debug features. + + Support for this debug option is board-specific and may not + be available for some boards. + +if DEBUG_LEDS + +config DEBUG_LEDS_ERROR + bool "LED Driver Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable LED driver error output to SYSLOG. + +config DEBUG_LEDS_WARN + bool "LED Driver Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable LED driver warning output to SYSLOG. + +config DEBUG_LEDS_INFO + bool "LED Driver Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable LED driver informational output to SYSLOG. + +endif # DEBUG_LEDS + +config DEBUG_INPUT + bool "Input Device Debug Features" + default n + depends on INPUT + ---help--- + Enable input d. + Enable low level device debug features for the input device drivers + such as mice and touchscreens (disabled by default). Support for + this debug option is board-specific and may not be available for + some boards. + +if DEBUG_INPUT + +config DEBUG_INPUT_ERROR + bool "Input Device Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable input device error output to SYSLOG. + +config DEBUG_INPUT_WARN + bool "Input Device Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable input device warning output to SYSLOG. + +config DEBUG_INPUT_INFO + bool "Input Device Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable input device informational output to SYSLOG. + +endif # DEBUG_INPUT + +config DEBUG_ANALOG + bool "Analog Device Debug Features" + default n + depends on ANALOG + ---help--- + Enable analog device debug features. + Enable low level debug features the analog device drivers such as + A/D and D/A converters (disabled by default). Support for this + debug option is architecture-specific and may not be available for + some MCUs. + +if DEBUG_ANALOG + +config DEBUG_ANALOG_ERROR + bool "Analog Device Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable analog device error output to SYSLOG. + +config DEBUG_ANALOG_WARN + bool "Analog Device Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable analog device warning output to SYSLOG. + +config DEBUG_ANALOG_INFO + bool "Analog Device Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable CAN driver informational output to SYSLOG. + +endif # DEBUG_ANALOG + +config DEBUG_CAN + bool "CAN Debug Features" + default n + depends on CAN + ---help--- + Enable CAN driver debug features. + + Support for this debug option is architecture-specific and may not + be available for some MCUs. + +if DEBUG_CAN + +config DEBUG_CAN_ERROR + bool "CAN Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable CAN driver error output to SYSLOG. + +config DEBUG_CAN_WARN + bool "CAN Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable CAN driver warning output to SYSLOG. + +config DEBUG_CAN_INFO + bool "CAN Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable CAN driver informational output to SYSLOG. + +endif # DEBUG_CAN + +config DEBUG_GPIO + bool "GPIO Debug Features" + default n + ---help--- + Enable GPIO debug features. + + Support for this debug option is architecture-specific and may not + be available for some MCUs. + +if DEBUG_GPIO + +config DEBUG_GPIO_ERROR + bool "GPIO Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable GPIO error output to SYSLOG. + +config DEBUG_GPIO_WARN + bool "GPIO Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable GPIO warning output to SYSLOG. + +config DEBUG_GPIO_INFO + bool "GPIO Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable GPIO informational output to SYSLOG. + +endif # DEBUG_GPIO + +config DEBUG_I2C + bool "I2C Debug Features" + default n + depends on I2C + ---help--- + Enable I2C debug features. + + Support for this debug option is architecture-specific and may not + be available for some MCUs. + +if DEBUG_I2C + +config DEBUG_I2C_ERROR + bool "I2C Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable I2C driver error output to SYSLOG. + +config DEBUG_I2C_WARN + bool "I2C Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable I2C driver warning output to SYSLOG. + +config DEBUG_I2C_INFO + bool "I2C Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable I2C driver informational output to SYSLOG. + +endif # DEBUG_I2C + +config DEBUG_I2S + bool "I2S Debug Features" + default n + depends on I2S + ---help--- + Enable I2S debug features. + + Support for this debug option is architecture-specific and may not + be available for some MCUs. + +if DEBUG_I2S + +config DEBUG_I2S_ERROR + bool "I2S Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable I2S driver error output to SYSLOG. + + Support for this debug option is architecture-specific and may not + be available for some MCUs. + +config DEBUG_I2S_WARN + bool "I2S Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable I2S driver warning output to SYSLOG. + +config DEBUG_I2S_INFO + bool "I2S Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable I2S driver informational output to SYSLOG. + +endif # DEBUG_I2S + +config DEBUG_I3C + bool "I3C Debug Features" + default n + depends on I3C + ---help--- + Enable I3C debug features. + + Support for this debug option is architecture-specific and may not + be available for some MCUs. + +if DEBUG_I3C + +config DEBUG_I3C_ERROR + bool "I3C Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable I3C driver error output to SYSLOG. + + Support for this debug option is architecture-specific and may not + be available for some MCUs. + +config DEBUG_I3C_INFO + bool "I3C Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable I3C driver informational output to SYSLOG. + +endif # DEBUG_I3C + +config DEBUG_PWM + bool "PWM Debug Features" + default n + depends on PWM + ---help--- + Enable PWM debug features. + + Support for this debug option is architecture-specific and may not + be available for some MCUs. + +if DEBUG_PWM + +config DEBUG_PWM_ERROR + bool "PWM Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable PWM driver error output to SYSLOG. + + Support for this debug option is architecture-specific and may not + be available for some MCUs. + +config DEBUG_PWM_WARN + bool "PWM Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable PWM driver warning output to SYSLOG. + +config DEBUG_PWM_INFO + bool "PWM Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable PWM driver informational output to SYSLOG. + +endif # DEBUG_PWM + +config DEBUG_CAPTURE + bool "CAPTURE Debug Features" + default n + depends on CAPTURE + ---help--- + Enable CAPTURE debug features. + + Support for this debug option is architecture-specific and may not + be available for some MCUs. + +if DEBUG_CAPTURE + +config DEBUG_CAPTURE_ERROR + bool "CAPTURE Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable CAPTURE driver error output to SYSLOG. + + Support for this debug option is architecture-specific and may not + be available for some MCUs. + +config DEBUG_CAPTURE_WARN + bool "CAPTURE Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable CAPTURE driver warning output to SYSLOG. + +config DEBUG_CAPTURE_INFO + bool "CAPTURE Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable CAPTURE driver informational output to SYSLOG. + +endif # DEBUG_CAPTURE + +config DEBUG_RC + bool "RC Debug Features" + default n + depends on DRIVERS_RC + ---help--- + Enable RC debug features. + + Support for this debug option is architecture-specific and may not + be available for some MCUs. + +if DEBUG_RC + +config DEBUG_RC_ERROR + bool "RC Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable RC driver error output to SYSLOG. + + Support for this debug option is architecture-specific and may not + be available for some MCUs. + +config DEBUG_RC_WARN + bool "RC Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable RC driver warning output to SYSLOG. + +config DEBUG_RC_INFO + bool "RC Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable RC driver informational output to SYSLOG. + +endif # DEBUG_RC + +config DEBUG_REGMAP + bool "REGMAP Debug Features" + default n + depends on REGMAP + ---help--- + Enable REGMAP debug features. + + Support for this debug option is architecture-specific and may not + be available for some MCUs. + +if DEBUG_REGMAP + +config DEBUG_REGMAP_ERROR + bool "Regmap Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable regmap subsystems error output to SYSLOG. + +config DEBUG_REGMAP_WARN + bool "Regmap Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable regmap subsystems warning output to SYSLOG. + +config DEBUG_REGMAP_INFO + bool "Regmap Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable regmap subsystems informational output to SYSLOG. + +endif # DEBUG_REGMAP + +config DEBUG_RMT + bool "RMT Debug Features" + default n + depends on RMT + ---help--- + Enable RMT debug features. + + Support for this debug option is architecture-specific and may not + be available for some MCUs. + +if DEBUG_RMT + +config DEBUG_RMT_ERROR + bool "RMT Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable RMT driver error output to SYSLOG. + + Support for this debug option is architecture-specific and may not + be available for some MCUs. + +config DEBUG_RMT_WARN + bool "RMT Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable RMT driver warning output to SYSLOG. + +config DEBUG_RMT_INFO + bool "RMT Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable RMT driver informational output to SYSLOG. + +endif # DEBUG_RMT + +config DEBUG_RTC + bool "RTC Debug Features" + default n + depends on RTC + ---help--- + Enable RTC debug features. + + Support for this debug option is architecture-specific and may not + be available for some MCUs. + +if DEBUG_RTC + +config DEBUG_RTC_ERROR + bool "RTC Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable RTC driver error output to SYSLOG. + + Support for this debug option is architecture-specific and may not + be available for some MCUs. + +config DEBUG_RTC_WARN + bool "RTC Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable RTC driver warning output to SYSLOG. + +config DEBUG_RTC_INFO + bool "RTC Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable RTC driver informational output to SYSLOG. + +endif # DEBUG_RTC + +config DEBUG_MEMCARD + bool "Memory Card Driver Debug Features" + default n + depends on MMCSD + ---help--- + Enable MMC/SD memory card Driver debug features. + + Support for this debug option is architecture-specific and may not + be available for some MCUs. + +if DEBUG_MEMCARD + +config DEBUG_MEMCARD_ERROR + bool "Memory Card Driver Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable MMC/SD memory card driver error output to SYSLOG. + + Support for this debug option is architecture-specific and may not + be available for some MCUs. + +config DEBUG_MEMCARD_WARN + bool "Memory Card Driver Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable MMC/SD memory card driver warning output to SYSLOG. + +config DEBUG_MEMCARD_INFO + bool "Memory Card Driver Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable MMC/SD memory card driver informational output to SYSLOG. + +endif # DEBUG_MEMCARD + +config DEBUG_SENSORS + bool "Sensor Debug Features" + default n + depends on SENSORS + ---help--- + Enable sensor driver debug features. + + Support for this debug option is architecture-specific and may not + be available for some MCUs. + +if DEBUG_SENSORS + +config DEBUG_SENSORS_ERROR + bool "Sensor Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable sensor driver error output to SYSLOG. + +config DEBUG_SENSORS_WARN + bool "Sensor Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable sensor driver warning output to SYSLOG. + +config DEBUG_SENSORS_INFO + bool "Sensor Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable sensor driver informational output to SYSLOG. + +endif # DEBUG_SENSORS + +config DEBUG_SPI + bool "SPI Debug Features" + default n + depends on SPI + ---help--- + Enable SPI debug features. + + Support for this debug option is architecture-specific and may not + be available for some MCUs. + +if DEBUG_SPI + +config DEBUG_SPI_ERROR + bool "SPI Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable SPI error output to SYSLOG. + +config DEBUG_SPI_WARN + bool "SPI Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable SPI warning output to SYSLOG. + +config DEBUG_SPI_INFO + bool "SPI Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable SPI informational output to SYSLOG. + +endif # DEBUG_SPI + +config DEBUG_THERMAL + bool "Thermal Debug Features" + default n + ---help--- + Enable thermal debug features. + +if DEBUG_THERMAL + +config DEBUG_THERMAL_ERROR + bool "Thermal Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable thermal error output to SYSLOG. + +config DEBUG_THERMAL_WARN + bool "Thermal Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable thermal warning output to SYSLOG. + +config DEBUG_THERMAL_INFO + bool "Thermal Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable thermal informational output to SYSLOG. + +endif # DEBUG_THERMAL + +config DEBUG_TIMER + bool "Timer Debug Features" + default n + ---help--- + Enable timer debug features. + + Support for this debug option is architecture-specific and may not + be available for some MCUs. + +if DEBUG_TIMER + +config DEBUG_TIMER_ERROR + bool "Timer Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable timer error output to SYSLOG. + +config DEBUG_TIMER_WARN + bool "Timer Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable timer warning output to SYSLOG. + +config DEBUG_TIMER_INFO + bool "Timer Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable timer informational output to SYSLOG. + +endif # DEBUG_TIMER + +config DEBUG_USB + bool "USB Debug Features" + default n + depends on USBDEV || USBHOST + ---help--- + Enable USB debug features. + +if DEBUG_USB + +config DEBUG_USB_ERROR + bool "USB Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable USB error output to SYSLOG. + +config DEBUG_USB_WARN + bool "USB Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable USB warning output to SYSLOG. + +config DEBUG_USB_INFO + bool "USB Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable USB informational output to SYSLOG. + +endif # DEBUG_USB + +config DEBUG_WATCHDOG + bool "Watchdog Timer Debug Features" + default n + depends on WATCHDOG + ---help--- + Enable watchdog timer debug features. + + Support for this debug option is architecture-specific and may not + be available for some MCUs. + +if DEBUG_WATCHDOG + +config DEBUG_WATCHDOG_ERROR + bool "Watchdog Timer Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable watchdog time error output to SYSLOG. + +config DEBUG_WATCHDOG_WARN + bool "Watchdog Timer Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable watchdog time warning output to SYSLOG. + +config DEBUG_WATCHDOG_INFO + bool "Watchdog Timer Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable watchdog time informational output to SYSLOG. + +endif # DEBUG_WATCHDOG + +config DEBUG_MOTOR + bool "Motor Debug Features" + default n + depends on MOTOR + ---help--- + Enable motor debug features. + +if DEBUG_MOTOR + +config DEBUG_MOTOR_ERROR + bool "Motor Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable motor error output to SYSLOG. + +config DEBUG_MOTOR_WARN + bool "Motor Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable motor warning output to SYSLOG. + +config DEBUG_MOTOR_INFO + bool "Motor Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable motor informational output to SYSLOG. + +endif # DEBUG_MOTOR + +config DEBUG_STEPPER + bool "Stepper Motor Debug Features" + default n + depends on STEPPER + ---help--- + Enable motor debug features. + +if DEBUG_STEPPER + +config DEBUG_STEPPER_ERROR + bool "Stepper Motor Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable motor error output to SYSLOG. + +config DEBUG_STEPPER_WARN + bool "Stepper Motor Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable motor warning output to SYSLOG. + +config DEBUG_STEPPER_INFO + bool "Stepper Motor Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable motor informational output to SYSLOG. + +endif # DEBUG_STEPPER + + +config DEBUG_VIDEO + bool "Video Debug Features" + default n + depends on DRIVERS_VIDEO + ---help--- + Enable video debug features. + +if DEBUG_VIDEO + +config DEBUG_VIDEO_ERROR + bool "Video Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable video error output to SYSLOG. + +config DEBUG_VIDEO_WARN + bool "Video Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable video warning output to SYSLOG. + +config DEBUG_VIDEO_INFO + bool "Video Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable video informational output to SYSLOG. + +endif # DEBUG_VIDEO + +config DEBUG_VIRTIO + bool "Virtio Debug Features" + default n + depends on DRIVERS_VIRTIO + ---help--- + Enable virtio debug features. + +if DEBUG_VIRTIO + +config DEBUG_VIRTIO_ERROR + bool "Virtio Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable virtio error output to SYSLOG. + +config DEBUG_VIRTIO_WARN + bool "Virtio Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable virtio warning output to SYSLOG. + +config DEBUG_VIRTIO_INFO + bool "Virtio Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable virtio informational output to SYSLOG. + +endif # DEBUG_VIDEO + +config DEBUG_VHOST + bool "Vhost Debug Features" + default n + depends on DRIVERS_VHOST + ---help--- + Enable vhost debug features. + +if DEBUG_VHOST + +config DEBUG_VHOST_ERROR + bool "Vhost Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable vhost error output to SYSLOG. + +config DEBUG_VHOST_WARN + bool "Vhost Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable vhost warning output to SYSLOG. + +config DEBUG_VHOST_INFO + bool "Vhost Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable vhost informational output to SYSLOG. + +endif # DEBUG_VHOST + +config DEBUG_RESET + bool "RESET Debug Features" + default n + depends on RESET + ---help--- + Enable RESET debug features. + +if DEBUG_RESET + +config DEBUG_RESET_ERROR + bool "RESET Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable RESET driver error output to SYSLOG. + +config DEBUG_RESET_INFO + bool "RESET Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable RESET driver informational output to SYSLOG. + +endif # DEBUG_RESET + +config DEBUG_IPC + bool "IPC (Interprocessor communication) Debug Features" + default n + ---help--- + Enable IPC debug features. + +if DEBUG_IPC + +config DEBUG_IPC_ERROR + bool "IPC Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable IPC error output to SYSLOG. + +config DEBUG_IPC_WARN + bool "IPC Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable IPC warning output to SYSLOG. + +config DEBUG_IPC_INFO + bool "IPC Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable IPC informational output to SYSLOG. + +endif # DEBUG_IPC + +config DEBUG_PCI + bool "PCI Debug Features" + default n + depends on PCI + ---help--- + Enable PCI driver debug features. + + Support for this debug option is architecture-specific and may not + be available for some MCUs. + +if DEBUG_PCI + +config DEBUG_PCI_ERROR + bool "PCI Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable PCI driver error output to SYSLOG. + +config DEBUG_PCI_WARN + bool "PCI Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable PCI driver warning output to SYSLOG. + +config DEBUG_PCI_INFO + bool "PCI Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable PCI driver informational output to SYSLOG. + +endif # DEBUG_PCI + +config DEBUG_RPMSG + bool "RPMSG Debug Features" + default n + depends on RPMSG + ---help--- + Enable RPMSG driver debug features. + +if DEBUG_RPMSG + +config DEBUG_RPMSG_ERROR + bool "RPMSG Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable RPMSG driver error output to SYSLOG. + +config DEBUG_RPMSG_WARN + bool "RPMSG Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable RPMSG driver warning output to SYSLOG. + +config DEBUG_RPMSG_INFO + bool "RPMSG Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable RPMSG driver informational output to SYSLOG. + +endif # DEBUG_RPMSG + +config DEBUG_CORESIGHT + bool "Coresight Debug Features" + default n + depends on CORESIGHT + ---help--- + Enable coresight debug features. + +if DEBUG_CORESIGHT + +config DEBUG_CORESIGHT_ERROR + bool "Coresight Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable coresight driver error output to SYSLOG. + +config DEBUG_CORESIGHT_WARN + bool "Coresight Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable coresight warning output to SYSLOG. + +config DEBUG_CORESIGHT_INFO + bool "Coresight Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable coresight driver informational output to SYSLOG. + +endif # DEBUG_CORESIGHT + +endif # DEBUG_FEATURES + +config ARCH_PROTECT_ZERO_ADDRESS + bool "Protect address zero" + depends on ARCH_HAVE_DEBUG + default n + ---help--- + When the program accesses address 0, it will assert automatically. + Hardware support is required, such as ARM V8M DWT watchpoint + +config ARCH_HAVE_STACKCHECK + bool + default n + +config STACK_COLORATION + bool "Stack coloration" + default n + depends on ARCH_HAVE_STACKCHECK + ---help--- + Enable stack coloration to initialize the stack memory to the value + of STACK_COLOR and enable the stack checking APIs that can be used + to monitor the level of stack usage. + + Only supported by a few architectures. + +config STACKCHECK_SOFTWARE + bool "Software detection of stack overflow" + depends on STACK_COLORATION && DEBUG_ASSERTIONS + ---help--- + When switching contexts, it will detect whether a stack overflow occurs. + Two methods are used here. + The first is to check the legitimacy of the value of the sp register; + the second is to check the specified number of bytes at the bottom of the stack. + If either of these two methods fails, an ASSERT will be triggered. + +config STACKCHECK_MARGIN + int "Stack overflow check size (bytes)" + depends on STACKCHECK_SOFTWARE + default 16 + ---help--- + Specifies the number of bytes at the end of the stack to check for overflow. + A value of 0 disables additional checking. Increase this value for stricter + overflow detection, at the cost of additional overhead. + +config STACK_CANARIES + bool "Compiler stack canaries" + depends on ARCH_HAVE_STACKCHECK + default n + ---help--- + This option enables compiler stack canaries. + If stack canaries are supported by the compiler, it will emit + extra code that inserts a canary value into the stack frame when + a function is entered and validates this value upon exit. + Stack corruption (such as that caused by buffer overflow) results + in a fatal error condition for the running entity. + Enabling this option can result in a significant increase + in footprint and an associated decrease in performance. + +choice STACK_CANARIES_LEVEL + prompt "Stack Canaries Level Configuration" + default STACK_PROTECTOR_ALL + depends on STACK_CANARIES + ---help--- + Based on the configuration options, configure the stack Canaries Level. + +config STACK_PROTECTOR + bool "-fstack-protector" + ---help--- + Enable basic stack protection. + +config STACK_PROTECTOR_STRONG + bool "-fstack-protector-strong" + ---help--- + Using stronger stack protection mechanisms may involve more complex + security checks. + +config STACK_PROTECTOR_ALL + bool "-fstack-protector-all" + ---help--- + Enable stack protection for all functions, including those that are + typically not protected. + +config STACK_PROTECTOR_EXPLICIT + bool "-fstack-protector-explicit" + ---help--- + Enable stack protection only for functions explicitly marked as + requiring stack protection. + +endchoice # Stack Canaries Level Configuration + +config STACK_CANARIES_LEVEL + string + default "-fstack-protector" if STACK_PROTECTOR + default "-fstack-protector-strong" if STACK_PROTECTOR_STRONG + default "-fstack-protector-all" if STACK_PROTECTOR_ALL + default "-fstack-protector-explicit" if STACK_PROTECTOR_EXPLICIT + depends on STACK_CANARIES + +config STACK_USAGE + bool "Generate stack usage information" + ---help--- + Generate an extra file that specifies the maximum amount of stack used, + on a per-function basis. Please use https://github.com/HBehrens/puncover + or tools/showstack.sh to generate the more useful report. + +config STACK_USAGE_WARNING + int "Detect use of large stack variables" + default 0 + ---help--- + Set the stack warning threshold, if the stack usage exceeds the + threshold, a warning will be generated + +config ARCH_HAVE_HEAPCHECK + bool + default n + +config HEAP_COLORATION + bool "Heap coloration" + default n + depends on ARCH_HAVE_HEAPCHECK + ---help--- + Enable heap coloration to check heap usage. Only supported by a few + architectures. + +config DEBUG_SYMBOLS + bool "Generate Debug Symbols" + default n + ---help--- + Build with debug symbols (needed for use with a debugger). + +config DEBUG_SYMBOLS_LEVEL + string "Custom symbols level" + depends on DEBUG_SYMBOLS + default "-g" + ---help--- + This string represents the custom symbol level that will be + used if DEBUG_SYMBOLS. + +config FRAME_POINTER + bool "Compile the NuttX with frame pointers" + default n + ---help--- + If you say Y here the resulting NuttX image will be slightly + larger and slower, but it gives very useful debugging information + in case of bugs. + +endmenu # Debug Options \ No newline at end of file diff --git a/Kconfig.license b/Kconfig.license new file mode 100644 index 0000000000..6064c1c372 --- /dev/null +++ b/Kconfig.license @@ -0,0 +1,72 @@ + + +config ALLOW_BSD_COMPONENTS + bool "Use components that have BSD licenses" + default n + ---help--- + When this option is enabled the project will allow the use + of components that have BSD licenses. + + NOTE: Please check that the license for each enabled + component matches your project license. + + NOTE: If this option is not set the following components + are not included in the setup menu: + Crypto + AES cypher support + FS + NFS client file system + SPIFFS File System + Wireless + Bluetooth LE support + +config ALLOW_GPL_COMPONENTS + bool "Use components that have GPL/LGPL licenses" + default n + ---help--- + When this option is enabled the project will allow the use + of components that have GPL/LGPL licenses. + + NOTE: Please check that the license for each enabled + component matches your project license. + +config ALLOW_MIT_COMPONENTS + bool "Use components that have MIT licenses" + default n + ---help--- + When this option is enabled the project will allow the use + of components that have MIT licenses. + + NOTE: Please check that the license for each enabled + component matches your project license. + +config ALLOW_BSDNORDIC_COMPONENTS + bool "Use components that have 5-Clause Nordic licenses" + depends on ARCH_CHIP_NRF52 || ARCH_CHIP_NRF53 || ARCH_CHIP_NRF91 + default n + ---help--- + When this option is enabled the project will allow the use + of components that have 5-Clause Nordic licenses. + + NOTE: Please check that the license for each enabled + component matches your project license. + +config ALLOW_ECLIPSE_COMPONENTS + bool "Use components that have Eclipse Public Licenses" + default n + ---help--- + When this option is enabled the project will allow the use + of components that have EPL licenses. + + NOTE: Please check that the license for each enabled + component matches your project license. + +config ALLOW_ICS_COMPONENTS + bool "Use components that have ICS license" + default n + ---help--- + When this option is enabled the project will allow the use + of components that have ICS licenses. + + NOTE: Please check that the license for each enabled + component matches your project license. \ No newline at end of file diff --git a/Kconfig.setup b/Kconfig.setup new file mode 100644 index 0000000000..dda841f711 --- /dev/null +++ b/Kconfig.setup @@ -0,0 +1,506 @@ +menu "Build Setup" + +config EXPERIMENTAL + bool "Show experimental options" + ---help--- + Some features and drivers are considered "experimental" or + development/work-in-progress status. By default, these options are + hidden in the Kconfig menus. Enabling "Show experimental options" + makes these options visible and makes it possible to enable them. + +config DEFAULT_SMALL + bool "Default to smallest size" + default n + ---help--- + When options are present, the default value for certain options will + be the one the results in the smallest size (at a loss of features). + The default is a fuller feature set at a larger size. + + NOTE: This option does not prevent you from overriding the default + to select another alternative. Nor does it affect the settings that + have already been selected in your configuration file. This applies + only to new settings that require a default value. + +choice + prompt "Build Host Platform" + default HOST_LINUX + +config HOST_LINUX + bool "Linux" + +config HOST_MACOS + bool "macOS" + +endchoice # Build Host Platform + +choice + prompt "Windows Build Environment" + default WINDOWS_MSYS + depends on HOST_WINDOWS + +config WINDOWS_MSYS + bool "MSYS or MSYS2" + select TOOLCHAIN_WINDOWS + ---help--- + Build natively in a Cygwin environment with POSIX style paths (like + /cygdrive/c/cygwin/home) + +endchoice # Windows Build Environment + +menu "Build Configuration" + +config BASE_DEFCONFIG + string "Base Configuration" + default "" + ---help--- + This will be automatically be updated by the configuration + script. This is the base configuration file that was used to create the + current configuration. It is useful for getting the current configuration + on runtime. + +config MODULES + bool + option modules + ---help--- + Automatically selected if KERNEL build is selected. + This selection marks the implementation of Kconfig + to enable the module build function, and is used to + enable 'm' in the triate state. Its semantics are + consistent with Kernel. This selection also effects + the behavior of the 'make export' target and currently + has no effect unless you wish to build loadable applications + in a FLAT build. + +choice + prompt "Memory organization" + default BUILD_FLAT + +config BUILD_FLAT + bool "Flat address space" + ---help--- + Build NuttX as one large, executable "blob". All of the code + within the blob can interrupt with all of the other code within + the blob. There are no special privileges, protections, or + restraints. + +config BUILD_PROTECTED + bool "NuttX protected build" + depends on ARCH_USE_MPU + select LIB_SYSCALL + select BUILD_2PASS + ---help--- + Builds NuttX and selected applications as two "blobs": A protected, + privileged kernel blob and a separate unprivileged, user blob. This + requires use of the two pass build with each blob being build on + each pass. + + NOTE: This build configuration requires that the platform support + a memory protection unit (MPU). Support, however, may not be + implemented on all platforms. + +config BUILD_KERNEL + bool "NuttX kernel build" + depends on ARCH_USE_MMU && ARCH_ADDRENV + select LIB_SYSCALL + select MODULES + ---help--- + Builds NuttX as a separately compiled kernel. No applications are + built. All user applications must reside in a file system where + they can be loaded into memory for execution. + + NOTE: This build configuration requires that the platform support + a memory management unit (MMU) and address environments. Support, + however, may not be implemented on all platforms. + +endchoice # Build configuration + +config BUILD_PIC + bool "NuttX PIC build" + default n + ---help--- + Builds NuttX with position-independent code (PIC). This will allow + load NuttX into memory at any address and run it. + +endmenu # Build Setup + +menu "Customize Header Files" + +config ARCH_HAVE_STDINT_H + bool + default n + ---help--- + Selected by architecture specific logic if the architecture provides + a stdint.h header file. + +config ARCH_STDINT_H + bool "stdint.h" + default n + depends on ARCH_HAVE_STDINT_H + ---help--- + The stdint.h header file can be found at nuttx/include/stdint.h. + However, that header includes logic to redirect the inclusion of an + architecture specific header file like: + + #ifdef CONFIG_ARCH_STDINT_H + # include + #else + ... + #endif + + Recall that that include path, include/arch, is a symbolic link and + will refer to a version of stdint.h at nuttx/arch//include/stdint.h. + +config ARCH_HAVE_STDBOOL_H + bool + default n + ---help--- + Selected by architecture specific logic if the architecture provides + a stdbool.h header file. + +config ARCH_STDBOOL_H + bool "stdbool.h" + default n + depends on ARCH_HAVE_STDBOOL_H + ---help--- + The stdbool.h header file can be found at nuttx/include/stdbool.h. + However, that header includes logic to redirect the inclusion of an + architecture specific header file like: + + #ifdef CONFIG_ARCH_STDBOOL_H + # include + #else + ... + #endif + + Recall that that include path, include/arch, is a symbolic link and + will refer to a version of stdbool.h at nuttx/arch//include/stdbool.h. + +config ARCH_HAVE_MATH_H + bool + default n + ---help--- + Selected by architecture specific logic if the architecture provides + a math.h header file. + +config ARCH_MATH_H + bool "math.h" + depends on ARCH_HAVE_MATH_H + default n + ---help--- + There is also a re-directing version of math.h in the source tree. + However, it resides out-of-the-way at include/nuttx/lib/math.h because it + conflicts too often with the system math.h. If ARCH_MATH_H=y is + defined, however, the top-level makefile will copy the redirecting + math.h header file from include/nuttx/lib/math.h to include/math.h. math.h + will then include the architecture-specific version of math.h that you + must provide at nuttx/arch/>architecture + #endif + + So for the architectures that define ARCH_MATH_H=y, include/math.h + will be the redirecting math.h header file; for the architectures + that don't select ARCH_MATH_H, the redirecting math.h header file + will stay out-of-the-way in include/nuttx/. + +config ARCH_FLOAT_H + bool "float.h" + default n + ---help--- + The float.h header file defines the properties of your floating + point implementation. It would always be best to use your + toolchain's float.h header file but if none is available, a default + float.h header file will provided if this option is selected. However + there is no assurance that the settings in this float.h are actually + correct for your platform! + +config DISABLE_FLOAT + bool "Disable floating point" + default n + ---help--- + Disable floating point support in the compiler. This will reduce + code size and increase performance. This option is only available + on some architectures. + +config ARCH_HAVE_STDARG_H + bool + default n + ---help--- + Selected by architecture specific logic if the architecture provides + a math.h header file. + +config ARCH_STDARG_H + bool "stdarg.h" + depends on ARCH_HAVE_STDARG_H + default n + ---help--- + There is a redirecting version of stdarg.h in the source tree. It + resides out-of-the-way at include/nuttx/lib/stdarg.h. This is + because you should normally use your toolchain's stdarg.h file. But + sometimes, your toolchain's stdarg.h file may have other header + file dependencies and so may not be usable in the NuttX build + environment. In those cases, you may have to create a architecture- + specific stdarg.h header file at nuttx/arch//include/stdarg.h + + If ARCH_STDARG_H=y is defined, the top-level makefile will copy the + re-directing stdarg.h header file from include/nuttx/lib/stdarg.h to + include/stdarg.h. So for the architectures that cannot use their + toolchain's stdarg.h file, they can use this alternative by defining + ARCH_STDARG_H=y and providing. If ARCH_STDARG_H, is not defined, then + the stdarg.h header file will stay out-of-the-way in include/nuttx/. + +config ARCH_HAVE_SETJMP + bool + default n + +config ARCH_SETJMP_H + bool "setjmp.h" + default n + depends on ARCH_HAVE_SETJMP + ---help--- + There is a redirecting version of setjmp.h in the source tree. It + resides out-of-the-way at include/nuttx/lib/setjmp.h. This is + because you should normally use your toolchain's setjmp.h file. But + sometimes, your toolchain's setjmp.h file may have other header + file dependencies and so may not be usable in the NuttX build + environment. In those cases, you may have to create a architecture- + specific setjmp.h header file at nuttx/arch//include/setjmp.h + + If ARCH_SETJMP_H=y is defined, the top-level makefile will copy the + re-directing setjmp.h header file from include/nuttx/lib/setjmp.h to + include/setjmp.h. So for the architectures that cannot use their + toolchain's setjmp.h file, they can use this alternative by defining + ARCH_SETJMP_H=y and providing. If ARCH_SETJMP_H, is not defined, then + the setjmp.h header file will stay out-of-the-way in include/nuttx/. + +choice + prompt "debug.h selection" + default ARCH_NONE_DEBUG_H + +config ARCH_NONE_DEBUG_H + bool "None" + ---help--- + No debug.h under include/arch/ and include/arch/chip. + +config ARCH_DEBUG_H + bool "debug.h" + ---help--- + The debug.h under include/arch contains architecture dependent debugging primitives + +config ARCH_CHIP_DEBUG_H + bool "chip debug.h" + ---help--- + The debug.h under include/arch/chip contains architecture dependent debugging primitives + +config ARCH_BOARD_DEBUG_H + bool "board debug.h" + ---help--- + The debug.h under include/arch/board contains board dependent debugging primitives + +endchoice # debug.h selection + +endmenu # Customize Header Files + +source "Kconfig.debug" + +menuconfig TRACE + bool "Enable tracepoints" + default n + depends on SCHED_INSTRUMENTATION_DUMP + ---help--- + If this option is enabled, tracepoints at critical code in + the kernel will be enabled. + +if TRACE +config TRACE_APP + bool "Enable tracepoints in app" + default n + +config TRACE_ARCH + bool "Enable tracepoints in arch" + default n + +config TRACE_AUDIO + bool "Enable tracepoints in audio" + default n + +config TRACE_BOARDS + bool "Enable tracepoints in boards" + default n + +config TRACE_CRYPTO + bool "Enable tracepoints in crypto" + default n + +config TRACE_DRIVERS + bool "Enable tracepoints in drivers" + default n + +config TRACE_FS + bool "Enable tracepoints in fs" + default n + +if TRACE_FS +menu "Trace Fs Support" + +config TRACE_LITTLEFS_FS + bool "Enable tracepoints in littlefs" + default n + +config TRACE_ROMFS_FS + bool "Enable tracepoints in romfs" + default n + +config TRACE_RPMSGFS_FS + bool "Enable tracepoints in rpmsgfs" + default n + +endmenu # Trace Fs Support +endif + +config TRACE_GRAPHICS + bool "Enable tracepoints in graphics" + default n + +config TRACE_INPUT + bool "Enable tracepoints in input" + default n + +config TRACE_LIBS + bool "Enable tracepoints in libs" + default n + +config TRACE_MM + bool "Enable tracepoints in mm" + default n + +config TRACE_NET + bool "Enable tracepoints in net" + default n + +config TRACE_SCHED + bool "Enable tracepoints in sched" + default n + +config TRACE_VIDEO + bool "Enable tracepoints in video" + default n + +config TRACE_WIRELESS + bool "Enable tracepoints in wireless" + default n + +endif #TRACE + +choice + prompt "Optimization Level" + default DEBUG_NOOPT if DEBUG_SYMBOLS + default DEBUG_FULLOPT if !DEBUG_SYMBOLS + +config DEBUG_NOOPT + bool "Suppress Optimization" + ---help--- + Build without optimization. This is often helpful when debugging code. + +config DEBUG_CUSTOMOPT + bool "Custom Optimization" + depends on ARCH_HAVE_CUSTOMOPT + ---help--- + Select a custom debug level. This is often helpful if you suspect an + optimization level error and want to lower the level of optimization. + +config DEBUG_FULLOPT + bool "Normal, Full optimization" + ---help--- + Build full optimization. This is the normal case for production + firmware. + +endchoice # Optimization Level + +config DEBUG_OPTLEVEL + string "Custom Optimization Level" + default "/O2" if HOST_WINDOWS + default "-O2" + depends on DEBUG_CUSTOMOPT + ---help--- + This string represents the custom optimization level that will be + used if DEBUG_CUSTOMOPT. + +choice + prompt "Link Time Optimization (LTO)" + default LTO_NONE + ---help--- + This option enables Link Time Optimization (LTO), which allows the + compiler to optimize binaries globally. + + If unsure, select LTO_NONE. Note that LTO is very resource-intensive + so it's disabled by default. + +config LTO_NONE + bool "None" + ---help--- + Build the kernel normally, without Link Time Optimization (LTO). + +config LTO_FULL + bool "GNU Full LTO (EXPERIMENTAL)" + depends on ARCH_TOOLCHAIN_GNU + ---help--- + Link time optimization is implemented as a GCC front end for a bytecode + bytecode representation of GIMPLE that is emitted in special sections + of .o files. Currently, LTO support is enabled in most ELF-based systems, + as well as darwin, cygwin and mingw systems. + +config LTO_THIN + bool "Clang ThinLTO (EXPERIMENTAL)" + depends on ARCH_TOOLCHAIN_CLANG + ---help--- + This option enables Clang's ThinLTO, which allows for parallel + optimization and faster incremental compiles compared to the + CONFIG_LTO_FULL option. More information can be found + from Clang's documentation: + + https://clang.llvm.org/docs/ThinLTO.html + + If unsure, say Y. +endchoice + +config DEBUG_OPT_UNUSED_SECTIONS + bool "Optimization to eliminate the unused input sections" + default y + depends on ARCH_TOOLCHAIN_GNU + ---help--- + Use these options on systems where the linker can perform optimizations + to improve locality of reference in the instruction space. Most systems + using the ELF object format have linkers with such optimizations. + + Enable this option to optimization the unused input sections with the + linker by compiling with " -ffunction-sections -fdata-sections ", and + linking with " --gc-sections ". + +config DEBUG_LINK_WHOLE_ARCHIVE + bool "Force every object to be included in the resulting shared library." + default n + depends on DEBUG_OPT_UNUSED_SECTIONS + ---help--- + Selecting this option will pass "--whole-archive" to ld + when linking NuttX ELF. + +config DEBUG_LINK_MAP + bool "Generate link map file" + default y + ---help--- + Selecting this option will pass "-Map=$(TOPDIR)$(DELIM)nuttx.map" to ld + when linking NuttX ELF. That file can be useful for verifying + and debugging magic section games, and for seeing which + pieces of code get eliminated with DEBUG_OPT_UNUSED_SECTIONS. + +config CCACHE + bool "Use ccache" + default n + ---help--- + If enabled, ccache will be used during the build. + Build artifacts will be cached to a local storage, considerably + reducing build times. + +endmenu # Build Setup \ No newline at end of file diff --git a/Makefile b/Makefile index ac65abe112..f2b17cb2c2 100644 --- a/Makefile +++ b/Makefile @@ -20,23 +20,188 @@ # ############################################################################ -# Check if the system has been configured -ifeq ($(wildcard .config),) -.DEFAULT default: - @echo "NuttX has not been configured!" - @echo "To configure the project:" - @echo " tools/configure.sh " - @echo "For a list of available configurations:" - @echo " tools/configure.sh -L" +############################################################################ +# NXBASE - Mandatory variable. Gets exported to all sub-makes. +# +# The NXBASE variable should always point to the top-level NuttX directory. +# Ideally, it should be exported as an envvar rather than being set as +# argument to make. +# +# Example: +# ~/.bashrc: export NXBASE=/path/to/nuttx +# ~/.zshrc: export NXBASE=/path/to/nuttx +############################################################################ + +ifeq ($(realpath ${NXBASE}),) + $(error Build stopped, NXBASE required) else -include .config + export NXBASE +endif -# Include the correct Makefile for the selected architecture. +############################################################################ +# NXOUT - Mandatory variable. Gets exported to all sub-makes. +# +# The NXOUT variable defines the output directory for the build. +# It is infered to the default ${NXBASE}/build directory. This path +# is reserved by the NuttX build system. +############################################################################ -ifeq ($(CONFIG_WINDOWS_NATIVE),y) -include tools/Win.mk +NXOUT ?= $(realpath ${NXBASE}/build) +export NXOUT + +############################################################################ +# ARCH - Mandatory variable. Gets exported. Mainly used in Kconfig. +# +# Rather than depending on the Kconfig system to set the architecture, +# which still needs initial manual setup, the architecture can be set +# ahead of time. This still require setting the arch manually, but avoids +# relying on Kconfig to do so. This greatly simplifies Kconfig "tree". +# +# The architecture must be resolved early on in the build system. the +# supported architectures are stored in the ARCHS variable. +############################################################################ + +ARCHS := arm risc-v sim + +ifeq (${ARCH},) + $(error Build stopped, ARCH not set) +endif + +ifeq ($(findstring ${ARCH}, ${ARCHS}),) + $(info Currently supported ARCHS: ${ARCHS}) + $(error Build stopped, ARCH not supported) +endif + +export ARCH + +TOOLCHAIN ?= gcc +TOOLCHAIN := ${NXBASE}/tools/${ARCH}/toolchain/${TOOLCHAIN}.defs +ifeq ($(realpath ${TOOLCHAIN}),) + $(error Build stopped, TOOLCHAIN not found) else -include tools/Unix.mk + export TOOLCHAIN endif + +# Force the BCFG to always be passed to build process. +# This new Environment variable defines the board:config to be used. + +ifndef BCFG + $(info ERROR: Board configuration not set) + $(error Build stopped, BCFG required.) endif + +# BDIR variable sets the board directory. +# It can be implied if the build starts from the board directory. + +BDIR ?= ${CURDIR} +ifeq ($(realpath ${BDIR}/configs/${BCFG}),) + $(error Build stopped, BDIR:BCFG config invalid) +endif + +# Control build verbosity +# +# V=0: Exit silent mode +# V=1,2: Enable echo of commands +# V=2: Enable bug/verbose options in tools and scripts + +ifeq ($(V),) + MAKE := $(MAKE) -s --no-print-directory +endif + +ifeq ($(V),1) + export Q := +else ifeq ($(V),2) + export Q := +else + export Q := @ +endif + +# Kconfiglib the only option + +.PHONY: menuconfig savedefconfig oldconfig olddefconfig defconfig genconfig + +KCONFIG_CONFIG = ${NXOUT}/.config +KCONFIG_AUTOHEADER = ${NXOUT}/config.h + +KCONFIG_ENV := KCONFIG_CONFIG=${KCONFIG_CONFIG} +KCONFIG_ENV += KCONFIG_AUTOHEADER=${KCONFIG_AUTOHEADER} +KCONFIG_ENV += ARCH=${ARCH} + +KCONFIG_OLDCONFIG = oldconfig +KCONFIG_OLDDEFCONFIG = olddefconfig +KCONFIG_MENUCONFIG = menuconfig +KCONFIG_SAVEDEFCONFIG = savedefconfig +KCONFIG_GENCONFIG = genconfig +KCONFIG_DEFCONFIG = defconfig + +.PHONY: ${KCONFIG_CONFIG} +${KCONFIG_CONFIG}: + $(Q) [ -f ${KCONFIG_CONFIG} ] || \ + ${KCONFIG_ENV} ${KCONFIG_DEFCONFIG} ${BDIR}/configs/${BCFG}/defconfig + +.PHONY: ${KCONFIG_AUTOHEADER} +${KCONFIG_AUTOHEADER}: + $(Q) ${KCONFIG_ENV} ${KCONFIG_GENCONFIG} + +menuconfig: ${KCONFIG_CONFIG} + $(Q) ${KCONFIG_ENV} ${KCONFIG_MENUCONFIG} + +savedefconfig: + $(Q) ${KCONFIG_ENV} ${KCONFIG_SAVEDEFCONFIG} + +oldconfig: + $(Q) ${KCONFIG_ENV} ${KCONFIG_OLDCONFIG} + +olddefconfig: + $(Q) ${KCONFIG_ENV} ${KCONFIG_OLDDEFCONFIG} + +defconfig: + $(Q) ${KCONFIG_ENV} ${KCONFIG_DEFCONFIG} + +genconfig: ${KCONFIG_CONFIG} + $(Q) ${KCONFIG_ENV} ${KCONFIG_GENCONFIG} + +############################################################################ +# Here starts the rules definition for building NuttX libraries +############################################################################ +include ${KCONFIG_CONFIG} + +MAKE_INC := -f ${KCONFIG_CONFIG} +MAKE_INC += -f ${NXBASE}/tools/Config.mk + +.PHONY: libarch +TARGETS := libarch +libarch: ${KCONFIG_CONFIG} ${KCONFIG_AUTOHEADER} + $(Q) ${MAKE} ${MAKE_INC} -f Makefile -C arch/${ARCH} all + + + +ifeq (${CONFIG_AUDIO},y) +.PHONY: libaudio +TARGETS += libaudio +libaudio: ${KCONFIG_CONFIG} ${KCONFIG_AUTOHEADER} + $(Q) ${MAKE} ${MAKE_INC} -f Makefile -C audio all +endif + +ifeq (${CONFIG_CRYPTO},y) +.PHONY: libcrypto +TARGETS += libcrypto +libcrypto: ${KCONFIG_CONFIG} ${KCONFIG_AUTOHEADER} + $(Q) ${MAKE} ${MAKE_INC} -f Makefile -C crypto all +endif + +.PHONY: libbinfmt +TARGETS += libbinfmt +libbinfmt: ${KCONFIG_CONFIG} ${KCONFIG_AUTOHEADER} + $(Q) ${MAKE} ${MAKE_INC} -f Makefile -C binfmt all + +# Support for ROMFS image creation + +ifeq (${CONFIG_FS_ROMFS},y) + ifdef ROMFSIMG + TARGETS += ${ROMFSIMG} + else + $(error ROMFSIMG is not defined by the board Makefile) + endif +endif \ No newline at end of file diff --git a/VERSION b/VERSION new file mode 100644 index 0000000000..7b4c9a9733 --- /dev/null +++ b/VERSION @@ -0,0 +1,4 @@ +VERSION_MAJOR = 12 +VERSION_MINOR = 10 +PATCH = 0 +EXTRAVERSION = \ No newline at end of file diff --git a/arch/CMakeLists.txt b/arch/CMakeLists.txt deleted file mode 100644 index 287370dd04..0000000000 --- a/arch/CMakeLists.txt +++ /dev/null @@ -1,41 +0,0 @@ -# ############################################################################## -# arch/CMakeLists.txt -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more contributor -# license agreements. See the NOTICE file distributed with this work for -# additional information regarding copyright ownership. The ASF licenses this -# file to you under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy of -# the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. -# -# ############################################################################## -# Declare arch library. In contrast to other user/kernel pairs built in KERNEL -# mode, on arch/ the "user" portion uses a different set of sources than the -# kernel portion. To keep things simple the naming k is not used. Instead, -# the "user" portion is named "arch_interface". - -nuttx_add_kernel_library(arch) -target_include_directories(arch PRIVATE ${CMAKE_SOURCE_DIR}/sched) - -if(CONFIG_BUILD_PROTECTED) - nuttx_add_system_library(arch_interface) - file(TOUCH "${CMAKE_CURRENT_BINARY_DIR}/empty.c") - target_sources(arch_interface PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/empty.c") - target_include_directories(arch_interface PRIVATE ${CMAKE_SOURCE_DIR}/sched) -endif() - -# TODO: move this higher up ifeq ($(CONFIG_SCHED_INSTRUMENTATION_SYSCALL),y) -# EXTRALINKCMDS += @$(TOPDIR)/syscall/syscall_wraps.ldcmd endif - -# include corresponding arch subdirectory -add_subdirectory(${CONFIG_ARCH}) diff --git a/arch/Kconfig b/arch/Kconfig index fe609c1d69..627e20e511 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -3,281 +3,7 @@ # see the file kconfig-language.txt in the NuttX tools repository. # -choice - prompt "CPU Architecture" - default ARCH_ARM - -config ARCH_ARM - bool "ARM" - select ARCH_HAVE_BACKTRACE - select ARCH_HAVE_INTERRUPTSTACK - select ARCH_HAVE_FORK - select ARCH_HAVE_STACKCHECK - select ARCH_HAVE_CUSTOMOPT - select ARCH_HAVE_STDARG_H - select ARCH_HAVE_SETJMP if !ARCH_TOOLCHAIN_IAR - select ARCH_HAVE_SYSCALL_HOOKS - select ARCH_HAVE_RDWR_MEM_CPU_RUN - select ARCH_HAVE_TCBINFO - select ARCH_HAVE_THREAD_LOCAL - ---help--- - The ARM architectures - -config ARCH_ARM64 - bool "ARM64" - select ALARM_ARCH - select ARCH_HAVE_BACKTRACE - select ARCH_HAVE_INTERRUPTSTACK - select ARCH_HAVE_FORK if !BUILD_KERNEL - select ARCH_HAVE_STACKCHECK - select ARCH_HAVE_CUSTOMOPT - select ARCH_HAVE_STDARG_H - select ARCH_HAVE_SETJMP - select ARCH_HAVE_SYSCALL_HOOKS - select ARCH_HAVE_RDWR_MEM_CPU_RUN - select ARCH_HAVE_TCBINFO - select ARCH_HAVE_THREAD_LOCAL - select ARCH_HAVE_PERF_EVENTS - select ONESHOT - select LIBC_ARCH_ELF_64BIT if LIBC_ARCH_ELF - ---help--- - The ARM64 architectures - -config ARCH_AVR - bool "AVR" - select ARCH_NOINTC - select ARCH_HAVE_INTERRUPTSTACK - select ARCH_HAVE_CUSTOMOPT - ---help--- - Atmel 8-bit bit AVR and 32-bit AVR32 architectures - -config ARCH_HC - bool "Freescale HC" - select ARCH_NOINTC - select ARCH_HAVE_INTERRUPTSTACK - ---help--- - Freescale HC architectures (M9S12) - -config ARCH_MIPS - bool "MIPS" - select ARCH_HAVE_INTERRUPTSTACK - select ARCH_HAVE_CUSTOMOPT - ---help--- - MIPS architectures (PIC32) - -config ARCH_MISOC - bool "MISOC" - select ARCH_HAVE_INTERRUPTSTACK - select ARCH_HAVE_CUSTOMOPT - select ARCH_HAVE_STDARG_H - ---help--- - MISOC - -config ARCH_RENESAS - bool "Renesas" - select ARCH_NOINTC - select ARCH_HAVE_INTERRUPTSTACK - ---help--- - Renesas architectures (SH and M16C). - -config ARCH_RISCV - bool "RISC-V" - select ARCH_HAVE_BACKTRACE - select ARCH_HAVE_CPUINFO - select ARCH_HAVE_INTERRUPTSTACK - select ARCH_HAVE_STACKCHECK - select ARCH_HAVE_FORK - select ARCH_HAVE_CUSTOMOPT - select ARCH_HAVE_SETJMP - select ARCH_HAVE_STDARG_H - select ARCH_HAVE_SYSCALL_HOOKS - select ARCH_HAVE_RDWR_MEM_CPU_RUN - select ARCH_HAVE_TCBINFO - select ARCH_HAVE_THREAD_LOCAL - select ARCH_HAVE_POWEROFF - select ARCH_HAVE_LAZYFPU if ARCH_HAVE_FPU - select ARCH_HAVE_CPUID_MAPPING if ARCH_HAVE_MULTICPU - ---help--- - RISC-V 32 and 64-bit RV32 / RV64 architectures. - -config ARCH_SIM - bool "Simulation" - select ARCH_HAVE_BACKTRACE - select ARCH_HAVE_MULTICPU if !CONFIG_WINDOWS_NATIVE - select ARCH_HAVE_RTC_SUBSECONDS - select ARCH_HAVE_SERIAL_TERMIOS - select ARCH_HAVE_SYSCALL_HOOKS - select ARCH_HAVE_TICKLESS - select ARCH_HAVE_POWEROFF - select ARCH_HAVE_TESTSET - select ARCH_HAVE_FORK if !HOST_WINDOWS - select ARCH_HAVE_SETJMP - select ARCH_HAVE_CUSTOMOPT - select ARCH_HAVE_TCBINFO - select ARCH_HAVE_TEXT_HEAP - select ARCH_SETJMP_H - select ALARM_ARCH - select ONESHOT - select SERIAL_CONSOLE - select SERIAL_IFLOWCONTROL - select SCHED_HPWORK - select ARCH_HAVE_CPUINFO - ---help--- - Linux/Cygwin user-mode simulation. - -config ARCH_X86 - bool "x86" - select ARCH_HAVE_TCBINFO - ---help--- - Intel x86 architectures. - -config ARCH_X86_64 - bool "x86_64" - select ARCH_HAVE_TCBINFO - select ARCH_HAVE_FPU - select ARCH_HAVE_DPFPU - select ARCH_HAVE_MULTICPU - select ARCH_HAVE_TESTSET - select ARCH_HAVE_INTERRUPTSTACK - select ARCH_HAVE_CUSTOMOPT - select ARCH_HAVE_THREAD_LOCAL - select PCI_LATE_DRIVERS_REGISTER if PCI - select LIBC_ARCH_ELF_64BIT if LIBC_ARCH_ELF - select ARCH_TOOLCHAIN_GNU - select ARCH_HAVE_BACKTRACE - select ARCH_HAVE_FORK if !BUILD_KERNEL - select ARCH_HAVE_SETJMP - select ARCH_HAVE_PERF_EVENTS - ---help--- - x86-64 architectures. - -config ARCH_XTENSA - bool "Xtensa" - select ARCH_HAVE_BACKTRACE - select ARCH_HAVE_CPUINFO - select ARCH_HAVE_INTERRUPTSTACK - select ARCH_HAVE_STACKCHECK - select ARCH_HAVE_CUSTOMOPT - select ARCH_HAVE_THREAD_LOCAL - select ARCH_HAVE_TCBINFO - select ARCH_HAVE_STDARG_H - select ARCH_HAVE_SETJMP if ARCH_TOOLCHAIN_GNU - select ARCH_HAVE_SYSCALL_HOOKS - select ARCH_HAVE_PERF_EVENTS - ---help--- - Cadence® Tensilica® Xtensa® actictures. - -config ARCH_Z16 - bool "ZNEO" - select ARCH_HAVE_HEAP2 - ---help--- - ZiLOG ZNEO 16-bit architectures (z16f). - -config ARCH_Z80 - bool "z80" - select ARCH_HAVE_HEAP2 - ---help--- - ZiLOG 8-bit architectures (z80, ez80, z8). - -config ARCH_OR1K - bool "OpenRISC" - ---help--- - OpenRISC architectures. - -config ARCH_SPARC - bool "SPARC" - select ARCH_HAVE_INTERRUPTSTACK - select ARCH_HAVE_CUSTOMOPT - select ARCH_HAVE_TCBINFO - ---help--- - SPARC architectures (SPARC V8) - -config ARCH_TRICORE - bool "Infineon TriCore" - select ARCH_HAVE_INTERRUPTSTACK - select ARCH_HAVE_STACKCHECK - select ARCH_HAVE_CUSTOMOPT - select ARCH_HAVE_TCBINFO - ---help--- - Infineon 32-bit AURIX TriCore architectures - -endchoice - -config ARCH - string - default "arm" if ARCH_ARM - default "arm64" if ARCH_ARM64 - default "avr" if ARCH_AVR - default "hc" if ARCH_HC - default "mips" if ARCH_MIPS - default "misoc" if ARCH_MISOC - default "renesas" if ARCH_RENESAS - default "risc-v" if ARCH_RISCV - default "sim" if ARCH_SIM - default "x86" if ARCH_X86 - default "x86_64" if ARCH_X86_64 - default "xtensa" if ARCH_XTENSA - default "z16" if ARCH_Z16 - default "z80" if ARCH_Z80 - default "or1k" if ARCH_OR1K - default "sparc" if ARCH_SPARC - default "tricore" if ARCH_TRICORE - -source "arch/arm/Kconfig" -source "arch/arm64/Kconfig" -source "arch/avr/Kconfig" -source "arch/hc/Kconfig" -source "arch/mips/Kconfig" -source "arch/misoc/Kconfig" -source "arch/renesas/Kconfig" -source "arch/risc-v/Kconfig" -source "arch/sim/Kconfig" -source "arch/x86/Kconfig" -source "arch/x86_64/Kconfig" -source "arch/xtensa/Kconfig" -source "arch/z16/Kconfig" -source "arch/z80/Kconfig" -source "arch/or1k/Kconfig" -source "arch/sparc/Kconfig" -source "arch/tricore/Kconfig" - -config ARCH_CHIP_CUSTOM - bool "Custom Chip Support" - default n - -if ARCH_CHIP_CUSTOM -menu "Custom Chip Configuration" - -config ARCH_CHIP_CUSTOM_NAME - string "Custom chip name" - default "" - ---help--- - This is a name for the chip. It is not used except to return the - information via the NSH uname command. - -config ARCH_CHIP_CUSTOM_DIR - string "Custom chip directory" - default "" - ---help--- - If the custom chip configuration is selected, then it is necessary - to also tell the build system where it can find the chip directory - for the custom chip. - - In this case, the chip directory is assumed to lie outside the - NuttX directory. The provided path must then be a full, absolute - path to some location outside of the NuttX source tree (like - "~/projects/mychip"). - -config ARCH_CHIP_CUSTOM_DIR_RELPATH - bool "Relative custom chip directory" - default y - ---help--- - Specifies that the chip directory is relative to the NuttX directory. - -endmenu # Custom Chip Configuration -endif #ARCH_CHIP_CUSTOM - -source "$BINDIR/arch/dummy/Kconfig" +comment "Common Architecture Configuration" config ARCH_TOOLCHAIN_GNU bool @@ -311,21 +37,6 @@ config ARCH_TOOLCHAIN_TASKING bool default n -config ARCH_GNU_NO_WEAKFUNCTIONS - bool - depends on ARCH_TOOLCHAIN_GNU - default n - ---help--- - Disable support for weak functions. - -config ARCH_SIZET_LONG - bool "size_t is type long" - default n - ---help--- - size_t may be type long or type int. This matters for some - C++ library routines because the NuttX size_t might not have - the same underlying type as your toolchain's size_t. - config ARCH_INSTRUMENT_ALL bool "Instrument All" default n diff --git a/arch/arm/src/.gitignore b/arch/arm/.gitignore similarity index 100% rename from arch/arm/src/.gitignore rename to arch/arm/.gitignore diff --git a/arch/arm/CMakeLists.txt b/arch/arm/CMakeLists.txt deleted file mode 100644 index 95feda928e..0000000000 --- a/arch/arm/CMakeLists.txt +++ /dev/null @@ -1,23 +0,0 @@ -# ############################################################################## -# arch/arm/CMakeLists.txt -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more contributor -# license agreements. See the NOTICE file distributed with this work for -# additional information regarding copyright ownership. The ASF licenses this -# file to you under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy of -# the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. -# -# ############################################################################## - -nuttx_add_subdirectory() diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 7da93153db..ab0724cddd 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -3,1214 +3,17 @@ # see the file kconfig-language.txt in the NuttX tools repository. # -if ARCH_ARM -comment "ARM Options" - -choice - prompt "ARM Toolchain Selection" - default ARM_TOOLCHAIN_GNU_EABI - -config ARM_TOOLCHAIN_IAR - bool "IAR ANSI C/C++ toolchain" - select CYGWIN_WINTOOL if WINDOWS_CYGWIN - -config ARM_TOOLCHAIN_BUILDROOT - bool "Buildroot (Cygwin or Linux)" - depends on !WINDOWS_NATIVE - select ARCH_TOOLCHAIN_GCC - -config ARM_TOOLCHAIN_BUILDROOT_OABI - bool "OABI (vs EABI)" - depends on !WINDOWS_NATIVE - select ARCH_TOOLCHAIN_GCC - ---help--- - Most of the older buildroot toolchains are OABI - -config ARM_TOOLCHAIN_GNU_EABI - bool "Generic GNU EABI toolchain" - select ARCH_TOOLCHAIN_GCC - ---help--- - This option should work for any modern GNU toolchain (GCC 4.5 or newer) - -config ARM_TOOLCHAIN_GNU_OABI - bool "Generic GNU OABI toolchain" - select ARCH_TOOLCHAIN_GCC - ---help--- - This option should work for any GNU toolchain. - -config ARM_TOOLCHAIN_CLANG - bool "LLVM Clang toolchain" - depends on !LIBM_TOOLCHAIN - select ARCH_TOOLCHAIN_CLANG - -config ARM_TOOLCHAIN_ARMCLANG - bool "ARM Compiler Clang toolchain" - select ARCH_TOOLCHAIN_ARMCLANG - -config ARM_TOOLCHAIN_GHS - bool "ARM Compiler Green Hills Software toolchain" - select ARCH_TOOLCHAIN_GHS - -endchoice # ARM Toolchain Selection - -choice - prompt "ARM MCU selection" - default ARCH_CHIP_STM32 - -config ARCH_CHIP_A1X - bool "Allwinner A1X" - select ARCH_CORTEXA8 - select ARM_HAVE_NEON - select ARCH_HAVE_IRQPRIO - select ARCH_HAVE_LOWVECTORS - select ARCH_HAVE_FETCHADD - select ARCH_HAVE_SDRAM - depends on BOOT_RUNFROMSDRAM - select ARCH_HAVE_ADDRENV - select ARCH_NEED_ADDRENV_MAPPING - ---help--- - Allwinner A1X family: A10, A10S (A12), A13 (ARM Cortex-A8) - -config ARCH_CHIP_AM335X - bool "TI AM335X" - select ARCH_CORTEXA8 - select ARM_HAVE_NEON - select ARCH_HAVE_IRQPRIO - select ARCH_HAVE_LOWVECTORS - select ARCH_HAVE_FETCHADD - select ARCH_HAVE_SDRAM - depends on BOOT_RUNFROMSDRAM - select ARCH_HAVE_ADDRENV - select ARCH_NEED_ADDRENV_MAPPING - ---help--- - TI AM335X family: AM3356, AM3357, AM3358, AM3359 (ARM Cortex-A8) - -config ARCH_CHIP_FVP_ARMV8R_AARCH32 - bool "ARM FVP virt platform (ARMv8r AARCH32)" - select ARCH_CORTEXR52 - select ARCH_HAVE_LOWVECTORS - select ARCH_HAVE_FETCHADD - select ARCH_HAVE_IRQPRIO - select ARCH_HAVE_HIPRI_INTERRUPT - select ARCH_HAVE_FPU - ---help--- - ARM FVP virt platform (ARMv8r) - -config ARCH_CHIP_C5471 - bool "TMS320 C5471" - select ARCH_ARM7TDMI - select ARCH_HAVE_LOWVECTORS - select OTHER_UART_SERIALDRIVER - ---help--- - TI TMS320 C5471, A180, or DA180 (ARM7TDMI) - -config ARCH_CHIP_CSK6 - bool "LISTEANAI CSK6 6001A/6011B/6012" - select ARCH_HAVE_MPU - select ARCH_HAVE_FETCHADD - select ARCH_HAVE_I2CRESET - select ARCH_HAVE_HEAPCHECK - select ARCH_HAVE_PROGMEM - select ARCH_HAVE_SPI_BITORDER - select ARCH_HAVE_TICKLESS - select ARCH_HAVE_TIMEKEEPING - select ARM_HAVE_MPU_UNIFIED - select ARMV8M_HAVE_STACKCHECK - select ARCH_HAVE_ADJTIME - select ARCH_CORTEXM33 - ---help--- - LISTEANAI CSK6 architectures (ARM Cortex-M33). - -config ARCH_CHIP_DM320 - bool "TMS320 DM320" - select ARCH_ARM926EJS - select ARCH_HAVE_LOWVECTORS - ---help--- - TI DMS320 DM320 (ARM926EJS) - -config ARCH_CHIP_EFM32 - bool "Energy Micro EFM32" - select ARCH_HAVE_SPI_BITORDER - select ARCH_HAVE_FETCHADD - ---help--- - Energy Micro EFM32 microcontrollers (ARM Cortex-M). - -config ARCH_CHIP_EOSS3 - bool "QuickLogic EOS S3" - select ARCH_CORTEXM4 - select ARCH_HAVE_MPU - select ARM_HAVE_MPU_UNIFIED - select ARCH_HAVE_FPU - ---help--- - QuickLogic EOS S3 (ARM Cortex-M4) - -config ARCH_CHIP_GD32F4 - bool "GD32MCU GD32 F4" - select ARCH_CORTEXM4 - select ARCH_HAVE_MPU - select ARCH_HAVE_FETCHADD - select ARCH_HAVE_I2CRESET - select ARCH_HAVE_HEAPCHECK - select ARCH_HAVE_PROGMEM - select ARCH_HAVE_SPI_BITORDER - select ARCH_HAVE_TICKLESS - select ARM_HAVE_MPU_UNIFIED - select ARMV7M_HAVE_STACKCHECK - ---help--- - GD32MCU GD32 architectures (ARM Cortex-M4). - -config ARCH_CHIP_IMX1 - bool "NXP/Freescale iMX.1" - select ARCH_ARM920T - select ARCH_HAVE_HEAP2 - select ARCH_HAVE_LOWVECTORS - ---help--- - Freescale iMX.1 architectures (ARM920T) - -config ARCH_CHIP_IMX6 - bool "NXP/Freescale iMX.6" - select ARCH_CORTEXA9 - select ARM_THUMB - select ARMV7A_HAVE_L2CC_PL310 - select ARM_HAVE_NEON - select ARCH_HAVE_TRUSTZONE - select ARCH_HAVE_LOWVECTORS - select ARCH_HAVE_FETCHADD - select ARCH_HAVE_SDRAM - depends on BOOT_RUNFROMSDRAM - select ARCH_HAVE_ADDRENV - select ARCH_NEED_ADDRENV_MAPPING - ---help--- - Freescale iMX.6 architectures (Cortex-A9) - -config ARCH_CHIP_IMX9_CORTEX_M - bool "NXP iMX.9 Cortex-M7" - select ARCH_CORTEXM7 - select ARCH_HAVE_MPU - select ARCH_HAVE_FETCHADD - select ARCH_HAVE_RAMFUNCS - select ARCH_HAVE_TICKLESS - select ARCH_HAVE_I2CRESET - select ARCH_HAVE_SPI_CS_CONTROL - select ARM_HAVE_MPU_UNIFIED - select ARMV7M_HAVE_STACKCHECK - ---help--- - iMX.9 architectures (Cortex-M7) - -config ARCH_CHIP_IMXRT - bool "NXP/Freescale iMX.RT" - select ARCH_CORTEXM7 - select ARCH_HAVE_MPU - select ARCH_HAVE_FETCHADD - select ARCH_HAVE_RAMFUNCS - select ARCH_HAVE_TICKLESS - select ARCH_HAVE_I2CRESET - select ARCH_HAVE_SPI_CS_CONTROL - select ARM_HAVE_MPU_UNIFIED - select ARMV7M_HAVE_STACKCHECK - ---help--- - NXP i.MX RT (ARM Cortex-M7) architectures - -config ARCH_CHIP_KINETIS - bool "NXP/Freescale Kinetis" - select ARCH_CORTEXM4 - select ARCH_HAVE_MPU - select ARM_HAVE_MPU_UNIFIED - select ARCH_HAVE_FPU - select ARCH_HAVE_FETCHADD - select ARCH_HAVE_RAMFUNCS - select ARCH_HAVE_I2CRESET - ---help--- - Freescale Kinetis Architectures (ARM Cortex-M4) - -config ARCH_CHIP_KL - bool "NXP/Freescale Kinetis L" - select ARCH_CORTEXM0 - ---help--- - Freescale Kinetis L Architectures (ARM Cortex-M0+) - -config ARCH_CHIP_LC823450 - bool "ON Semiconductor LC823450" - select ARCH_CORTEXM3 - select ARCH_HAVE_MPU - select ARCH_HAVE_HEAPCHECK - select ARCH_HAVE_MULTICPU - select ARCH_HAVE_I2CRESET - select ARCH_HAVE_CUSTOM_TESTSET - ---help--- - ON Semiconductor LC823450 architectures (ARM dual Cortex-M3) - -config ARCH_CHIP_LM - bool "TI/Luminary Stellaris" - select ARCH_HAVE_MPU - select ARM_HAVE_MPU_UNIFIED - ---help--- - TI/Luminary Stellaris LMS3 and LM4F architectures (ARM Cortex-M3/4) - -config ARCH_CHIP_LPC17XX_40XX - bool "NXP LPC17xx/LPC40xx" - select ARCH_HAVE_MPU - select ARM_HAVE_MPU_UNIFIED - select ARCH_HAVE_FETCHADD - select ARMV7M_HAVE_STACKCHECK - ---help--- - NXP LPC17xx & LPC40xx architectures (ARM Cortex-M3/4) - -config ARCH_CHIP_LPC214X - bool "NXP LPC214x" - select ARCH_ARM7TDMI - select ARCH_HAVE_LOWVECTORS - ---help--- - NXP LPC2145x architectures (ARM7TDMI) - -config ARCH_CHIP_LPC2378 - bool "NXP LPC2378" - select ARCH_ARM7TDMI - select ARCH_HAVE_LOWVECTORS - ---help--- - NXP LPC2145x architectures (ARM7TDMI) - -config ARCH_CHIP_LPC31XX - bool "NXP LPC31XX" - select ARCH_ARM926EJS - select ARCH_HAVE_LOWVECTORS - ---help--- - NPX LPC31XX architectures (ARM926EJS). - -config ARCH_CHIP_LPC43XX - bool "NXP LPC43XX" - select ARCH_CORTEXM4 - select ARCH_HAVE_MPU - select ARM_HAVE_MPU_UNIFIED - select ARCH_HAVE_FPU - select ARCH_HAVE_FETCHADD - ---help--- - NPX LPC43XX architectures (ARM Cortex-M4). - -config ARCH_CHIP_LPC54XX - bool "NXP LPC54XX" - select ARCH_CORTEXM4 - select ARCH_HAVE_MPU - select ARM_HAVE_MPU_UNIFIED - select ARCH_HAVE_FPU - select ARCH_HAVE_FETCHADD - ---help--- - NPX LPC54XX architectures (ARM Cortex-M4). - -config ARCH_CHIP_MAX326XX - bool "Maxim Integrated MAX326XX" - select ARCH_HAVE_FETCHADD - ---help--- - Maxim Integrated MAX326XX microcontrollers (ARM Cortex-M4F). - -config ARCH_CHIP_MOXART - bool "MoxART" - select ARCH_ARM7TDMI - select ARCH_HAVE_RESET - select ARCH_HAVE_SERIAL_TERMIOS - ---help--- - MoxART family - -config ARCH_CHIP_NRF52 - bool "Nordic nRF52" - select ARCH_CORTEXM4 - select ARCH_HAVE_TICKLESS - select ARMV7M_HAVE_STACKCHECK - #select ARCH_HAVE_MPU - #select ARM_HAVE_MPU_UNIFIED - select ARCH_HAVE_SPI_BITORDER - select ARCH_HAVE_FPU - select ARCH_HAVE_PWM_MULTICHAN - select ARCH_HAVE_SERIAL_TERMIOS - select ARCH_DMA_NO_FLASH_TRANSFER - ---help--- - Nordic nRF52 architectures (ARM Cortex-M4). - -config ARCH_CHIP_NRF53 - bool "Nordic nRF53" - select ARCH_CORTEXM33 - select ARCH_HAVE_PWM_MULTICHAN - select ARCH_DMA_NO_FLASH_TRANSFER - depends on EXPERIMENTAL - ---help--- - Nordic nRF53 architectures (ARM dual Cortex-M33). - -config ARCH_CHIP_NRF91 - bool "Nordic nRF91" - select ARCH_CORTEXM33 - select ARCH_HAVE_PWM_MULTICHAN - select ARCH_HAVE_TRUSTZONE - select ARCH_HAVE_TICKLESS - select ARCH_DMA_NO_FLASH_TRANSFER - select ARCH_HAVE_FPU - depends on EXPERIMENTAL - ---help--- - Nordic nRF91 architectures (ARM Cortex-M33 with integrated - LTE-M/NB-IoT modem and GNSS). - -config ARCH_CHIP_NUC1XX - bool "Nuvoton NUC100/120" - select ARCH_CORTEXM0 - ---help--- - Nuvoton NUC100/120 architectures (ARM Cortex-M0). - -config ARCH_CHIP_MCX_NXXX - bool "NXP MCX NXXx Cortex-M33" - select ARCH_CORTEXM33 - select ARCH_HAVE_FPU - select ARCH_HAVE_DFPU - ---help--- - NXXx architectures (Cortex-M33) - -config ARCH_CHIP_RA4 - bool "Renesas RA4" - ---help--- - Renesas RA4 Architecture (ARM Cortex-M4F/M33). - -config ARCH_CHIP_RP2040 - bool "Raspberry Pi RP2040" - select ARCH_CORTEXM0 - select ARCH_HAVE_RAMVECTORS - select ARCH_HAVE_MULTICPU - select ARCH_HAVE_I2CRESET - select ARM_HAVE_WFE_SEV - select ARCH_HAVE_PWM_MULTICHAN - select ARCH_BOARD_COMMON - select ARCH_HAVE_CUSTOM_TESTSET - ---help--- - Raspberry Pi RP2040 architectures (ARM dual Cortex-M0+). - -config ARCH_CHIP_RP23XX - bool "Raspberry Pi RP23XX" - select ARCH_CORTEXM33 - select ARCH_HAVE_RAMVECTORS - select ARCH_HAVE_MULTICPU - select ARCH_HAVE_I2CRESET - select ARM_HAVE_WFE_SEV - select ARM_HAVE_DSP - select ARCH_HAVE_FPU - select ARCH_HAVE_CUSTOM_TESTSET - select ARCH_HAVE_PWM_MULTICHAN - select ARCH_BOARD_COMMON - ---help--- - Raspberry Pi RP23XX architectures (ARM dual Cortex-M33 or RISC-V). - -config ARCH_CHIP_S32K1XX - bool "NXP S32K1XX" - select ARCH_HAVE_MPU - select ARM_HAVE_MPU_UNIFIED - select ARCH_HAVE_RAMFUNCS - select ARCH_HAVE_I2CRESET - ---help--- - NPX S32K1XX architectures (ARM Cortex-M0+ and Cortex-M4F). - -config ARCH_CHIP_S32K3XX - bool "NXP S32K3XX" - select ARCH_HAVE_MPU - select ARCH_HAVE_RAMFUNCS - select ARM_HAVE_MPU_UNIFIED - select ARCH_HAVE_I2CRESET - ---help--- - NPX S32K3XX architectures (ARM Cortex-M7). - -config ARCH_CHIP_SAMA5 - bool "Atmel SAMA5" - select ARCH_CORTEXA5 - select ARCH_HAVE_IRQPRIO - select ARCH_HAVE_LOWVECTORS - select ARCH_HAVE_FETCHADD - select ARCH_HAVE_I2CRESET - select ARCH_HAVE_TICKLESS - select ARCH_HAVE_ADDRENV - select ARCH_NEED_ADDRENV_MAPPING - ---help--- - Atmel SAMA5 (ARM Cortex-A5) - -config ARCH_CHIP_SAMD2X - bool "Microchip/Atmel SAMD2x" - select ARCH_CORTEXM0 - ---help--- - Microchip (formerly Atmel) SAMD2X (ARM Cortex-M0+) - -config ARCH_CHIP_SAML2X - bool "Microchip/Atmel SAML2x" - select ARCH_CORTEXM0 - ---help--- - Microchip (formerly Atmel) SAML2X (ARM Cortex-M0+) - -config ARCH_CHIP_SAMD5X - bool "Microchip SAMD5x" - select ARCH_CORTEXM4 - select ARCH_HAVE_TICKLESS - ---help--- - Microchip SAMD5X (ARM Cortex-M4) - -config ARCH_CHIP_SAME5X - bool "Microchip SAME5x" - select ARCH_CORTEXM4 - ---help--- - Microchip SAME5x (ARM Cortex-M4) - -config ARCH_CHIP_SAM34 - bool "Atmel SAM3/SAM4" - select ARCH_HAVE_MPU - select ARM_HAVE_MPU_UNIFIED - select ARCH_HAVE_FETCHADD - select ARCH_HAVE_RAMFUNCS - select ARMV7M_HAVE_STACKCHECK - ---help--- - Atmel SAM3 (ARM Cortex-M3) and SAM4 (ARM Cortex-M4) architectures - -config ARCH_CHIP_SAMV7 - bool "Atmel SAMV7" - select ARCH_CORTEXM7 - select ARCH_HAVE_MPU - select ARCH_HAVE_FETCHADD - select ARCH_HAVE_PROGMEM - select ARCH_HAVE_RAMFUNCS - select ARCH_HAVE_TICKLESS - select ARCH_HAVE_I2CRESET - select ARCH_HAVE_SPI_CS_CONTROL - select ARM_HAVE_MPU_UNIFIED - select ARMV7M_HAVE_STACKCHECK - select ARCH_HAVE_ADJTIME - ---help--- - Atmel SAMV7 (ARM Cortex-M7) architectures - -config ARCH_CHIP_SIMPLELINK - bool "TI SimpleLink" - select ARCH_HAVE_MPU - select ARM_HAVE_MPU_UNIFIED - select ARCH_HAVE_FETCHADD - depends on EXPERIMENTAL - ---help--- - TI SimpleLink CCxxx architectures (ARM Cortex-M3 or M4) - -config ARCH_CHIP_STM32 - bool "STMicro STM32 F1/F2/F3/F4/G4/L1" - select ARCH_HAVE_MPU - select ARCH_HAVE_FETCHADD - select ARCH_HAVE_I2CRESET - select ARCH_HAVE_HEAPCHECK - select ARCH_HAVE_PROGMEM - select ARCH_HAVE_SPI_BITORDER - select ARCH_HAVE_TICKLESS - select ARCH_HAVE_TIMEKEEPING - select ARM_HAVE_MPU_UNIFIED - select ARMV7M_HAVE_STACKCHECK - select ARCH_HAVE_ADJTIME - ---help--- - STMicro STM32 architectures (ARM Cortex-M3/4). - -config ARCH_CHIP_STM32F0 - bool "STMicro STM32 F0" - select ARCH_CORTEXM0 - ---help--- - STMicro STM32F0 architectures (ARM Cortex-M0). - -config ARCH_CHIP_STM32L0 - bool "STMicro STM32 L0" - select ARCH_CORTEXM0 - ---help--- - STMicro STM32L0 architectures (ARM Cortex-M0+). - -config ARCH_CHIP_STM32G0 - bool "STMicro STM32 G0" - select ARCH_CORTEXM0 - select ARCH_HAVE_PROGMEM - ---help--- - STMicro STM32G0 architectures (ARM Cortex-M0+). - -config ARCH_CHIP_STM32C0 - bool "STMicro STM32 C0" - select ARCH_CORTEXM0 - ---help--- - STMicro STM32C0 architectures (ARM Cortex-M0+). - -config ARCH_CHIP_STM32F7 - bool "STMicro STM32 F7" - select ARCH_CORTEXM7 - select ARCH_HAVE_MPU - select ARCH_HAVE_FETCHADD - select ARCH_HAVE_I2CRESET - select ARCH_HAVE_HEAPCHECK - select ARCH_HAVE_PROGMEM - select ARCH_HAVE_SPI_BITORDER - select ARM_HAVE_MPU_UNIFIED - select ARMV7M_HAVE_STACKCHECK - select ARCH_HAVE_TICKLESS - select ARCH_HAVE_TIMEKEEPING - ---help--- - STMicro STM32 architectures (ARM Cortex-M7). - -config ARCH_CHIP_STM32H7 - bool "STMicro STM32 H7" - select ARCH_HAVE_MPU - select ARCH_HAVE_I2CRESET - select ARCH_HAVE_PROGMEM -# select ARCH_HAVE_HEAPCHECK - select ARCH_HAVE_SPI_BITORDER - select ARM_HAVE_MPU_UNIFIED - select ARMV7M_HAVE_STACKCHECK - select ARCH_HAVE_TICKLESS - select ARCH_HAVE_TIMEKEEPING - ---help--- - STMicro STM32H7 architectures (ARM Cortex-M7 or - dual ARM Cortex-M7 Cortex-M4). - -config ARCH_CHIP_STM32L4 - bool "STMicro STM32 L4" - select ARCH_CORTEXM4 - select ARCH_HAVE_MPU - select ARCH_HAVE_FETCHADD - select ARCH_HAVE_I2CRESET - select ARCH_HAVE_HEAPCHECK - select ARCH_HAVE_PROGMEM - select ARCH_HAVE_SPI_BITORDER - select ARCH_HAVE_TICKLESS - select ARM_HAVE_MPU_UNIFIED - select ARMV7M_HAVE_STACKCHECK - ---help--- - STMicro STM32 architectures (ARM Cortex-M4). - -config ARCH_CHIP_STM32H5 - bool "STMicro STM32 H5" - select ARCH_CORTEXM33 - select ARCH_HAVE_MPU - select ARM_HAVE_DSP - select ARCH_HAVE_FETCHADD - select ARCH_HAVE_HEAPCHECK - select ARCH_HAVE_PROGMEM - select ARCH_HAVE_SPI_BITORDER - select ARCH_HAVE_TICKLESS - select ARCH_HAVE_TRUSTZONE - select ARM_HAVE_MPU_UNIFIED - select ARMV8M_HAVE_STACKCHECK - ---help--- - STMicro STM32 H5 architectures (ARM Cortex-M33). - -config ARCH_CHIP_STM32L5 - bool "STMicro STM32 L5" - select ARCH_CORTEXM33 - select ARCH_HAVE_MPU - select ARM_HAVE_DSP - select ARCH_HAVE_FETCHADD - select ARCH_HAVE_HEAPCHECK - select ARCH_HAVE_PROGMEM - select ARCH_HAVE_SPI_BITORDER - select ARCH_HAVE_TICKLESS - select ARCH_HAVE_TRUSTZONE - select ARM_HAVE_MPU_UNIFIED - select ARMV8M_HAVE_STACKCHECK - ---help--- - STMicro STM32 L5 architectures (ARM Cortex-M33). - -config ARCH_CHIP_STM32U5 - bool "STMicro STM32 U5" - select ARCH_CORTEXM33 - select ARCH_HAVE_MPU - select ARM_HAVE_DSP - select ARCH_HAVE_FETCHADD - select ARCH_HAVE_HEAPCHECK - select ARCH_HAVE_HEAP2 - select ARCH_HAVE_PROGMEM - select ARCH_HAVE_SPI_BITORDER - select ARCH_HAVE_TICKLESS - select ARM_HAVE_MPU_UNIFIED - select ARMV8M_HAVE_STACKCHECK - select ARCH_HAVE_TRUSTZONE - ---help--- - STMicro STM32 U5 architectures (ARM Cortex-M33). - -config ARCH_CHIP_STM32WB - bool "STMicro STM32 WB" - select ARCH_CORTEXM4 - select ARCH_HAVE_FPU - select ARCH_HAVE_MPU - select ARCH_HAVE_FETCHADD - select ARCH_HAVE_I2CRESET - select ARCH_HAVE_HEAPCHECK - select ARCH_HAVE_PROGMEM - select ARCH_HAVE_SPI_BITORDER - select ARCH_HAVE_TICKLESS - select ARM_HAVE_MPU_UNIFIED - select ARMV7M_HAVE_STACKCHECK - ---help--- - STMicro STM32WB architectures (ARM Cortex-M4). - -config ARCH_CHIP_STM32WL5 - bool "STMicro STM32 WL5" - select ARCH_CORTEXM4 - select ARCH_HAVE_MPU - select ARCH_HAVE_FETCHADD - select ARCH_HAVE_I2CRESET - select ARCH_HAVE_HEAPCHECK - select ARCH_HAVE_PROGMEM - select ARCH_HAVE_SPI_BITORDER - select ARCH_HAVE_TICKLESS - select ARM_HAVE_MPU_UNIFIED - select ARMV7M_HAVE_STACKCHECK - ---help--- - STMicro STM32WL5 architectures (dual CPU ARM Cortex-M4 Cortex-M0). - -config ARCH_CHIP_STR71X - bool "STMicro STR71x" - select ARCH_ARM7TDMI - select ARCH_HAVE_LOWVECTORS - ---help--- - STMicro STR71x architectures (ARM7TDMI). - -config ARCH_CHIP_TMS570 - bool "TI TMS570" - select ENDIAN_BIG - select ARCH_HAVE_LOWVECTORS - select ARCH_HAVE_FETCHADD - select ARCH_HAVE_RAMFUNCS - select ARMV7R_MEMINIT - select ARMV7R_HAVE_DECODEFIQ - ---help--- - TI TMS570 family - -config ARCH_CHIP_TIVA - bool "TI Tiva" - select ARCH_HAVE_MPU - select ARM_HAVE_MPU_UNIFIED - select ARCH_HAVE_FETCHADD - ---help--- - TI Tiva TM4C architectures (ARM Cortex-M4) - -config ARCH_CHIP_XMC4 - bool "Infineon XMC4xxx" - select ARCH_CORTEXM4 - select ARCH_HAVE_MPU - select ARCH_HAVE_FETCHADD - select ARCH_HAVE_RAMFUNCS - select ARCH_HAVE_I2CRESET - select ARM_HAVE_MPU_UNIFIED - select ARMV7M_HAVE_STACKCHECK - select ARCH_HAVE_TICKLESS - ---help--- - Infineon XMC4xxx(ARM Cortex-M4) architectures - -config ARCH_CHIP_MX8MP - bool "NXP i.MX8MP" - select ARCH_CORTEXM7 - select ARCH_HAVE_MPU - select ARCH_HAVE_FETCHADD - select ARCH_HAVE_RAMFUNCS - select ARCH_HAVE_I2CRESET - select ARM_HAVE_MPU_UNIFIED - select ARMV7M_HAVE_ICACHE - select ARMV7M_HAVE_DCACHE - select ARMV7M_HAVE_ITCM - select ARMV7M_HAVE_DTCM - select ARMV7M_HAVE_STACKCHECK - ---help--- - NXP i.MX8MP (ARM Cortex-M7) architectures - -config ARCH_CHIP_CXD56XX - bool "Sony CXD56xx" - select ARCH_CORTEXM4 - select ARCH_HAVE_MPU - select ARM_HAVE_MPU_UNIFIED - select ARCH_HAVE_FPU - select ARCH_HAVE_HEAPCHECK - select ARCH_HAVE_MULTICPU - select ARCH_HAVE_TEXT_HEAP - select ARCH_HAVE_SDIO if MMCSD - select ARCH_HAVE_MATH_H - select ARCH_HAVE_I2CRESET - select ARCH_HAVE_CUSTOM_TESTSET - select LIBC_ARCH_ATOMIC if SMP - ---help--- - Sony CXD56XX (ARM Cortex-M4) architectures - -config ARCH_CHIP_PHY62XX - bool "Phyplus PHY62XX BLE" - select ARCH_CORTEXM0 - ---help--- - Phyplus PHY62XX architectures (ARM Cortex-M0). - -config ARCH_CHIP_TLSR82 - bool "Telink TLSR82XX" - select ARCH_ARMV6M - select ARCH_HAVE_RESET - ---help--- - Telink tlsr82xx architectures (Customed armv6m) - -config ARCH_CHIP_MPS - bool "MPS ARM Series" - ---help--- - MPS platform (MPS2 MPS3) - -config ARCH_CHIP_QEMU_ARM - bool "QEMU virt platform (ARMv7a)" - select ARCH_HAVE_POWEROFF - select ARCH_HAVE_RESET - select ARCH_IDLE_CUSTOM - ---help--- - QEMU virt platform (ARMv7a) - -config ARCH_CHIP_GOLDFISH_ARM - bool "GOLDFISH virt platform (ARMv7a)" - select ARCH_HAVE_POWEROFF - select ARCH_HAVE_RESET - select ARM_HAVE_PSCI - select ARM_HAVE_NEON - ---help--- - GOLDFISH virt platform (ARMv7a) - -config ARCH_CHIP_AT32 - bool "Artery AT32 F4" - select ARCH_HAVE_MPU - select ARCH_HAVE_FETCHADD - select ARCH_HAVE_I2CRESET - select ARCH_HAVE_HEAPCHECK - select ARCH_HAVE_PROGMEM - select ARCH_HAVE_SPI_BITORDER - select ARCH_HAVE_TICKLESS - select ARCH_HAVE_TIMEKEEPING - select ARM_HAVE_MPU_UNIFIED - select ARMV7M_HAVE_STACKCHECK - ---help--- - Artery AT32 architectures (ARM Cortex-M4) - -config ARCH_CHIP_CXD32XX - bool "Sony CXD32xx" - select ARCH_CORTEXM4 - select ARCH_HAVE_FPU - select LIBC_ARCH_ATOMIC - ---help--- - Sony CXD32XX (ARM Cortex-M4) architectures - -config ARCH_CHIP_ARM_CUSTOM - bool "Custom ARM chip" - select ARCH_CHIP_CUSTOM - ---help--- - Select this option if there is no directory for the chip under arch/arm/src/. - -endchoice # ARM MCU selection - -config ARCH_ARM7TDMI - bool - default n - select ARCH_DCACHE - select ARCH_ICACHE - ---help--- - The Arm7TDMI-S is an excellent workhorse processor capable of a wide - array of applications. Traditionally used in mobile handsets, the - processor is now broadly in many non-mobile applications. - -config ARCH_ARM920T - bool - default n - select ARCH_DCACHE - select ARCH_ICACHE - select ARCH_HAVE_MMU - select ARCH_USE_MMU - ---help--- - The ARM9 processor family is built around the ARM9TDMI processor and - incorporates the 16-bit Thumb instruction set. The ARM9 Thumb family - includes the ARM920T and ARM922T cached processor macrocells: - - - Dual 16k caches for applications running Symbian OS, Palm OS, - Linux and Windows CE, - - Dual 8k caches for applications running Symbian OS, Palm OS, Linux - and Windows CE Applications - -config ARCH_ARM926EJS - bool - default n - select ARCH_DCACHE - select ARCH_ICACHE - select ARCH_HAVE_MMU - select ARCH_USE_MMU - ---help--- - Arm926EJ-S is the entry point processor capable of supporting full - Operating Systems including Linux, WindowsCE, and Symbian. - - The ARM9E processor family enables single processor solutions for - microcontroller, DSP and Java applications. The ARM9E family of - products are DSP-enhanced 32-bit RISC processors, for applications - requiring a mix of DSP and microcontroller performance. The family - includes the ARM926EJ-S, ARM946E-S, ARM966E-S, and ARM968E-S - processor macrocells. They include signal processing extensions to - enhance 16-bit fixed point performance using a single-cycle 32 x 16 - multiply-accumulate (MAC) unit, and implement the 16-bit Thumb - instruction set. The ARM926EJ-S processor also includes ARM Jazelle - technology which enables the direct execution of Java bytecodes in - hardware. - -config ARCH_ARM1136J - bool - default n - select ARCH_DCACHE - select ARCH_ICACHE - select ARCH_HAVE_MMU - select ARCH_USE_MMU - ---help--- - Arm1136J(F)-S is very similar to Arm926EJ-S, but includes an - extended pipeline, basic SIMD (Single Instruction Multiple Data) - instructions, and improved frequency and performance. - -config ARCH_ARM1156T2 - bool - default n - select ARCH_DCACHE - select ARCH_ICACHE - select ARCH_HAVE_MMU - select ARCH_USE_MMU - ---help--- - Arm1156T2(F)-S is the highest-performance processor in the real-time - Classic Arm family. - -config ARCH_ARM1176JZ - bool - default n - select ARCH_DCACHE - select ARCH_ICACHE - select ARCH_HAVE_MMU - select ARCH_USE_MMU - ---help--- - Arm1176JZ(F)-S is the highest-performance single-core processor in - the Classic Arm family. It also introduced TrustZone technology to - enable secure execution outside of the reach of malicious code. - -config ARCH_ARMV6M - bool - default n - select ARCH_HAVE_CPUINFO - -config ARCH_CORTEXM0 - bool - default n - select ARM_THUMB - select ARCH_ARMV6M - select ARCH_HAVE_IRQPRIO - select ARCH_HAVE_IRQTRIGGER - select ARCH_HAVE_RAMVECTORS - select ARCH_HAVE_RESET - select ARCH_HAVE_HARDFAULT_DEBUG - -config ARCH_ARMV7M - bool - default n - select ARCH_HAVE_CPUINFO - select ARCH_HAVE_DEBUG - select ARCH_HAVE_PERF_EVENTS - -config ARCH_CORTEXM3 - bool - default n - select ARM_THUMB - select ARCH_ARMV7M - select ARCH_HAVE_IRQPRIO - select ARCH_HAVE_IRQTRIGGER - select ARCH_HAVE_RAMVECTORS - select ARCH_HAVE_HIPRI_INTERRUPT - select ARCH_HAVE_RESET - select ARCH_HAVE_TESTSET - select ARCH_HAVE_HARDFAULT_DEBUG - select ARCH_HAVE_MEMFAULT_DEBUG - select ARCH_HAVE_BUSFAULT_DEBUG - select ARCH_HAVE_USAGEFAULT_DEBUG - -config ARCH_CORTEXM4 - bool - default n - select ARM_THUMB - select ARCH_ARMV7M - select ARCH_HAVE_IRQPRIO - select ARCH_HAVE_IRQTRIGGER - select ARCH_HAVE_RAMVECTORS - select ARCH_HAVE_HIPRI_INTERRUPT - select ARCH_HAVE_RESET - select ARCH_HAVE_TESTSET - select ARCH_HAVE_HARDFAULT_DEBUG - select ARCH_HAVE_MEMFAULT_DEBUG - select ARCH_HAVE_BUSFAULT_DEBUG - select ARCH_HAVE_USAGEFAULT_DEBUG - -config ARCH_CORTEXM7 - bool - default n - select ARM_THUMB - select ARCH_ARMV7M - select ARCH_HAVE_FPU - select ARCH_HAVE_IRQPRIO - select ARCH_HAVE_IRQTRIGGER - select ARCH_HAVE_RAMVECTORS - select ARCH_HAVE_HIPRI_INTERRUPT - select ARCH_HAVE_RESET - select ARCH_HAVE_TESTSET - select ARCH_HAVE_HARDFAULT_DEBUG - select ARCH_HAVE_MEMFAULT_DEBUG - select ARCH_HAVE_BUSFAULT_DEBUG - select ARCH_HAVE_USAGEFAULT_DEBUG - -config ARCH_ARMV7A - bool - default n - select ARCH_HAVE_CPUINFO - select ARCH_HAVE_DEBUG - select ARCH_HAVE_PERF_EVENTS - select ARM_HAVE_WFE_SEV - -config ARCH_CORTEXA5 - bool - default n - select ARCH_ARMV7A - select ARCH_DCACHE - select ARCH_ICACHE - select ARCH_HAVE_MMU - select ARCH_USE_MMU - select ARCH_HAVE_TESTSET - select ARM_HAVE_MPCORE - -config ARCH_CORTEXA7 - bool - default n - select ARCH_ARMV7A - select ARCH_DCACHE - select ARCH_ICACHE - select ARCH_HAVE_MMU - select ARCH_USE_MMU - select ARCH_HAVE_TESTSET - select ARCH_HAVE_FPU - select ARM_HAVE_MPCORE - -config ARCH_CORTEXA8 - bool - default n - select ARCH_ARMV7A - select ARCH_DCACHE - select ARCH_ICACHE - select ARCH_HAVE_MMU - select ARCH_USE_MMU - select ARCH_HAVE_TESTSET - -config ARCH_CORTEXA9 - bool - default n - select ARCH_ARMV7A - select ARCH_DCACHE - select ARCH_ICACHE - select ARCH_HAVE_MMU - select ARCH_USE_MMU - select ARCH_HAVE_TESTSET - select ARM_HAVE_MPCORE - -config ARCH_ARMV7R - bool - default n - select ARCH_HAVE_CPUINFO - select ARCH_HAVE_PERF_EVENTS - -config ARCH_CORTEXR4 - bool - default n - select ARCH_ARMV7R - select ARCH_DCACHE - select ARCH_ICACHE - select ARCH_HAVE_MPU - select ARCH_HAVE_TESTSET - -config ARCH_CORTEXR5 - bool - default n - select ARCH_ARMV7R - select ARCH_DCACHE - select ARCH_ICACHE - select ARCH_HAVE_MPU - select ARCH_HAVE_TESTSET - -config ARCH_CORTEXR7 - bool - default n - select ARCH_ARMV7R - select ARCH_DCACHE - select ARCH_ICACHE - select ARCH_HAVE_MPU - select ARCH_HAVE_TESTSET - -config ARCH_CORTEXR52 - bool - default n - select ARCH_ARMV8R - select ARCH_HAVE_MPU - select ARCH_HAVE_TESTSET - -config ARCH_ARMV8M - bool - default n - select ARCH_HAVE_CPUINFO - select ARCH_HAVE_DEBUG - select ARCH_HAVE_PERF_EVENTS - -config ARCH_CORTEXM23 - bool - default n - select ARM_THUMB - select ARCH_ARMV8M - select ARCH_HAVE_IRQPRIO - select ARCH_HAVE_IRQTRIGGER - select ARCH_HAVE_RAMVECTORS - select ARCH_HAVE_HIPRI_INTERRUPT - select ARCH_HAVE_RESET - select ARCH_HAVE_TESTSET - select ARCH_HAVE_HARDFAULT_DEBUG - -config ARCH_CORTEXM33 - bool - default n - select ARM_THUMB - select ARCH_ARMV8M - select ARCH_HAVE_IRQPRIO - select ARCH_HAVE_IRQTRIGGER - select ARCH_HAVE_RAMVECTORS - select ARCH_HAVE_HIPRI_INTERRUPT - select ARCH_HAVE_RESET - select ARCH_HAVE_TESTSET - select ARCH_HAVE_HARDFAULT_DEBUG - select ARCH_HAVE_MEMFAULT_DEBUG - select ARCH_HAVE_BUSFAULT_DEBUG - select ARCH_HAVE_USAGEFAULT_DEBUG - select ARCH_HAVE_SECUREFAULT_DEBUG if ARCH_TRUSTZONE_SECURE - -config ARCH_CORTEXM35P - bool - default n - select ARM_THUMB - select ARCH_ARMV8M - select ARCH_HAVE_IRQPRIO - select ARCH_HAVE_IRQTRIGGER - select ARCH_HAVE_RAMVECTORS - select ARCH_HAVE_HIPRI_INTERRUPT - select ARCH_HAVE_RESET - select ARCH_HAVE_TESTSET - select ARCH_HAVE_HARDFAULT_DEBUG - select ARCH_HAVE_MEMFAULT_DEBUG - select ARCH_HAVE_BUSFAULT_DEBUG - select ARCH_HAVE_USAGEFAULT_DEBUG - select ARCH_HAVE_SECUREFAULT_DEBUG if ARCH_TRUSTZONE_SECURE - -config ARCH_CORTEXM55 - bool - default n - select ARM_THUMB - select ARCH_ARMV8M - select ARCH_HAVE_IRQPRIO - select ARCH_HAVE_IRQTRIGGER - select ARCH_HAVE_RAMVECTORS - select ARCH_HAVE_HIPRI_INTERRUPT - select ARCH_HAVE_RESET - select ARCH_HAVE_TESTSET - select ARCH_HAVE_HARDFAULT_DEBUG - select ARCH_HAVE_MEMFAULT_DEBUG - select ARCH_HAVE_BUSFAULT_DEBUG - select ARCH_HAVE_USAGEFAULT_DEBUG - select ARCH_HAVE_SECUREFAULT_DEBUG if ARCH_TRUSTZONE_SECURE - -config ARCH_CORTEXM85 - bool - default n - select ARM_THUMB - select ARCH_ARMV8M - select ARCH_HAVE_IRQPRIO - select ARCH_HAVE_IRQTRIGGER - select ARCH_HAVE_RAMVECTORS - select ARCH_HAVE_HIPRI_INTERRUPT - select ARCH_HAVE_RESET - select ARCH_HAVE_TESTSET - select ARCH_HAVE_HARDFAULT_DEBUG - select ARCH_HAVE_MEMFAULT_DEBUG - select ARCH_HAVE_BUSFAULT_DEBUG - select ARCH_HAVE_USAGEFAULT_DEBUG - select ARCH_HAVE_SECUREFAULT_DEBUG if ARCH_TRUSTZONE_SECURE - -config ARCH_ARMV8R - bool - default n - select ARCH_HAVE_CPUINFO - select ARCH_HAVE_PERF_EVENTS - select ONESHOT - select ALARM_ARCH - +source "arch/arm/Kconfig.arch" config ARCH_FAMILY string - default "arm" if ARCH_ARM7TDMI || ARCH_ARM920T || ARCH_ARM926EJS || ARCH_ARM1136J || ARCH_ARM1156T2 || ARCH_ARM1176JZ default "armv6-m" if ARCH_ARMV6M default "armv7-a" if ARCH_ARMV7A default "armv7-m" if ARCH_ARMV7M default "armv7-r" if ARCH_ARMV7R default "armv8-m" if ARCH_ARMV8M default "armv8-r" if ARCH_ARMV8R - -config ARCH_CHIP - string - default "a1x" if ARCH_CHIP_A1X - default "am335x" if ARCH_CHIP_AM335X - default "fvp-v8r-aarch32" if ARCH_CHIP_FVP_ARMV8R_AARCH32 - default "c5471" if ARCH_CHIP_C5471 - default "dm320" if ARCH_CHIP_DM320 - default "efm32" if ARCH_CHIP_EFM32 - default "eoss3" if ARCH_CHIP_EOSS3 - default "gd32f4" if ARCH_CHIP_GD32F4 - default "imx1" if ARCH_CHIP_IMX1 - default "imx6" if ARCH_CHIP_IMX6 - default "imx9" if ARCH_CHIP_IMX9_CORTEX_M - default "imxrt" if ARCH_CHIP_IMXRT - default "kinetis" if ARCH_CHIP_KINETIS - default "kl" if ARCH_CHIP_KL - default "lc823450" if ARCH_CHIP_LC823450 - default "tiva" if ARCH_CHIP_LM || ARCH_CHIP_TIVA || ARCH_CHIP_SIMPLELINK - default "lpc17xx_40xx" if ARCH_CHIP_LPC17XX_40XX - default "lpc214x" if ARCH_CHIP_LPC214X - default "lpc2378" if ARCH_CHIP_LPC2378 - default "lpc31xx" if ARCH_CHIP_LPC31XX - default "lpc43xx" if ARCH_CHIP_LPC43XX - default "lpc54xx" if ARCH_CHIP_LPC54XX - default "max326xx" if ARCH_CHIP_MAX326XX - default "moxart" if ARCH_CHIP_MOXART - default "nrf52" if ARCH_CHIP_NRF52 - default "nrf53" if ARCH_CHIP_NRF53 - default "nrf91" if ARCH_CHIP_NRF91 - default "nuc1xx" if ARCH_CHIP_NUC1XX - default "ra4" if ARCH_CHIP_RA4 - default "rp2040" if ARCH_CHIP_RP2040 - default "rp23xx" if ARCH_CHIP_RP23XX - default "s32k1xx" if ARCH_CHIP_S32K1XX - default "s32k3xx" if ARCH_CHIP_S32K3XX - default "sama5" if ARCH_CHIP_SAMA5 - default "samd2l2" if ARCH_CHIP_SAMD2X || ARCH_CHIP_SAML2X - default "samd5e5" if ARCH_CHIP_SAMD5X || ARCH_CHIP_SAME5X - default "sam34" if ARCH_CHIP_SAM34 - default "samv7" if ARCH_CHIP_SAMV7 - default "stm32" if ARCH_CHIP_STM32 - default "stm32f0l0g0" if ARCH_CHIP_STM32F0 || ARCH_CHIP_STM32L0 || ARCH_CHIP_STM32G0 || ARCH_CHIP_STM32C0 - default "stm32f7" if ARCH_CHIP_STM32F7 - default "stm32h7" if ARCH_CHIP_STM32H7 - default "stm32l4" if ARCH_CHIP_STM32L4 - default "stm32h5" if ARCH_CHIP_STM32H5 - default "stm32l5" if ARCH_CHIP_STM32L5 - default "stm32u5" if ARCH_CHIP_STM32U5 - default "stm32wb" if ARCH_CHIP_STM32WB - default "stm32wl5" if ARCH_CHIP_STM32WL5 - default "str71x" if ARCH_CHIP_STR71X - default "tms570" if ARCH_CHIP_TMS570 - default "xmc4" if ARCH_CHIP_XMC4 - default "mx8mp" if ARCH_CHIP_MX8MP - default "cxd56xx" if ARCH_CHIP_CXD56XX - default "phy62xx" if ARCH_CHIP_PHY62XX - default "tlsr82" if ARCH_CHIP_TLSR82 - default "qemu" if ARCH_CHIP_QEMU_ARM - default "mps" if ARCH_CHIP_MPS - default "goldfish" if ARCH_CHIP_GOLDFISH_ARM - default "at32" if ARCH_CHIP_AT32 - default "cxd32xx" if ARCH_CHIP_CXD32XX - default "csk6" if ARCH_CHIP_CSK6 - default "mcx-nxxx" if ARCH_CHIP_MCX_NXXX + default "arm" config ARM_THUMB bool "Thumb Mode" @@ -1530,207 +333,25 @@ endchoice # Choose ARM unwinder endif if ARCH_ARMV6M -source "arch/arm/src/armv6-m/Kconfig" +source "arch/arm/armv6-m/Kconfig" endif if ARCH_ARMV7A -source "arch/arm/src/armv7-a/Kconfig" +source "arch/arm/armv7-a/Kconfig" endif if ARCH_ARMV7M -source "arch/arm/src/armv7-m/Kconfig" +source "arch/arm/armv7-m/Kconfig" endif if ARCH_ARMV7R -source "arch/arm/src/armv7-r/Kconfig" +source "arch/arm/armv7-r/Kconfig" endif if ARCH_ARMV8M -source "arch/arm/src/armv8-m/Kconfig" +source "arch/arm/armv8-m/Kconfig" endif if ARCH_ARMV8R -source "arch/arm/src/armv8-r/Kconfig" +source "arch/arm/armv8-r/Kconfig" endif if ARCH_ARM7TDMI || ARCH_ARM920T || ARCH_ARM926EJS || ARCH_ARM1136J || ARCH_ARM1156T2 || ARCH_ARM1176JZ -source "arch/arm/src/arm/Kconfig" +source "arch/arm/arm/Kconfig" endif -if ARCH_CHIP_A1X -source "arch/arm/src/a1x/Kconfig" -endif -if ARCH_CHIP_AM335X -source "arch/arm/src/am335x/Kconfig" -endif -if ARCH_CHIP_FVP_ARMV8R_AARCH32 -source "arch/arm/src/fvp-v8r-aarch32/Kconfig" -endif -if ARCH_CHIP_C5471 -source "arch/arm/src/c5471/Kconfig" -endif -if ARCH_CHIP_DM320 -source "arch/arm/src/dm320/Kconfig" -endif -if ARCH_CHIP_EFM32 -source "arch/arm/src/efm32/Kconfig" -endif -if ARCH_CHIP_EOSS3 -source "arch/arm/src/eoss3/Kconfig" -endif -if ARCH_CHIP_GD32F4 -source "arch/arm/src/gd32f4/Kconfig" -endif -if ARCH_CHIP_IMX1 -source "arch/arm/src/imx1/Kconfig" -endif -if ARCH_CHIP_IMX6 -source "arch/arm/src/imx6/Kconfig" -endif -if ARCH_CHIP_IMX9_CORTEX_M -source "arch/arm/src/imx9/Kconfig" -endif -if ARCH_CHIP_IMXRT -source "arch/arm/src/imxrt/Kconfig" -endif -if ARCH_CHIP_KINETIS -source "arch/arm/src/kinetis/Kconfig" -endif -if ARCH_CHIP_KL -source "arch/arm/src/kl/Kconfig" -endif -if ARCH_CHIP_LC823450 -source "arch/arm/src/lc823450/Kconfig" -endif -if ARCH_CHIP_LM || ARCH_CHIP_TIVA || ARCH_CHIP_SIMPLELINK -source "arch/arm/src/tiva/Kconfig" -endif -if ARCH_CHIP_LPC17XX_40XX -source "arch/arm/src/lpc17xx_40xx/Kconfig" -endif -if ARCH_CHIP_LPC214X -source "arch/arm/src/lpc214x/Kconfig" -endif -if ARCH_CHIP_LPC2378 -source "arch/arm/src/lpc2378/Kconfig" -endif -if ARCH_CHIP_LPC31XX -source "arch/arm/src/lpc31xx/Kconfig" -endif -if ARCH_CHIP_LPC43XX -source "arch/arm/src/lpc43xx/Kconfig" -endif -if ARCH_CHIP_LPC54XX -source "arch/arm/src/lpc54xx/Kconfig" -endif -if ARCH_CHIP_S32K1XX -source "arch/arm/src/s32k1xx/Kconfig" -endif -if ARCH_CHIP_S32K3XX -source "arch/arm/src/s32k3xx/Kconfig" -endif -if ARCH_CHIP_MAX326XX -source "arch/arm/src/max326xx/Kconfig" -endif -if ARCH_CHIP_MOXART -source "arch/arm/src/moxart/Kconfig" -endif -if ARCH_CHIP_NRF52 -source "arch/arm/src/nrf52/Kconfig" -endif -if ARCH_CHIP_NRF53 -source "arch/arm/src/nrf53/Kconfig" -endif -if ARCH_CHIP_NRF91 -source "arch/arm/src/nrf91/Kconfig" -endif -if ARCH_CHIP_NUC1XX -source "arch/arm/src/nuc1xx/Kconfig" -endif -if ARCH_CHIP_RA4 -source "arch/arm/src/ra4/Kconfig" -endif -if ARCH_CHIP_RP2040 -source "arch/arm/src/rp2040/Kconfig" -endif -if ARCH_CHIP_RP23XX -source "arch/arm/src/rp23xx/Kconfig" -endif -if ARCH_CHIP_SAMA5 -source "arch/arm/src/sama5/Kconfig" -endif -if ARCH_CHIP_SAMD2X || ARCH_CHIP_SAML2X -source "arch/arm/src/samd2l2/Kconfig" -endif -if ARCH_CHIP_SAMD5X || ARCH_CHIP_SAME5X -source "arch/arm/src/samd5e5/Kconfig" -endif -if ARCH_CHIP_SAM34 -source "arch/arm/src/sam34/Kconfig" -endif -if ARCH_CHIP_SAMV7 -source "arch/arm/src/samv7/Kconfig" -endif -if ARCH_CHIP_STM32 -source "arch/arm/src/stm32/Kconfig" -endif -if ARCH_CHIP_STM32F0 || ARCH_CHIP_STM32L0 || ARCH_CHIP_STM32G0 || ARCH_CHIP_STM32C0 -source "arch/arm/src/stm32f0l0g0/Kconfig" -endif -if ARCH_CHIP_STM32F7 -source "arch/arm/src/stm32f7/Kconfig" -endif -if ARCH_CHIP_STM32H7 -source "arch/arm/src/stm32h7/Kconfig" -endif -if ARCH_CHIP_STM32L4 -source "arch/arm/src/stm32l4/Kconfig" -endif -if ARCH_CHIP_STM32H5 -source "arch/arm/src/stm32h5/Kconfig" -endif -if ARCH_CHIP_STM32L5 -source "arch/arm/src/stm32l5/Kconfig" -endif -if ARCH_CHIP_STM32U5 -source "arch/arm/src/stm32u5/Kconfig" -endif -if ARCH_CHIP_STM32WB -source "arch/arm/src/stm32wb/Kconfig" -endif -if ARCH_CHIP_STM32WL5 -source "arch/arm/src/stm32wl5/Kconfig" -endif -if ARCH_CHIP_STR71X -source "arch/arm/src/str71x/Kconfig" -endif -if ARCH_CHIP_TMS570 -source "arch/arm/src/tms570/Kconfig" -endif -if ARCH_CHIP_XMC4 -source "arch/arm/src/xmc4/Kconfig" -endif -if ARCH_CHIP_MX8MP -source "arch/arm/src/mx8mp/Kconfig" -endif -if ARCH_CHIP_PHY62XX -source "arch/arm/src/phy62xx/Kconfig" -endif -if ARCH_CHIP_CXD56XX -source "arch/arm/src/cxd56xx/Kconfig" -endif -if ARCH_CHIP_TLSR82 -source "arch/arm/src/tlsr82/Kconfig" -endif -if ARCH_CHIP_QEMU_ARM -source "arch/arm/src/qemu/Kconfig" -endif -if ARCH_CHIP_MPS -source "arch/arm/src/mps/Kconfig" -endif -if ARCH_CHIP_GOLDFISH_ARM -source "arch/arm/src/goldfish/Kconfig" -endif -if ARCH_CHIP_AT32 -source "arch/arm/src/at32/Kconfig" -endif -if ARCH_CHIP_CXD32XX -source "arch/arm/src/cxd32xx/Kconfig" -endif -if ARCH_CHIP_MCX_NXXX -source "arch/arm/src/mcx-nxxx/Kconfig" -endif -endif # ARCH_ARM + +source "arch/Kconfig" \ No newline at end of file diff --git a/arch/arm/Kconfig.arch b/arch/arm/Kconfig.arch new file mode 100644 index 0000000000..3a29edb6c5 --- /dev/null +++ b/arch/arm/Kconfig.arch @@ -0,0 +1,362 @@ + +config ARCH_ARM + bool + default y + select ARCH_HAVE_BACKTRACE + select ARCH_HAVE_INTERRUPTSTACK + select ARCH_HAVE_FORK + select ARCH_HAVE_STACKCHECK + select ARCH_HAVE_CUSTOMOPT + select ARCH_HAVE_STDARG_H + select ARCH_HAVE_SETJMP if !ARCH_TOOLCHAIN_IAR + select ARCH_HAVE_SYSCALL_HOOKS + select ARCH_HAVE_RDWR_MEM_CPU_RUN + select ARCH_HAVE_TCBINFO + select ARCH_HAVE_THREAD_LOCAL + ---help--- + The ARM architectures + +config ARCH_ARM7TDMI + bool + default n + select ARCH_DCACHE + select ARCH_ICACHE + ---help--- + The Arm7TDMI-S is an excellent workhorse processor capable of a wide + array of applications. Traditionally used in mobile handsets, the + processor is now broadly in many non-mobile applications. + +config ARCH_ARM920T + bool + default n + select ARCH_DCACHE + select ARCH_ICACHE + select ARCH_HAVE_MMU + select ARCH_USE_MMU + ---help--- + The ARM9 processor family is built around the ARM9TDMI processor and + incorporates the 16-bit Thumb instruction set. The ARM9 Thumb family + includes the ARM920T and ARM922T cached processor macrocells: + + - Dual 16k caches for applications running Symbian OS, Palm OS, + Linux and Windows CE, + - Dual 8k caches for applications running Symbian OS, Palm OS, Linux + and Windows CE Applications + +config ARCH_ARM926EJS + bool + default n + select ARCH_DCACHE + select ARCH_ICACHE + select ARCH_HAVE_MMU + select ARCH_USE_MMU + ---help--- + Arm926EJ-S is the entry point processor capable of supporting full + Operating Systems including Linux, WindowsCE, and Symbian. + + The ARM9E processor family enables single processor solutions for + microcontroller, DSP and Java applications. The ARM9E family of + products are DSP-enhanced 32-bit RISC processors, for applications + requiring a mix of DSP and microcontroller performance. The family + includes the ARM926EJ-S, ARM946E-S, ARM966E-S, and ARM968E-S + processor macrocells. They include signal processing extensions to + enhance 16-bit fixed point performance using a single-cycle 32 x 16 + multiply-accumulate (MAC) unit, and implement the 16-bit Thumb + instruction set. The ARM926EJ-S processor also includes ARM Jazelle + technology which enables the direct execution of Java bytecodes in + hardware. + +config ARCH_ARM1136J + bool + default n + select ARCH_DCACHE + select ARCH_ICACHE + select ARCH_HAVE_MMU + select ARCH_USE_MMU + ---help--- + Arm1136J(F)-S is very similar to Arm926EJ-S, but includes an + extended pipeline, basic SIMD (Single Instruction Multiple Data) + instructions, and improved frequency and performance. + +config ARCH_ARM1156T2 + bool + default n + select ARCH_DCACHE + select ARCH_ICACHE + select ARCH_HAVE_MMU + select ARCH_USE_MMU + ---help--- + Arm1156T2(F)-S is the highest-performance processor in the real-time + Classic Arm family. + +config ARCH_ARM1176JZ + bool + default n + select ARCH_DCACHE + select ARCH_ICACHE + select ARCH_HAVE_MMU + select ARCH_USE_MMU + ---help--- + Arm1176JZ(F)-S is the highest-performance single-core processor in + the Classic Arm family. It also introduced TrustZone technology to + enable secure execution outside of the reach of malicious code. + +config ARCH_ARMV6M + bool + default n + select ARCH_HAVE_CPUINFO + +config ARCH_CORTEXM0 + bool + default n + select ARM_THUMB + select ARCH_ARMV6M + select ARCH_HAVE_IRQPRIO + select ARCH_HAVE_IRQTRIGGER + select ARCH_HAVE_RAMVECTORS + select ARCH_HAVE_RESET + select ARCH_HAVE_HARDFAULT_DEBUG + +config ARCH_ARMV7M + bool + default n + select ARCH_HAVE_CPUINFO + select ARCH_HAVE_DEBUG + select ARCH_HAVE_PERF_EVENTS + +config ARCH_CORTEXM3 + bool + default n + select ARM_THUMB + select ARCH_ARMV7M + select ARCH_HAVE_IRQPRIO + select ARCH_HAVE_IRQTRIGGER + select ARCH_HAVE_RAMVECTORS + select ARCH_HAVE_HIPRI_INTERRUPT + select ARCH_HAVE_RESET + select ARCH_HAVE_TESTSET + select ARCH_HAVE_HARDFAULT_DEBUG + select ARCH_HAVE_MEMFAULT_DEBUG + select ARCH_HAVE_BUSFAULT_DEBUG + select ARCH_HAVE_USAGEFAULT_DEBUG + +config ARCH_CORTEXM4 + bool + default n + select ARM_THUMB + select ARCH_ARMV7M + select ARCH_HAVE_IRQPRIO + select ARCH_HAVE_IRQTRIGGER + select ARCH_HAVE_RAMVECTORS + select ARCH_HAVE_HIPRI_INTERRUPT + select ARCH_HAVE_RESET + select ARCH_HAVE_TESTSET + select ARCH_HAVE_HARDFAULT_DEBUG + select ARCH_HAVE_MEMFAULT_DEBUG + select ARCH_HAVE_BUSFAULT_DEBUG + select ARCH_HAVE_USAGEFAULT_DEBUG + +config ARCH_CORTEXM7 + bool + default n + select ARM_THUMB + select ARCH_ARMV7M + select ARCH_HAVE_FPU + select ARCH_HAVE_IRQPRIO + select ARCH_HAVE_IRQTRIGGER + select ARCH_HAVE_RAMVECTORS + select ARCH_HAVE_HIPRI_INTERRUPT + select ARCH_HAVE_RESET + select ARCH_HAVE_TESTSET + select ARCH_HAVE_HARDFAULT_DEBUG + select ARCH_HAVE_MEMFAULT_DEBUG + select ARCH_HAVE_BUSFAULT_DEBUG + select ARCH_HAVE_USAGEFAULT_DEBUG + +config ARCH_ARMV7A + bool + default n + select ARCH_HAVE_CPUINFO + select ARCH_HAVE_DEBUG + select ARCH_HAVE_PERF_EVENTS + select ARM_HAVE_WFE_SEV + +config ARCH_CORTEXA5 + bool + default n + select ARCH_ARMV7A + select ARCH_DCACHE + select ARCH_ICACHE + select ARCH_HAVE_MMU + select ARCH_USE_MMU + select ARCH_HAVE_TESTSET + select ARM_HAVE_MPCORE + +config ARCH_CORTEXA7 + bool + default n + select ARCH_ARMV7A + select ARCH_DCACHE + select ARCH_ICACHE + select ARCH_HAVE_MMU + select ARCH_USE_MMU + select ARCH_HAVE_TESTSET + select ARCH_HAVE_FPU + select ARM_HAVE_MPCORE + +config ARCH_CORTEXA8 + bool + default n + select ARCH_ARMV7A + select ARCH_DCACHE + select ARCH_ICACHE + select ARCH_HAVE_MMU + select ARCH_USE_MMU + select ARCH_HAVE_TESTSET + +config ARCH_CORTEXA9 + bool + default n + select ARCH_ARMV7A + select ARCH_DCACHE + select ARCH_ICACHE + select ARCH_HAVE_MMU + select ARCH_USE_MMU + select ARCH_HAVE_TESTSET + select ARM_HAVE_MPCORE + +config ARCH_ARMV7R + bool + default n + select ARCH_HAVE_CPUINFO + select ARCH_HAVE_PERF_EVENTS + +config ARCH_CORTEXR4 + bool + default n + select ARCH_ARMV7R + select ARCH_DCACHE + select ARCH_ICACHE + select ARCH_HAVE_MPU + select ARCH_HAVE_TESTSET + +config ARCH_CORTEXR5 + bool + default n + select ARCH_ARMV7R + select ARCH_DCACHE + select ARCH_ICACHE + select ARCH_HAVE_MPU + select ARCH_HAVE_TESTSET + +config ARCH_CORTEXR7 + bool + default n + select ARCH_ARMV7R + select ARCH_DCACHE + select ARCH_ICACHE + select ARCH_HAVE_MPU + select ARCH_HAVE_TESTSET + +config ARCH_CORTEXR52 + bool + default n + select ARCH_ARMV8R + select ARCH_HAVE_MPU + select ARCH_HAVE_TESTSET + +config ARCH_ARMV8M + bool + default n + select ARCH_HAVE_CPUINFO + select ARCH_HAVE_DEBUG + select ARCH_HAVE_PERF_EVENTS + +config ARCH_CORTEXM23 + bool + default n + select ARM_THUMB + select ARCH_ARMV8M + select ARCH_HAVE_IRQPRIO + select ARCH_HAVE_IRQTRIGGER + select ARCH_HAVE_RAMVECTORS + select ARCH_HAVE_HIPRI_INTERRUPT + select ARCH_HAVE_RESET + select ARCH_HAVE_TESTSET + select ARCH_HAVE_HARDFAULT_DEBUG + +config ARCH_CORTEXM33 + bool + default n + select ARM_THUMB + select ARCH_ARMV8M + select ARCH_HAVE_IRQPRIO + select ARCH_HAVE_IRQTRIGGER + select ARCH_HAVE_RAMVECTORS + select ARCH_HAVE_HIPRI_INTERRUPT + select ARCH_HAVE_RESET + select ARCH_HAVE_TESTSET + select ARCH_HAVE_HARDFAULT_DEBUG + select ARCH_HAVE_MEMFAULT_DEBUG + select ARCH_HAVE_BUSFAULT_DEBUG + select ARCH_HAVE_USAGEFAULT_DEBUG + select ARCH_HAVE_SECUREFAULT_DEBUG if ARCH_TRUSTZONE_SECURE + +config ARCH_CORTEXM35P + bool + default n + select ARM_THUMB + select ARCH_ARMV8M + select ARCH_HAVE_IRQPRIO + select ARCH_HAVE_IRQTRIGGER + select ARCH_HAVE_RAMVECTORS + select ARCH_HAVE_HIPRI_INTERRUPT + select ARCH_HAVE_RESET + select ARCH_HAVE_TESTSET + select ARCH_HAVE_HARDFAULT_DEBUG + select ARCH_HAVE_MEMFAULT_DEBUG + select ARCH_HAVE_BUSFAULT_DEBUG + select ARCH_HAVE_USAGEFAULT_DEBUG + select ARCH_HAVE_SECUREFAULT_DEBUG if ARCH_TRUSTZONE_SECURE + +config ARCH_CORTEXM55 + bool + default n + select ARM_THUMB + select ARCH_ARMV8M + select ARCH_HAVE_IRQPRIO + select ARCH_HAVE_IRQTRIGGER + select ARCH_HAVE_RAMVECTORS + select ARCH_HAVE_HIPRI_INTERRUPT + select ARCH_HAVE_RESET + select ARCH_HAVE_TESTSET + select ARCH_HAVE_HARDFAULT_DEBUG + select ARCH_HAVE_MEMFAULT_DEBUG + select ARCH_HAVE_BUSFAULT_DEBUG + select ARCH_HAVE_USAGEFAULT_DEBUG + select ARCH_HAVE_SECUREFAULT_DEBUG if ARCH_TRUSTZONE_SECURE + +config ARCH_CORTEXM85 + bool + default n + select ARM_THUMB + select ARCH_ARMV8M + select ARCH_HAVE_IRQPRIO + select ARCH_HAVE_IRQTRIGGER + select ARCH_HAVE_RAMVECTORS + select ARCH_HAVE_HIPRI_INTERRUPT + select ARCH_HAVE_RESET + select ARCH_HAVE_TESTSET + select ARCH_HAVE_HARDFAULT_DEBUG + select ARCH_HAVE_MEMFAULT_DEBUG + select ARCH_HAVE_BUSFAULT_DEBUG + select ARCH_HAVE_USAGEFAULT_DEBUG + select ARCH_HAVE_SECUREFAULT_DEBUG if ARCH_TRUSTZONE_SECURE + +config ARCH_ARMV8R + bool + default n + select ARCH_HAVE_CPUINFO + select ARCH_HAVE_PERF_EVENTS + select ONESHOT + select ALARM_ARCH \ No newline at end of file diff --git a/arch/arm/Makefile b/arch/arm/Makefile new file mode 100644 index 0000000000..7587f38453 --- /dev/null +++ b/arch/arm/Makefile @@ -0,0 +1,88 @@ +############################################################################ +# arch/arm/src/Makefile +# +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. The +# ASF licenses this file to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +############################################################################ + +TOOLCHAIN_NAME := $(notdir ${TOOLCHAIN}) +TOOLCHAIN_NAME := $(basename ${TOOLCHAIN_NAME}) + +VPATH += ${ARCH_DIR}/common +include ${ARCH_DIR}/common/Make.defs + +VPATH += ${ARCH_DIR}/${ARCH_FAMILY} +include ${ARCH_DIR}/${ARCH_FAMILY}/Make.defs + +VPATH += ${ARCH_DIR}/${TOOLCHAIN_NAME} + +$(info TOOLCHAIN: ${TOOLCHAIN}) +INCLUDES := ${INCDIR_PREFIX}${NXBASE}/include +INCLUDES += ${INCDIR_PREFIX}${NXBASE}/include/chip +INCLUDES += ${INCDIR_PREFIX}${NXBASE}/sched +INCLUDES += ${INCDIR_PREFIX}${ARCH_DIR}/common + +DEFINES = -D__KERNEL__ + +CFLAGS += ${INCLUDES} +CFLAGS += ${DEFINES} + +AFLAGS += ${INCLUDES} +CFLAGS += ${DEFINES} +AFLAGS += -D__ASSEMBLY__ + +BIN = libarch.a + +STARTUP_OBJS = $(STARTUP_CSRC:.c=.o) +STARTUP_OBJS := $(addprefix ${NXOUT}/, ${STARTUP_OBJS}) + +HEAD_OBJS = $(HEAD_ASRC:.S=.o) +HEAD_OBJS := $(addprefix ${NXOUT}/, ${HEAD_OBJS}) + +COBJS = $(CSRCS:.c=.o) +COBJS := $(addprefix ${NXOUT}/, ${COBJS}) + +AOBJS = $(ASRCS:.S=.o) +AOBJS := $(addprefix ${NXOUT}/, ${AOBJS}) + +OBJS = ${STARTUP_OBJS} ${HEAD_OBJ} ${COBJS} ${AOBJS} + +${STARTUP_OBJS} ${COBJS}: ${NXOUT}/%.o: %.c + $(call COMPILE, $<, $@, -MMD) + +${HEAD_OBJS} ${AOBJS}: ${NXOUT}/%.o: %.S + $(call ASSEMBLE, $<, $@, -MMD) + +symlink: + $(call LINK, ${ARCH_DIR}/include, ${NXBASE}/include/arch) + $(call LINK, ${NXBASE}/soc/arm/include/${ARCH_CHIP}, ${NXBASE}/include/chip) + $(call LINK, ${NXOUT}/config.h, ${NXBASE}/include/nuttx/config.h) + +unlink: + $(call UNLINK, ${NXBASE}/include/arch) + $(call UNLINK, ${NXBASE}/include/chip) + $(call UNLINK, ${NXBASE}/include/nuttx/config.h) + +${BIN}: ${OBJS} + $(call ARCHIVE, ${NXOUT}/$@, $^) + +.PHONY: symlink unlink all +.IGNORE: ${BIN} + +all: symlink ${BIN} unlink + diff --git a/arch/arm/src/arm/Kconfig b/arch/arm/arm/Kconfig similarity index 100% rename from arch/arm/src/arm/Kconfig rename to arch/arm/arm/Kconfig diff --git a/arch/arm/src/arm/Make.defs b/arch/arm/arm/Make.defs similarity index 71% rename from arch/arm/src/arm/Make.defs rename to arch/arm/arm/Make.defs index faff6009b7..fc3c541f9a 100644 --- a/arch/arm/src/arm/Make.defs +++ b/arch/arm/arm/Make.defs @@ -20,20 +20,16 @@ # ############################################################################ -# Common ARM files - -include common/Make.defs - HEAD_ASRC = arm_head.S -CMN_CSRCS += arm_dataabort.c arm_doirq.c arm_initialstate.c -CMN_CSRCS += arm_prefetchabort.c arm_schedulesigaction.c -CMN_CSRCS += arm_sigdeliver.c arm_syscall.c arm_tcbinfo.c -CMN_CSRCS += arm_undefinedinsn.c +CSRCS += arm_dataabort.c arm_doirq.c arm_initialstate.c +CSRCS += arm_prefetchabort.c arm_schedulesigaction.c +CSRCS += arm_sigdeliver.c arm_syscall.c arm_tcbinfo.c +CSRCS += arm_undefinedinsn.c -CMN_ASRCS += arm_cache.S arm_vectors.S arm_vectortab.S -CMN_ASRCS += arm_saveusercontext.S +ASRCS += arm_cache.S arm_vectors.S arm_vectortab.S +ASRCS += arm_saveusercontext.S ifeq ($(CONFIG_LEGACY_PAGING),y) - CMN_CSRCS += arm_pginitialize.c arm_checkmapping.c arm_allocpage.c arm_va2pte.c + CSRCS += arm_pginitialize.c arm_checkmapping.c arm_allocpage.c arm_va2pte.c endif diff --git a/arch/arm/src/arm/Toolchain.defs b/arch/arm/arm/Toolchain.defs similarity index 100% rename from arch/arm/src/arm/Toolchain.defs rename to arch/arm/arm/Toolchain.defs diff --git a/arch/arm/src/arm/arm.h b/arch/arm/arm/arm.h similarity index 100% rename from arch/arm/src/arm/arm.h rename to arch/arm/arm/arm.h diff --git a/arch/arm/src/arm/arm_allocpage.c b/arch/arm/arm/arm_allocpage.c similarity index 100% rename from arch/arm/src/arm/arm_allocpage.c rename to arch/arm/arm/arm_allocpage.c diff --git a/arch/arm/src/arm/arm_cache.S b/arch/arm/arm/arm_cache.S similarity index 100% rename from arch/arm/src/arm/arm_cache.S rename to arch/arm/arm/arm_cache.S diff --git a/arch/arm/src/arm/arm_checkmapping.c b/arch/arm/arm/arm_checkmapping.c similarity index 100% rename from arch/arm/src/arm/arm_checkmapping.c rename to arch/arm/arm/arm_checkmapping.c diff --git a/arch/arm/src/arm/arm_dataabort.c b/arch/arm/arm/arm_dataabort.c similarity index 100% rename from arch/arm/src/arm/arm_dataabort.c rename to arch/arm/arm/arm_dataabort.c diff --git a/arch/arm/src/arm/arm_doirq.c b/arch/arm/arm/arm_doirq.c similarity index 96% rename from arch/arm/src/arm/arm_doirq.c rename to arch/arm/arm/arm_doirq.c index 8273de97be..bd49b4edec 100644 --- a/arch/arm/src/arm/arm_doirq.c +++ b/arch/arm/arm/arm_doirq.c @@ -32,8 +32,6 @@ #include #include -#include -#include #include #include "arm_internal.h" @@ -62,7 +60,6 @@ uint32_t *arm_doirq(int irq, uint32_t *regs) { struct tcb_s *tcb = this_task(); - board_autoled_on(LED_INIRQ); #ifdef CONFIG_SUPPRESS_INTERRUPTS PANIC(); #else @@ -117,6 +114,5 @@ uint32_t *arm_doirq(int irq, uint32_t *regs) up_set_interrupt_context(false); #endif - board_autoled_off(LED_INIRQ); return regs; } diff --git a/arch/arm/src/arm/arm_head.S b/arch/arm/arm/arm_head.S similarity index 100% rename from arch/arm/src/arm/arm_head.S rename to arch/arm/arm/arm_head.S diff --git a/arch/arm/src/arm/arm_initialstate.c b/arch/arm/arm/arm_initialstate.c similarity index 100% rename from arch/arm/src/arm/arm_initialstate.c rename to arch/arm/arm/arm_initialstate.c diff --git a/arch/arm/src/arm/arm_nommuhead.S b/arch/arm/arm/arm_nommuhead.S similarity index 100% rename from arch/arm/src/arm/arm_nommuhead.S rename to arch/arm/arm/arm_nommuhead.S diff --git a/arch/arm/src/arm/arm_pginitialize.c b/arch/arm/arm/arm_pginitialize.c similarity index 100% rename from arch/arm/src/arm/arm_pginitialize.c rename to arch/arm/arm/arm_pginitialize.c diff --git a/arch/arm/src/arm/arm_prefetchabort.c b/arch/arm/arm/arm_prefetchabort.c similarity index 100% rename from arch/arm/src/arm/arm_prefetchabort.c rename to arch/arm/arm/arm_prefetchabort.c diff --git a/arch/arm/src/arm/arm_saveusercontext.S b/arch/arm/arm/arm_saveusercontext.S similarity index 100% rename from arch/arm/src/arm/arm_saveusercontext.S rename to arch/arm/arm/arm_saveusercontext.S diff --git a/arch/arm/src/arm/arm_schedulesigaction.c b/arch/arm/arm/arm_schedulesigaction.c similarity index 100% rename from arch/arm/src/arm/arm_schedulesigaction.c rename to arch/arm/arm/arm_schedulesigaction.c diff --git a/arch/arm/src/arm/arm_sigdeliver.c b/arch/arm/arm/arm_sigdeliver.c similarity index 100% rename from arch/arm/src/arm/arm_sigdeliver.c rename to arch/arm/arm/arm_sigdeliver.c diff --git a/arch/arm/src/arm/arm_syscall.c b/arch/arm/arm/arm_syscall.c similarity index 100% rename from arch/arm/src/arm/arm_syscall.c rename to arch/arm/arm/arm_syscall.c diff --git a/arch/arm/src/arm/arm_tcbinfo.c b/arch/arm/arm/arm_tcbinfo.c similarity index 100% rename from arch/arm/src/arm/arm_tcbinfo.c rename to arch/arm/arm/arm_tcbinfo.c diff --git a/arch/arm/src/arm/arm_undefinedinsn.c b/arch/arm/arm/arm_undefinedinsn.c similarity index 100% rename from arch/arm/src/arm/arm_undefinedinsn.c rename to arch/arm/arm/arm_undefinedinsn.c diff --git a/arch/arm/src/arm/arm_va2pte.c b/arch/arm/arm/arm_va2pte.c similarity index 100% rename from arch/arm/src/arm/arm_va2pte.c rename to arch/arm/arm/arm_va2pte.c diff --git a/arch/arm/src/arm/arm_vectors.S b/arch/arm/arm/arm_vectors.S similarity index 100% rename from arch/arm/src/arm/arm_vectors.S rename to arch/arm/arm/arm_vectors.S diff --git a/arch/arm/src/arm/arm_vectortab.S b/arch/arm/arm/arm_vectortab.S similarity index 100% rename from arch/arm/src/arm/arm_vectortab.S rename to arch/arm/arm/arm_vectortab.S diff --git a/arch/arm/src/arm/pg_macros.h b/arch/arm/arm/pg_macros.h similarity index 100% rename from arch/arm/src/arm/pg_macros.h rename to arch/arm/arm/pg_macros.h diff --git a/arch/arm/src/armv6-m/Kconfig b/arch/arm/armv6-m/Kconfig similarity index 100% rename from arch/arm/src/armv6-m/Kconfig rename to arch/arm/armv6-m/Kconfig diff --git a/arch/arm/src/armv6-m/Make.defs b/arch/arm/armv6-m/Make.defs similarity index 80% rename from arch/arm/src/armv6-m/Make.defs rename to arch/arm/armv6-m/Make.defs index 0bd98bc57c..b35ae5799f 100644 --- a/arch/arm/src/armv6-m/Make.defs +++ b/arch/arm/armv6-m/Make.defs @@ -20,10 +20,6 @@ # ############################################################################ -# Common ARM files - -include common/Make.defs - CMN_ASRCS += arm_exception.S arm_saveusercontext.S CMN_CSRCS += arm_cpuinfo.c arm_doirq.c arm_hardfault.c arm_initialstate.c @@ -35,9 +31,17 @@ ifneq ($(CONFIG_ARCH_HAVE_CUSTOM_VECTORS),y) CMN_CSRCS += arm_vectors.c endif +<<<<<<< HEAD:arch/z80/src/z80/Make.defs +CMN_CSRCS = z80_allocateheap.c z80_createstack.c z80_doirq.c +CMN_CSRCS += z80_exit.c z80_initialize.c z80_interruptcontext.c +CMN_CSRCS += z80_idle.c z80_mdelay.c z80_releasestack.c +CMN_CSRCS += z80_switchcontext.c z80_stackframe.c +CMN_CSRCS += z80_udelay.c z80_usestack.c +======= ifneq ($(filter y,$(CONFIG_DEBUG_FEATURES)$(CONFIG_ARM_COREDUMP_REGION)),) CMN_CSRCS += arm_dumpnvic.c endif +>>>>>>> 753c7b2dd6 (walnux: moveout):arch/arm/armv6-m/Make.defs ifeq ($(CONFIG_ARCH_RAMVECTORS),y) CMN_CSRCS += arm_ramvec_initialize.c arm_ramvec_attach.c diff --git a/arch/arm/src/armv6-m/Toolchain.defs b/arch/arm/armv6-m/Toolchain.defs similarity index 100% rename from arch/arm/src/armv6-m/Toolchain.defs rename to arch/arm/armv6-m/Toolchain.defs diff --git a/arch/arm/src/armv6-m/arm_cpuinfo.c b/arch/arm/armv6-m/arm_cpuinfo.c similarity index 100% rename from arch/arm/src/armv6-m/arm_cpuinfo.c rename to arch/arm/armv6-m/arm_cpuinfo.c diff --git a/arch/arm/src/armv6-m/arm_doirq.c b/arch/arm/armv6-m/arm_doirq.c similarity index 100% rename from arch/arm/src/armv6-m/arm_doirq.c rename to arch/arm/armv6-m/arm_doirq.c diff --git a/arch/arm/src/armv6-m/arm_dumpnvic.c b/arch/arm/armv6-m/arm_dumpnvic.c similarity index 100% rename from arch/arm/src/armv6-m/arm_dumpnvic.c rename to arch/arm/armv6-m/arm_dumpnvic.c diff --git a/arch/arm/src/armv6-m/arm_exception.S b/arch/arm/armv6-m/arm_exception.S similarity index 100% rename from arch/arm/src/armv6-m/arm_exception.S rename to arch/arm/armv6-m/arm_exception.S diff --git a/arch/arm/src/armv6-m/arm_hardfault.c b/arch/arm/armv6-m/arm_hardfault.c similarity index 100% rename from arch/arm/src/armv6-m/arm_hardfault.c rename to arch/arm/armv6-m/arm_hardfault.c diff --git a/arch/arm/src/armv6-m/arm_initialstate.c b/arch/arm/armv6-m/arm_initialstate.c similarity index 100% rename from arch/arm/src/armv6-m/arm_initialstate.c rename to arch/arm/armv6-m/arm_initialstate.c diff --git a/arch/arm/src/armv6-m/arm_ramvec_attach.c b/arch/arm/armv6-m/arm_ramvec_attach.c similarity index 100% rename from arch/arm/src/armv6-m/arm_ramvec_attach.c rename to arch/arm/armv6-m/arm_ramvec_attach.c diff --git a/arch/arm/src/armv6-m/arm_ramvec_initialize.c b/arch/arm/armv6-m/arm_ramvec_initialize.c similarity index 100% rename from arch/arm/src/armv6-m/arm_ramvec_initialize.c rename to arch/arm/armv6-m/arm_ramvec_initialize.c diff --git a/arch/arm/src/armv6-m/arm_saveusercontext.S b/arch/arm/armv6-m/arm_saveusercontext.S similarity index 100% rename from arch/arm/src/armv6-m/arm_saveusercontext.S rename to arch/arm/armv6-m/arm_saveusercontext.S diff --git a/arch/arm/src/armv6-m/arm_schedulesigaction.c b/arch/arm/armv6-m/arm_schedulesigaction.c similarity index 100% rename from arch/arm/src/armv6-m/arm_schedulesigaction.c rename to arch/arm/armv6-m/arm_schedulesigaction.c diff --git a/arch/arm/src/armv6-m/arm_sigdeliver.c b/arch/arm/armv6-m/arm_sigdeliver.c similarity index 100% rename from arch/arm/src/armv6-m/arm_sigdeliver.c rename to arch/arm/armv6-m/arm_sigdeliver.c diff --git a/arch/arm/src/armv6-m/arm_svcall.c b/arch/arm/armv6-m/arm_svcall.c similarity index 100% rename from arch/arm/src/armv6-m/arm_svcall.c rename to arch/arm/armv6-m/arm_svcall.c diff --git a/arch/arm/src/armv6-m/arm_systemreset.c b/arch/arm/armv6-m/arm_systemreset.c similarity index 100% rename from arch/arm/src/armv6-m/arm_systemreset.c rename to arch/arm/armv6-m/arm_systemreset.c diff --git a/arch/arm/src/armv6-m/arm_tcbinfo.c b/arch/arm/armv6-m/arm_tcbinfo.c similarity index 100% rename from arch/arm/src/armv6-m/arm_tcbinfo.c rename to arch/arm/armv6-m/arm_tcbinfo.c diff --git a/arch/arm/src/armv6-m/arm_trigger_irq.c b/arch/arm/armv6-m/arm_trigger_irq.c similarity index 100% rename from arch/arm/src/armv6-m/arm_trigger_irq.c rename to arch/arm/armv6-m/arm_trigger_irq.c diff --git a/arch/arm/src/armv6-m/arm_vectors.c b/arch/arm/armv6-m/arm_vectors.c similarity index 100% rename from arch/arm/src/armv6-m/arm_vectors.c rename to arch/arm/armv6-m/arm_vectors.c diff --git a/arch/arm/src/armv6-m/exc_return.h b/arch/arm/armv6-m/exc_return.h similarity index 100% rename from arch/arm/src/armv6-m/exc_return.h rename to arch/arm/armv6-m/exc_return.h diff --git a/arch/arm/src/armv6-m/nvic.h b/arch/arm/armv6-m/nvic.h similarity index 100% rename from arch/arm/src/armv6-m/nvic.h rename to arch/arm/armv6-m/nvic.h diff --git a/arch/arm/src/armv6-m/psr.h b/arch/arm/armv6-m/psr.h similarity index 100% rename from arch/arm/src/armv6-m/psr.h rename to arch/arm/armv6-m/psr.h diff --git a/arch/arm/src/armv6-m/ram_vectors.h b/arch/arm/armv6-m/ram_vectors.h similarity index 100% rename from arch/arm/src/armv6-m/ram_vectors.h rename to arch/arm/armv6-m/ram_vectors.h diff --git a/arch/z16/src/common/z16_mdelay.c b/arch/arm/armv6-m/z16_mdelay.c similarity index 100% rename from arch/z16/src/common/z16_mdelay.c rename to arch/arm/armv6-m/z16_mdelay.c diff --git a/arch/z16/src/common/z16_udelay.c b/arch/arm/armv6-m/z16_udelay.c similarity index 100% rename from arch/z16/src/common/z16_udelay.c rename to arch/arm/armv6-m/z16_udelay.c diff --git a/arch/arm/src/armv7-a/Kconfig b/arch/arm/armv7-a/Kconfig similarity index 100% rename from arch/arm/src/armv7-a/Kconfig rename to arch/arm/armv7-a/Kconfig diff --git a/arch/arm/src/armv7-a/Make.defs b/arch/arm/armv7-a/Make.defs similarity index 98% rename from arch/arm/src/armv7-a/Make.defs rename to arch/arm/armv7-a/Make.defs index 690226f943..b5fc2fc84f 100644 --- a/arch/arm/src/armv7-a/Make.defs +++ b/arch/arm/armv7-a/Make.defs @@ -20,10 +20,6 @@ # ############################################################################ -# Common ARM files - -include common/Make.defs - # The vector table is the "head" object, i.e., the one that must forced into # the link in order to draw in all of the other components diff --git a/arch/arm/src/armv7-a/Toolchain.defs b/arch/arm/armv7-a/Toolchain.defs similarity index 100% rename from arch/arm/src/armv7-a/Toolchain.defs rename to arch/arm/armv7-a/Toolchain.defs diff --git a/arch/arm/src/armv7-a/addrenv.h b/arch/arm/armv7-a/addrenv.h similarity index 100% rename from arch/arm/src/armv7-a/addrenv.h rename to arch/arm/armv7-a/addrenv.h diff --git a/arch/arm/src/armv7-a/arm.h b/arch/arm/armv7-a/arm.h similarity index 100% rename from arch/arm/src/armv7-a/arm.h rename to arch/arm/armv7-a/arm.h diff --git a/arch/arm/src/armv7-a/arm_addrenv.c b/arch/arm/armv7-a/arm_addrenv.c similarity index 100% rename from arch/arm/src/armv7-a/arm_addrenv.c rename to arch/arm/armv7-a/arm_addrenv.c diff --git a/arch/arm/src/armv7-a/arm_addrenv_kstack.c b/arch/arm/armv7-a/arm_addrenv_kstack.c similarity index 100% rename from arch/arm/src/armv7-a/arm_addrenv_kstack.c rename to arch/arm/armv7-a/arm_addrenv_kstack.c diff --git a/arch/arm/src/armv7-a/arm_addrenv_perms.c b/arch/arm/armv7-a/arm_addrenv_perms.c similarity index 100% rename from arch/arm/src/armv7-a/arm_addrenv_perms.c rename to arch/arm/armv7-a/arm_addrenv_perms.c diff --git a/arch/arm/src/armv7-a/arm_addrenv_pgmap.c b/arch/arm/armv7-a/arm_addrenv_pgmap.c similarity index 100% rename from arch/arm/src/armv7-a/arm_addrenv_pgmap.c rename to arch/arm/armv7-a/arm_addrenv_pgmap.c diff --git a/arch/arm/src/armv7-a/arm_addrenv_shm.c b/arch/arm/armv7-a/arm_addrenv_shm.c similarity index 100% rename from arch/arm/src/armv7-a/arm_addrenv_shm.c rename to arch/arm/armv7-a/arm_addrenv_shm.c diff --git a/arch/arm/src/armv7-a/arm_addrenv_ustack.c b/arch/arm/armv7-a/arm_addrenv_ustack.c similarity index 100% rename from arch/arm/src/armv7-a/arm_addrenv_ustack.c rename to arch/arm/armv7-a/arm_addrenv_ustack.c diff --git a/arch/arm/src/armv7-a/arm_addrenv_utils.c b/arch/arm/armv7-a/arm_addrenv_utils.c similarity index 100% rename from arch/arm/src/armv7-a/arm_addrenv_utils.c rename to arch/arm/armv7-a/arm_addrenv_utils.c diff --git a/arch/arm/src/armv7-a/arm_allocpage.c b/arch/arm/armv7-a/arm_allocpage.c similarity index 100% rename from arch/arm/src/armv7-a/arm_allocpage.c rename to arch/arm/armv7-a/arm_allocpage.c diff --git a/arch/arm/src/armv7-a/arm_cache.c b/arch/arm/armv7-a/arm_cache.c similarity index 100% rename from arch/arm/src/armv7-a/arm_cache.c rename to arch/arm/armv7-a/arm_cache.c diff --git a/arch/arm/src/armv7-a/arm_checkmapping.c b/arch/arm/armv7-a/arm_checkmapping.c similarity index 100% rename from arch/arm/src/armv7-a/arm_checkmapping.c rename to arch/arm/armv7-a/arm_checkmapping.c diff --git a/arch/arm/src/armv7-a/arm_cpu_psci.c b/arch/arm/armv7-a/arm_cpu_psci.c similarity index 100% rename from arch/arm/src/armv7-a/arm_cpu_psci.c rename to arch/arm/armv7-a/arm_cpu_psci.c diff --git a/arch/arm/src/armv7-a/arm_cpu_psci.h b/arch/arm/armv7-a/arm_cpu_psci.h similarity index 100% rename from arch/arm/src/armv7-a/arm_cpu_psci.h rename to arch/arm/armv7-a/arm_cpu_psci.h diff --git a/arch/arm/src/armv7-a/arm_cpuhead.S b/arch/arm/armv7-a/arm_cpuhead.S similarity index 100% rename from arch/arm/src/armv7-a/arm_cpuhead.S rename to arch/arm/armv7-a/arm_cpuhead.S diff --git a/arch/arm/src/armv7-a/arm_cpuidlestack.c b/arch/arm/armv7-a/arm_cpuidlestack.c similarity index 100% rename from arch/arm/src/armv7-a/arm_cpuidlestack.c rename to arch/arm/armv7-a/arm_cpuidlestack.c diff --git a/arch/arm/src/armv7-a/arm_cpuinfo.c b/arch/arm/armv7-a/arm_cpuinfo.c similarity index 100% rename from arch/arm/src/armv7-a/arm_cpuinfo.c rename to arch/arm/armv7-a/arm_cpuinfo.c diff --git a/arch/arm/src/armv7-a/arm_cpustart.c b/arch/arm/armv7-a/arm_cpustart.c similarity index 100% rename from arch/arm/src/armv7-a/arm_cpustart.c rename to arch/arm/armv7-a/arm_cpustart.c diff --git a/arch/arm/src/armv7-a/arm_dataabort.c b/arch/arm/armv7-a/arm_dataabort.c similarity index 100% rename from arch/arm/src/armv7-a/arm_dataabort.c rename to arch/arm/armv7-a/arm_dataabort.c diff --git a/arch/arm/src/armv7-a/arm_dofiq.c b/arch/arm/armv7-a/arm_dofiq.c similarity index 100% rename from arch/arm/src/armv7-a/arm_dofiq.c rename to arch/arm/armv7-a/arm_dofiq.c diff --git a/arch/arm/src/armv7-a/arm_doirq.c b/arch/arm/armv7-a/arm_doirq.c similarity index 100% rename from arch/arm/src/armv7-a/arm_doirq.c rename to arch/arm/armv7-a/arm_doirq.c diff --git a/arch/arm/src/armv7-a/arm_fpucmp.c b/arch/arm/armv7-a/arm_fpucmp.c similarity index 100% rename from arch/arm/src/armv7-a/arm_fpucmp.c rename to arch/arm/armv7-a/arm_fpucmp.c diff --git a/arch/arm/src/armv7-a/arm_fpuconfig.S b/arch/arm/armv7-a/arm_fpuconfig.S similarity index 100% rename from arch/arm/src/armv7-a/arm_fpuconfig.S rename to arch/arm/armv7-a/arm_fpuconfig.S diff --git a/arch/arm/src/armv7-a/arm_gicv2.c b/arch/arm/armv7-a/arm_gicv2.c similarity index 100% rename from arch/arm/src/armv7-a/arm_gicv2.c rename to arch/arm/armv7-a/arm_gicv2.c diff --git a/arch/arm/src/armv7-a/arm_gicv2_dump.c b/arch/arm/armv7-a/arm_gicv2_dump.c similarity index 100% rename from arch/arm/src/armv7-a/arm_gicv2_dump.c rename to arch/arm/armv7-a/arm_gicv2_dump.c diff --git a/arch/arm/src/armv7-a/arm_gicv2m.c b/arch/arm/armv7-a/arm_gicv2m.c similarity index 100% rename from arch/arm/src/armv7-a/arm_gicv2m.c rename to arch/arm/armv7-a/arm_gicv2m.c diff --git a/arch/arm/src/armv7-a/arm_head.S b/arch/arm/armv7-a/arm_head.S similarity index 100% rename from arch/arm/src/armv7-a/arm_head.S rename to arch/arm/armv7-a/arm_head.S diff --git a/arch/arm/src/armv7-a/arm_hwdebug.c b/arch/arm/armv7-a/arm_hwdebug.c similarity index 100% rename from arch/arm/src/armv7-a/arm_hwdebug.c rename to arch/arm/armv7-a/arm_hwdebug.c diff --git a/arch/arm/src/armv7-a/arm_initialstate.c b/arch/arm/armv7-a/arm_initialstate.c similarity index 100% rename from arch/arm/src/armv7-a/arm_initialstate.c rename to arch/arm/armv7-a/arm_initialstate.c diff --git a/arch/arm/src/armv7-a/arm_l2cc_pl310.c b/arch/arm/armv7-a/arm_l2cc_pl310.c similarity index 100% rename from arch/arm/src/armv7-a/arm_l2cc_pl310.c rename to arch/arm/armv7-a/arm_l2cc_pl310.c diff --git a/arch/arm/src/armv7-a/arm_mmu.c b/arch/arm/armv7-a/arm_mmu.c similarity index 100% rename from arch/arm/src/armv7-a/arm_mmu.c rename to arch/arm/armv7-a/arm_mmu.c diff --git a/arch/arm/src/armv7-a/arm_perf.c b/arch/arm/armv7-a/arm_perf.c similarity index 100% rename from arch/arm/src/armv7-a/arm_perf.c rename to arch/arm/armv7-a/arm_perf.c diff --git a/arch/arm/src/armv7-a/arm_pgalloc.c b/arch/arm/armv7-a/arm_pgalloc.c similarity index 100% rename from arch/arm/src/armv7-a/arm_pgalloc.c rename to arch/arm/armv7-a/arm_pgalloc.c diff --git a/arch/arm/src/armv7-a/arm_pghead.S b/arch/arm/armv7-a/arm_pghead.S similarity index 100% rename from arch/arm/src/armv7-a/arm_pghead.S rename to arch/arm/armv7-a/arm_pghead.S diff --git a/arch/arm/src/armv7-a/arm_pginitialize.c b/arch/arm/armv7-a/arm_pginitialize.c similarity index 100% rename from arch/arm/src/armv7-a/arm_pginitialize.c rename to arch/arm/armv7-a/arm_pginitialize.c diff --git a/arch/arm/src/armv7-a/arm_physpgaddr.c b/arch/arm/armv7-a/arm_physpgaddr.c similarity index 100% rename from arch/arm/src/armv7-a/arm_physpgaddr.c rename to arch/arm/armv7-a/arm_physpgaddr.c diff --git a/arch/arm/src/armv7-a/arm_prefetchabort.c b/arch/arm/armv7-a/arm_prefetchabort.c similarity index 100% rename from arch/arm/src/armv7-a/arm_prefetchabort.c rename to arch/arm/armv7-a/arm_prefetchabort.c diff --git a/arch/arm/src/armv7-a/arm_saveusercontext.S b/arch/arm/armv7-a/arm_saveusercontext.S similarity index 100% rename from arch/arm/src/armv7-a/arm_saveusercontext.S rename to arch/arm/armv7-a/arm_saveusercontext.S diff --git a/arch/arm/src/armv7-a/arm_schedulesigaction.c b/arch/arm/armv7-a/arm_schedulesigaction.c similarity index 100% rename from arch/arm/src/armv7-a/arm_schedulesigaction.c rename to arch/arm/armv7-a/arm_schedulesigaction.c diff --git a/arch/arm/src/armv7-a/arm_scu.c b/arch/arm/armv7-a/arm_scu.c similarity index 100% rename from arch/arm/src/armv7-a/arm_scu.c rename to arch/arm/armv7-a/arm_scu.c diff --git a/arch/arm/src/armv7-a/arm_sigdeliver.c b/arch/arm/armv7-a/arm_sigdeliver.c similarity index 100% rename from arch/arm/src/armv7-a/arm_sigdeliver.c rename to arch/arm/armv7-a/arm_sigdeliver.c diff --git a/arch/arm/src/armv7-a/arm_smccc.S b/arch/arm/armv7-a/arm_smccc.S similarity index 100% rename from arch/arm/src/armv7-a/arm_smccc.S rename to arch/arm/armv7-a/arm_smccc.S diff --git a/arch/arm/src/armv7-a/arm_smpcall.c b/arch/arm/armv7-a/arm_smpcall.c similarity index 100% rename from arch/arm/src/armv7-a/arm_smpcall.c rename to arch/arm/armv7-a/arm_smpcall.c diff --git a/arch/arm/src/armv7-a/arm_syscall.c b/arch/arm/armv7-a/arm_syscall.c similarity index 100% rename from arch/arm/src/armv7-a/arm_syscall.c rename to arch/arm/armv7-a/arm_syscall.c diff --git a/arch/arm/src/armv7-a/arm_tcbinfo.c b/arch/arm/armv7-a/arm_tcbinfo.c similarity index 100% rename from arch/arm/src/armv7-a/arm_tcbinfo.c rename to arch/arm/armv7-a/arm_tcbinfo.c diff --git a/arch/arm/src/armv7-a/arm_timer.c b/arch/arm/armv7-a/arm_timer.c similarity index 100% rename from arch/arm/src/armv7-a/arm_timer.c rename to arch/arm/armv7-a/arm_timer.c diff --git a/arch/arm/src/armv7-a/arm_timer.h b/arch/arm/armv7-a/arm_timer.h similarity index 100% rename from arch/arm/src/armv7-a/arm_timer.h rename to arch/arm/armv7-a/arm_timer.h diff --git a/arch/arm/src/armv7-a/arm_undefinedinsn.c b/arch/arm/armv7-a/arm_undefinedinsn.c similarity index 100% rename from arch/arm/src/armv7-a/arm_undefinedinsn.c rename to arch/arm/armv7-a/arm_undefinedinsn.c diff --git a/arch/arm/src/armv7-a/arm_va2pte.c b/arch/arm/armv7-a/arm_va2pte.c similarity index 100% rename from arch/arm/src/armv7-a/arm_va2pte.c rename to arch/arm/armv7-a/arm_va2pte.c diff --git a/arch/arm/src/armv7-a/arm_vectors.S b/arch/arm/armv7-a/arm_vectors.S similarity index 100% rename from arch/arm/src/armv7-a/arm_vectors.S rename to arch/arm/armv7-a/arm_vectors.S diff --git a/arch/arm/src/armv7-a/arm_vectortab.S b/arch/arm/armv7-a/arm_vectortab.S similarity index 100% rename from arch/arm/src/armv7-a/arm_vectortab.S rename to arch/arm/armv7-a/arm_vectortab.S diff --git a/arch/arm/src/armv7-a/arm_virtpgaddr.c b/arch/arm/armv7-a/arm_virtpgaddr.c similarity index 100% rename from arch/arm/src/armv7-a/arm_virtpgaddr.c rename to arch/arm/armv7-a/arm_virtpgaddr.c diff --git a/arch/arm/src/armv7-a/cp15_cacheops.c b/arch/arm/armv7-a/cp15_cacheops.c similarity index 100% rename from arch/arm/src/armv7-a/cp15_cacheops.c rename to arch/arm/armv7-a/cp15_cacheops.c diff --git a/arch/arm/src/armv7-a/cp15_cacheops.h b/arch/arm/armv7-a/cp15_cacheops.h similarity index 100% rename from arch/arm/src/armv7-a/cp15_cacheops.h rename to arch/arm/armv7-a/cp15_cacheops.h diff --git a/arch/arm/src/armv7-a/gic.h b/arch/arm/armv7-a/gic.h similarity index 100% rename from arch/arm/src/armv7-a/gic.h rename to arch/arm/armv7-a/gic.h diff --git a/arch/arm/src/armv7-a/gtm.h b/arch/arm/armv7-a/gtm.h similarity index 100% rename from arch/arm/src/armv7-a/gtm.h rename to arch/arm/armv7-a/gtm.h diff --git a/arch/arm/src/armv7-a/l2cc.h b/arch/arm/armv7-a/l2cc.h similarity index 100% rename from arch/arm/src/armv7-a/l2cc.h rename to arch/arm/armv7-a/l2cc.h diff --git a/arch/arm/src/armv7-a/l2cc_pl310.h b/arch/arm/armv7-a/l2cc_pl310.h similarity index 100% rename from arch/arm/src/armv7-a/l2cc_pl310.h rename to arch/arm/armv7-a/l2cc_pl310.h diff --git a/arch/arm/src/armv7-a/mmu.h b/arch/arm/armv7-a/mmu.h similarity index 100% rename from arch/arm/src/armv7-a/mmu.h rename to arch/arm/armv7-a/mmu.h diff --git a/arch/arm/src/armv7-a/mpcore.h b/arch/arm/armv7-a/mpcore.h similarity index 100% rename from arch/arm/src/armv7-a/mpcore.h rename to arch/arm/armv7-a/mpcore.h diff --git a/arch/arm/src/armv7-a/pgalloc.h b/arch/arm/armv7-a/pgalloc.h similarity index 100% rename from arch/arm/src/armv7-a/pgalloc.h rename to arch/arm/armv7-a/pgalloc.h diff --git a/arch/arm/src/armv7-a/sctlr.h b/arch/arm/armv7-a/sctlr.h similarity index 100% rename from arch/arm/src/armv7-a/sctlr.h rename to arch/arm/armv7-a/sctlr.h diff --git a/arch/arm/src/armv7-a/scu.h b/arch/arm/armv7-a/scu.h similarity index 100% rename from arch/arm/src/armv7-a/scu.h rename to arch/arm/armv7-a/scu.h diff --git a/arch/arm/src/armv7-a/smp.h b/arch/arm/armv7-a/smp.h similarity index 100% rename from arch/arm/src/armv7-a/smp.h rename to arch/arm/armv7-a/smp.h diff --git a/arch/arm/src/armv7-m/Kconfig b/arch/arm/armv7-m/Kconfig similarity index 100% rename from arch/arm/src/armv7-m/Kconfig rename to arch/arm/armv7-m/Kconfig diff --git a/arch/arm/src/armv7-m/Make.defs b/arch/arm/armv7-m/Make.defs similarity index 65% rename from arch/arm/src/armv7-m/Make.defs rename to arch/arm/armv7-m/Make.defs index 8edd3e1ca9..5c4408a2f7 100644 --- a/arch/arm/src/armv7-m/Make.defs +++ b/arch/arm/armv7-m/Make.defs @@ -20,48 +20,44 @@ # ############################################################################ -# Common ARM files +ASRCS += arm_exception.S arm_saveusercontext.S -include common/Make.defs - -CMN_ASRCS += arm_exception.S arm_saveusercontext.S - -CMN_CSRCS += arm_busfault.c arm_cache.c arm_cpuinfo.c arm_doirq.c -CMN_CSRCS += arm_hardfault.c arm_initialstate.c arm_itm.c -CMN_CSRCS += arm_memfault.c arm_perf.c -CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c -CMN_CSRCS += arm_svcall.c arm_systemreset.c arm_tcbinfo.c -CMN_CSRCS += arm_trigger_irq.c arm_usagefault.c arm_dbgmonitor.c +CSRCS += arm_busfault.c arm_cache.c arm_cpuinfo.c arm_doirq.c +CSRCS += arm_hardfault.c arm_initialstate.c arm_itm.c +CSRCS += arm_memfault.c arm_perf.c +CSRCS += arm_schedulesigaction.c arm_sigdeliver.c +CSRCS += arm_svcall.c arm_systemreset.c arm_tcbinfo.c +CSRCS += arm_trigger_irq.c arm_usagefault.c arm_dbgmonitor.c ifneq ($(CONFIG_ARCH_HAVE_CUSTOM_VECTORS),y) - CMN_CSRCS += arm_vectors.c + CSRCS += arm_vectors.c endif ifeq ($(CONFIG_ARMV7M_SYSTICK),y) - CMN_CSRCS += arm_systick.c + CSRCS += arm_systick.c endif ifeq ($(CONFIG_ARMV7M_ITMSYSLOG),y) - CMN_CSRCS += arm_itm_syslog.c + CSRCS += arm_itm_syslog.c endif ifeq ($(CONFIG_ARMV7M_STACKCHECK),y) - CMN_CSRCS += arm_stackcheck.c + CSRCS += arm_stackcheck.c endif ifeq ($(CONFIG_ARCH_FPU),y) - CMN_CSRCS += arm_fpuconfig.c - CMN_CSRCS += arm_fpucmp.c + CSRCS += arm_fpuconfig.c + CSRCS += arm_fpucmp.c endif ifeq ($(CONFIG_ARCH_RAMVECTORS),y) - CMN_CSRCS += arm_ramvec_initialize.c arm_ramvec_attach.c + CSRCS += arm_ramvec_initialize.c arm_ramvec_attach.c endif ifneq ($(filter y,$(CONFIG_ARM_MPU) $(CONFIG_ARM_MPU_EARLY_RESET)),) - CMN_CSRCS += arm_mpu.c + CSRCS += arm_mpu.c endif ifeq ($(CONFIG_ARM_COREDUMP_REGION),y) - CMN_CSRCS += arm_dumpnvic.c + CSRCS += arm_dumpnvic.c endif diff --git a/arch/arm/src/armv7-m/Toolchain.defs b/arch/arm/armv7-m/Toolchain.defs similarity index 97% rename from arch/arm/src/armv7-m/Toolchain.defs rename to arch/arm/armv7-m/Toolchain.defs index 499be35aed..330bf5242c 100644 --- a/arch/arm/src/armv7-m/Toolchain.defs +++ b/arch/arm/armv7-m/Toolchain.defs @@ -23,7 +23,6 @@ # Parametrization for ARCHCPUFLAGS ifeq ($(CONFIG_ARCH_CORTEXM4),y) - TOOLCHAIN_ARM7EM := y ifeq ($(CONFIG_ARM_TOOLCHAIN_GHS),y) TOOLCHAIN_MTUNE := -cpu=cortexm4 ifeq ($(CONFIG_ARCH_FPU),y) @@ -166,5 +165,7 @@ endif ifeq ($(CONFIG_ARMV7M_STACKCHECK),y) ARCHOPTIMIZATION += -finstrument-functions -ffixed-r10 endif +<<<<<<< Updated upstream:arch/arm/armv7-m/Toolchain.defs -include $(TOPDIR)/arch/arm/src/common/Toolchain.defs +======= +>>>>>>> Stashed changes:arch/arm/src/armv7-m/Toolchain.defs diff --git a/arch/arm/src/armv7-m/arm_busfault.c b/arch/arm/armv7-m/arm_busfault.c similarity index 100% rename from arch/arm/src/armv7-m/arm_busfault.c rename to arch/arm/armv7-m/arm_busfault.c diff --git a/arch/arm/src/armv7-m/arm_cache.c b/arch/arm/armv7-m/arm_cache.c similarity index 100% rename from arch/arm/src/armv7-m/arm_cache.c rename to arch/arm/armv7-m/arm_cache.c diff --git a/arch/arm/src/armv7-m/arm_cpuinfo.c b/arch/arm/armv7-m/arm_cpuinfo.c similarity index 100% rename from arch/arm/src/armv7-m/arm_cpuinfo.c rename to arch/arm/armv7-m/arm_cpuinfo.c diff --git a/arch/arm/src/armv7-m/arm_dbgmonitor.c b/arch/arm/armv7-m/arm_dbgmonitor.c similarity index 100% rename from arch/arm/src/armv7-m/arm_dbgmonitor.c rename to arch/arm/armv7-m/arm_dbgmonitor.c diff --git a/arch/arm/src/armv7-m/arm_doirq.c b/arch/arm/armv7-m/arm_doirq.c similarity index 96% rename from arch/arm/src/armv7-m/arm_doirq.c rename to arch/arm/armv7-m/arm_doirq.c index 9dff88e514..b6ca5728e4 100644 --- a/arch/arm/src/armv7-m/arm_doirq.c +++ b/arch/arm/armv7-m/arm_doirq.c @@ -31,8 +31,6 @@ #include #include -#include -#include #include #include "arm_internal.h" @@ -70,7 +68,6 @@ uint32_t *arm_doirq(int irq, uint32_t *regs) tcb->xcp.regs = regs; } - board_autoled_on(LED_INIRQ); #ifdef CONFIG_SUPPRESS_INTERRUPTS PANIC(); #else @@ -116,8 +113,6 @@ uint32_t *arm_doirq(int irq, uint32_t *regs) regs = tcb->xcp.regs; #endif - board_autoled_off(LED_INIRQ); - /* (*running_task)->xcp.regs is about to become invalid * and will be marked as NULL to avoid misusage. */ diff --git a/arch/arm/src/armv7-m/arm_dumpnvic.c b/arch/arm/armv7-m/arm_dumpnvic.c similarity index 100% rename from arch/arm/src/armv7-m/arm_dumpnvic.c rename to arch/arm/armv7-m/arm_dumpnvic.c diff --git a/arch/arm/src/armv7-m/arm_exception.S b/arch/arm/armv7-m/arm_exception.S similarity index 100% rename from arch/arm/src/armv7-m/arm_exception.S rename to arch/arm/armv7-m/arm_exception.S diff --git a/arch/arm/src/armv7-m/arm_fpucmp.c b/arch/arm/armv7-m/arm_fpucmp.c similarity index 100% rename from arch/arm/src/armv7-m/arm_fpucmp.c rename to arch/arm/armv7-m/arm_fpucmp.c diff --git a/arch/arm/src/armv7-m/arm_fpuconfig.c b/arch/arm/armv7-m/arm_fpuconfig.c similarity index 100% rename from arch/arm/src/armv7-m/arm_fpuconfig.c rename to arch/arm/armv7-m/arm_fpuconfig.c diff --git a/arch/arm/src/armv7-m/arm_hardfault.c b/arch/arm/armv7-m/arm_hardfault.c similarity index 100% rename from arch/arm/src/armv7-m/arm_hardfault.c rename to arch/arm/armv7-m/arm_hardfault.c diff --git a/arch/arm/src/armv7-m/arm_initialstate.c b/arch/arm/armv7-m/arm_initialstate.c similarity index 100% rename from arch/arm/src/armv7-m/arm_initialstate.c rename to arch/arm/armv7-m/arm_initialstate.c diff --git a/arch/arm/src/armv7-m/arm_itm.c b/arch/arm/armv7-m/arm_itm.c similarity index 100% rename from arch/arm/src/armv7-m/arm_itm.c rename to arch/arm/armv7-m/arm_itm.c diff --git a/arch/arm/src/armv7-m/arm_itm_syslog.c b/arch/arm/armv7-m/arm_itm_syslog.c similarity index 100% rename from arch/arm/src/armv7-m/arm_itm_syslog.c rename to arch/arm/armv7-m/arm_itm_syslog.c diff --git a/arch/arm/src/armv7-m/arm_memfault.c b/arch/arm/armv7-m/arm_memfault.c similarity index 100% rename from arch/arm/src/armv7-m/arm_memfault.c rename to arch/arm/armv7-m/arm_memfault.c diff --git a/arch/arm/src/armv7-m/arm_mpu.c b/arch/arm/armv7-m/arm_mpu.c similarity index 100% rename from arch/arm/src/armv7-m/arm_mpu.c rename to arch/arm/armv7-m/arm_mpu.c diff --git a/arch/arm/src/armv7-m/arm_perf.c b/arch/arm/armv7-m/arm_perf.c similarity index 100% rename from arch/arm/src/armv7-m/arm_perf.c rename to arch/arm/armv7-m/arm_perf.c diff --git a/arch/arm/src/armv7-m/arm_ramvec_attach.c b/arch/arm/armv7-m/arm_ramvec_attach.c similarity index 100% rename from arch/arm/src/armv7-m/arm_ramvec_attach.c rename to arch/arm/armv7-m/arm_ramvec_attach.c diff --git a/arch/arm/src/armv7-m/arm_ramvec_initialize.c b/arch/arm/armv7-m/arm_ramvec_initialize.c similarity index 100% rename from arch/arm/src/armv7-m/arm_ramvec_initialize.c rename to arch/arm/armv7-m/arm_ramvec_initialize.c diff --git a/arch/arm/src/armv7-m/arm_saveusercontext.S b/arch/arm/armv7-m/arm_saveusercontext.S similarity index 100% rename from arch/arm/src/armv7-m/arm_saveusercontext.S rename to arch/arm/armv7-m/arm_saveusercontext.S diff --git a/arch/arm/src/armv7-m/arm_schedulesigaction.c b/arch/arm/armv7-m/arm_schedulesigaction.c similarity index 100% rename from arch/arm/src/armv7-m/arm_schedulesigaction.c rename to arch/arm/armv7-m/arm_schedulesigaction.c diff --git a/arch/arm/src/armv7-m/arm_sigdeliver.c b/arch/arm/armv7-m/arm_sigdeliver.c similarity index 97% rename from arch/arm/src/armv7-m/arm_sigdeliver.c rename to arch/arm/armv7-m/arm_sigdeliver.c index b55c1e8e05..3cf223e92d 100644 --- a/arch/arm/src/armv7-m/arm_sigdeliver.c +++ b/arch/arm/armv7-m/arm_sigdeliver.c @@ -33,8 +33,6 @@ #include #include -#include -#include #include "sched/sched.h" #include "arm_internal.h" @@ -67,7 +65,6 @@ void arm_sigdeliver(void) int16_t saved_irqcount; #endif - board_autoled_on(LED_SIGNAL); sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head); @@ -156,7 +153,6 @@ retry: * execution. */ - board_autoled_off(LED_SIGNAL); #ifdef CONFIG_SMP /* We need to keep the IRQ lock until task switching */ diff --git a/arch/arm/src/armv7-m/arm_stackcheck.c b/arch/arm/armv7-m/arm_stackcheck.c similarity index 100% rename from arch/arm/src/armv7-m/arm_stackcheck.c rename to arch/arm/armv7-m/arm_stackcheck.c diff --git a/arch/arm/src/armv7-m/arm_svcall.c b/arch/arm/armv7-m/arm_svcall.c similarity index 100% rename from arch/arm/src/armv7-m/arm_svcall.c rename to arch/arm/armv7-m/arm_svcall.c diff --git a/arch/arm/src/armv7-m/arm_systemreset.c b/arch/arm/armv7-m/arm_systemreset.c similarity index 100% rename from arch/arm/src/armv7-m/arm_systemreset.c rename to arch/arm/armv7-m/arm_systemreset.c diff --git a/arch/arm/src/armv7-m/arm_systick.c b/arch/arm/armv7-m/arm_systick.c similarity index 100% rename from arch/arm/src/armv7-m/arm_systick.c rename to arch/arm/armv7-m/arm_systick.c diff --git a/arch/arm/src/armv7-m/arm_tcbinfo.c b/arch/arm/armv7-m/arm_tcbinfo.c similarity index 100% rename from arch/arm/src/armv7-m/arm_tcbinfo.c rename to arch/arm/armv7-m/arm_tcbinfo.c diff --git a/arch/arm/src/armv7-m/arm_trigger_irq.c b/arch/arm/armv7-m/arm_trigger_irq.c similarity index 100% rename from arch/arm/src/armv7-m/arm_trigger_irq.c rename to arch/arm/armv7-m/arm_trigger_irq.c diff --git a/arch/arm/src/armv7-m/arm_usagefault.c b/arch/arm/armv7-m/arm_usagefault.c similarity index 100% rename from arch/arm/src/armv7-m/arm_usagefault.c rename to arch/arm/armv7-m/arm_usagefault.c diff --git a/arch/arm/src/armv7-m/arm_vectors.c b/arch/arm/armv7-m/arm_vectors.c similarity index 100% rename from arch/arm/src/armv7-m/arm_vectors.c rename to arch/arm/armv7-m/arm_vectors.c diff --git a/arch/arm/src/armv7-m/dwt.h b/arch/arm/armv7-m/dwt.h similarity index 100% rename from arch/arm/src/armv7-m/dwt.h rename to arch/arm/armv7-m/dwt.h diff --git a/arch/arm/src/armv7-m/etm.h b/arch/arm/armv7-m/etm.h similarity index 100% rename from arch/arm/src/armv7-m/etm.h rename to arch/arm/armv7-m/etm.h diff --git a/arch/arm/src/armv7-m/exc_return.h b/arch/arm/armv7-m/exc_return.h similarity index 100% rename from arch/arm/src/armv7-m/exc_return.h rename to arch/arm/armv7-m/exc_return.h diff --git a/arch/arm/src/armv7-m/fpb.h b/arch/arm/armv7-m/fpb.h similarity index 100% rename from arch/arm/src/armv7-m/fpb.h rename to arch/arm/armv7-m/fpb.h diff --git a/arch/arm/src/armv7-m/itm.h b/arch/arm/armv7-m/itm.h similarity index 100% rename from arch/arm/src/armv7-m/itm.h rename to arch/arm/armv7-m/itm.h diff --git a/arch/arm/src/armv7-m/itm_syslog.h b/arch/arm/armv7-m/itm_syslog.h similarity index 100% rename from arch/arm/src/armv7-m/itm_syslog.h rename to arch/arm/armv7-m/itm_syslog.h diff --git a/arch/arm/src/armv7-m/mpu.h b/arch/arm/armv7-m/mpu.h similarity index 100% rename from arch/arm/src/armv7-m/mpu.h rename to arch/arm/armv7-m/mpu.h diff --git a/arch/arm/src/armv7-m/nvic.h b/arch/arm/armv7-m/nvic.h similarity index 100% rename from arch/arm/src/armv7-m/nvic.h rename to arch/arm/armv7-m/nvic.h diff --git a/arch/arm/src/armv7-m/psr.h b/arch/arm/armv7-m/psr.h similarity index 100% rename from arch/arm/src/armv7-m/psr.h rename to arch/arm/armv7-m/psr.h diff --git a/arch/arm/src/armv7-m/ram_vectors.h b/arch/arm/armv7-m/ram_vectors.h similarity index 100% rename from arch/arm/src/armv7-m/ram_vectors.h rename to arch/arm/armv7-m/ram_vectors.h diff --git a/arch/arm/src/armv7-m/systick.h b/arch/arm/armv7-m/systick.h similarity index 100% rename from arch/arm/src/armv7-m/systick.h rename to arch/arm/armv7-m/systick.h diff --git a/arch/arm/src/armv7-m/tpi.h b/arch/arm/armv7-m/tpi.h similarity index 100% rename from arch/arm/src/armv7-m/tpi.h rename to arch/arm/armv7-m/tpi.h diff --git a/arch/arm/src/armv7-r/CMakeLists.txt b/arch/arm/armv7-r/CMakeLists.txt similarity index 100% rename from arch/arm/src/armv7-r/CMakeLists.txt rename to arch/arm/armv7-r/CMakeLists.txt diff --git a/arch/arm/src/armv7-r/Kconfig b/arch/arm/armv7-r/Kconfig similarity index 100% rename from arch/arm/src/armv7-r/Kconfig rename to arch/arm/armv7-r/Kconfig diff --git a/arch/z80/src/z180/Make.defs b/arch/arm/armv7-r/Make.defs similarity index 57% rename from arch/z80/src/z180/Make.defs rename to arch/arm/armv7-r/Make.defs index cd68793f6b..138d08dd20 100644 --- a/arch/z80/src/z180/Make.defs +++ b/arch/arm/armv7-r/Make.defs @@ -1,5 +1,5 @@ ############################################################################ -# arch/z80/src/z180/Make.defs +# arch/arm/src/armv7-r/Make.defs # # SPDX-License-Identifier: Apache-2.0 # @@ -20,14 +20,29 @@ # ############################################################################ -ifeq ($(CONFIG_ARCH_HAVEHEAD),) -ifeq ($(CONFIG_LINKER_ROM_AT_0000),y) -HEAD_ASRC = z180_rom.asm -else -HEAD_ASRC = z180_head.asm -endif +# The vector table is the "head" object, i.e., the one that must forced into +# the link in order to draw in all of the other components + +HEAD_ASRC += arm_vectortab.S + +# Common assembly language files + +CSRCS += arm_cache.c arm_cpuinfo.c arm_dataabort.c +CSRCS += arm_doirq.c arm_gicv2.c arm_gicv2_dump.c +CSRCS += arm_initialstate.c arm_prefetchabort.c +CSRCS += arm_schedulesigaction.c arm_sigdeliver.c +CSRCS += arm_syscall.c arm_tcbinfo.c arm_undefinedinsn.c +CSRCS += arm_perf.c cp15_cacheops.c + +# Common C source files + +ASRCS += arm_head.S arm_vectors.S arm_saveusercontext.S + +ifeq ($(CONFIG_ARMV7R_HAVE_PTM), y) + CSRCS += arm_timer.c endif +<<<<<<< HEAD:arch/z80/src/z180/Make.defs CMN_CSRCS = z80_allocateheap.c z80_createstack.c z80_doirq.c CMN_CSRCS += z80_exit.c z80_interruptcontext.c z80_idle.c CMN_CSRCS += z80_initialize.c z80_mdelay.c z80_nputs.c @@ -41,12 +56,23 @@ ifeq ($(CONFIG_LINKER_ROM_AT_0000),y) CHIP_ASRCS += z180_romvectors.asm else CHIP_ASRCS += z180_vectors.asm +======= +ifeq ($(CONFIG_BUILD_PROTECTED),y) + CSRCS += arm_mpu.c +>>>>>>> 753c7b2dd6 (walnux: moveout):arch/arm/armv7-r/Make.defs endif -CHIP_CSRCS = z180_copystate.c z180_initialstate.c z180_io.c z180_irq.c -CHIP_CSRCS += z180_lowscc.c z180_lowserial.c z180_modifiyreg8.c z180_mmu.c -CHIP_CSRCS += z180_registerdump.c z180_schedulesigaction.c z180_sigdeliver.c - -ifneq ($(CONFIG_SCHED_TICKLESS),y) -CHIP_CSRCS += z180_timerisr.c +ifeq ($(CONFIG_ARMV7R_L2CC_PL310),y) + CSRCS += arm_l2cc_pl310.c +endif + +ifeq ($(CONFIG_ARCH_FPU),y) + CSRCS += arm_fpucmp.c + ASRCS += arm_fpuconfig.S +endif + +ifeq ($(CONFIG_SMP),y) + ASRCS += arm_cpuhead.S + CSRCS += arm_cpustart.c arm_smpcall.c + CSRCS += arm_cpuidlestack.c arm_scu.c endif diff --git a/arch/arm/src/armv7-r/Toolchain.defs b/arch/arm/armv7-r/Toolchain.defs similarity index 100% rename from arch/arm/src/armv7-r/Toolchain.defs rename to arch/arm/armv7-r/Toolchain.defs diff --git a/arch/arm/src/armv7-r/arm.h b/arch/arm/armv7-r/arm.h similarity index 100% rename from arch/arm/src/armv7-r/arm.h rename to arch/arm/armv7-r/arm.h diff --git a/arch/arm/src/armv7-r/arm_cache.c b/arch/arm/armv7-r/arm_cache.c similarity index 100% rename from arch/arm/src/armv7-r/arm_cache.c rename to arch/arm/armv7-r/arm_cache.c diff --git a/arch/arm/src/armv7-r/arm_cpuhead.S b/arch/arm/armv7-r/arm_cpuhead.S similarity index 100% rename from arch/arm/src/armv7-r/arm_cpuhead.S rename to arch/arm/armv7-r/arm_cpuhead.S diff --git a/arch/arm/src/armv7-r/arm_cpuidlestack.c b/arch/arm/armv7-r/arm_cpuidlestack.c similarity index 100% rename from arch/arm/src/armv7-r/arm_cpuidlestack.c rename to arch/arm/armv7-r/arm_cpuidlestack.c diff --git a/arch/arm/src/armv7-r/arm_cpuinfo.c b/arch/arm/armv7-r/arm_cpuinfo.c similarity index 100% rename from arch/arm/src/armv7-r/arm_cpuinfo.c rename to arch/arm/armv7-r/arm_cpuinfo.c diff --git a/arch/arm/src/armv7-r/arm_cpustart.c b/arch/arm/armv7-r/arm_cpustart.c similarity index 100% rename from arch/arm/src/armv7-r/arm_cpustart.c rename to arch/arm/armv7-r/arm_cpustart.c diff --git a/arch/arm/src/armv7-r/arm_dataabort.c b/arch/arm/armv7-r/arm_dataabort.c similarity index 100% rename from arch/arm/src/armv7-r/arm_dataabort.c rename to arch/arm/armv7-r/arm_dataabort.c diff --git a/arch/arm/src/armv7-r/arm_doirq.c b/arch/arm/armv7-r/arm_doirq.c similarity index 100% rename from arch/arm/src/armv7-r/arm_doirq.c rename to arch/arm/armv7-r/arm_doirq.c diff --git a/arch/arm/src/armv7-r/arm_fpucmp.c b/arch/arm/armv7-r/arm_fpucmp.c similarity index 100% rename from arch/arm/src/armv7-r/arm_fpucmp.c rename to arch/arm/armv7-r/arm_fpucmp.c diff --git a/arch/arm/src/armv7-r/arm_fpuconfig.S b/arch/arm/armv7-r/arm_fpuconfig.S similarity index 100% rename from arch/arm/src/armv7-r/arm_fpuconfig.S rename to arch/arm/armv7-r/arm_fpuconfig.S diff --git a/arch/arm/src/armv7-r/arm_gicv2.c b/arch/arm/armv7-r/arm_gicv2.c similarity index 100% rename from arch/arm/src/armv7-r/arm_gicv2.c rename to arch/arm/armv7-r/arm_gicv2.c diff --git a/arch/arm/src/armv7-r/arm_gicv2_dump.c b/arch/arm/armv7-r/arm_gicv2_dump.c similarity index 100% rename from arch/arm/src/armv7-r/arm_gicv2_dump.c rename to arch/arm/armv7-r/arm_gicv2_dump.c diff --git a/arch/arm/src/armv7-r/arm_head.S b/arch/arm/armv7-r/arm_head.S similarity index 100% rename from arch/arm/src/armv7-r/arm_head.S rename to arch/arm/armv7-r/arm_head.S diff --git a/arch/arm/src/armv7-r/arm_initialstate.c b/arch/arm/armv7-r/arm_initialstate.c similarity index 100% rename from arch/arm/src/armv7-r/arm_initialstate.c rename to arch/arm/armv7-r/arm_initialstate.c diff --git a/arch/arm/src/armv7-r/arm_l2cc_pl310.c b/arch/arm/armv7-r/arm_l2cc_pl310.c similarity index 100% rename from arch/arm/src/armv7-r/arm_l2cc_pl310.c rename to arch/arm/armv7-r/arm_l2cc_pl310.c diff --git a/arch/arm/src/armv7-r/arm_mpu.c b/arch/arm/armv7-r/arm_mpu.c similarity index 100% rename from arch/arm/src/armv7-r/arm_mpu.c rename to arch/arm/armv7-r/arm_mpu.c diff --git a/arch/arm/src/armv7-r/arm_perf.c b/arch/arm/armv7-r/arm_perf.c similarity index 100% rename from arch/arm/src/armv7-r/arm_perf.c rename to arch/arm/armv7-r/arm_perf.c diff --git a/arch/arm/src/armv7-r/arm_prefetchabort.c b/arch/arm/armv7-r/arm_prefetchabort.c similarity index 100% rename from arch/arm/src/armv7-r/arm_prefetchabort.c rename to arch/arm/armv7-r/arm_prefetchabort.c diff --git a/arch/arm/src/armv7-r/arm_saveusercontext.S b/arch/arm/armv7-r/arm_saveusercontext.S similarity index 100% rename from arch/arm/src/armv7-r/arm_saveusercontext.S rename to arch/arm/armv7-r/arm_saveusercontext.S diff --git a/arch/arm/src/armv7-r/arm_schedulesigaction.c b/arch/arm/armv7-r/arm_schedulesigaction.c similarity index 100% rename from arch/arm/src/armv7-r/arm_schedulesigaction.c rename to arch/arm/armv7-r/arm_schedulesigaction.c diff --git a/arch/arm/src/armv7-r/arm_scu.c b/arch/arm/armv7-r/arm_scu.c similarity index 100% rename from arch/arm/src/armv7-r/arm_scu.c rename to arch/arm/armv7-r/arm_scu.c diff --git a/arch/arm/src/armv7-r/arm_sigdeliver.c b/arch/arm/armv7-r/arm_sigdeliver.c similarity index 100% rename from arch/arm/src/armv7-r/arm_sigdeliver.c rename to arch/arm/armv7-r/arm_sigdeliver.c diff --git a/arch/arm/src/armv7-r/arm_smpcall.c b/arch/arm/armv7-r/arm_smpcall.c similarity index 100% rename from arch/arm/src/armv7-r/arm_smpcall.c rename to arch/arm/armv7-r/arm_smpcall.c diff --git a/arch/arm/src/armv7-r/arm_syscall.c b/arch/arm/armv7-r/arm_syscall.c similarity index 100% rename from arch/arm/src/armv7-r/arm_syscall.c rename to arch/arm/armv7-r/arm_syscall.c diff --git a/arch/arm/src/armv7-r/arm_tcbinfo.c b/arch/arm/armv7-r/arm_tcbinfo.c similarity index 100% rename from arch/arm/src/armv7-r/arm_tcbinfo.c rename to arch/arm/armv7-r/arm_tcbinfo.c diff --git a/arch/arm/src/armv7-r/arm_timer.c b/arch/arm/armv7-r/arm_timer.c similarity index 100% rename from arch/arm/src/armv7-r/arm_timer.c rename to arch/arm/armv7-r/arm_timer.c diff --git a/arch/arm/src/armv7-r/arm_timer.h b/arch/arm/armv7-r/arm_timer.h similarity index 100% rename from arch/arm/src/armv7-r/arm_timer.h rename to arch/arm/armv7-r/arm_timer.h diff --git a/arch/arm/src/armv7-r/arm_undefinedinsn.c b/arch/arm/armv7-r/arm_undefinedinsn.c similarity index 100% rename from arch/arm/src/armv7-r/arm_undefinedinsn.c rename to arch/arm/armv7-r/arm_undefinedinsn.c diff --git a/arch/arm/src/armv7-r/arm_vectors.S b/arch/arm/armv7-r/arm_vectors.S similarity index 100% rename from arch/arm/src/armv7-r/arm_vectors.S rename to arch/arm/armv7-r/arm_vectors.S diff --git a/arch/arm/src/armv7-r/arm_vectortab.S b/arch/arm/armv7-r/arm_vectortab.S similarity index 100% rename from arch/arm/src/armv7-r/arm_vectortab.S rename to arch/arm/armv7-r/arm_vectortab.S diff --git a/arch/arm/src/armv7-r/cp15_cacheops.c b/arch/arm/armv7-r/cp15_cacheops.c similarity index 100% rename from arch/arm/src/armv7-r/cp15_cacheops.c rename to arch/arm/armv7-r/cp15_cacheops.c diff --git a/arch/arm/src/armv7-r/cp15_cacheops.h b/arch/arm/armv7-r/cp15_cacheops.h similarity index 100% rename from arch/arm/src/armv7-r/cp15_cacheops.h rename to arch/arm/armv7-r/cp15_cacheops.h diff --git a/arch/arm/src/armv7-r/gic.h b/arch/arm/armv7-r/gic.h similarity index 100% rename from arch/arm/src/armv7-r/gic.h rename to arch/arm/armv7-r/gic.h diff --git a/arch/arm/src/armv7-r/l2cc.h b/arch/arm/armv7-r/l2cc.h similarity index 100% rename from arch/arm/src/armv7-r/l2cc.h rename to arch/arm/armv7-r/l2cc.h diff --git a/arch/arm/src/armv7-r/l2cc_pl310.h b/arch/arm/armv7-r/l2cc_pl310.h similarity index 100% rename from arch/arm/src/armv7-r/l2cc_pl310.h rename to arch/arm/armv7-r/l2cc_pl310.h diff --git a/arch/arm/src/armv7-r/mpcore.h b/arch/arm/armv7-r/mpcore.h similarity index 100% rename from arch/arm/src/armv7-r/mpcore.h rename to arch/arm/armv7-r/mpcore.h diff --git a/arch/arm/src/armv7-r/mpu.h b/arch/arm/armv7-r/mpu.h similarity index 100% rename from arch/arm/src/armv7-r/mpu.h rename to arch/arm/armv7-r/mpu.h diff --git a/arch/arm/src/armv7-r/sctlr.h b/arch/arm/armv7-r/sctlr.h similarity index 100% rename from arch/arm/src/armv7-r/sctlr.h rename to arch/arm/armv7-r/sctlr.h diff --git a/arch/arm/src/armv7-r/scu.h b/arch/arm/armv7-r/scu.h similarity index 100% rename from arch/arm/src/armv7-r/scu.h rename to arch/arm/armv7-r/scu.h diff --git a/arch/arm/src/armv7-r/smp.h b/arch/arm/armv7-r/smp.h similarity index 100% rename from arch/arm/src/armv7-r/smp.h rename to arch/arm/armv7-r/smp.h diff --git a/arch/arm/src/armv8-m/CMakeLists.txt b/arch/arm/armv8-m/CMakeLists.txt similarity index 100% rename from arch/arm/src/armv8-m/CMakeLists.txt rename to arch/arm/armv8-m/CMakeLists.txt diff --git a/arch/arm/src/armv8-m/Kconfig b/arch/arm/armv8-m/Kconfig similarity index 100% rename from arch/arm/src/armv8-m/Kconfig rename to arch/arm/armv8-m/Kconfig diff --git a/arch/arm/src/armv8-m/Make.defs b/arch/arm/armv8-m/Make.defs similarity index 63% rename from arch/arm/src/armv8-m/Make.defs rename to arch/arm/armv8-m/Make.defs index 0d1a8222a3..a764340620 100644 --- a/arch/arm/src/armv8-m/Make.defs +++ b/arch/arm/armv8-m/Make.defs @@ -20,53 +20,48 @@ # ############################################################################ -# Common ARM files - -include common/Make.defs - -CMN_ASRCS += arm_exception.S arm_saveusercontext.S - -CMN_CSRCS += arm_busfault.c arm_cache.c arm_cpuinfo.c arm_doirq.c -CMN_CSRCS += arm_hardfault.c arm_initialstate.c arm_itm.c -CMN_CSRCS += arm_memfault.c arm_perf.c arm_sau.c -CMN_CSRCS += arm_schedulesigaction.c arm_securefault.c arm_secure_irq.c -CMN_CSRCS += arm_sigdeliver.c arm_svcall.c -CMN_CSRCS += arm_systemreset.c arm_tcbinfo.c -CMN_CSRCS += arm_trigger_irq.c arm_usagefault.c arm_dbgmonitor.c +ASRCS += arm_exception.S arm_saveusercontext.S +CSRCS += arm_busfault.c arm_cache.c arm_cpuinfo.c arm_doirq.c +CSRCS += arm_hardfault.c arm_initialstate.c arm_itm.c +CSRCS += arm_memfault.c arm_perf.c arm_sau.c +CSRCS += arm_schedulesigaction.c arm_securefault.c arm_secure_irq.c +CSRCS += arm_sigdeliver.c arm_svcall.c +CSRCS += arm_systemreset.c arm_tcbinfo.c +CSRCS += arm_trigger_irq.c arm_usagefault.c arm_dbgmonitor.c ifneq ($(CONFIG_ARCH_HAVE_CUSTOM_VECTORS),y) - CMN_CSRCS += arm_vectors.c + CSRCS += arm_vectors.c endif ifeq ($(CONFIG_ARMV8M_SYSTICK),y) - CMN_CSRCS += arm_systick.c + CSRCS += arm_systick.c endif ifeq ($(CONFIG_ARMV8M_ITMSYSLOG),y) - CMN_CSRCS += arm_itm_syslog.c + CSRCS += arm_itm_syslog.c endif ifeq ($(CONFIG_ARMV8M_STACKCHECK),y) - CMN_CSRCS += arm_stackcheck.c + CSRCS += arm_stackcheck.c endif ifeq ($(CONFIG_ARCH_FPU),y) - CMN_CSRCS += arm_fpuconfig.c - CMN_CSRCS += arm_fpucmp.c + CSRCS += arm_fpuconfig.c + CSRCS += arm_fpucmp.c endif ifeq ($(CONFIG_ARCH_RAMVECTORS),y) - CMN_CSRCS += arm_ramvec_initialize.c arm_ramvec_attach.c + CSRCS += arm_ramvec_initialize.c arm_ramvec_attach.c endif ifneq ($(filter y,$(CONFIG_ARM_MPU) $(CONFIG_ARM_MPU_EARLY_RESET)),) - CMN_CSRCS += arm_mpu.c + CSRCS += arm_mpu.c endif ifeq ($(CONFIG_ARCH_TRUSTZONE_SECURE),y) - CMN_CSRCS += arm_gen_nonsecfault.c + CSRCS += arm_gen_nonsecfault.c endif ifeq ($(CONFIG_ARM_COREDUMP_REGION),y) - CMN_CSRCS += arm_dumpnvic.c + CSRCS += arm_dumpnvic.c endif diff --git a/arch/arm/src/armv8-m/Toolchain.defs b/arch/arm/armv8-m/Toolchain.defs similarity index 100% rename from arch/arm/src/armv8-m/Toolchain.defs rename to arch/arm/armv8-m/Toolchain.defs diff --git a/arch/arm/src/armv8-m/arm_busfault.c b/arch/arm/armv8-m/arm_busfault.c similarity index 100% rename from arch/arm/src/armv8-m/arm_busfault.c rename to arch/arm/armv8-m/arm_busfault.c diff --git a/arch/arm/src/armv8-m/arm_cache.c b/arch/arm/armv8-m/arm_cache.c similarity index 100% rename from arch/arm/src/armv8-m/arm_cache.c rename to arch/arm/armv8-m/arm_cache.c diff --git a/arch/arm/src/armv8-m/arm_cpuinfo.c b/arch/arm/armv8-m/arm_cpuinfo.c similarity index 100% rename from arch/arm/src/armv8-m/arm_cpuinfo.c rename to arch/arm/armv8-m/arm_cpuinfo.c diff --git a/arch/arm/src/armv8-m/arm_dbgmonitor.c b/arch/arm/armv8-m/arm_dbgmonitor.c similarity index 100% rename from arch/arm/src/armv8-m/arm_dbgmonitor.c rename to arch/arm/armv8-m/arm_dbgmonitor.c diff --git a/arch/arm/src/armv8-m/arm_doirq.c b/arch/arm/armv8-m/arm_doirq.c similarity index 100% rename from arch/arm/src/armv8-m/arm_doirq.c rename to arch/arm/armv8-m/arm_doirq.c diff --git a/arch/arm/src/armv8-m/arm_dumpnvic.c b/arch/arm/armv8-m/arm_dumpnvic.c similarity index 100% rename from arch/arm/src/armv8-m/arm_dumpnvic.c rename to arch/arm/armv8-m/arm_dumpnvic.c diff --git a/arch/arm/src/armv8-m/arm_exception.S b/arch/arm/armv8-m/arm_exception.S similarity index 100% rename from arch/arm/src/armv8-m/arm_exception.S rename to arch/arm/armv8-m/arm_exception.S diff --git a/arch/arm/src/armv8-m/arm_fpucmp.c b/arch/arm/armv8-m/arm_fpucmp.c similarity index 100% rename from arch/arm/src/armv8-m/arm_fpucmp.c rename to arch/arm/armv8-m/arm_fpucmp.c diff --git a/arch/arm/src/armv8-m/arm_fpuconfig.c b/arch/arm/armv8-m/arm_fpuconfig.c similarity index 100% rename from arch/arm/src/armv8-m/arm_fpuconfig.c rename to arch/arm/armv8-m/arm_fpuconfig.c diff --git a/arch/arm/src/armv8-m/arm_gen_nonsecfault.c b/arch/arm/armv8-m/arm_gen_nonsecfault.c similarity index 100% rename from arch/arm/src/armv8-m/arm_gen_nonsecfault.c rename to arch/arm/armv8-m/arm_gen_nonsecfault.c diff --git a/arch/arm/src/armv8-m/arm_hardfault.c b/arch/arm/armv8-m/arm_hardfault.c similarity index 100% rename from arch/arm/src/armv8-m/arm_hardfault.c rename to arch/arm/armv8-m/arm_hardfault.c diff --git a/arch/arm/src/armv8-m/arm_initialstate.c b/arch/arm/armv8-m/arm_initialstate.c similarity index 100% rename from arch/arm/src/armv8-m/arm_initialstate.c rename to arch/arm/armv8-m/arm_initialstate.c diff --git a/arch/arm/src/armv8-m/arm_itm.c b/arch/arm/armv8-m/arm_itm.c similarity index 100% rename from arch/arm/src/armv8-m/arm_itm.c rename to arch/arm/armv8-m/arm_itm.c diff --git a/arch/arm/src/armv8-m/arm_itm_syslog.c b/arch/arm/armv8-m/arm_itm_syslog.c similarity index 100% rename from arch/arm/src/armv8-m/arm_itm_syslog.c rename to arch/arm/armv8-m/arm_itm_syslog.c diff --git a/arch/arm/src/armv8-m/arm_memfault.c b/arch/arm/armv8-m/arm_memfault.c similarity index 100% rename from arch/arm/src/armv8-m/arm_memfault.c rename to arch/arm/armv8-m/arm_memfault.c diff --git a/arch/arm/src/armv8-m/arm_mpu.c b/arch/arm/armv8-m/arm_mpu.c similarity index 100% rename from arch/arm/src/armv8-m/arm_mpu.c rename to arch/arm/armv8-m/arm_mpu.c diff --git a/arch/arm/src/armv8-m/arm_perf.c b/arch/arm/armv8-m/arm_perf.c similarity index 100% rename from arch/arm/src/armv8-m/arm_perf.c rename to arch/arm/armv8-m/arm_perf.c diff --git a/arch/arm/src/armv8-m/arm_ramvec_attach.c b/arch/arm/armv8-m/arm_ramvec_attach.c similarity index 100% rename from arch/arm/src/armv8-m/arm_ramvec_attach.c rename to arch/arm/armv8-m/arm_ramvec_attach.c diff --git a/arch/arm/src/armv8-m/arm_ramvec_initialize.c b/arch/arm/armv8-m/arm_ramvec_initialize.c similarity index 100% rename from arch/arm/src/armv8-m/arm_ramvec_initialize.c rename to arch/arm/armv8-m/arm_ramvec_initialize.c diff --git a/arch/arm/src/armv8-m/arm_sau.c b/arch/arm/armv8-m/arm_sau.c similarity index 100% rename from arch/arm/src/armv8-m/arm_sau.c rename to arch/arm/armv8-m/arm_sau.c diff --git a/arch/arm/src/armv8-m/arm_saveusercontext.S b/arch/arm/armv8-m/arm_saveusercontext.S similarity index 100% rename from arch/arm/src/armv8-m/arm_saveusercontext.S rename to arch/arm/armv8-m/arm_saveusercontext.S diff --git a/arch/arm/src/armv8-m/arm_schedulesigaction.c b/arch/arm/armv8-m/arm_schedulesigaction.c similarity index 100% rename from arch/arm/src/armv8-m/arm_schedulesigaction.c rename to arch/arm/armv8-m/arm_schedulesigaction.c diff --git a/arch/arm/src/armv8-m/arm_secure_irq.c b/arch/arm/armv8-m/arm_secure_irq.c similarity index 100% rename from arch/arm/src/armv8-m/arm_secure_irq.c rename to arch/arm/armv8-m/arm_secure_irq.c diff --git a/arch/arm/src/armv8-m/arm_securefault.c b/arch/arm/armv8-m/arm_securefault.c similarity index 100% rename from arch/arm/src/armv8-m/arm_securefault.c rename to arch/arm/armv8-m/arm_securefault.c diff --git a/arch/arm/src/armv8-m/arm_sigdeliver.c b/arch/arm/armv8-m/arm_sigdeliver.c similarity index 100% rename from arch/arm/src/armv8-m/arm_sigdeliver.c rename to arch/arm/armv8-m/arm_sigdeliver.c diff --git a/arch/arm/src/armv8-m/arm_stackcheck.c b/arch/arm/armv8-m/arm_stackcheck.c similarity index 100% rename from arch/arm/src/armv8-m/arm_stackcheck.c rename to arch/arm/armv8-m/arm_stackcheck.c diff --git a/arch/arm/src/armv8-m/arm_svcall.c b/arch/arm/armv8-m/arm_svcall.c similarity index 100% rename from arch/arm/src/armv8-m/arm_svcall.c rename to arch/arm/armv8-m/arm_svcall.c diff --git a/arch/arm/src/armv8-m/arm_systemreset.c b/arch/arm/armv8-m/arm_systemreset.c similarity index 100% rename from arch/arm/src/armv8-m/arm_systemreset.c rename to arch/arm/armv8-m/arm_systemreset.c diff --git a/arch/arm/src/armv8-m/arm_systick.c b/arch/arm/armv8-m/arm_systick.c similarity index 100% rename from arch/arm/src/armv8-m/arm_systick.c rename to arch/arm/armv8-m/arm_systick.c diff --git a/arch/arm/src/armv8-m/arm_tcbinfo.c b/arch/arm/armv8-m/arm_tcbinfo.c similarity index 100% rename from arch/arm/src/armv8-m/arm_tcbinfo.c rename to arch/arm/armv8-m/arm_tcbinfo.c diff --git a/arch/arm/src/armv8-m/arm_trigger_irq.c b/arch/arm/armv8-m/arm_trigger_irq.c similarity index 100% rename from arch/arm/src/armv8-m/arm_trigger_irq.c rename to arch/arm/armv8-m/arm_trigger_irq.c diff --git a/arch/arm/src/armv8-m/arm_usagefault.c b/arch/arm/armv8-m/arm_usagefault.c similarity index 100% rename from arch/arm/src/armv8-m/arm_usagefault.c rename to arch/arm/armv8-m/arm_usagefault.c diff --git a/arch/arm/src/armv8-m/arm_vectors.c b/arch/arm/armv8-m/arm_vectors.c similarity index 100% rename from arch/arm/src/armv8-m/arm_vectors.c rename to arch/arm/armv8-m/arm_vectors.c diff --git a/arch/arm/src/armv8-m/dwt.h b/arch/arm/armv8-m/dwt.h similarity index 100% rename from arch/arm/src/armv8-m/dwt.h rename to arch/arm/armv8-m/dwt.h diff --git a/arch/arm/src/armv8-m/etm.h b/arch/arm/armv8-m/etm.h similarity index 100% rename from arch/arm/src/armv8-m/etm.h rename to arch/arm/armv8-m/etm.h diff --git a/arch/arm/src/armv8-m/exc_return.h b/arch/arm/armv8-m/exc_return.h similarity index 100% rename from arch/arm/src/armv8-m/exc_return.h rename to arch/arm/armv8-m/exc_return.h diff --git a/arch/arm/src/armv8-m/fpb.h b/arch/arm/armv8-m/fpb.h similarity index 100% rename from arch/arm/src/armv8-m/fpb.h rename to arch/arm/armv8-m/fpb.h diff --git a/arch/arm/src/armv8-m/itm.h b/arch/arm/armv8-m/itm.h similarity index 100% rename from arch/arm/src/armv8-m/itm.h rename to arch/arm/armv8-m/itm.h diff --git a/arch/arm/src/armv8-m/itm_syslog.h b/arch/arm/armv8-m/itm_syslog.h similarity index 100% rename from arch/arm/src/armv8-m/itm_syslog.h rename to arch/arm/armv8-m/itm_syslog.h diff --git a/arch/arm/src/armv8-m/mpu.h b/arch/arm/armv8-m/mpu.h similarity index 100% rename from arch/arm/src/armv8-m/mpu.h rename to arch/arm/armv8-m/mpu.h diff --git a/arch/arm/src/armv8-m/nvic.h b/arch/arm/armv8-m/nvic.h similarity index 100% rename from arch/arm/src/armv8-m/nvic.h rename to arch/arm/armv8-m/nvic.h diff --git a/arch/arm/src/armv8-m/pmu.h b/arch/arm/armv8-m/pmu.h similarity index 100% rename from arch/arm/src/armv8-m/pmu.h rename to arch/arm/armv8-m/pmu.h diff --git a/arch/arm/src/armv8-m/psr.h b/arch/arm/armv8-m/psr.h similarity index 100% rename from arch/arm/src/armv8-m/psr.h rename to arch/arm/armv8-m/psr.h diff --git a/arch/arm/src/armv8-m/ram_vectors.h b/arch/arm/armv8-m/ram_vectors.h similarity index 100% rename from arch/arm/src/armv8-m/ram_vectors.h rename to arch/arm/armv8-m/ram_vectors.h diff --git a/arch/arm/src/armv8-m/sau.h b/arch/arm/armv8-m/sau.h similarity index 100% rename from arch/arm/src/armv8-m/sau.h rename to arch/arm/armv8-m/sau.h diff --git a/arch/arm/src/armv8-m/systick.h b/arch/arm/armv8-m/systick.h similarity index 100% rename from arch/arm/src/armv8-m/systick.h rename to arch/arm/armv8-m/systick.h diff --git a/arch/arm/src/armv8-m/tpi.h b/arch/arm/armv8-m/tpi.h similarity index 100% rename from arch/arm/src/armv8-m/tpi.h rename to arch/arm/armv8-m/tpi.h diff --git a/arch/arm/src/armv8-r/Kconfig b/arch/arm/armv8-r/Kconfig similarity index 100% rename from arch/arm/src/armv8-r/Kconfig rename to arch/arm/armv8-r/Kconfig diff --git a/arch/arm/src/armv8-r/Make.defs b/arch/arm/armv8-r/Make.defs similarity index 71% rename from arch/arm/src/armv8-r/Make.defs rename to arch/arm/armv8-r/Make.defs index 0735cbf554..df4916a34e 100644 --- a/arch/arm/src/armv8-r/Make.defs +++ b/arch/arm/armv8-r/Make.defs @@ -20,10 +20,6 @@ # ############################################################################ -# Common ARM files - -include common/Make.defs - # The vector table is the "head" object, i.e., the one that must forced into # the link in order to draw in all of the other components @@ -31,30 +27,30 @@ HEAD_ASRC += arm_vectortab.S # Common assembly language files -CMN_CSRCS += arm_arch_timer.c arm_cache.c arm_cpuinfo.c arm_dataabort.c -CMN_CSRCS += arm_doirq.c arm_gicv3.c -CMN_CSRCS += arm_initialstate.c arm_prefetchabort.c -CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c -CMN_CSRCS += arm_syscall.c arm_tcbinfo.c arm_undefinedinsn.c -CMN_CSRCS += arm_perf.c cp15_cacheops.c +CSRCS += arm_arch_timer.c arm_cache.c arm_cpuinfo.c arm_dataabort.c +CSRCS += arm_doirq.c arm_gicv3.c +CSRCS += arm_initialstate.c arm_prefetchabort.c +CSRCS += arm_schedulesigaction.c arm_sigdeliver.c +CSRCS += arm_syscall.c arm_tcbinfo.c arm_undefinedinsn.c +CSRCS += arm_perf.c cp15_cacheops.c # Common C source files -CMN_ASRCS += arm_head.S arm_vectors.S arm_saveusercontext.S +ASRCS += arm_head.S arm_vectors.S arm_saveusercontext.S # ifeq ($(CONFIG_BUILD_PROTECTED),y) -# CMN_CSRCS += arm_mpu.c +# CSRCS += arm_mpu.c # endif ifeq ($(CONFIG_ARCH_FPU),y) - CMN_CSRCS += arm_fpucmp.c - CMN_ASRCS += arm_fpuconfig.S + CSRCS += arm_fpucmp.c + ASRCS += arm_fpuconfig.S endif ifeq ($(CONFIG_ARMV8R_L2CC_PL310),y) - CMN_CSRCS += arm_l2cc_pl310.c + CSRCS += arm_l2cc_pl310.c endif ifeq ($(CONFIG_ARCH_HIPRI_INTERRUPT),y) - CMN_CSRCS += arm_dofiq.c + CSRCS += arm_dofiq.c endif diff --git a/arch/arm/src/armv8-r/Toolchain.defs b/arch/arm/armv8-r/Toolchain.defs similarity index 100% rename from arch/arm/src/armv8-r/Toolchain.defs rename to arch/arm/armv8-r/Toolchain.defs diff --git a/arch/arm/src/armv8-r/arm.h b/arch/arm/armv8-r/arm.h similarity index 100% rename from arch/arm/src/armv8-r/arm.h rename to arch/arm/armv8-r/arm.h diff --git a/arch/arm/src/armv8-r/arm_arch_timer.c b/arch/arm/armv8-r/arm_arch_timer.c similarity index 100% rename from arch/arm/src/armv8-r/arm_arch_timer.c rename to arch/arm/armv8-r/arm_arch_timer.c diff --git a/arch/arm/src/armv8-r/arm_arch_timer.h b/arch/arm/armv8-r/arm_arch_timer.h similarity index 100% rename from arch/arm/src/armv8-r/arm_arch_timer.h rename to arch/arm/armv8-r/arm_arch_timer.h diff --git a/arch/arm/src/armv8-r/arm_cache.c b/arch/arm/armv8-r/arm_cache.c similarity index 100% rename from arch/arm/src/armv8-r/arm_cache.c rename to arch/arm/armv8-r/arm_cache.c diff --git a/arch/arm/src/armv8-r/arm_cpuinfo.c b/arch/arm/armv8-r/arm_cpuinfo.c similarity index 100% rename from arch/arm/src/armv8-r/arm_cpuinfo.c rename to arch/arm/armv8-r/arm_cpuinfo.c diff --git a/arch/arm/src/armv8-r/arm_dataabort.c b/arch/arm/armv8-r/arm_dataabort.c similarity index 100% rename from arch/arm/src/armv8-r/arm_dataabort.c rename to arch/arm/armv8-r/arm_dataabort.c diff --git a/arch/arm/src/armv8-r/arm_dofiq.c b/arch/arm/armv8-r/arm_dofiq.c similarity index 100% rename from arch/arm/src/armv8-r/arm_dofiq.c rename to arch/arm/armv8-r/arm_dofiq.c diff --git a/arch/arm/src/armv8-r/arm_doirq.c b/arch/arm/armv8-r/arm_doirq.c similarity index 100% rename from arch/arm/src/armv8-r/arm_doirq.c rename to arch/arm/armv8-r/arm_doirq.c diff --git a/arch/arm/src/armv8-r/arm_fpucmp.c b/arch/arm/armv8-r/arm_fpucmp.c similarity index 100% rename from arch/arm/src/armv8-r/arm_fpucmp.c rename to arch/arm/armv8-r/arm_fpucmp.c diff --git a/arch/arm/src/armv8-r/arm_fpuconfig.S b/arch/arm/armv8-r/arm_fpuconfig.S similarity index 100% rename from arch/arm/src/armv8-r/arm_fpuconfig.S rename to arch/arm/armv8-r/arm_fpuconfig.S diff --git a/arch/arm/src/armv8-r/arm_gic.h b/arch/arm/armv8-r/arm_gic.h similarity index 100% rename from arch/arm/src/armv8-r/arm_gic.h rename to arch/arm/armv8-r/arm_gic.h diff --git a/arch/arm/src/armv8-r/arm_gicv3.c b/arch/arm/armv8-r/arm_gicv3.c similarity index 100% rename from arch/arm/src/armv8-r/arm_gicv3.c rename to arch/arm/armv8-r/arm_gicv3.c diff --git a/arch/arm/src/armv8-r/arm_head.S b/arch/arm/armv8-r/arm_head.S similarity index 100% rename from arch/arm/src/armv8-r/arm_head.S rename to arch/arm/armv8-r/arm_head.S diff --git a/arch/arm/src/armv8-r/arm_initialstate.c b/arch/arm/armv8-r/arm_initialstate.c similarity index 100% rename from arch/arm/src/armv8-r/arm_initialstate.c rename to arch/arm/armv8-r/arm_initialstate.c diff --git a/arch/arm/src/armv8-r/arm_l2cc_pl310.c b/arch/arm/armv8-r/arm_l2cc_pl310.c similarity index 100% rename from arch/arm/src/armv8-r/arm_l2cc_pl310.c rename to arch/arm/armv8-r/arm_l2cc_pl310.c diff --git a/arch/arm/src/armv8-r/arm_perf.c b/arch/arm/armv8-r/arm_perf.c similarity index 100% rename from arch/arm/src/armv8-r/arm_perf.c rename to arch/arm/armv8-r/arm_perf.c diff --git a/arch/arm/src/armv8-r/arm_prefetchabort.c b/arch/arm/armv8-r/arm_prefetchabort.c similarity index 100% rename from arch/arm/src/armv8-r/arm_prefetchabort.c rename to arch/arm/armv8-r/arm_prefetchabort.c diff --git a/arch/arm/src/armv8-r/arm_saveusercontext.S b/arch/arm/armv8-r/arm_saveusercontext.S similarity index 100% rename from arch/arm/src/armv8-r/arm_saveusercontext.S rename to arch/arm/armv8-r/arm_saveusercontext.S diff --git a/arch/arm/src/armv8-r/arm_schedulesigaction.c b/arch/arm/armv8-r/arm_schedulesigaction.c similarity index 100% rename from arch/arm/src/armv8-r/arm_schedulesigaction.c rename to arch/arm/armv8-r/arm_schedulesigaction.c diff --git a/arch/arm/src/armv8-r/arm_sigdeliver.c b/arch/arm/armv8-r/arm_sigdeliver.c similarity index 100% rename from arch/arm/src/armv8-r/arm_sigdeliver.c rename to arch/arm/armv8-r/arm_sigdeliver.c diff --git a/arch/arm/src/armv8-r/arm_syscall.c b/arch/arm/armv8-r/arm_syscall.c similarity index 100% rename from arch/arm/src/armv8-r/arm_syscall.c rename to arch/arm/armv8-r/arm_syscall.c diff --git a/arch/arm/src/armv8-r/arm_tcbinfo.c b/arch/arm/armv8-r/arm_tcbinfo.c similarity index 100% rename from arch/arm/src/armv8-r/arm_tcbinfo.c rename to arch/arm/armv8-r/arm_tcbinfo.c diff --git a/arch/arm/src/armv8-r/arm_undefinedinsn.c b/arch/arm/armv8-r/arm_undefinedinsn.c similarity index 100% rename from arch/arm/src/armv8-r/arm_undefinedinsn.c rename to arch/arm/armv8-r/arm_undefinedinsn.c diff --git a/arch/arm/src/armv8-r/arm_vectors.S b/arch/arm/armv8-r/arm_vectors.S similarity index 100% rename from arch/arm/src/armv8-r/arm_vectors.S rename to arch/arm/armv8-r/arm_vectors.S diff --git a/arch/arm/src/armv8-r/arm_vectortab.S b/arch/arm/armv8-r/arm_vectortab.S similarity index 100% rename from arch/arm/src/armv8-r/arm_vectortab.S rename to arch/arm/armv8-r/arm_vectortab.S diff --git a/arch/arm/src/armv8-r/cp15_cacheops.c b/arch/arm/armv8-r/cp15_cacheops.c similarity index 100% rename from arch/arm/src/armv8-r/cp15_cacheops.c rename to arch/arm/armv8-r/cp15_cacheops.c diff --git a/arch/arm/src/armv8-r/cp15_cacheops.h b/arch/arm/armv8-r/cp15_cacheops.h similarity index 100% rename from arch/arm/src/armv8-r/cp15_cacheops.h rename to arch/arm/armv8-r/cp15_cacheops.h diff --git a/arch/arm/src/armv8-r/l2cc.h b/arch/arm/armv8-r/l2cc.h similarity index 100% rename from arch/arm/src/armv8-r/l2cc.h rename to arch/arm/armv8-r/l2cc.h diff --git a/arch/arm/src/armv8-r/l2cc_pl310.h b/arch/arm/armv8-r/l2cc_pl310.h similarity index 100% rename from arch/arm/src/armv8-r/l2cc_pl310.h rename to arch/arm/armv8-r/l2cc_pl310.h diff --git a/arch/arm/src/armv8-r/sctlr.h b/arch/arm/armv8-r/sctlr.h similarity index 100% rename from arch/arm/src/armv8-r/sctlr.h rename to arch/arm/armv8-r/sctlr.h diff --git a/arch/arm/src/common/Make.defs b/arch/arm/common/Make.defs similarity index 67% rename from arch/arm/src/common/Make.defs rename to arch/arm/common/Make.defs index c0722eb1f5..f6a328eac2 100644 --- a/arch/arm/src/common/Make.defs +++ b/arch/arm/common/Make.defs @@ -20,15 +20,15 @@ # ############################################################################ -STARTUP_OBJS = crt0$(OBJEXT) +STARTUP_CSRC = crt0.c # Common ARM files -CMN_CSRCS += arm_allocateheap.c arm_createstack.c arm_exit.c -CMN_CSRCS += arm_getintstack.c arm_initialize.c arm_lowputs.c -CMN_CSRCS += arm_nputs.c arm_releasestack.c arm_registerdump.c -CMN_CSRCS += arm_stackframe.c arm_modifyreg.c -CMN_CSRCS += arm_usestack.c arm_fork.c arm_poweroff.c +CSRCS += arm_allocateheap.c arm_createstack.c arm_exit.c +CSRCS += arm_getintstack.c arm_initialize.c arm_lowputs.c +CSRCS += arm_nputs.c arm_releasestack.c arm_registerdump.c +CSRCS += arm_stackframe.c arm_modifyreg.c +CSRCS += arm_usestack.c arm_fork.c arm_poweroff.c ifneq ($(CONFIG_ALARM_ARCH),y) ifneq ($(CONFIG_TIMER_ARCH),y) @@ -37,47 +37,45 @@ ifneq ($(CONFIG_ALARM_ARCH),y) endif ifeq ($(CONFIG_STACK_COLORATION),y) - CMN_CSRCS += arm_checkstack.c + CSRCS += arm_checkstack.c endif ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) - CMN_CSRCS += arm_idle.c + CSRCS += arm_idle.c endif ifeq ($(CONFIG_BUILD_PROTECTED)$(CONFIG_BUILD_KERNEL),y) - CMN_CSRCS += arm_task_start.c arm_pthread_start.c - CMN_CSRCS += arm_signal_dispatch.c - ifeq ($(CONFIG_BUILD_PROTECTED),y) - CMN_UASRCS += arm_signal_handler.S - endif + CSRCS += arm_task_start.c arm_pthread_start.c + CSRCS += arm_signal_dispatch.c + CSRCS += arm_signal_handler.S endif ifeq ($(CONFIG_ARM_SEMIHOSTING_SYSLOG),y) - CMN_CSRCS += arm_semi_syslog.c + CSRCS += arm_semi_syslog.c endif ifeq ($(CONFIG_ARM_SEMIHOSTING_HOSTFS),y) - CMN_CSRCS += arm_hostfs.c + CSRCS += arm_hostfs.c endif ifeq ($(CONFIG_SCHED_THREAD_LOCAL),y) - CMN_CSRCS += arm_tls.c + CSRCS += arm_tls.c endif ifeq ($(CONFIG_UNWINDER_FRAME_POINTER),y) - CMN_CSRCS += arm_backtrace_fp.c + CSRCS += arm_backtrace_fp.c endif ifeq ($(CONFIG_UNWINDER_STACK_POINTER),y) - CMN_CSRCS += arm_backtrace_sp.c + CSRCS += arm_backtrace_sp.c endif ifeq ($(CONFIG_UNWINDER_ARM),y) - CMN_CSRCS += arm_backtrace_unwind.c + CSRCS += arm_backtrace_unwind.c endif -CMN_ASRCS += fork.S +ASRCS += fork.S ifeq ($(CONFIG_ARCH_HAVE_FETCHADD),y) - CMN_ASRCS += arm_fetchadd.S + ASRCS += arm_fetchadd.S endif diff --git a/arch/arm/src/common/Toolchain.defs b/arch/arm/common/Toolchain.defs similarity index 100% rename from arch/arm/src/common/Toolchain.defs rename to arch/arm/common/Toolchain.defs diff --git a/arch/arm/src/common/arm_allocateheap.c b/arch/arm/common/arm_allocateheap.c similarity index 97% rename from arch/arm/src/common/arm_allocateheap.c rename to arch/arm/common/arm_allocateheap.c index f29b028441..884004e678 100644 --- a/arch/arm/src/common/arm_allocateheap.c +++ b/arch/arm/common/arm_allocateheap.c @@ -32,11 +32,8 @@ #include #include -#include #include -#include - #include "arm_internal.h" #include "chip.h" #ifdef CONFIG_BUILD_KERNEL @@ -125,7 +122,7 @@ void weak_function up_allocate_heap(void **heap_start, size_t *heap_size) #ifdef CONFIG_ARCH_PGPOOL_PBASE size_t end = CONFIG_ARCH_PGPOOL_PBASE; #else - size_t end = CONFIG_RAM_END; + size_t end = (CONFIG_RAM_START + CONFIG_RAM_SIZE); #endif #ifdef CONFIG_MM_KERNEL_HEAP @@ -134,7 +131,6 @@ void weak_function up_allocate_heap(void **heap_start, size_t *heap_size) /* Return the user-space heap settings */ - board_autoled_on(LED_HEAPALLOCATE); *heap_start = (void *)base; *heap_size = end - base; } @@ -187,7 +183,6 @@ void weak_function up_allocate_kheap(void **heap_start, size_t *heap_size) /* Return the kernel-space heap settings */ - board_autoled_on(LED_HEAPALLOCATE); *heap_start = (void *)base; *heap_size = size; } diff --git a/arch/arm/src/common/arm_backtrace_fp.c b/arch/arm/common/arm_backtrace_fp.c similarity index 100% rename from arch/arm/src/common/arm_backtrace_fp.c rename to arch/arm/common/arm_backtrace_fp.c diff --git a/arch/arm/src/common/arm_backtrace_sp.c b/arch/arm/common/arm_backtrace_sp.c similarity index 100% rename from arch/arm/src/common/arm_backtrace_sp.c rename to arch/arm/common/arm_backtrace_sp.c diff --git a/arch/arm/src/common/arm_backtrace_unwind.c b/arch/arm/common/arm_backtrace_unwind.c similarity index 100% rename from arch/arm/src/common/arm_backtrace_unwind.c rename to arch/arm/common/arm_backtrace_unwind.c diff --git a/arch/arm/src/common/arm_checkstack.c b/arch/arm/common/arm_checkstack.c similarity index 100% rename from arch/arm/src/common/arm_checkstack.c rename to arch/arm/common/arm_checkstack.c diff --git a/arch/arm/src/common/arm_createstack.c b/arch/arm/common/arm_createstack.c similarity index 98% rename from arch/arm/src/common/arm_createstack.c rename to arch/arm/common/arm_createstack.c index 92d156bb16..9cd22e0a48 100644 --- a/arch/arm/src/common/arm_createstack.c +++ b/arch/arm/common/arm_createstack.c @@ -36,8 +36,6 @@ #include #include #include -#include -#include #include "arm_internal.h" @@ -194,7 +192,6 @@ int up_create_stack(struct tcb_s *tcb, size_t stack_size, uint8_t ttype) #endif /* CONFIG_STACK_COLORATION */ tcb->flags |= TCB_FLAG_FREE_STACK; - board_autoled_on(LED_STACKCREATED); return OK; } diff --git a/arch/arm/src/common/arm_exit.c b/arch/arm/common/arm_exit.c similarity index 100% rename from arch/arm/src/common/arm_exit.c rename to arch/arm/common/arm_exit.c diff --git a/arch/arm/src/common/arm_fork.c b/arch/arm/common/arm_fork.c similarity index 100% rename from arch/arm/src/common/arm_fork.c rename to arch/arm/common/arm_fork.c diff --git a/arch/arm/src/common/arm_fork.h b/arch/arm/common/arm_fork.h similarity index 100% rename from arch/arm/src/common/arm_fork.h rename to arch/arm/common/arm_fork.h diff --git a/arch/arm/src/common/arm_getintstack.c b/arch/arm/common/arm_getintstack.c similarity index 100% rename from arch/arm/src/common/arm_getintstack.c rename to arch/arm/common/arm_getintstack.c diff --git a/arch/arm/src/common/arm_hostfs.c b/arch/arm/common/arm_hostfs.c similarity index 100% rename from arch/arm/src/common/arm_hostfs.c rename to arch/arm/common/arm_hostfs.c diff --git a/arch/arm/src/common/arm_idle.c b/arch/arm/common/arm_idle.c similarity index 100% rename from arch/arm/src/common/arm_idle.c rename to arch/arm/common/arm_idle.c diff --git a/arch/arm/src/common/arm_initialize.c b/arch/arm/common/arm_initialize.c similarity index 98% rename from arch/arm/src/common/arm_initialize.c rename to arch/arm/common/arm_initialize.c index c5c4350746..f18eb1ade3 100644 --- a/arch/arm/src/common/arm_initialize.c +++ b/arch/arm/common/arm_initialize.c @@ -26,7 +26,6 @@ #include #include -#include #include "arm_internal.h" @@ -152,5 +151,4 @@ void up_initialize(void) /* Initialize the L2 cache if present and selected */ arm_l2ccinitialize(); - board_autoled_on(LED_IRQSENABLED); } diff --git a/arch/arm/src/common/arm_internal.h b/arch/arm/common/arm_internal.h similarity index 99% rename from arch/arm/src/common/arm_internal.h rename to arch/arm/common/arm_internal.h index bb8ddc8e9b..a941088c6b 100644 --- a/arch/arm/src/common/arm_internal.h +++ b/arch/arm/common/arm_internal.h @@ -35,8 +35,7 @@ # include # include # include - -# include "chip.h" +# include #endif /**************************************************************************** diff --git a/arch/arm/src/common/arm_lowputs.c b/arch/arm/common/arm_lowputs.c similarity index 100% rename from arch/arm/src/common/arm_lowputs.c rename to arch/arm/common/arm_lowputs.c diff --git a/arch/arm/src/common/arm_mdelay.c b/arch/arm/common/arm_mdelay.c similarity index 100% rename from arch/arm/src/common/arm_mdelay.c rename to arch/arm/common/arm_mdelay.c diff --git a/arch/arm/src/common/arm_modifyreg.c b/arch/arm/common/arm_modifyreg.c similarity index 100% rename from arch/arm/src/common/arm_modifyreg.c rename to arch/arm/common/arm_modifyreg.c diff --git a/arch/arm/src/common/arm_nputs.c b/arch/arm/common/arm_nputs.c similarity index 100% rename from arch/arm/src/common/arm_nputs.c rename to arch/arm/common/arm_nputs.c diff --git a/arch/arm/src/common/arm_poweroff.c b/arch/arm/common/arm_poweroff.c similarity index 100% rename from arch/arm/src/common/arm_poweroff.c rename to arch/arm/common/arm_poweroff.c diff --git a/arch/arm/src/common/arm_pthread_start.c b/arch/arm/common/arm_pthread_start.c similarity index 100% rename from arch/arm/src/common/arm_pthread_start.c rename to arch/arm/common/arm_pthread_start.c diff --git a/arch/arm/src/common/arm_registerdump.c b/arch/arm/common/arm_registerdump.c similarity index 100% rename from arch/arm/src/common/arm_registerdump.c rename to arch/arm/common/arm_registerdump.c diff --git a/arch/arm/src/common/arm_releasestack.c b/arch/arm/common/arm_releasestack.c similarity index 100% rename from arch/arm/src/common/arm_releasestack.c rename to arch/arm/common/arm_releasestack.c diff --git a/arch/arm/src/common/arm_semi_syslog.c b/arch/arm/common/arm_semi_syslog.c similarity index 100% rename from arch/arm/src/common/arm_semi_syslog.c rename to arch/arm/common/arm_semi_syslog.c diff --git a/arch/arm/src/common/arm_signal_dispatch.c b/arch/arm/common/arm_signal_dispatch.c similarity index 100% rename from arch/arm/src/common/arm_signal_dispatch.c rename to arch/arm/common/arm_signal_dispatch.c diff --git a/arch/arm/src/common/arm_stackframe.c b/arch/arm/common/arm_stackframe.c similarity index 100% rename from arch/arm/src/common/arm_stackframe.c rename to arch/arm/common/arm_stackframe.c diff --git a/arch/arm/src/common/arm_task_start.c b/arch/arm/common/arm_task_start.c similarity index 100% rename from arch/arm/src/common/arm_task_start.c rename to arch/arm/common/arm_task_start.c diff --git a/arch/arm/src/common/arm_tls.c b/arch/arm/common/arm_tls.c similarity index 100% rename from arch/arm/src/common/arm_tls.c rename to arch/arm/common/arm_tls.c diff --git a/arch/arm/src/common/arm_udelay.c b/arch/arm/common/arm_udelay.c similarity index 100% rename from arch/arm/src/common/arm_udelay.c rename to arch/arm/common/arm_udelay.c diff --git a/arch/arm/src/common/arm_usestack.c b/arch/arm/common/arm_usestack.c similarity index 100% rename from arch/arm/src/common/arm_usestack.c rename to arch/arm/common/arm_usestack.c diff --git a/arch/arm/src/common/crt0.c b/arch/arm/common/crt0.c similarity index 100% rename from arch/arm/src/common/crt0.c rename to arch/arm/common/crt0.c diff --git a/arch/arm/src/common/hwcap.h b/arch/arm/common/hwcap.h similarity index 100% rename from arch/arm/src/common/hwcap.h rename to arch/arm/common/hwcap.h diff --git a/arch/arm/src/common/gnu/arm_fetchadd.S b/arch/arm/gcc/arm_fetchadd.S similarity index 100% rename from arch/arm/src/common/gnu/arm_fetchadd.S rename to arch/arm/gcc/arm_fetchadd.S diff --git a/arch/arm/src/common/gnu/arm_signal_handler.S b/arch/arm/gcc/arm_signal_handler.S similarity index 100% rename from arch/arm/src/common/gnu/arm_signal_handler.S rename to arch/arm/gcc/arm_signal_handler.S diff --git a/arch/arm/src/common/gnu/fork.S b/arch/arm/gcc/fork.S similarity index 100% rename from arch/arm/src/common/gnu/fork.S rename to arch/arm/gcc/fork.S diff --git a/arch/arm/src/common/iar/arm_fetchadd.S b/arch/arm/iar/arm_fetchadd.S similarity index 100% rename from arch/arm/src/common/iar/arm_fetchadd.S rename to arch/arm/iar/arm_fetchadd.S diff --git a/arch/arm/src/common/iar/fork.S b/arch/arm/iar/fork.S similarity index 100% rename from arch/arm/src/common/iar/fork.S rename to arch/arm/iar/fork.S diff --git a/arch/arm/include/armv7-m/nvicpri.h b/arch/arm/include/armv7-m/nvicpri.h index 401487b91d..af85951ac5 100644 --- a/arch/arm/include/armv7-m/nvicpri.h +++ b/arch/arm/include/armv7-m/nvicpri.h @@ -27,7 +27,7 @@ * Included Files ****************************************************************************/ -#include +#include /**************************************************************************** * Pre-processor Prototypes diff --git a/arch/arm/include/irq.h b/arch/arm/include/irq.h index 28139f63e9..d0629e64aa 100644 --- a/arch/arm/include/irq.h +++ b/arch/arm/include/irq.h @@ -34,7 +34,7 @@ #include #ifndef __ASSEMBLY__ # include -# include +# include #endif /**************************************************************************** @@ -47,7 +47,7 @@ /* Include chip-specific IRQ definitions (including IRQ numbers) */ -#include +#include /* Include NuttX-specific IRQ definitions */ diff --git a/arch/arm/src/CMakeLists.txt b/arch/arm/src/CMakeLists.txt deleted file mode 100644 index 4f9ff8d089..0000000000 --- a/arch/arm/src/CMakeLists.txt +++ /dev/null @@ -1,35 +0,0 @@ -# ############################################################################## -# arch/arm/src/CMakeLists.txt -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more contributor -# license agreements. See the NOTICE file distributed with this work for -# additional information regarding copyright ownership. The ASF licenses this -# file to you under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy of -# the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. -# -# ############################################################################## - -add_subdirectory(${ARCH_SUBDIR}) -add_subdirectory(${NUTTX_CHIP_ABS_DIR} EXCLUDE_FROM_ALL exclude_chip) -add_subdirectory(common) - -# Include directories (before system ones) as PUBLIC so that it can be exposed -# to libboard -target_include_directories(arch BEFORE PUBLIC ${NUTTX_CHIP_ABS_DIR} common - ${ARCH_SUBDIR}) - -if(CONFIG_BUILD_PROTECTED) - target_include_directories(arch_interface BEFORE PUBLIC ${NUTTX_CHIP_ABS_DIR} - common ${ARCH_SUBDIR}) -endif() diff --git a/arch/arm/src/Makefile b/arch/arm/src/Makefile deleted file mode 100644 index 5cb4485b54..0000000000 --- a/arch/arm/src/Makefile +++ /dev/null @@ -1,288 +0,0 @@ -############################################################################ -# arch/arm/src/Makefile -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -include $(TOPDIR)/tools/Make.defs -include chip/Make.defs - -ifeq ($(CONFIG_ARCH_ARMV7A),y) # ARMv7-A -ARCH_SUBDIR = armv7-a -else ifeq ($(CONFIG_ARCH_ARMV7R),y) # ARMv7-R -ARCH_SUBDIR = armv7-r -else ifeq ($(CONFIG_ARCH_ARMV8R),y) # ARMv8-R -ARCH_SUBDIR = armv8-r -else ifeq ($(CONFIG_ARCH_ARMV7M),y) # ARMv7-M -ARCH_SUBDIR = armv7-m -else ifeq ($(CONFIG_ARCH_ARMV8M),y) # ARMv8-M -ARCH_SUBDIR = armv8-m -else ifeq ($(CONFIG_ARCH_ARMV6M),y) # ARMv6-M -ARCH_SUBDIR = armv6-m -else # ARM9, ARM7TDMI, etc. -ARCH_SUBDIR = arm -endif - -ARCH_SRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src - -INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)chip -INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)common -INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)$(ARCH_SUBDIR) -INCLUDES += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)sched - -CPPFLAGS += $(INCLUDES) -CFLAGS += $(INCLUDES) -CXXFLAGS += $(INCLUDES) -AFLAGS += $(INCLUDES) - -NUTTX = $(call CONVERT_PATH,$(TOPDIR)$(DELIM)nuttx$(EXEEXT)) - -# Additional rules for system call wrapper - -ifeq ($(CONFIG_SCHED_INSTRUMENTATION_SYSCALL),y) - EXTRALINKCMDS += @$(TOPDIR)/syscall/syscall_wraps.ldcmd -endif - -# The "head" object - -HEAD_OBJ = $(HEAD_ASRC:.S=$(OBJEXT)) -STARTUP_OBJS ?= $(HEAD_OBJ) - -# Flat build or kernel-mode objects - -ASRCS = $(CHIP_ASRCS) $(CMN_ASRCS) -AOBJS = $(ASRCS:.S=$(OBJEXT)) - -CSRCS = $(CHIP_CSRCS) $(CMN_CSRCS) -COBJS = $(CSRCS:.c=$(OBJEXT)) - -SRCS = $(ASRCS) $(CSRCS) -OBJS = $(AOBJS) $(COBJS) - -# User-mode objects - -UASRCS = $(CHIP_UASRCS) $(CMN_UASRCS) -UAOBJS = $(UASRCS:.S=$(OBJEXT)) - -UCSRCS = $(CHIP_UCSRCS) $(CMN_UCSRCS) -UCOBJS = $(UCSRCS:.c=$(OBJEXT)) - -USRCS = $(UASRCS) $(UCSRCS) -UOBJS = $(UAOBJS) $(UCOBJS) - -KBIN = libkarch$(LIBEXT) -BIN = libarch$(LIBEXT) - -$(foreach lib,$(notdir $(wildcard $(APPDIR)$(DELIM)staging$(DELIM)*$(LIBEXT))), \ - $(foreach elib,$(EXTRA_LIBS), \ - $(if $(filter $(notdir $(elib)),$(lib)), \ - $(eval NAMEFULL_LIBS+=$(elib)), \ - $(if $(filter $(notdir $(elib)),$(patsubst lib%$(LIBEXT),-l%,$(lib))), \ - $(eval NAMESPEC_LIBS+=$(elib)) \ - ) \ - ) \ - ) \ - ) - -EXTRA_LIBS := $(filter-out $(NAMEFULL_LIBS) $(NAMESPEC_LIBS),$(EXTRA_LIBS)) -EXTRA_LIBS += $(wildcard $(APPDIR)$(DELIM)staging$(DELIM)*$(LIBEXT)) - -# Override in Make.defs if linker is not 'ld' - -ifeq ($(CONFIG_ARM_TOOLCHAIN_ARMCLANG),) - ifeq ($(LD),$(CC)) - ifeq ($(CONFIG_STACK_CANARIES),y) - # filter out ssp(Stack Smashing Protector) related flags: - # -fstack-protector - # -fstack-protector-all - # -fstack-protector-strong - # -fstack-protector-explicit - STRIPCFLAGS = $(filter -fstack-protector%,$(CFLAGS)) - endif - LDSTARTGROUP ?= -Wl,--start-group - LDENDGROUP ?= -Wl,--end-group - LDFLAGS := $(addprefix -Xlinker ,$(LDFLAGS)) - LDFLAGS += $(filter-out $(STRIPCFLAGS),$(CFLAGS)) - else ifneq ($(CONFIG_ARM_TOOLCHAIN_GHS),y) - LDSTARTGROUP ?= --start-group - LDENDGROUP ?= --end-group - endif - - LIBPATH_OPT = -L - LIBRARY_OPT = -l - SCRIPT_OPT = -T -else - LIBPATH_OPT = --userlibpath - LIBRARY_OPT = --library= - SCRIPT_OPT = --scatter= - EXTRA_LIBS += arm_vectors.o -endif - -ARCHSCRIPT := $(call CONVERT_PATH,$(ARCHSCRIPT)) -LDFLAGS += $(addprefix $(SCRIPT_OPT),$(addsuffix .tmp,$(ARCHSCRIPT))) $(EXTRALINKCMDS) -LIBPATHS += $(LIBPATH_OPT) $(call CONVERT_PATH,$(TOPDIR)$(DELIM)staging) - -BOARDMAKE = $(if $(wildcard board$(DELIM)Makefile),y,) -ifeq ($(BOARDMAKE),y) - LIBPATHS += $(LIBPATH_OPT) $(call CONVERT_PATH,$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board) -endif - -LDLIBS = $(patsubst %.a,%,$(patsubst lib%,$(LIBRARY_OPT)%,$(LINKLIBS))) -ifeq ($(BOARDMAKE),y) - LDLIBS += $(LIBRARY_OPT)board -endif - -VPATH += chip -VPATH += common -VPATH += $(ARCH_SUBDIR) - -ifeq ($(CONFIG_ARM_TOOLCHAIN_IAR),y) - VPATH += common$(DELIM)iar -else # ifeq ($(CONFIG_ARCH_TOOLCHAIN_GNU),y) - VPATH += common$(DELIM)gnu - VPATH += common$(DELIM)ghs -endif - -all: $(HEAD_OBJ) $(BIN) - -.PHONY: board$(DELIM)libboard$(LIBEXT) - -$(AOBJS) $(UAOBJS) $(HEAD_OBJ): %$(OBJEXT): %.S - $(call ASSEMBLE, $<, $@) - -$(COBJS) $(UCOBJS): %$(OBJEXT): %.c - $(call COMPILE, $<, $@) - -$(STARTUP_OBJS): %$(OBJEXT): %.c - $(Q) $(CC) $(CELFFLAGS) -c common$(DELIM)crt0.c -o crt0$(OBJEXT) - -ifeq ($(CONFIG_BUILD_FLAT),y) -$(BIN): $(STARTUP_OBJS) $(OBJS) - $(call ARCHIVE, $@, $(OBJS)) -else -$(BIN): $(STARTUP_OBJS) $(UOBJS) - $(call ARCHIVE, $@, $(UOBJS)) -endif - -$(KBIN): $(OBJS) - $(call ARCHIVE, $@, $(OBJS)) - -board$(DELIM)libboard$(LIBEXT): - $(Q) $(MAKE) -C board libboard$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)" - -# When multiple linking, these two additional linking objects will be included - -ifeq ($(CONFIG_MM_KASAN_GLOBAL),y) -EXTRA_LIBS += kasan_globals$(OBJEXT) -endif -ifeq ($(CONFIG_ALLSYMS),y) -EXTRA_LIBS += allsyms$(OBJEXT) -endif - -define LINK_ALLSYMS_KASAN - $(if $(CONFIG_ALLSYMS), - $(Q) $(TOPDIR)/tools/mkallsyms.py $(NUTTX) allsyms.tmp --orderbyname $(CONFIG_SYMTAB_ORDEREDBYNAME) - $(Q) $(call COMPILE, allsyms.tmp, allsyms$(OBJEXT), -x c) - $(Q) $(call DELFILE, allsyms.tmp)) - $(if $(CONFIG_MM_KASAN_GLOBAL), - $(Q) $(TOPDIR)/tools/kasan_global.py -e $(NUTTX) -o kasan_globals.tmp -a $(CONFIG_MM_KASAN_GLOBAL_ALIGN) - $(Q) $(call COMPILE, kasan_globals.tmp, kasan_globals$(OBJEXT) -fno-sanitize=kernel-address, -x c) - $(Q) $(call DELFILE, kasan_globals.tmp)) - $(Q) $(LD) $(LDFLAGS) $(LIBPATHS) $(EXTRA_LIBPATHS) \ - -o $(NUTTX) $(HEAD_OBJ) $(EXTRA_OBJS) \ - $(LDSTARTGROUP) $(LDLIBS) $(EXTRA_LIBS) $(LDENDGROUP) -endef - -$(addsuffix .tmp,$(ARCHSCRIPT)): $(ARCHSCRIPT) - $(call PREPROCESS, $(patsubst %.tmp,%,$@), $@) - -nuttx$(EXEEXT): $(HEAD_OBJ) board$(DELIM)libboard$(LIBEXT) $(addsuffix .tmp,$(ARCHSCRIPT)) - $(Q) echo "LD: nuttx" -ifeq ($(CONFIG_ALLSYMS)$(CONFIG_MM_KASAN_GLOBAL),) - $(Q) $(LD) $(LDFLAGS) $(LIBPATHS) $(EXTRA_LIBPATHS) \ - -o $(NUTTX) $(HEAD_OBJ) $(EXTRA_OBJS) \ - $(LDSTARTGROUP) $(LDLIBS) $(EXTRA_LIBS) $(LDENDGROUP) -else - $(Q) $(call LINK_ALLSYMS_KASAN) - $(Q) $(call LINK_ALLSYMS_KASAN) - $(Q) $(call LINK_ALLSYMS_KASAN) - $(Q) $(call LINK_ALLSYMS_KASAN) -endif -ifeq ($(CONFIG_MM_KASAN_GLOBAL),y) - $(Q) $(OBJCOPY) -R .kasan.global $(NUTTX) - $(Q) $(OBJCOPY) -R .kasan.unused $(NUTTX) -endif -ifneq ($(CONFIG_WINDOWS_NATIVE),y) - $(Q) $(NM) $(NUTTX) | \ - grep -v '\(compiled\)\|\(\$(OBJEXT)$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \ - sort > $(TOPDIR)$(DELIM)System.map -endif - $(Q) $(call DELFILE, $(addsuffix .tmp,$(ARCHSCRIPT))) - -# This is part of the top-level export target -# Note that there may not be a head object if layout is handled -# by the linker configuration. - -export_startup: $(STARTUP_OBJS) -ifneq ($(STARTUP_OBJS),) - $(Q) if [ -d "$(EXPORT_DIR)$(DELIM)startup" ]; then \ - cp -f $(STARTUP_OBJS) "$(EXPORT_DIR)$(DELIM)startup$(DELIM)."; \ - else \ - echo "$(EXPORT_DIR)$(DELIM)startup does not exist"; \ - exit 1; \ - fi -endif - -# Dependencies - -makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds) $(HEAD_ASRC:.S=.dds) - $(call CATFILE, Make.dep, $^) - $(call DELFILE, $^) - -.depend: Makefile chip$(DELIM)Make.defs $(SRCS) $(TOPDIR)$(DELIM).config -ifeq ($(BOARDMAKE),y) - $(Q) $(MAKE) -C board depend -endif - $(Q) $(MAKE) makedepfile DEPPATH="$(patsubst %,--dep-path %,$(subst :, ,$(VPATH)))" - $(Q) touch $@ - -depend: .depend - -context:: - -clean: -ifeq ($(BOARDMAKE),y) - $(Q) $(MAKE) -C board clean -endif - $(call DELFILE, $(addsuffix .tmp,$(ARCHSCRIPT))) - $(call DELFILE, $(KBIN)) - $(call DELFILE, $(BIN)) -ifneq ($(EXTRADELFILE),) - $(call DELFILE, $(EXTRADELFILE)) -endif - $(call CLEAN) - -distclean:: clean -ifeq ($(BOARDMAKE),y) - $(Q) $(MAKE) -C board distclean -endif - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - --include Make.dep diff --git a/arch/arm/src/arm/CMakeLists.txt b/arch/arm/src/arm/CMakeLists.txt deleted file mode 100644 index 7441d85d92..0000000000 --- a/arch/arm/src/arm/CMakeLists.txt +++ /dev/null @@ -1,47 +0,0 @@ -# ############################################################################## -# arch/arm/src/arm/CMakeLists.txt -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more contributor -# license agreements. See the NOTICE file distributed with this work for -# additional information regarding copyright ownership. The ASF licenses this -# file to you under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy of -# the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. -# -# ############################################################################## - -set(SRCS arm_head.S) - -list( - APPEND - SRCS - arm_dataabort.c - arm_doirq.c - arm_initialstate.c - arm_prefetchabort.c - arm_schedulesigaction.c - arm_sigdeliver.c - arm_syscall.c - arm_tcbinfo.c - arm_undefinedinsn.c - arm_cache.S - arm_vectors.S - arm_vectortab.S - arm_saveusercontext.S) - -if(CONFIG_PAGING) - list(APPEND SRCS arm_pginitialize.c arm_checkmapping.c arm_allocpage.c - arm_va2pte.c) -endif() - -target_sources(arch PRIVATE ${SRCS}) diff --git a/arch/arm/src/armv6-m/CMakeLists.txt b/arch/arm/src/armv6-m/CMakeLists.txt deleted file mode 100644 index ccbebc9b49..0000000000 --- a/arch/arm/src/armv6-m/CMakeLists.txt +++ /dev/null @@ -1,47 +0,0 @@ -# ############################################################################## -# arch/arm/src/armv6-m/CMakeLists.txt -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more contributor -# license agreements. See the NOTICE file distributed with this work for -# additional information regarding copyright ownership. The ASF licenses this -# file to you under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy of -# the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. -# -# ############################################################################## - -set(SRCS - arm_exception.S - arm_saveusercontext.S - arm_cpuinfo.c - arm_doirq.c - arm_hardfault.c - arm_initialstate.c - arm_schedulesigaction.c - arm_sigdeliver.c - arm_svcall.c - arm_systemreset.c - arm_tcbinfo.c - arm_trigger_irq.c - arm_vectors.c) - -if((DEFINED CONFIG_DEBUG_FEATURES AND CONFIG_DEBUG_FEATURES) - OR (DEFINED CONFIG_ARM_COREDUMP_REGION AND CONFIG_ARM_COREDUMP_REGION)) - list(APPEND SRCS arm_dumpnvic.c) -endif() - -if(CONFIG_ARCH_RAMVECTORS) - list(APPEND SRCS arm_ramvec_initialize.c arm_ramvec_attach.c) -endif() - -target_sources(arch PRIVATE ${SRCS}) diff --git a/arch/arm/src/armv7-a/CMakeLists.txt b/arch/arm/src/armv7-a/CMakeLists.txt deleted file mode 100644 index dcb6cdad90..0000000000 --- a/arch/arm/src/armv7-a/CMakeLists.txt +++ /dev/null @@ -1,126 +0,0 @@ -# ############################################################################## -# arch/arm/src/armv7-a/CMakeLists.txt -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more contributor -# license agreements. See the NOTICE file distributed with this work for -# additional information regarding copyright ownership. The ASF licenses this -# file to you under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy of -# the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. -# -# ############################################################################## - -# The vector table is the "head" object, i.e., the one that must forced into the -# link in order to draw in all of the other components - -set(SRCS arm_vectortab.S) - -# Common assembly language files - -list(APPEND SRCS arm_cpuhead.S arm_vectors.S arm_saveusercontext.S) - -# Common C source files - -list( - APPEND - SRCS - arm_cache.c - arm_cpuinfo.c - arm_dataabort.c - arm_doirq.c - arm_gicv2.c - arm_gicv2_dump.c - arm_initialstate.c - arm_mmu.c - arm_prefetchabort.c - arm_schedulesigaction.c - arm_sigdeliver.c - arm_syscall.c - arm_tcbinfo.c - arm_undefinedinsn.c - arm_perf.c - cp15_cacheops.c) - -if(CONFIG_ARMV7A_GICv2M) - list(APPEND SRCS arm_gicv2m.c) -endif() - -if(CONFIG_ARCH_HAVE_DEBUG) - list(APPEND SRCS arm_hwdebug.c) -endif() - -if(CONFIG_ARMV7A_HAVE_PTM) - list(APPEND SRCS arm_timer.c) -endif() - -if(CONFIG_ARMV7A_L2CC_PL310) - list(APPEND SRCS arm_l2cc_pl310.c) -endif() - -if(CONFIG_LEGACY_PAGING) - list( - APPEND - SRCS - arm_allocpage.c - arm_checkmapping.c - arm_pginitialize.c - arm_va2pte.c - arm_pghead.S) -else() - list(APPEND SRCS arm_head.S) -endif() - -if(CONFIG_ARCH_ADDRENV) - list( - APPEND - SRCS - arm_addrenv.c - arm_addrenv_utils.c - arm_addrenv_perms.c - arm_pgalloc.c - arm_addrenv_pgmap.c) - if(CONFIG_ARCH_STACK_DYNAMIC) - list(APPEND SRCS arm_addrenv_ustack.c) - endif() - if(CONFIG_ARCH_KERNEL_STACK) - list(APPEND SRCS arm_addrenv_kstack.c) - endif() - if(CONFIG_ARCH_VMA_MAPPING) - list(APPEND SRCS arm_addrenv_shm.c) - endif() -endif() - -if(CONFIG_MM_PGALLOC) - list(APPEND SRCS arm_physpgaddr.c) - if(CONFIG_ARCH_PGPOOL_MAPPING) - list(APPEND SRCS arm_virtpgaddr.c) - endif() -endif() - -if(CONFIG_ARCH_FPU) - list(APPEND SRCS arm_fpucmp.c arm_fpuconfig.S) -endif() - -if(CONFIG_SMP) - list(APPEND SRCS arm_cpustart.c arm_smpcall.c arm_cpuidlestack.c arm_scu.c) -endif() - -if(CONFIG_ARM_PSCI) - list(APPEND SRCS arm_cpu_psci.c arm_smccc.S) -endif() - -if(CONFIG_ARCH_HIPRI_INTERRUPT) - list(APPEND SRCS arm_dofiq.c) -endif() - -target_sources(arch PRIVATE ${SRCS}) diff --git a/arch/arm/src/armv7-r/Make.defs b/arch/arm/src/armv7-r/Make.defs deleted file mode 100644 index a0c29c9d72..0000000000 --- a/arch/arm/src/armv7-r/Make.defs +++ /dev/null @@ -1,66 +0,0 @@ -############################################################################ -# arch/arm/src/armv7-r/Make.defs -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -# Common ARM files - -include common/Make.defs - -# The vector table is the "head" object, i.e., the one that must forced into -# the link in order to draw in all of the other components - -HEAD_ASRC += arm_vectortab.S - -# Common assembly language files - -CMN_CSRCS += arm_cache.c arm_cpuinfo.c arm_dataabort.c -CMN_CSRCS += arm_doirq.c arm_gicv2.c arm_gicv2_dump.c -CMN_CSRCS += arm_initialstate.c arm_prefetchabort.c -CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c -CMN_CSRCS += arm_syscall.c arm_tcbinfo.c arm_undefinedinsn.c -CMN_CSRCS += arm_perf.c cp15_cacheops.c - -# Common C source files - -CMN_ASRCS += arm_head.S arm_vectors.S arm_saveusercontext.S - -ifeq ($(CONFIG_ARMV7R_HAVE_PTM), y) - CMN_CSRCS += arm_timer.c -endif - -ifeq ($(CONFIG_BUILD_PROTECTED),y) - CMN_CSRCS += arm_mpu.c -endif - -ifeq ($(CONFIG_ARMV7R_L2CC_PL310),y) - CMN_CSRCS += arm_l2cc_pl310.c -endif - -ifeq ($(CONFIG_ARCH_FPU),y) - CMN_CSRCS += arm_fpucmp.c - CMN_ASRCS += arm_fpuconfig.S -endif - -ifeq ($(CONFIG_SMP),y) - CMN_ASRCS += arm_cpuhead.S - CMN_CSRCS += arm_cpustart.c arm_smpcall.c - CMN_CSRCS += arm_cpuidlestack.c arm_scu.c -endif diff --git a/arch/arm/src/armv8-r/CMakeLists.txt b/arch/arm/src/armv8-r/CMakeLists.txt deleted file mode 100644 index 36c019dcef..0000000000 --- a/arch/arm/src/armv8-r/CMakeLists.txt +++ /dev/null @@ -1,60 +0,0 @@ -# ############################################################################## -# arch/arm/src/armv8-r/CMakeLists.txt -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more contributor -# license agreements. See the NOTICE file distributed with this work for -# additional information regarding copyright ownership. The ASF licenses this -# file to you under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy of -# the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. -# -# ############################################################################## - -# The vector table - -set(SRCS arm_vectortab.S) - -# Common assembly language files - -list(APPEND SRCS arm_head.S arm_vectors.S arm_saveusercontext.S) - -# Common C source files - -list( - APPEND - SRCS - arm_arch_timer.c - arm_cache.c - arm_cpuinfo.c - arm_dataabort.c - arm_doirq.c - arm_gicv3.c - arm_initialstate.c - arm_prefetchabort.c - arm_schedulesigaction.c - arm_sigdeliver.c - arm_syscall.c - arm_tcbinfo.c - arm_undefinedinsn.c - arm_perf.c - cp15_cacheops.c) - -if(CONFIG_ARCH_FPU) - list(APPEND SRCS arm_fpucmp.c arm_fpuconfig.S) -endif() - -if(CONFIG_ARCH_HIPRI_INTERRUPT) - list(APPEND SRCS arm_dofiq.c) -endif() - -target_sources(arch PRIVATE ${SRCS}) diff --git a/arch/arm/src/cmake/Toolchain.cmake b/arch/arm/src/cmake/Toolchain.cmake deleted file mode 100644 index cd3b2a630c..0000000000 --- a/arch/arm/src/cmake/Toolchain.cmake +++ /dev/null @@ -1,62 +0,0 @@ -# ############################################################################## -# arch/arm/src/cmake/Toolchain.cmake -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more contributor -# license agreements. See the NOTICE file distributed with this work for -# additional information regarding copyright ownership. The ASF licenses this -# file to you under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy of -# the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. -# -# ############################################################################## - -# Toolchain - -set(CMAKE_SYSTEM_NAME Generic) -set(CMAKE_SYSTEM_VERSION 1) - -set(ARCH_SUBDIR) - -if(CONFIG_ARCH_ARMV7A) # ARMv7-A - set(ARCH_SUBDIR armv7-a) -elseif(CONFIG_ARCH_ARMV7R) # ARMv7-R - set(ARCH_SUBDIR armv7-r) -elseif(CONFIG_ARCH_ARMV8R) # ARMv8-R - set(ARCH_SUBDIR armv8-r) -elseif(CONFIG_ARCH_ARMV7M) # ARMv7-M - set(ARCH_SUBDIR armv7-m) -elseif(CONFIG_ARCH_ARMV8M) # ARMv8-M - set(ARCH_SUBDIR armv8-m) -elseif(CONFIG_ARCH_ARMV6M) # ARMv6-M - set(ARCH_SUBDIR armv6-m) -else() # ARM9, ARM7TDMI, etc. - set(ARCH_SUBDIR arm) -endif() - -include(${ARCH_SUBDIR}) - -# include the toolchain specific cmake file - -set(TOOLCHAIN_FILE) - -if(CONFIG_ARCH_TOOLCHAIN_CLANG) # clang - set(TOOLCHAIN_FILE clang) -elseif(CONFIG_ARCH_TOOLCHAIN_ARMCLANG) # arm clang - set(TOOLCHAIN_FILE armclang) -elseif(CONFIG_ARCH_TOOLCHAIN_GHS) # greenhills - set(TOOLCHAIN_FILE ghs) -else() # gcc - set(TOOLCHAIN_FILE gcc) -endif() - -include(${TOOLCHAIN_FILE}) diff --git a/arch/arm/src/cmake/arm.cmake b/arch/arm/src/cmake/arm.cmake deleted file mode 100644 index 37220431be..0000000000 --- a/arch/arm/src/cmake/arm.cmake +++ /dev/null @@ -1,21 +0,0 @@ -# ############################################################################## -# arch/arm/src/cmake/arm.cmake -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more contributor -# license agreements. See the NOTICE file distributed with this work for -# additional information regarding copyright ownership. The ASF licenses this -# file to you under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy of -# the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. -# -# ############################################################################## diff --git a/arch/arm/src/cmake/armclang.cmake b/arch/arm/src/cmake/armclang.cmake deleted file mode 100644 index 026d6a8225..0000000000 --- a/arch/arm/src/cmake/armclang.cmake +++ /dev/null @@ -1,244 +0,0 @@ -# ############################################################################## -# arch/arm/src/cmake/armclang.cmake -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more contributor -# license agreements. See the NOTICE file distributed with this work for -# additional information regarding copyright ownership. The ASF licenses this -# file to you under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy of -# the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. -# -# ############################################################################## - -# Toolchain - -set(CMAKE_SYSTEM_NAME Generic) -set(CMAKE_SYSTEM_VERSION 1) - -set(CMAKE_ASM_COMPILER armclang) -set(CMAKE_C_COMPILER armclang) -set(CMAKE_CXX_COMPILER armclang) -set(CMAKE_PREPROCESSOR armclang -E -P -x c) -set(CMAKE_STRIP llvm-strip --strip-unneeded) -set(CMAKE_OBJCOPY llvm-objcopy) -set(CMAKE_OBJDUMP llvm-objdump) -set(CMAKE_LINKER armlink) -set(CMAKE_LD armlink) -set(CMAKE_AR armar -rcs) -set(CMAKE_NM llvm-nm) -set(CMAKE_RANLIB llvm-ranlib) - -# Since the no_builtin attribute is not fully supported on Clang disable the -# built-in functions, refer: https://github.com/apache/nuttx/pull/5971 - -add_compile_options(-fno-builtin --target=arm-arm-none-eabi) - -# Suppress license warning - -add_compile_options(-Wno-license-management) -add_link_options(-Wl,--diag_suppress=9931) -# Input sections are specified even though there will be no such sections found -# in the libraries linked. Warning: L6314W: No section matches pattern *(xxx). - -add_link_options(-Wl,--diag_suppress=6314) - -# Allow Empty Execution region declared on scatter Warning: L6312W: Empty -# Execution region description for region xxx - -add_link_options(-Wl,--diag_suppress=6312) - -# Match pattern for an unused section that is being removed. Warning: L6329W: -# Pattern xxx only matches removed unused sections. - -add_link_options(-Wl,--diag_suppress=6329) - -# override the ARCHIVE command - -set(CMAKE_ARCHIVE_COMMAND " rcs ") -set(CMAKE_RANLIB_COMMAND " ") -set(CMAKE_C_ARCHIVE_CREATE ${CMAKE_ARCHIVE_COMMAND}) -set(CMAKE_CXX_ARCHIVE_CREATE ${CMAKE_ARCHIVE_COMMAND}) -set(CMAKE_ASM_ARCHIVE_CREATE ${CMAKE_ARCHIVE_COMMAND}) - -set(CMAKE_C_ARCHIVE_APPEND ${CMAKE_ARCHIVE_COMMAND}) -set(CMAKE_CXX_ARCHIVE_APPEND ${CMAKE_ARCHIVE_COMMAND}) -set(CMAKE_ASM_ARCHIVE_APPEND ${CMAKE_ARCHIVE_COMMAND}) - -set(CMAKE_C_ARCHIVE_FINISH ${CMAKE_RANLIB_COMMAND}) -set(CMAKE_CXX_ARCHIVE_FINISH ${CMAKE_RANLIB_COMMAND}) -set(CMAKE_ASM_ARCHIVE_FINISH ${CMAKE_RANLIB_COMMAND}) - -set(NO_LTO "-fno-lto") - -if(CONFIG_ENDIAN_BIG) - add_compile_options(-mbig-endian) -endif() - -# Architecture flags - -add_link_options(-Wl,--entry=__start) -add_link_options(-nostdlib) -add_compile_options(-fno-common -Wall -Wshadow -Wundef -nostdlib) - -if(CONFIG_DEBUG_CUSTOMOPT) - add_compile_options(${CONFIG_DEBUG_OPTLEVEL}) -elseif(CONFIG_DEBUG_FULLOPT) - add_compile_options(-Os) -endif() - -if(NOT CONFIG_DEBUG_NOOPT) - add_compile_options(-fno-strict-aliasing) -endif() - -if(CONFIG_FRAME_POINTER) - add_compile_options(-fno-omit-frame-pointer -fno-optimize-sibling-calls) -else() - add_compile_options(-fomit-frame-pointer) -endif() - -if(CONFIG_STACK_CANARIES) - add_compile_options(-fstack-protector-all) -endif() - -if(CONFIG_STACK_USAGE) - add_compile_options(-fstack-usage) -endif() -if(CONFIG_STACK_USAGE_WARNING AND NOT "${CONFIG_STACK_USAGE_WARNING}" STREQUAL - "0") - add_compile_options(-Wstack-usage=${CONFIG_STACK_USAGE_WARNING}) -endif() - -if(CONFIG_COVERAGE_ALL) - add_compile_options(-fprofile-instr-generate -fcoverage-mapping) -endif() - -if(CONFIG_PROFILE_ALL) - add_compile_options(-pg) -endif() - -if(CONFIG_MM_UBSAN_ALL) - add_compile_options(${CONFIG_MM_UBSAN_OPTION}) -endif() - -if(CONFIG_MM_UBSAN_TRAP_ON_ERROR) - add_compile_options(-fsanitize-undefined-trap-on-error) -endif() - -if(CONFIG_MM_KASAN_INSTRUMENT_ALL) - add_compile_options(-fsanitize=kernel-address) -endif() - -if(CONFIG_MM_KASAN_GLOBAL) - add_compile_options(--param=asan-globals=1) -endif() - -if(CONFIG_MM_KASAN_DISABLE_READS_CHECK) - add_compile_options(--param=asan-instrument-reads=0) -endif() - -if(CONFIG_MM_KASAN_DISABLE_WRITES_CHECK) - add_compile_options(--param=asan-instrument-writes=0) -endif() - -# Instrumentation options - -if(CONFIG_ARCH_INSTRUMENT_ALL) - add_compile_options(-finstrument-functions) -endif() - -if(CONFIG_UNWINDER_ARM) - add_compile_options(-funwind-tables -fasynchronous-unwind-tables) -endif() - -# Link Time Optimization - -if(CONFIG_LTO_THIN) - add_compile_options(-flto=thin) -elseif(CONFIG_LTO_FULL) - add_compile_options(-flto) - -elseif(CONFIG_LTO_FAT) - add_compile_options(-flto -ffat-lto-objects) -endif() - -# The arm clang toolchain requires to pass the linker option will gcc tool chain -# can automatically perform lto at linking time if it found any object files are -# compiled with flto - -if(NOT CONFIG_LTO_NONE) - add_link_options(-Wl,--lto) -endif() - -if(CONFIG_ARM_THUMB) - add_compile_options(-mthumb) - - # GCC Manual: -mthumb ... If you want to force assembler files to be - # interpreted as Thumb code, either add a `.thumb' directive to the source or - # pass the -mthumb option directly to the assembler by prefixing it with -Wa. - - add_compile_options(-Wa,-mthumb) - - # Outputs an implicit IT block when there is a conditional instruction without - # an enclosing IT block. - - add_compile_options(-Wa,-mimplicit-it=always) -endif() - -# Debug link map - -if(CONFIG_DEBUG_LINK_MAP) - add_link_options( - -Wl,--strict - -Wl,--map - -Wl,--xref - -Wl,--symbols - -Wl,--info=unused - -Wl,--info=veneers - -Wl,--info=summarysizes - -Wl,--info=summarystack) -endif() - -if(CONFIG_DEBUG_SYMBOLS) - add_compile_options(${CONFIG_DEBUG_SYMBOLS_LEVEL}) - - add_link_options(-Wl,--debug) -endif() - -add_compile_options( - -Wno-attributes -Wno-unknown-pragmas - $<$:-Wstrict-prototypes> - $<$:-nostdinc++>) - -# When all C++ code is built using GCC 7.1 or a higher version, we can safely -# disregard warnings of the type "parameter passing for X changed in GCC 7.1." -# Refer to : -# https://stackoverflow.com/questions/48149323/what-does-the-gcc-warning-project-parameter-passing-for-x-changed-in-gcc-7-1-m - -add_compile_options(-Wno-psabi) - -if(CONFIG_CXX_STANDARD) - add_compile_options($<$:-std=${CONFIG_CXX_STANDARD}>) -endif() - -if(NOT CONFIG_CXX_EXCEPTION) - add_compile_options($<$:-fno-exceptions> - $<$:-fcheck-new>) -endif() - -if(NOT CONFIG_CXX_RTTI) - add_compile_options($<$:-fno-rtti>) -endif() - -set(CMAKE_EXE_LINKER_FLAGS_INIT "--specs=nosys.specs") - -set(PREPROCESS ${CMAKE_C_COMPILER} ${CMAKE_C_FLAG_ARGS} -E -P -x c) diff --git a/arch/arm/src/cmake/armv6-m.cmake b/arch/arm/src/cmake/armv6-m.cmake deleted file mode 100644 index 5d52da216d..0000000000 --- a/arch/arm/src/cmake/armv6-m.cmake +++ /dev/null @@ -1,28 +0,0 @@ -# ############################################################################## -# arch/arm/src/cmake/armv6-m.cmake -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more contributor -# license agreements. See the NOTICE file distributed with this work for -# additional information regarding copyright ownership. The ASF licenses this -# file to you under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy of -# the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. -# -# ############################################################################## - -add_compile_options(-mcpu=cortex-m0 -mthumb -mfloat-abi=soft) - -# LLVM Configuration -set(LLVM_ARCHTYPE thumbv6m) -set(LLVM_ABITYPE eabi) -set(LLVM_CPUTYPE cortex-m0) diff --git a/arch/arm/src/cmake/armv7-a.cmake b/arch/arm/src/cmake/armv7-a.cmake deleted file mode 100644 index ddd02c324b..0000000000 --- a/arch/arm/src/cmake/armv7-a.cmake +++ /dev/null @@ -1,93 +0,0 @@ -# ############################################################################## -# arch/arm/src/cmake/armv7-a.cmake -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more contributor -# license agreements. See the NOTICE file distributed with this work for -# additional information regarding copyright ownership. The ASF licenses this -# file to you under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy of -# the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. -# -# ############################################################################## - -set(PLATFORM_FLAGS) - -if(CONFIG_ARCH_CORTEXA5) - list(APPEND PLATFORM_FLAGS -mcpu=cortex-a5) - set(LLVM_CPUTYPE cortex-a5) -elseif(CONFIG_ARCH_CORTEXA7) - list(APPEND PLATFORM_FLAGS -mcpu=cortex-a7) - set(LLVM_CPUTYPE cortex-a7) -elseif(CONFIG_ARCH_CORTEXA8) - list(APPEND PLATFORM_FLAGS -mcpu=cortex-a8) - set(LLVM_CPUTYPE cortex-a8) -elseif(CONFIG_ARCH_CORTEXA9) - list(APPEND PLATFORM_FLAGS -mcpu=cortex-a9) - set(LLVM_CPUTYPE cortex-a9) -endif() - -if(CONFIG_ARM_THUMB) - set(LLVM_ARCHTYPE thumbv7a) -else() - set(LLVM_ARCHTYPE armv7-a) -endif() - -if(CONFIG_ARCH_FPU) - set(LLVM_ABITYPE eabihf) -else() - set(LLVM_ABITYPE eabi) -endif() - -if(NOT CONFIG_ARM_DPFPU32) - set(ARCHFPUD16 -d16) -endif() - -# ~~~ -# | Cortex | FPU Option 1 | FPU Option 2 | FPU Option 3 | -# |--------|--------------------|------------------------|-----------------------| -# | A5 | -mfpu=vfpv4-fp16 | -mfpu=vfpv4-d16-fp16 | -mfpu=neon-fp16 | -# | A7 | -mfpu=vfpv4 | -mfpu=vfpv4-d16 | -mfpu=neon-vfpv4 | -# | A8 | -mfpu=vfpv3 | | -mfpu=neon (alias for neon-vfpv3) | -# | A9 | -mfpu=vfpv3-fp16 | -mfpu=vfpv3-d16-fp16 | -mfpu=neon-fp16 | -# | A15 | -mfpu=vfpv4 | | -mfpu=neon-vfpv4 | -# ~~~ - -if(CONFIG_ARCH_FPU) - if(CONFIG_ARM_FPU_ABI_SOFT) - list(APPEND PLATFORM_FLAGS -mfloat-abi=softfp) - else() - list(APPEND PLATFORM_FLAGS -mfloat-abi=hard) - endif() - - if(CONFIG_ARM_NEON) - set(ARCHNEON neon-) - endif() - if(CONFIG_ARCH_CORTEXA8) - set(ARCHFPU vfpv3) - elseif(CONFIG_ARCH_CORTEXA9) - set(ARCHFPU vfpv3) - else() - set(ARCHFPU vfpv4) - endif() - - list(APPEND PLATFORM_FLAGS -mfpu=${ARCHNEON}${ARCHFPU}${ARCHFPUD16}) - -else() - list(APPEND PLATFORM_FLAGS -mfloat-abi=soft) -endif() - -if(CONFIG_ARCH_INSTRUMENT_ALL AND NOT CONFIG_ARMV8M_STACKCHECK) - list(APPEND PLATFORM_FLAGS -finstrument-functions) -endif() - -add_compile_options(${PLATFORM_FLAGS}) diff --git a/arch/arm/src/cmake/armv7-m.cmake b/arch/arm/src/cmake/armv7-m.cmake deleted file mode 100644 index 1f6d121e78..0000000000 --- a/arch/arm/src/cmake/armv7-m.cmake +++ /dev/null @@ -1,60 +0,0 @@ -# ############################################################################## -# arch/arm/src/cmake/armv7-m.cmake -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more contributor -# license agreements. See the NOTICE file distributed with this work for -# additional information regarding copyright ownership. The ASF licenses this -# file to you under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy of -# the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. -# -# ############################################################################## - -set(CMAKE_SYSTEM_NAME Generic) -set(CMAKE_SYSTEM_VERSION 1) - -set(CMAKE_C_COMPILER_FORCED TRUE) -set(CMAKE_CXX_COMPILER_FORCED TRUE) - -set(TOOLCHAIN_ARCH_FILE) - -if(CONFIG_ARCH_TOOLCHAIN_CLANG) # clang - set(TOOLCHAIN_ARCH_FILE armv7-m_clang) -elseif(CONFIG_ARCH_TOOLCHAIN_ARMCLANG) # arm clang - set(TOOLCHAIN_ARCH_FILE armv7-m_armclang) -elseif(CONFIG_ARCH_TOOLCHAIN_GHS) # greenhills - set(TOOLCHAIN_ARCH_FILE armv7-m_ghs) -else() # gcc - set(TOOLCHAIN_ARCH_FILE armv7-m_gcc) -endif() - -# LLVM Configuration -if(CONFIG_ARCH_CORTEXM3) - set(LLVM_ARCHTYPE thumbv7m) - set(LLVM_CPUTYPE cortex-m3) -else() - set(LLVM_ARCHTYPE thumbv7em) - if(CONFIG_ARCH_CORTEXM4) - set(LLVM_CPUTYPE cortex-m4) - elseif(CONFIG_ARCH_CORTEXM7) - set(LLVM_CPUTYPE cortex-m7) - endif() -endif() - -if(CONFIG_ARCH_FPU) - set(LLVM_ABITYPE eabihf) -else() - set(LLVM_ABITYPE eabi) -endif() - -include(${TOOLCHAIN_ARCH_FILE}) diff --git a/arch/arm/src/cmake/armv7-m_armclang.cmake b/arch/arm/src/cmake/armv7-m_armclang.cmake deleted file mode 100644 index eb09191a66..0000000000 --- a/arch/arm/src/cmake/armv7-m_armclang.cmake +++ /dev/null @@ -1,61 +0,0 @@ -# ############################################################################## -# arch/arm/src/cmake/armv7-m_armclang.cmake -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more contributor -# license agreements. See the NOTICE file distributed with this work for -# additional information regarding copyright ownership. The ASF licenses this -# file to you under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy of -# the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. -# -# ############################################################################## - -set(PLATFORM_FLAGS) - -if(CONFIG_ARCH_CORTEXM4) - list(APPEND PLATFORM_FLAGS -mtune=cortex-m4 -march=armv7e-m) - if(CONFIG_ARCH_FPU) - list(APPEND PLATFORM_FLAGS -mfpu=fpv4-sp-d16) - endif() -elseif(CONFIG_ARCH_CORTEXM7) - list(APPEND PLATFORM_FLAGS -mtune=cortex-m7 -march=armv7e-m) - if(CONFIG_ARCH_FPU) - if(CONFIG_ARCH_DPFPU) - list(APPEND PLATFORM_FLAGS -mfpu=fpv5-d16) - else() - list(APPEND PLATFORM_FLAGS -mfpu=fpv5-sp-d16) - endif() - endif() -else() - list(APPEND PLATFORM_FLAGS -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft) -endif() - -if(CONFIG_ARCH_FPU) - if(CONFIG_ARM_FPU_ABI_SOFT) - list(APPEND PLATFORM_FLAGS -mfloat-abi=softfp) - else() - list(APPEND PLATFORM_FLAGS -mfloat-abi=hard) - endif() -else() - list(APPEND PLATFORM_FLAGS -mfloat-abi=soft) -endif() - -if(CONFIG_ARMV7M_STACKCHECK) - list(APPEND PLATFORM_FLAGS -finstrument-functions -ffixed-r10) -endif() - -if(CONFIG_ARCH_INSTRUMENT_ALL AND NOT CONFIG_ARMV7M_STACKCHECK) - list(APPEND PLATFORM_FLAGS -finstrument-functions) -endif() - -add_compile_options(${PLATFORM_FLAGS}) diff --git a/arch/arm/src/cmake/armv7-m_clang.cmake b/arch/arm/src/cmake/armv7-m_clang.cmake deleted file mode 100644 index ffea1be6b7..0000000000 --- a/arch/arm/src/cmake/armv7-m_clang.cmake +++ /dev/null @@ -1,97 +0,0 @@ -# ############################################################################## -# arch/arm/src/cmake/armv7-m_clang.cmake -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more contributor -# license agreements. See the NOTICE file distributed with this work for -# additional information regarding copyright ownership. The ASF licenses this -# file to you under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy of -# the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. -# -# ############################################################################## - -set(PLATFORM_FLAGS) - -if(CONFIG_ARCH_CORTEXM4) - list(APPEND PLATFORM_FLAGS -mtune=cortex-m4 -march=armv7e-m) - if(CONFIG_ARCH_FPU) - list(APPEND PLATFORM_FLAGS -mfpu=fpv4-sp-d16) - endif() -elseif(CONFIG_ARCH_CORTEXM7) - list(APPEND PLATFORM_FLAGS -mtune=cortex-m7 -march=armv7e-m) - if(CONFIG_ARCH_FPU) - if(CONFIG_ARCH_DPFPU) - list(APPEND PLATFORM_FLAGS -mfpu=fpv5-d16) - else() - list(APPEND PLATFORM_FLAGS -mfpu=fpv5-sp-d16) - endif() - endif() -else() - list(APPEND PLATFORM_FLAGS -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft) -endif() - -if(CONFIG_ARCH_FPU) - if(CONFIG_ARM_FPU_ABI_SOFT) - list(APPEND PLATFORM_FLAGS -mfloat-abi=softfp) - else() - list(APPEND PLATFORM_FLAGS -mfloat-abi=hard) - endif() -else() - list(APPEND PLATFORM_FLAGS -mfloat-abi=soft) -endif() - -# Clang Configuration files - -set(ARCHFLAGS) - -if(CONFIG_ARCH_CORTEXM4) - if(CONFIG_ARCH_FPU) - string(APPEND ARCHFLAGS "--config armv7em_hard_fpv4_sp_d16.cfg") - else() - string(APPEND ARCHFLAGS "--config armv7em_soft_nofp.cfg") - endif() -elseif(CONFIG_ARCH_CORTEXM7) - if(CONFIG_ARCH_FPU) - string(APPEND ARCHFLAGS "--config armv7em_hard_fpv5.cfg") - else() - string(APPEND ARCHFLAGS "--config armv7em_soft_nofp.cfg") - endif() -else() - string(APPEND ARCHFLAGS "--config armv7em_soft_nofp.cfg") -endif() - -if(NOT "${CMAKE_C_FLAGS}" STREQUAL "" AND NOT "${ARCHFLAGS}" STREQUAL "") - string(REGEX MATCH "${ARCHFLAGS}" EXISTS_FLAGS "${CMAKE_C_FLAGS}") -endif() - -if(NOT EXISTS_FLAGS) - set(CMAKE_ASM_FLAGS - "${CMAKE_ASM_FLAGS} ${ARCHFLAGS}" - CACHE STRING "" FORCE) - set(CMAKE_C_FLAGS - "${CMAKE_C_FLAGS} ${ARCHFLAGS}" - CACHE STRING "" FORCE) - set(CMAKE_CXX_FLAGS - "${CMAKE_CXX_FLAGS} ${ARCHFLAGS}" - CACHE STRING "" FORCE) -endif() - -if(CONFIG_ARMV7M_STACKCHECK) - list(APPEND PLATFORM_FLAGS -finstrument-functions -ffixed-r10) -endif() - -if(CONFIG_ARCH_INSTRUMENT_ALL AND NOT CONFIG_ARMV7M_STACKCHECK) - list(APPEND PLATFORM_FLAGS -finstrument-functions) -endif() - -add_compile_options(${PLATFORM_FLAGS}) diff --git a/arch/arm/src/cmake/armv7-m_gcc.cmake b/arch/arm/src/cmake/armv7-m_gcc.cmake deleted file mode 100644 index 331e4dc3e8..0000000000 --- a/arch/arm/src/cmake/armv7-m_gcc.cmake +++ /dev/null @@ -1,99 +0,0 @@ -# ############################################################################## -# arch/arm/src/cmake/armv7-m_gcc.cmake -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more contributor -# license agreements. See the NOTICE file distributed with this work for -# additional information regarding copyright ownership. The ASF licenses this -# file to you under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy of -# the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. -# -# ############################################################################## - -set(PLATFORM_FLAGS) - -if(CONFIG_ARCH_CORTEXM4) - list(APPEND PLATFORM_FLAGS -mtune=cortex-m4 -march=armv7e-m) - if(CONFIG_ARCH_FPU) - list(APPEND PLATFORM_FLAGS -mfpu=fpv4-sp-d16) - endif() -elseif(CONFIG_ARCH_CORTEXM7) - list(APPEND PLATFORM_FLAGS -mtune=cortex-m7 -march=armv7e-m) - if(CONFIG_ARCH_FPU) - if(CONFIG_ARCH_DPFPU) - list(APPEND PLATFORM_FLAGS -mfpu=fpv5-d16) - else() - list(APPEND PLATFORM_FLAGS -mfpu=fpv5-sp-d16) - endif() - endif() -else() - list(APPEND PLATFORM_FLAGS -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft) -endif() - -if(CONFIG_ARCH_FPU) - if(CONFIG_ARM_FPU_ABI_SOFT) - list(APPEND PLATFORM_FLAGS -mfloat-abi=softfp) - else() - list(APPEND PLATFORM_FLAGS -mfloat-abi=hard) - endif() -else() - list(APPEND PLATFORM_FLAGS -mfloat-abi=soft) -endif() - -# Clang Configuration files - -if(CONFIG_ARCH_TOOLCHAIN_CLANG) - set(ARCHFLAGS) - - if(CONFIG_ARCH_CORTEXM4) - if(CONFIG_ARCH_FPU) - string(APPEND ARCHFLAGS "--config armv7em_hard_fpv4_sp_d16.cfg") - else() - string(APPEND ARCHFLAGS "--config armv7em_soft_nofp.cfg") - endif() - elseif(CONFIG_ARCH_CORTEXM7) - if(CONFIG_ARCH_FPU) - string(APPEND ARCHFLAGS "--config armv7em_hard_fpv5.cfg") - else() - string(APPEND ARCHFLAGS "--config armv7em_soft_nofp.cfg") - endif() - else() - string(APPEND ARCHFLAGS "--config armv7em_soft_nofp.cfg") - endif() - - if(NOT "${CMAKE_C_FLAGS}" STREQUAL "" AND NOT "${ARCHFLAGS}" STREQUAL "") - string(REGEX MATCH "${ARCHFLAGS}" EXISTS_FLAGS "${CMAKE_C_FLAGS}") - endif() - - if(NOT EXISTS_FLAGS) - set(CMAKE_ASM_FLAGS - "${CMAKE_ASM_FLAGS} ${ARCHFLAGS}" - CACHE STRING "" FORCE) - set(CMAKE_C_FLAGS - "${CMAKE_C_FLAGS} ${ARCHFLAGS}" - CACHE STRING "" FORCE) - set(CMAKE_CXX_FLAGS - "${CMAKE_CXX_FLAGS} ${ARCHFLAGS}" - CACHE STRING "" FORCE) - endif() -endif() - -if(CONFIG_ARMV7M_STACKCHECK) - list(APPEND PLATFORM_FLAGS -finstrument-functions -ffixed-r10) -endif() - -if(CONFIG_ARCH_INSTRUMENT_ALL AND NOT CONFIG_ARMV7M_STACKCHECK) - list(APPEND PLATFORM_FLAGS -finstrument-functions) -endif() - -add_compile_options(${PLATFORM_FLAGS}) diff --git a/arch/arm/src/cmake/armv7-m_ghs.cmake b/arch/arm/src/cmake/armv7-m_ghs.cmake deleted file mode 100644 index c78665b97e..0000000000 --- a/arch/arm/src/cmake/armv7-m_ghs.cmake +++ /dev/null @@ -1,67 +0,0 @@ -# ############################################################################## -# arch/arm/src/cmake/armv7-m_ghs.cmake -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more contributor -# license agreements. See the NOTICE file distributed with this work for -# additional information regarding copyright ownership. The ASF licenses this -# file to you under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy of -# the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. -# -# ############################################################################## - -set(PLATFORM_FLAGS) - -if(CONFIG_ARCH_CORTEXM4) - list(APPEND PLATFORM_FLAGS -cpu=cortexm4) - if(CONFIG_ARCH_FPU) - if(CONFIG_ARCH_DPFPU) - list(APPEND PLATFORM_FLAGS -fpu=vfpv3) - else() - list(APPEND PLATFORM_FLAGS -fpu=vfpv3_d16) - endif() - endif() -elseif(CONFIG_ARCH_CORTEXM7) - list(APPEND PLATFORM_FLAGS -cpu=cortexm7) - if(CONFIG_ARCH_FPU) - if(CONFIG_ARCH_DPFPU) - list(APPEND PLATFORM_FLAGS -fpu=vfpv3) - else() - list(APPEND PLATFORM_FLAGS -fpu=vfpv3_d16) - endif() - endif() -else() - list(APPEND PLATFORM_FLAGS -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft) -endif() - -if(CONFIG_ARCH_FPU) - if(CONFIG_ARM_FPU_ABI_SOFT) - list(APPEND PLATFORM_FLAGS -fsoft) - elseif(CONFIG_ARCH_DPFPU) - list(APPEND PLATFORM_FLAGS -fhard) - else() - list(APPEND PLATFORM_FLAGS -fsingle) - endif() -else() - list(APPEND PLATFORM_FLAGS -fsoft) -endif() - -if(CONFIG_ARMV7M_STACKCHECK) - list(APPEND PLATFORM_FLAGS -finstrument-functions -ffixed-r10) -endif() - -if(CONFIG_ARCH_INSTRUMENT_ALL AND NOT CONFIG_ARMV7M_STACKCHECK) - list(APPEND PLATFORM_FLAGS -finstrument-functions) -endif() - -add_compile_options(${PLATFORM_FLAGS}) diff --git a/arch/arm/src/cmake/armv7-r.cmake b/arch/arm/src/cmake/armv7-r.cmake deleted file mode 100644 index 4444320202..0000000000 --- a/arch/arm/src/cmake/armv7-r.cmake +++ /dev/null @@ -1,44 +0,0 @@ -# ############################################################################## -# arch/arm/src/cmake/armv7-r.cmake -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more contributor -# license agreements. See the NOTICE file distributed with this work for -# additional information regarding copyright ownership. The ASF licenses this -# file to you under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy of -# the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. -# -# ############################################################################## - -set(PLATFORM_FLAGS) - -if(CONFIG_ARCH_CORTEXR4) - list(APPEND PLATFORM_FLAGS -mcpu=cortex-r4) -elseif(CONFIG_ARCH_CORTEXR5) - list(APPEND PLATFORM_FLAGS -mcpu=cortex-r5) -elseif(CONFIG_ARCH_CORTEXR7) - list(APPEND PLATFORM_FLAGS -mcpu=cortex-r7) -endif() - -if(CONFIG_ARCH_FPU) - list(APPEND PLATFORM_FLAGS -mfpu=vfpv3-d16) - if(CONFIG_ARM_FPU_ABI_SOFT) - list(APPEND PLATFORM_FLAGS -mfloat-abi=softfp) - else() - list(APPEND PLATFORM_FLAGS -mfloat-abi=hard) - endif() -else() - list(APPEND PLATFORM_FLAGS -mfloat-abi=soft) -endif() - -add_compile_options(${PLATFORM_FLAGS}) diff --git a/arch/arm/src/cmake/armv8-m.cmake b/arch/arm/src/cmake/armv8-m.cmake deleted file mode 100644 index 71a8747e56..0000000000 --- a/arch/arm/src/cmake/armv8-m.cmake +++ /dev/null @@ -1,133 +0,0 @@ -# ############################################################################## -# arch/arm/src/cmake/armv8-m.cmake -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more contributor -# license agreements. See the NOTICE file distributed with this work for -# additional information regarding copyright ownership. The ASF licenses this -# file to you under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy of -# the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. -# -# ############################################################################## - -set(PLATFORM_FLAGS) - -# LLVM Configuration -if(CONFIG_ARCH_CORTEXM23) - set(LLVM_ARCHTYPE thumbv8m.base) - set(LLVM_CPUTYPE cortex-m23) -elseif(CONFIG_ARCH_CORTEXM33) - set(LLVM_ARCHTYPE thumbv8m.main) - set(LLVM_CPUTYPE cortex-m33) -elseif(CONFIG_ARCH_CORTEXM35P) - set(LLVM_ARCHTYPE thumbv8m.main) - set(LLVM_CPUTYPE cortex-m35p) -elseif(CONFIG_ARCH_CORTEXM55) - set(LLVM_ARCHTYPE thumbv8.1m.main) - set(LLVM_CPUTYPE cortex-m55) -elseif(CONFIG_ARCH_CORTEXM85) - set(LLVM_ARCHTYPE thumbv8.1m.main) - set(LLVM_CPUTYPE cortex-m85) -endif() - -# Set ABI type based on FPU configuration -if(CONFIG_ARCH_FPU) - set(LLVM_ABITYPE eabihf) -else() - set(LLVM_ABITYPE eabi) -endif() - -if(CONFIG_ARM_DSP) - set(EXTCPUFLAGS +dsp) -endif() - -if(CONFIG_ARM_TOOLCHAIN_CLANG) - if(CONFIG_ARCH_CORTEXM23) - set(TOOLCHAIN_CLANG_CONFIG armv8m.main_soft_nofp) - elseif(CONFIG_ARCH_CORTEXM33) - if(CONFIG_ARCH_FPU) - set(TOOLCHAIN_CLANG_CONFIG armv8m.main_hard_fp) - else() - set(TOOLCHAIN_CLANG_CONFIG armv8m.main_soft_nofp) - endif() - elseif(CONFIG_ARCH_CORTEXM35P) - if(CONFIG_ARCH_FPU) - set(TOOLCHAIN_CLANG_CONFIG armv8m.main_hard_fp) - else() - set(TOOLCHAIN_CLANG_CONFIG armv8m.main_soft_nofp) - endif() - elseif(CONFIG_ARCH_CORTEXM55) - if(CONFIG_ARCH_FPU) - set(TOOLCHAIN_CLANG_CONFIG armv8.1m.main_hard_fp) - else() - set(TOOLCHAIN_CLANG_CONFIG armv8.1m.main_soft_nofp_nomve) - endif() - elseif(CONFIG_ARCH_CORTEXM85) - if(CONFIG_ARCH_FPU) - set(TOOLCHAIN_CLANG_CONFIG armv8.1m.main_hard_fp) - else() - set(TOOLCHAIN_CLANG_CONFIG armv8.1m.main_soft_nofp_nomve) - endif() - endif() -endif() - -if(CONFIG_ARCH_CORTEXM23) - list(APPEND PLATFORM_FLAGS -mtune=cortex-m23 -march=armv8-m.main - -mfloat-abi=soft) -elseif(CONFIG_ARCH_CORTEXM33) - list(APPEND PLATFORM_FLAGS -mtune=cortex-m33 - -march=armv8-m.main${EXTCPUFLAGS}) - if(CONFIG_ARCH_FPU) - list(APPEND PLATFORM_FLAGS -mfpu=fpv5-sp-d16) - endif() -elseif(CONFIG_ARCH_CORTEXM35P) - list(APPEND PLATFORM_FLAGS -mtune=cortex-m35p - -march=armv8-m.main${EXTCPUFLAGS}) - if(CONFIG_ARCH_FPU) - list(APPEND PLATFORM_FLAGS -mfpu=fpv5-sp-d16) - endif() -elseif(CONFIG_ARCH_CORTEXM55) - list(APPEND PLATFORM_FLAGS -mtune=cortex-m55) - if(CONFIG_ARM_HAVE_MVE) - list(APPEND PLATFORM_FLAGS -march=armv8.1-m.main+mve.fp+fp.dp) - else() - list(APPEND PLATFORM_FLAGS -march=armv8.1-m.main${EXTCPUFLAGS}) - endif() - if(CONFIG_ARCH_FPU) - list(APPEND PLATFORM_FLAGS -mfpu=fpv5-d16) - endif() -endif() - -if(CONFIG_ARCH_FPU) - if(CONFIG_ARM_FPU_ABI_SOFT) - list(APPEND PLATFORM_FLAGS -mfloat-abi=softfp) - else() - list(APPEND PLATFORM_FLAGS -mfloat-abi=hard) - endif() -else() - list(APPEND PLATFORM_FLAGS -mfloat-abi=soft) -endif() - -if(CONFIG_ARMV8M_STACKCHECK) - list(APPEND PLATFORM_FLAGS -finstrument-functions -ffixed-r10) -endif() - -if(CONFIG_ARCH_INSTRUMENT_ALL AND NOT CONFIG_ARMV8M_STACKCHECK) - list(APPEND PLATFORM_FLAGS -finstrument-functions) -endif() - -if(CONFIG_ARMV8M_CMSE) - list(APPEND PLATFORM_FLAGS -mcmse) -endif() - -add_compile_options(${PLATFORM_FLAGS}) diff --git a/arch/arm/src/cmake/armv8-r.cmake b/arch/arm/src/cmake/armv8-r.cmake deleted file mode 100644 index 01fefd2e58..0000000000 --- a/arch/arm/src/cmake/armv8-r.cmake +++ /dev/null @@ -1,45 +0,0 @@ -# ############################################################################## -# arch/arm/src/cmake/armv8-r.cmake -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more contributor -# license agreements. See the NOTICE file distributed with this work for -# additional information regarding copyright ownership. The ASF licenses this -# file to you under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy of -# the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. -# -# ############################################################################## - -set(PLATFORM_FLAGS) - -if(CONFIG_ARCH_CORTEXR52) - list(APPEND PLATFORM_FLAGS -mcpu=cortex-r52) -endif() - -if(CONFIG_ARCH_FPU) - - if(CONFIG_ARM_NEON) - list(APPEND PLATFORM_FLAGS -mfpu=neon-fp-armv8) - else() - list(APPEND PLATFORM_FLAGS -mfpu=fp-armv8) - endif() - if(CONFIG_ARM_FPU_ABI_SOFT) - list(APPEND PLATFORM_FLAGS -mfloat-abi=softfp) - else() - list(APPEND PLATFORM_FLAGS -mfloat-abi=hard) - endif() -else() - list(APPEND PLATFORM_FLAGS -mfloat-abi=soft) -endif() - -add_compile_options(${PLATFORM_FLAGS}) diff --git a/arch/arm/src/cmake/clang.cmake b/arch/arm/src/cmake/clang.cmake deleted file mode 100644 index 55bddb33c7..0000000000 --- a/arch/arm/src/cmake/clang.cmake +++ /dev/null @@ -1,284 +0,0 @@ -# ############################################################################## -# arch/arm/src/cmake/clang.cmake -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more contributor -# license agreements. See the NOTICE file distributed with this work for -# additional information regarding copyright ownership. The ASF licenses this -# file to you under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy of -# the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. -# -# ############################################################################## - -# Toolchain - -set(CMAKE_SYSTEM_NAME Generic) -set(CMAKE_SYSTEM_VERSION 1) - -set(CMAKE_ASM_COMPILER clang) -set(CMAKE_C_COMPILER clang) -set(CMAKE_CXX_COMPILER clang++) -set(CMAKE_PREPROCESSOR clang -E -P -x c) -set(CMAKE_STRIP llvm-strip --strip-unneeded) -set(CMAKE_OBJCOPY llvm-objcopy) -set(CMAKE_OBJDUMP llvm-objdump) -set(CMAKE_LINKER ld.lld) -set(CMAKE_LD ld.lld) -set(CMAKE_AR llvm-ar) -set(CMAKE_NM llvm-nm) -set(CMAKE_RANLIB llvm-ranlib) - -# Since the no_builtin attribute is not fully supported on Clang disable the -# built-in functions, refer: https://github.com/apache/incubator-nuttx/pull/5971 - -add_compile_options(-fno-builtin) - -if(TOOLCHAIN_CLANG_CONFIG) - execute_process(COMMAND clang --version - OUTPUT_VARIABLE clang_full_version_string) - - string(REGEX REPLACE ".*clang version ([0-9]+\\.[0-9]+\.[0-9]+).*" "\\1" - CLANGVER ${clang_full_version_string}) - - if(CLANGVER STREQUAL "14.0") - set(TOOLCHAIN_CLANG_CONFIG ${TOOLCHAIN_CLANG_CONFIG}_nosys) - elseif(CLANGVER STRGREATER_EQUAL "17.0") - set(TOOLCHAIN_CLANG_OPTION -target) - set(TOOLCHAIN_CLANG_TARGET --target=arm-none-eabi) - else() - set(TOOLCHAIN_CLANG_OPTION --config) - endif() - add_compile_options(${TOOLCHAIN_CLANG_OPTION} ${TOOLCHAIN_CLANG_CONFIG}.cfg - ${TOOLCHAIN_CLANG_TARGET}) - add_link_options(${TOOLCHAIN_CLANG_OPTION} ${TOOLCHAIN_CLANG_CONFIG}.cfg - ${TOOLCHAIN_CLANG_TARGET}) -endif() - -# override the ARCHIVE command - -set(CMAKE_ARCHIVE_COMMAND " rcs ") -set(CMAKE_RANLIB_COMMAND " ") -set(CMAKE_C_ARCHIVE_CREATE ${CMAKE_ARCHIVE_COMMAND}) -set(CMAKE_CXX_ARCHIVE_CREATE ${CMAKE_ARCHIVE_COMMAND}) -set(CMAKE_ASM_ARCHIVE_CREATE ${CMAKE_ARCHIVE_COMMAND}) - -set(CMAKE_C_ARCHIVE_APPEND ${CMAKE_ARCHIVE_COMMAND}) -set(CMAKE_CXX_ARCHIVE_APPEND ${CMAKE_ARCHIVE_COMMAND}) -set(CMAKE_ASM_ARCHIVE_APPEND ${CMAKE_ARCHIVE_COMMAND}) - -set(CMAKE_C_ARCHIVE_FINISH ${CMAKE_RANLIB_COMMAND}) -set(CMAKE_CXX_ARCHIVE_FINISH ${CMAKE_RANLIB_COMMAND}) -set(CMAKE_ASM_ARCHIVE_FINISH ${CMAKE_RANLIB_COMMAND}) - -set(NO_LTO "-fno-lto") - -if(CONFIG_ENDIAN_BIG) - add_compile_options(-mbig-endian) -endif() - -add_compile_options(-fshort-enums) - -# Architecture flags - -add_link_options(-Wl,--entry=__start) -add_link_options(-nostdlib) -add_compile_options(-fno-common -Wall -Wshadow -Wundef -nostdlib) - -if(CONFIG_DEBUG_CUSTOMOPT) - add_compile_options(${CONFIG_DEBUG_OPTLEVEL}) -elseif(CONFIG_DEBUG_FULLOPT) - add_compile_options(-Oz) -endif() - -if(NOT CONFIG_DEBUG_NOOPT) - add_compile_options(-fno-strict-aliasing) -endif() - -if(CONFIG_FRAME_POINTER) - add_compile_options(-fno-omit-frame-pointer -fno-optimize-sibling-calls) -else() - add_compile_options(-fomit-frame-pointer) -endif() - -if(CONFIG_STACK_CANARIES) - add_compile_options(-fstack-protector-all) -endif() - -if(CONFIG_STACK_USAGE) - add_compile_options(-fstack-usage) -endif() -if(CONFIG_STACK_USAGE_WARNING AND NOT "${CONFIG_STACK_USAGE_WARNING}" STREQUAL - "0") - add_compile_options(-Wstack-usage=${CONFIG_STACK_USAGE_WARNING}) -endif() - -if(CONFIG_COVERAGE_ALL) - add_compile_options(-fprofile-instr-generate -fcoverage-mapping) -endif() - -if(CONFIG_PROFILE_ALL) - add_compile_options(-pg) -endif() - -if(CONFIG_MM_UBSAN_ALL) - add_compile_options(${CONFIG_MM_UBSAN_OPTION}) -endif() - -if(CONFIG_MM_UBSAN_TRAP_ON_ERROR) - add_compile_options(-fsanitize-undefined-trap-on-error) -endif() - -if(CONFIG_MM_KASAN_INSTRUMENT_ALL) - add_compile_options(-fsanitize=kernel-address) - add_compile_options(-mllvm=asan-stack=0) - add_compile_options(-mllvm=-asan-instrumentation-with-call-threshold=0) - - if(CONFIG_MM_KASAN_GLOBAL) - add_compile_options(-mllvm=asan-globals=1) - else() - add_compile_options(-mllvm=asan-globals=0) - endif() - - if(CONFIG_MM_KASAN_DISABLE_READS_CHECK) - add_compile_options(-mllvm=asan-instrument-reads=0) - endif() - - if(CONFIG_MM_KASAN_DISABLE_WRITES_CHECK) - add_compile_options(-mllvm=asan-instrument-writes=0) - endif() -endif() - -# Instrumentation options - -if(CONFIG_ARCH_INSTRUMENT_ALL) - add_compile_options(-finstrument-functions) -endif() - -if(CONFIG_UNWINDER_ARM) - add_compile_options(-funwind-tables -fasynchronous-unwind-tables) -endif() - -# Link Time Optimization - -if(CONFIG_LTO_THIN) - add_compile_options(-flto=thin) -elseif(CONFIG_LTO_FULL) - add_compile_options(-flto) - -elseif(CONFIG_LTO_FAT) - add_compile_options(-flto -ffat-lto-objects) -endif() - -if(CONFIG_ARM_THUMB) - add_compile_options(-mthumb) - - # GCC Manual: -mthumb ... If you want to force assembler files to be - # interpreted as Thumb code, either add a `.thumb' directive to the source or - # pass the -mthumb option directly to the assembler by prefixing it with -Wa. - - add_compile_options(-Wa,-mthumb) - - # Outputs an implicit IT block when there is a conditional instruction without - # an enclosing IT block. - - add_compile_options(-Wa,-mimplicit-it=always) -endif() - -# Optimization of unused sections - -if(CONFIG_DEBUG_OPT_UNUSED_SECTIONS) - add_link_options(-Wl,--gc-sections) - add_compile_options(-ffunction-sections -fdata-sections) -endif() - -# Debug --whole-archive - -if(CONFIG_DEBUG_LINK_WHOLE_ARCHIVE) - add_link_options(-Wl,--whole-archive) -endif() - -# Debug link map - -if(CONFIG_DEBUG_LINK_MAP) - add_link_options(-Wl,--cref -Wl,-Map=nuttx.map) -endif() - -if(CONFIG_DEBUG_SYMBOLS) - add_compile_options(${CONFIG_DEBUG_SYMBOLS_LEVEL}) -endif() - -add_compile_options( - -Wno-attributes -Wno-unknown-pragmas - $<$:-Wstrict-prototypes> - $<$:-nostdinc++>) - -# When all C++ code is built using GCC 7.1 or a higher version, we can safely -# disregard warnings of the type "parameter passing for X changed in GCC 7.1." -# Refer to : -# https://stackoverflow.com/questions/48149323/what-does-the-gcc-warning-project-parameter-passing-for-x-changed-in-gcc-7-1-m - -if(CONFIG_CXX_STANDARD) - add_compile_options($<$:-std=${CONFIG_CXX_STANDARD}>) -endif() - -if(NOT CONFIG_CXX_EXCEPTION) - add_compile_options($<$:-fno-exceptions> - $<$:-fcheck-new>) -endif() - -if(NOT CONFIG_CXX_RTTI) - add_compile_options($<$:-fno-rtti>) -endif() - -set(PREPROCESS ${CMAKE_C_COMPILER} ${CMAKE_C_FLAG_ARGS} -E -P -x c) - -# override nuttx_find_toolchain_lib - -set(NUTTX_FIND_TOOLCHAIN_LIB_DEFINED true) - -if(CONFIG_BUILTIN_TOOLCHAIN) - function(nuttx_find_toolchain_lib) - if(ARGN) - execute_process( - COMMAND ${CMAKE_C_COMPILER} ${CMAKE_C_FLAG_ARGS} ${NUTTX_EXTRA_FLAGS} - --print-file-name=${ARGN} - OUTPUT_STRIP_TRAILING_WHITESPACE - OUTPUT_VARIABLE extra_lib_path) - nuttx_add_extra_library(${extra_lib_path}) - else() - execute_process( - COMMAND ${CMAKE_C_COMPILER} ${CMAKE_C_FLAG_ARGS} ${NUTTX_EXTRA_FLAGS} - --print-libgcc-file-name - OUTPUT_STRIP_TRAILING_WHITESPACE - OUTPUT_VARIABLE libgcc_path) - get_filename_component(libgcc_name ${libgcc_path} NAME) - execute_process( - COMMAND ${CMAKE_C_COMPILER} ${CMAKE_C_FLAG_ARGS} ${NUTTX_EXTRA_FLAGS} - --print-file-name=${libgcc_name} - OUTPUT_STRIP_TRAILING_WHITESPACE - OUTPUT_VARIABLE libgcc) - nuttx_add_extra_library(${libgcc}) - endif() - endfunction() -else() - function(nuttx_find_toolchain_lib) - if(ARGN) - execute_process( - COMMAND ${CMAKE_C_COMPILER} ${CMAKE_C_FLAG_ARGS} ${NUTTX_EXTRA_FLAGS} - --print-file-name=${ARGN} - OUTPUT_STRIP_TRAILING_WHITESPACE - OUTPUT_VARIABLE extra_lib_path) - endif() - nuttx_add_extra_library(${extra_lib_path}) - endfunction() -endif() diff --git a/arch/arm/src/cmake/gcc.cmake b/arch/arm/src/cmake/gcc.cmake deleted file mode 100644 index fa253d2400..0000000000 --- a/arch/arm/src/cmake/gcc.cmake +++ /dev/null @@ -1,279 +0,0 @@ -# ############################################################################## -# arch/arm/src/cmake/gcc.cmake -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more contributor -# license agreements. See the NOTICE file distributed with this work for -# additional information regarding copyright ownership. The ASF licenses this -# file to you under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy of -# the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. -# -# ############################################################################## - -# Toolchain - -set(CMAKE_SYSTEM_NAME Generic) -set(CMAKE_SYSTEM_VERSION 1) - -set(TOOLCHAIN_PREFIX arm-none-eabi) -set(CMAKE_LIBRARY_ARCHITECTURE ${TOOLCHAIN_PREFIX}) -set(CMAKE_C_COMPILER_TARGET ${TOOLCHAIN_PREFIX}) -set(CMAKE_CXX_COMPILER_TARGET ${TOOLCHAIN_PREFIX}) - -set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER}) -set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc) -set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++) -set(CMAKE_PREPROCESSOR ${TOOLCHAIN_PREFIX}-gcc -E -P -x c) -set(CMAKE_STRIP ${TOOLCHAIN_PREFIX}-strip --strip-unneeded) -set(CMAKE_OBJCOPY ${TOOLCHAIN_PREFIX}-objcopy) -set(CMAKE_OBJDUMP ${TOOLCHAIN_PREFIX}-objdump) - -if(NOT CONFIG_LTO_NONE AND CONFIG_ARM_TOOLCHAIN_GNU_EABI) - set(CMAKE_LINKER ${TOOLCHAIN_PREFIX}-gcc) - set(CMAKE_LD ${TOOLCHAIN_PREFIX}-gcc) - set(CMAKE_AR ${TOOLCHAIN_PREFIX}-gcc-ar) - set(CMAKE_NM ${TOOLCHAIN_PREFIX}-gcc-nm) - set(CMAKE_RANLIB ${TOOLCHAIN_PREFIX}-gcc-ranlib) - add_compile_options(-fno-builtin) -else() - set(CMAKE_LINKER ${TOOLCHAIN_PREFIX}-ld) - set(CMAKE_LD ${TOOLCHAIN_PREFIX}-ld) - set(CMAKE_AR ${TOOLCHAIN_PREFIX}-ar) - set(CMAKE_NM ${TOOLCHAIN_PREFIX}-nm) - set(CMAKE_RANLIB ${TOOLCHAIN_PREFIX}-ranlib) -endif() - -set(NO_LTO "-fno-lto") - -# Workaround to skip -Warray-bounds check due to bug of GCC-12: Wrong warning -# array subscript [0] is outside array bounds: -# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105523 - -if(CONFIG_ARCH_TOOLCHAIN_GNU AND NOT CONFIG_ARCH_TOOLCHAIN_CLANG) - execute_process(COMMAND ${CMAKE_C_COMPILER} --version - OUTPUT_VARIABLE GCC_VERSION_OUTPUT) - string(REGEX MATCH "([0-9]+)\\.[0-9]+" GCC_VERSION_REGEX - "${GCC_VERSION_OUTPUT}") - set(GCCVER ${CMAKE_MATCH_1}) - - if(GCCVER GREATER_EQUAL 12) - add_link_options(-Wl,--print-memory-usage) - add_compile_options(--param=min-pagesize=0) - if(CONFIG_ARCH_RAMFUNCS OR NOT CONFIG_BOOT_RUNFROMFLASH) - add_link_options(-Wl,--no-warn-rwx-segments) - endif() - endif() -endif() - -# override the responsible file flag - -if(CMAKE_GENERATOR MATCHES "Ninja") - set(CMAKE_C_RESPONSE_FILE_FLAG "$DEFINES $INCLUDES $FLAGS @") - set(CMAKE_CXX_RESPONSE_FILE_FLAG "$DEFINES $INCLUDES $FLAGS @") - set(CMAKE_ASM_RESPONSE_FILE_FLAG "$DEFINES $INCLUDES $FLAGS @") -endif() - -# override the ARCHIVE command - -set(CMAKE_ARCHIVE_COMMAND " rcs ") -set(CMAKE_RANLIB_COMMAND " ") -set(CMAKE_C_ARCHIVE_CREATE ${CMAKE_ARCHIVE_COMMAND}) -set(CMAKE_CXX_ARCHIVE_CREATE ${CMAKE_ARCHIVE_COMMAND}) -set(CMAKE_ASM_ARCHIVE_CREATE ${CMAKE_ARCHIVE_COMMAND}) - -set(CMAKE_C_ARCHIVE_APPEND ${CMAKE_ARCHIVE_COMMAND}) -set(CMAKE_CXX_ARCHIVE_APPEND ${CMAKE_ARCHIVE_COMMAND}) -set(CMAKE_ASM_ARCHIVE_APPEND ${CMAKE_ARCHIVE_COMMAND}) - -set(CMAKE_C_ARCHIVE_FINISH ${CMAKE_RANLIB_COMMAND}) -set(CMAKE_CXX_ARCHIVE_FINISH ${CMAKE_RANLIB_COMMAND}) -set(CMAKE_ASM_ARCHIVE_FINISH ${CMAKE_RANLIB_COMMAND}) - -if(CONFIG_ENDIAN_BIG) - add_compile_options(-mbig-endian) -endif() - -# Architecture flags - -add_link_options(-Wl,--entry=__start) -add_link_options(-nostdlib) -add_compile_options(-fno-common -Wall -Wshadow -Wundef -nostdlib) - -if(CONFIG_DEBUG_CUSTOMOPT) - add_compile_options(${CONFIG_DEBUG_OPTLEVEL}) -elseif(CONFIG_DEBUG_FULLOPT) - add_compile_options(-Os) -endif() - -if(NOT CONFIG_DEBUG_NOOPT) - add_compile_options(-fno-strict-aliasing) -endif() - -if(CONFIG_FRAME_POINTER) - add_compile_options(-fno-omit-frame-pointer -fno-optimize-sibling-calls) -else() - add_compile_options(-fomit-frame-pointer) -endif() - -if(CONFIG_STACK_CANARIES) - add_compile_options(-fstack-protector-all) -endif() - -if(CONFIG_STACK_USAGE) - add_compile_options(-fstack-usage) -endif() -if(CONFIG_STACK_USAGE_WARNING AND NOT "${CONFIG_STACK_USAGE_WARNING}" STREQUAL - "0") - add_compile_options(-Wstack-usage=${CONFIG_STACK_USAGE_WARNING}) -endif() - -if(CONFIG_COVERAGE_ALL) - add_compile_options(-fprofile-arcs -ftest-coverage -fno-inline) -endif() - -if(CONFIG_MM_UBSAN_ALL) - add_compile_options(${CONFIG_MM_UBSAN_OPTION}) -endif() - -if(CONFIG_MM_UBSAN_TRAP_ON_ERROR) - add_compile_options(-fsanitize-undefined-trap-on-error) -endif() - -if(CONFIG_MM_KASAN_INSTRUMENT_ALL) - add_compile_options(-fsanitize=kernel-address) -endif() - -if(CONFIG_MM_KASAN_GLOBAL) - add_compile_options(--param=asan-globals=1) -endif() - -if(CONFIG_MM_KASAN_DISABLE_READS_CHECK) - add_compile_options(--param=asan-instrument-reads=0) -endif() - -if(CONFIG_MM_KASAN_DISABLE_WRITES_CHECK) - add_compile_options(--param=asan-instrument-writes=0) -endif() - -# Instrumentation options - -if(CONFIG_ARCH_INSTRUMENT_ALL) - add_compile_options(-finstrument-functions) -endif() - -if(CONFIG_PROFILE_ALL) - add_compile_options(-pg) -endif() - -if(CONFIG_UNWINDER_ARM) - add_compile_options(-funwind-tables -fasynchronous-unwind-tables) -endif() - -# Link Time Optimization - -if(CONFIG_LTO_THIN) - add_compile_options(-flto=thin) -elseif(CONFIG_LTO_FULL) - add_compile_options(-flto) - add_compile_options(-fuse-linker-plugin) -elseif(CONFIG_LTO_FAT) - add_compile_options(-flto -ffat-lto-objects) -endif() - -# The arm clang toolchain requires to pass the linker option will gcc tool chain -# can automatically perform lto at linking time if it found any object files are -# compiled with flto - -if(NOT CONFIG_LTO_NONE) - - # For gcc, use the linker plugin to extract objects with GIMPLE info from the - # lib archive - - add_compile_options(-fuse-linker-plugin) -endif() - -if(CONFIG_ARM_THUMB) - add_compile_options(-mthumb) - - # GCC Manual: -mthumb ... If you want to force assembler files to be - # interpreted as Thumb code, either add a `.thumb' directive to the source or - # pass the -mthumb option directly to the assembler by prefixing it with -Wa. - - add_compile_options(-Wa,-mthumb) - - # Outputs an implicit IT block when there is a conditional instruction without - # an enclosing IT block. - - add_compile_options(-Wa,-mimplicit-it=always) -endif() - -# Optimization of unused sections - -if(CONFIG_DEBUG_OPT_UNUSED_SECTIONS) - add_link_options(-Wl,--gc-sections) - add_compile_options(-ffunction-sections -fdata-sections) -endif() - -# Debug --whole-archive - -if(CONFIG_DEBUG_LINK_WHOLE_ARCHIVE) - add_link_options(-Wl,--whole-archive) -endif() - -# Debug link map - -if(CONFIG_DEBUG_LINK_MAP) - add_link_options(-Wl,--cref -Wl,-Map=nuttx.map) -endif() - -if(CONFIG_DEBUG_SYMBOLS) - add_compile_options(${CONFIG_DEBUG_SYMBOLS_LEVEL}) -endif() - -set(PICFLAGS -fpic -fPIE -mno-pic-data-is-text-relative -msingle-pic-base) - -if(CONFIG_BUILD_PIC) - add_compile_options(${PICFLAGS} -mpic-register=r9) - add_link_options(-Wl,--emit-relocs) -endif() - -add_compile_options(-Wno-attributes -Wno-unknown-pragmas - $<$:-Wstrict-prototypes>) - -# When all C++ code is built using GCC 7.1 or a higher version, we can safely -# disregard warnings of the type "parameter passing for X changed in GCC 7.1." -# Refer to : -# https://stackoverflow.com/questions/48149323/what-does-the-gcc-warning-project-parameter-passing-for-x-changed-in-gcc-7-1-m - -add_compile_options(-Wno-psabi) - -if(NOT CONFIG_LIBCXXTOOLCHAIN) - add_compile_options($<$:-nostdinc++>) -endif() - -if(CONFIG_CXX_STANDARD) - add_compile_options($<$:-std=${CONFIG_CXX_STANDARD}>) -endif() - -if(NOT CONFIG_CXX_EXCEPTION) - add_compile_options($<$:-fno-exceptions> - $<$:-fcheck-new>) -endif() - -if(NOT CONFIG_CXX_RTTI) - add_compile_options($<$:-fno-rtti>) -endif() - -set(CMAKE_EXE_LINKER_FLAGS_INIT "--specs=nosys.specs") - -set(PREPROCESS ${CMAKE_C_COMPILER} ${CMAKE_C_FLAG_ARGS} -E -P -x c) diff --git a/arch/arm/src/cmake/ghs.cmake b/arch/arm/src/cmake/ghs.cmake deleted file mode 100644 index ce4a907373..0000000000 --- a/arch/arm/src/cmake/ghs.cmake +++ /dev/null @@ -1,259 +0,0 @@ -# ############################################################################## -# arch/arm/src/cmake/ghs.cmake -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more contributor -# license agreements. See the NOTICE file distributed with this work for -# additional information regarding copyright ownership. The ASF licenses this -# file to you under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy of -# the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. -# -# ############################################################################## - -# Toolchain - -set(CMAKE_SYSTEM_NAME Generic) -set(CMAKE_SYSTEM_VERSION 1) - -set(CMAKE_ASM_COMPILER ccarm) -set(CMAKE_C_COMPILER ccarm) -set(CMAKE_CXX_COMPILER ccarm) -set(CMAKE_STRIP gstrip) -set(CMAKE_OBJCOPY objcopy) -set(CMAKE_OBJDUMP gdump) -set(CMAKE_LINKER cxarm) -set(CMAKE_LD cxarm) -set(CMAKE_AR cxarm) -set(CMAKE_GMEMFILE gmemfile) -set(CMAKE_NM gnm) -set(CMAKE_RANLIB echo) -set(CMAKE_PREPROCESSOR ccarm -E -P) - -# override the ARCHIVE command - -set(CMAKE_ARCHIVE_COMMAND - " -archive -o ") -set(CMAKE_C_ARCHIVE_CREATE ${CMAKE_ARCHIVE_COMMAND}) -set(CMAKE_CXX_ARCHIVE_CREATE ${CMAKE_ARCHIVE_COMMAND}) -set(CMAKE_ASM_ARCHIVE_CREATE ${CMAKE_ARCHIVE_COMMAND}) - -set(CMAKE_C_ARCHIVE_APPEND ${CMAKE_ARCHIVE_COMMAND}) -set(CMAKE_CXX_ARCHIVE_APPEND ${CMAKE_ARCHIVE_COMMAND}) -set(CMAKE_ASM_ARCHIVE_APPEND ${CMAKE_ARCHIVE_COMMAND}) - -set(NO_LTO "-Onolink") - -if(CONFIG_ENDIAN_BIG) - add_compile_options(-mbig-endian) -endif() - -# Architecture flags - -add_link_options(-entry=__start) -add_compile_options(--no_commons -Wall -Wshadow -Wundef -nostdlib) - -if(CONFIG_DEBUG_CUSTOMOPT) - add_compile_options(${CONFIG_DEBUG_OPTLEVEL}) -elseif(CONFIG_DEBUG_FULLOPT) - add_compile_options(-Osize) -endif() - -if(NOT CONFIG_DEBUG_NOOPT) - add_compile_options(-fno-strict-aliasing) -endif() - -if(CONFIG_FRAME_POINTER) - add_compile_options(-fno-omit-frame-pointer -fno-optimize-sibling-calls) -else() - add_compile_options(-noga) -endif() - -if(CONFIG_STACK_CANARIES) - add_compile_options(-fstack-protector-all) -endif() - -if(CONFIG_STACK_USAGE) - add_compile_options(-fstack-usage) -endif() -if(CONFIG_STACK_USAGE_WARNING AND NOT "${CONFIG_STACK_USAGE_WARNING}" STREQUAL - "0") - add_compile_options(-Wstack-usage=${CONFIG_STACK_USAGE_WARNING}) -endif() - -if(CONFIG_COVERAGE_ALL) - add_compile_options(-fprofile-arcs -ftest-coverage -fno-inline) -endif() - -if(CONFIG_PROFILE_ALL) - add_compile_options(-pg) -endif() - -if(CONFIG_MM_UBSAN_ALL) - add_compile_options(${CONFIG_MM_UBSAN_OPTION}) -endif() - -if(CONFIG_MM_UBSAN_TRAP_ON_ERROR) - add_compile_options(-fsanitize-undefined-trap-on-error) -endif() - -if(CONFIG_MM_KASAN_INSTRUMENT_ALL) - add_compile_options(-fsanitize=kernel-address) -endif() - -if(CONFIG_MM_KASAN_GLOBAL) - add_compile_options(--param=asan-globals=1) -endif() - -if(CONFIG_MM_KASAN_DISABLE_READS_CHECK) - add_compile_options(--param=asan-instrument-reads=0) -endif() - -if(CONFIG_MM_KASAN_DISABLE_WRITES_CHECK) - add_compile_options(--param=asan-instrument-writes=0) -endif() - -# Instrumentation options - -if(CONFIG_ARCH_INSTRUMENT_ALL) - add_compile_options(-finstrument-functions) -endif() - -if(CONFIG_UNWINDER_ARM) - add_compile_options(-funwind-tables -fasynchronous-unwind-tables) -endif() - -# Link Time Optimization - -if(CONFIG_LTO_THIN) - add_compile_options(-Olink -Ogeneral) -elseif(CONFIG_LTO_FULL) - add_compile_options(-Olink -Osize) -elseif(CONFIG_LTO_FAT) - add_compile_options(-Olink -Ospeed) -endif() - -if(CONFIG_ARM_THUMB) - add_compile_options(-thumb) -endif() - -# Debug --whole-archive - -if(CONFIG_DEBUG_LINK_WHOLE_ARCHIVE) - add_link_options(-Wl,--whole-archive) -endif() - -# Debug link map - -if(CONFIG_DEBUG_LINK_MAP) - add_link_options(-map=nuttx.map) -endif() - -if(CONFIG_DEBUG_SYMBOLS) - add_compile_options(-G -gdwarf-2) -endif() - -add_compile_options( - $<$:-preprocess_assembly_files> - $<$:--gnu_asm> - $<$:-gcc> - $<$:-gnu99> - $<$:-preprocess_assembly_files> - $<$:--diag_suppress=68,111,174,222,236,257,826,1143,1721> - $<$:--gnu_asm> - $<$:--diag_suppress=826>) - -if(CONFIG_CXX_STANDARD) - add_compile_options($<$:-std=${CONFIG_CXX_STANDARD}>) -endif() - -if(NOT CONFIG_CXX_EXCEPTION) - add_compile_options($<$:-fno-exceptions> - $<$:-fcheck-new>) -endif() - -if(CONFIG_CXX_STANDARD) - add_compile_options($<$:--${CONFIG_CXX_STANDARD}>) -endif() - -if(NOT CONFIG_CXX_EXCEPTION) - add_compile_options($<$:--no_exceptions> - $<$:-check=alloc>) -endif() - -if(NOT CONFIG_CXX_RTTI) - add_compile_options($<$:-fno-rtti>) -endif() - -set(PREPROCESS ${CMAKE_C_COMPILER} ${CMAKE_C_FLAG_ARGS} -E -P) - -# override nuttx_generate_preprocess_target - -set(NUTTX_TOOLCHAIN_PREPROCESS_DEFINED true) - -function(nuttx_generate_preprocess_target) - - # parse arguments into variables - - nuttx_parse_function_args( - FUNC - nuttx_generate_preprocess_target - ONE_VALUE - SOURCE_FILE - TARGET_FILE - MULTI_VALUE - DEPENDS - REQUIRED - SOURCE_FILE - TARGET_FILE - ARGN - ${ARGN}) - - add_custom_command( - OUTPUT ${TARGET_FILE} - COMMAND ${PREPROCESS} -I${CMAKE_BINARY_DIR}/include -filetype.cpp - ${SOURCE_FILE} -o ${TARGET_FILE} - DEPENDS ${SOURCE_FILE} ${DEPENDS}) - -endfunction() - -# override nuttx_find_toolchain_lib - -set(NUTTX_FIND_TOOLCHAIN_LIB_DEFINED true) - -function(nuttx_find_toolchain_lib) - execute_process( - COMMAND bash -c "which ${CMAKE_C_COMPILER} | awk -F '/[^/]*$' '{print $1}'" - OUTPUT_VARIABLE GHS_ROOT_PATH) - string(STRIP "${GHS_ROOT_PATH}" GHS_ROOT_PATH) - if(NOT ARGN) - nuttx_add_extra_library(${GHS_ROOT_PATH}/lib/thumb2/libarch.a) - if(CONFIG_ARCH_FPU) - if(CONFIG_ARM_FPU_ABI_SOFT) - nuttx_add_extra_library(${GHS_ROOT_PATH}/lib/thumb2/libind_sf.a) - nuttx_add_extra_library(${GHS_ROOT_PATH}/lib/thumb2/libmath_sf.a) - elseif(CONFIG_ARCH_DPFPU) - nuttx_add_extra_library(${GHS_ROOT_PATH}/lib/thumb2/libind_fp.a) - nuttx_add_extra_library(${GHS_ROOT_PATH}/lib/thumb2/libmath_fp.a) - else() - nuttx_add_extra_library(${GHS_ROOT_PATH}/lib/thumb2/libind_sd.a) - nuttx_add_extra_library(${GHS_ROOT_PATH}/lib/thumb2/libmath_sd.a) - endif() - else() - nuttx_add_extra_library(${GHS_ROOT_PATH}/lib/thumb2/libind_sf.a) - nuttx_add_extra_library(${GHS_ROOT_PATH}/lib/thumb2/libmath_sf.a) - endif() - endif() -endfunction() - -# disable nuttx cmake link group otption -set(DISABLE_LINK_GROUP true) diff --git a/arch/arm/src/cmake/platform.cmake b/arch/arm/src/cmake/platform.cmake deleted file mode 100644 index 0ff187a75a..0000000000 --- a/arch/arm/src/cmake/platform.cmake +++ /dev/null @@ -1,90 +0,0 @@ -# ############################################################################## -# arch/arm/src/cmake/platform.cmake -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more contributor -# license agreements. See the NOTICE file distributed with this work for -# additional information regarding copyright ownership. The ASF licenses this -# file to you under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy of -# the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. -# -# ############################################################################## - -# configure target processor - -if(CONFIG_ARCH_CORTEXM0) - set(CMAKE_SYSTEM_PROCESSOR cortex-m0) -elseif(CONFIG_ARCH_CORTEXM3) - set(CMAKE_SYSTEM_PROCESSOR cortex-m3) -elseif(CONFIG_ARCH_CORTEXM4) - set(CMAKE_SYSTEM_PROCESSOR cortex-m4) -elseif(CONFIG_ARCH_CORTEXM7) - set(CMAKE_SYSTEM_PROCESSOR cortex-m7) -elseif(CONFIG_ARCH_CORTEXM23) - set(CMAKE_SYSTEM_PROCESSOR cortex-m23) -elseif(CONFIG_ARCH_CORTEXM33) - set(CMAKE_SYSTEM_PROCESSOR cortex-m33) -elseif(CONFIG_ARCH_CORTEXM35P) - set(CMAKE_SYSTEM_PROCESSOR cortex-m35p) -elseif(CONFIG_ARCH_CORTEXM55) - set(CMAKE_SYSTEM_PROCESSOR cortex-m55) -elseif(CONFIG_ARCH_CORTEXA5) - set(CMAKE_SYSTEM_PROCESSOR cortex-a5) -elseif(CONFIG_ARCH_CORTEXA7) - set(CMAKE_SYSTEM_PROCESSOR cortex-a7) -elseif(CONFIG_ARCH_CORTEXA8) - set(CMAKE_SYSTEM_PROCESSOR cortex-a8) -elseif(CONFIG_ARCH_CORTEXA9) - set(CMAKE_SYSTEM_PROCESSOR cortex-a9) -elseif(CONFIG_ARCH_CORTEXR4) - set(CMAKE_SYSTEM_PROCESSOR cortex-r4) -elseif(CONFIG_ARCH_CORTEXR5) - set(CMAKE_SYSTEM_PROCESSOR cortex-r5) -elseif(CONFIG_ARCH_CORTEXR7) - set(CMAKE_SYSTEM_PROCESSOR cortex-r7) -elseif(CONFIG_ARCH_CORTEXR52) - set(CMAKE_SYSTEM_PROCESSOR cortex-r8) -else() - message(FATAL_ERROR "CMAKE_SYSTEM_PROCESSOR not set") -endif() - -get_directory_property(TOOLCHAIN_DIR_FLAGS DIRECTORY ${CMAKE_SOURCE_DIR} - COMPILE_OPTIONS) - -set(NUTTX_EXTRA_FLAGS "") -foreach(FLAG ${TOOLCHAIN_DIR_FLAGS}) - if(NOT FLAG MATCHES "^\\$<.*>$") - list(APPEND NUTTX_EXTRA_FLAGS ${FLAG}) - else() - string(REGEX MATCH "\\$<\\$:(.*)>" matched ${FLAG}) - if(matched) - list(APPEND NUTTX_EXTRA_FLAGS ${CMAKE_MATCH_1}) - endif() - endif() -endforeach() - -separate_arguments(CMAKE_C_FLAG_ARGS NATIVE_COMMAND ${CMAKE_C_FLAGS}) - -nuttx_find_toolchain_lib() - -if(NOT CONFIG_LIBM) - nuttx_find_toolchain_lib(libm.a) -endif() - -if(CONFIG_LIBSUPCXX_TOOLCHAIN) - nuttx_find_toolchain_lib(libsupc++.a) -endif() - -if(CONFIG_COVERAGE_TOOLCHAIN) - nuttx_find_toolchain_lib(libgcov.a) -endif() diff --git a/arch/arm/src/common/CMakeLists.txt b/arch/arm/src/common/CMakeLists.txt deleted file mode 100644 index f84143fcaf..0000000000 --- a/arch/arm/src/common/CMakeLists.txt +++ /dev/null @@ -1,95 +0,0 @@ -# ############################################################################## -# arch/arm/src/common/CMakeLists.txt -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more contributor -# license agreements. See the NOTICE file distributed with this work for -# additional information regarding copyright ownership. The ASF licenses this -# file to you under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy of -# the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. -# -# ############################################################################## - -if(CONFIG_ARCH_TOOLCHAIN_IAR) - set(ARCH_TOOLCHAIN_PATH iar) -else() - set(ARCH_TOOLCHAIN_PATH gnu) -endif() - -set(SRCS - arm_allocateheap.c - arm_createstack.c - arm_exit.c - arm_getintstack.c - arm_initialize.c - arm_lowputs.c - arm_modifyreg.c - arm_nputs.c - arm_releasestack.c - arm_registerdump.c - arm_stackframe.c - arm_usestack.c - arm_fork.c - arm_poweroff.c - ${ARCH_TOOLCHAIN_PATH}/fork.S) - -if(NOT CONFIG_ALARM_ARCH AND NOT CONFIG_TIMER_ARCH) - list(APPEND SRCS arm_mdelay.c arm_udelay.c) -endif() - -if(CONFIG_STACK_COLORATION) - list(APPEND SRCS arm_checkstack.c) -endif() - -if(NOT CONFIG_ARCH_IDLE_CUSTOM) - list(APPEND SRCS arm_idle.c) -endif() - -if(CONFIG_BUILD_PROTECTED OR CONFIG_BUILD_KERNEL) - list(APPEND SRCS arm_task_start.c arm_pthread_start.c arm_signal_dispatch.c) - - if(CONFIG_BUILD_PROTECTED) - target_sources(arch_interface - PRIVATE ${ARCH_TOOLCHAIN_PATH}/arm_signal_handler.S) - endif() -endif() - -if(CONFIG_ARM_SEMIHOSTING_SYSLOG) - list(APPEND SRCS arm_semi_syslog.c) -endif() - -if(CONFIG_ARM_SEMIHOSTING_HOSTFS) - list(APPEND SRCS arm_hostfs.c) -endif() - -if(CONFIG_SCHED_THREAD_LOCAL) - list(APPEND SRCS arm_tls.c) -endif() - -if(CONFIG_UNWINDER_FRAME_POINTER) - list(APPEND SRCS arm_backtrace_fp.c) -endif() - -if(CONFIG_UNWINDER_STACK_POINTER) - list(APPEND SRCS arm_backtrace_sp.c) -endif() - -if(CONFIG_UNWINDER_ARM) - list(APPEND SRCS arm_backtrace_unwind.c) -endif() - -if(CONFIG_ARCH_HAVE_FETCHADD) - list(APPEND SRCS ${ARCH_TOOLCHAIN_PATH}/arm_fetchadd.S) -endif() - -target_sources(arch PRIVATE ${SRCS}) diff --git a/arch/arm/src/common/README_lwl_console.txt b/arch/arm/src/common/README_lwl_console.txt deleted file mode 100644 index 266cd4f4d4..0000000000 --- a/arch/arm/src/common/README_lwl_console.txt +++ /dev/null @@ -1,59 +0,0 @@ -The file arm_lwl_console.c implements a 'Lightweight Link' protocol between -a target and debugger for use when you need a console but the target doesn't -have a spare serial port or other available resource. This implements a -new console type which uses two words of memory for data exchange. - -It is not particularly efficient because of the various compromises that are -made (polling in busy loops, mostly) but it works well enough to give you -something where you previously had nothing...typically the case when you're -bring up a new CPU, or when the hardware designer thought the softies could -cope without a logging port. It has an advantage over semi-hosting in that -it doesn't put the target into debug mode while it's running, so you've got -some hope of maintaining real time semantics. To be clear, for output only -use you'd be better off with SWO if you've got it available! - -There is a terminal program in python(*) for the host side in -tools/ocdconsole.py for use with openocd...the NuttX side functionality is -not dependent on a specific debugger, the only requirement on it being that -the debugger can watch and modify a memory location on the target while it is executing. - -Typical use is; - -$ tools/ocdconsole.py -==Link Activated - -NuttShell (NSH) -nsh> help -help usage: help [-v] [] - - ? echo exit hexdump ls mh sleep xd - cat exec help kill mb mw usleep -nsh> - -On the target side it's transparent, and is just a console; - -nsh> ls /dev -/dev: - console - null - ttyS0 -nsh> echo "Hello World" > /dev/console -Hello World -nsh> - -CPU load on the host is surprisingly low given that the polling loop is -continuous (probably due to the fact that openocd is spending most of it's -time waiting for messages to/from the debug port on the target). When not -actively doing anything there's no load on the target, but waiting for input -is done in a busy polled loop (so the thread is effectively busy-locked) -and output busy-waits for the previous message to be collected before it -sends the next one. - -For now I've only made it available on stm32, but it should only be a case -of changing the Kconfig and Make.defs for other arm CPUs to make it -available for them too. Moving beyond arm needs knowledge of the targets -that I don't have. - -If anyone fancies extending this proof-of-concept to full Segger-RTT-style -functionality then drop me a note, there are plenty of ways to improve -performance. diff --git a/arch/arm/src/stm32h7/chip.h b/arch/arm/src/stm32h7/chip.h deleted file mode 100644 index b1952cd9f2..0000000000 --- a/arch/arm/src/stm32h7/chip.h +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** - * arch/arm/src/stm32h7/chip.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_ARM_SRC_STM32H7_CHIP_H -#define __ARCH_ARM_SRC_STM32H7_CHIP_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -/* Include the memory map and the chip definitions file. Other chip - * hardware files should then include this file for the proper setup. - */ - -#include -#include -#include "hardware/stm32_pinmap.h" -#include "hardware/stm32_memorymap.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* If the common ARMv7-M vector handling logic is used, then it expects the - * following definition in this file that provides the number of supported - * external interrupts which, for this architecture, is provided in the - * arch/stm32h7/chip.h header file. - */ - -#define ARMV7M_PERIPHERAL_INTERRUPTS STM32_IRQ_NEXTINTS - -/* Cache line sizes (in bytes)for the STM32H7 */ - -#define ARMV7M_DCACHE_LINESIZE 32 /* 32 bytes (8 words) */ -#define ARMV7M_ICACHE_LINESIZE 32 /* 32 bytes (8 words) */ - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#endif /* __ARCH_ARM_SRC_STM32H7_CHIP_H */ diff --git a/arch/arm64/src/bcm2711/hardware/bcm2711_dma.h b/arch/arm64/src/bcm2711/hardware/bcm2711_dma.h index f967621ecf..d20fb3474c 100644 --- a/arch/arm64/src/bcm2711/hardware/bcm2711_dma.h +++ b/arch/arm64/src/bcm2711/hardware/bcm2711_dma.h @@ -28,7 +28,7 @@ ****************************************************************************/ #include "bcm2711_memmap.h" -#include +include /**************************************************************************** * Pre-processor Definitions diff --git a/arch/dummy/.gitignore b/arch/dummy/.gitignore deleted file mode 100644 index 9e1d2593ee..0000000000 --- a/arch/dummy/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/Kconfig diff --git a/boards/z16/z16f/z16f2800100zcog/Kconfig b/arch/dummy/Kconfig similarity index 100% rename from boards/z16/z16f/z16f2800100zcog/Kconfig rename to arch/dummy/Kconfig diff --git a/arch/dummy/dummy_kconfig b/arch/dummy/dummy_kconfig deleted file mode 100644 index f72f3c094c..0000000000 --- a/arch/dummy/dummy_kconfig +++ /dev/null @@ -1,4 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# diff --git a/arch/mips/include/mips32/irq.h b/arch/mips/include/mips32/irq.h index 9cbe1b5c7c..3911b32d85 100644 --- a/arch/mips/include/mips32/irq.h +++ b/arch/mips/include/mips32/irq.h @@ -32,7 +32,7 @@ ****************************************************************************/ #include -#include +include /**************************************************************************** * Pre-processor Definitions diff --git a/arch/mips/src/mips32/mips_irq.c b/arch/mips/src/mips32/mips_irq.c index 94eddd5143..fbcbe585f2 100644 --- a/arch/mips/src/mips32/mips_irq.c +++ b/arch/mips/src/mips32/mips_irq.c @@ -27,7 +27,7 @@ #include #include -#include +include #include /**************************************************************************** diff --git a/arch/misoc/include/lm32/irq.h b/arch/misoc/include/lm32/irq.h index ee7c687438..1905c7c751 100644 --- a/arch/misoc/include/lm32/irq.h +++ b/arch/misoc/include/lm32/irq.h @@ -28,7 +28,7 @@ ****************************************************************************/ #include -#include +include /**************************************************************************** * Pre-processor Definitions diff --git a/arch/misoc/include/minerva/irq.h b/arch/misoc/include/minerva/irq.h index 414a781c0a..1f9ded15cd 100644 --- a/arch/misoc/include/minerva/irq.h +++ b/arch/misoc/include/minerva/irq.h @@ -32,7 +32,7 @@ ****************************************************************************/ #include -#include +include /**************************************************************************** * Pre-processor Definitions diff --git a/arch/risc-v/src/common/riscv_sbi.h b/arch/risc-v/src/common/riscv_sbi.h index 01547a6c7b..e1e518d672 100644 --- a/arch/risc-v/src/common/riscv_sbi.h +++ b/arch/risc-v/src/common/riscv_sbi.h @@ -27,7 +27,7 @@ * Included Files ****************************************************************************/ -#include +include /**************************************************************************** * Pre-processor Definitions diff --git a/arch/sim/src/Makefile b/arch/sim/src/Makefile index d0ef55dae4..431210ced0 100644 --- a/arch/sim/src/Makefile +++ b/arch/sim/src/Makefile @@ -20,14 +20,12 @@ # ############################################################################ -include $(TOPDIR)/tools/Make.defs - -ARCH_SRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src -APPSDIR = $(TOPDIR)$(DELIM)$(CONFIG_APPS_DIR) +ARCH_SRCDIR = ${NXBASE}/arch/$(CONFIG_ARCH)/src +APPSDIR = ${NXBASE}/$(CONFIG_APPS_DIR) INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR) -INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)chip -INCLUDES += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)sched +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)/chip +INCLUDES += ${INCDIR_PREFIX}$(TOPDIR)/sched ifeq ($(CONFIG_VIDEOUTILS_OPENH264),y) INCLUDES += ${INCDIR_PREFIX}$(APPSDIR)/videoutils/openh264/openh264/codec/api @@ -50,7 +48,7 @@ CFLAGS += $(INCLUDES) CXXFLAGS += $(INCLUDES) AFLAGS += $(INCLUDES) -NUTTX = $(call CONVERT_PATH,$(TOPDIR)$(DELIM)nuttx$(EXEEXT)) +NUTTX = $(call CONVERT_PATH,$(TOPDIR)/nuttx$(EXEEXT)) # Determine which objects are required in the link.The # sim_head object normally draws in all that is needed, but @@ -108,7 +106,7 @@ HOSTCFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \ -fvisibility=default HOSTCFLAGS += ${INCDIR_PREFIX}$(ARCH_SRCDIR) -HOSTCFLAGS += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)chip +HOSTCFLAGS += ${INCDIR_PREFIX}$(ARCH_SRCDIR)/chip ifeq ($(CONFIG_HOST_MACOS),y) HOSTCFLAGS += -Wno-deprecated-declarations endif @@ -317,7 +315,7 @@ HEADOBJ = $(HEADSRC:.c=$(OBJEXT)) SRCS = $(ASRCS) $(CSRCS) $(HOSTSRCS) OBJS = $(AOBJS) $(COBJS) $(HOSTOBJS) -$(foreach lib,$(notdir $(wildcard $(APPDIR)$(DELIM)staging$(DELIM)*$(LIBEXT))), \ +$(foreach lib,$(notdir $(wildcard $(APPDIR)/staging$(DELIM)*$(LIBEXT))), \ $(foreach elib,$(EXTRA_LIBS), \ $(if $(filter $(notdir $(elib)),$(lib)), \ $(eval NAMEFULL_LIBS+=$(elib)), \ @@ -329,7 +327,7 @@ $(foreach lib,$(notdir $(wildcard $(APPDIR)$(DELIM)staging$(DELIM)*$(LIBEXT))), ) EXTRA_LIBS := $(filter-out $(NAMEFULL_LIBS) $(NAMESPEC_LIBS),$(EXTRA_LIBS)) -EXTRA_LIBS += $(wildcard $(APPDIR)$(DELIM)staging$(DELIM)*$(LIBEXT)) +EXTRA_LIBS += $(wildcard $(APPDIR)/staging$(DELIM)*$(LIBEXT)) # Override in Make.defs if linker is not 'ld' @@ -494,7 +492,7 @@ config.h: $(TOPDIR)/include/nuttx/config.h @echo "CP: $<" $(Q) cp $< $@ -.depend: Makefile config.h $(SRCS) $(TOPDIR)$(DELIM).config +.depend: Makefile config.h $(SRCS) $(TOPDIR)/.config $(Q) if [ -e board/Makefile ]; then \ $(MAKE) -C board depend ; \ fi diff --git a/arch/sparc/include/sparc_v8/irq.h b/arch/sparc/include/sparc_v8/irq.h index 701df770f3..ed8ba17113 100644 --- a/arch/sparc/include/sparc_v8/irq.h +++ b/arch/sparc/include/sparc_v8/irq.h @@ -32,7 +32,7 @@ ****************************************************************************/ #include -#include +include /**************************************************************************** * Pre-processor Definitions diff --git a/arch/sparc/src/sparc_v8/sparc_v8_irq.c b/arch/sparc/src/sparc_v8/sparc_v8_irq.c index 23ce2aef26..7305c0b677 100644 --- a/arch/sparc/src/sparc_v8/sparc_v8_irq.c +++ b/arch/sparc/src/sparc_v8/sparc_v8_irq.c @@ -27,7 +27,7 @@ #include #include -#include +include /**************************************************************************** * Public Functions diff --git a/arch/xtensa/include/irq.h b/arch/xtensa/include/irq.h index 5dc3e54b6c..477c459835 100644 --- a/arch/xtensa/include/irq.h +++ b/arch/xtensa/include/irq.h @@ -42,7 +42,7 @@ # include #endif -#include +include #include #include #include diff --git a/arch/z16/Kconfig b/arch/z16/Kconfig deleted file mode 100644 index 6297dd297b..0000000000 --- a/arch/z16/Kconfig +++ /dev/null @@ -1,60 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_Z16 -comment "Z16 Configuration Options" - -choice - prompt "ZNEO chip selection" - default ARCH_CHIP_Z16F2811 - -config ARCH_CHIP_Z16F2810 - bool "Z16F2810" - select ARCH_CHIP_Z16F - select ARCH_HAVE_IRQPRIO - ---help--- - ZiLOG Z16F2810 - -config ARCH_CHIP_Z16F2811 - bool "Z16F2811" - select ARCH_CHIP_Z16F - select ARCH_HAVE_IRQPRIO - ---help--- - ZiLOG Z16F2811 - -config ARCH_CHIP_Z16F3211 - bool "Z16F3211" - select ARCH_CHIP_Z16F - select ARCH_HAVE_IRQPRIO - ---help--- - ZiLOG Z16F321 - -config ARCH_CHIP_Z16F6411 - bool "Z16F6411" - select ARCH_CHIP_Z16F - select ARCH_HAVE_IRQPRIO - ---help--- - ZiLOG Z16F6411 - -config ARCH_CHIP_Z16_CUSTOM - bool "Custom ZNEO chip" - select ARCH_CHIP_CUSTOM - ---help--- - Select this option if there is no directory for the chip under arch/z16/src/. - -endchoice - -config ARCH_CHIP_Z16F - bool - select CYGWIN_WINTOOL if WINDOWS_CYGWIN - -config ARCH_CHIP - string - default "z16f" if ARCH_CHIP_Z16F - -source "arch/z16/src/common/Kconfig" -source "arch/z16/src/z16f/Kconfig" - -endif diff --git a/arch/z16/include/arch.h b/arch/z16/include/arch.h deleted file mode 100644 index 0bfe4ca5ea..0000000000 --- a/arch/z16/include/arch.h +++ /dev/null @@ -1,67 +0,0 @@ -/**************************************************************************** - * arch/z16/include/arch.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* This file should never be included directly but, rather, - * only indirectly through nuttx/arch.h - */ - -#ifndef __ARCH_Z16_INCLUDE_ARCH_H -#define __ARCH_Z16_INCLUDE_ARCH_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Inline functions - ****************************************************************************/ - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -#undef EXTERN -#ifdef __cplusplus -} -#endif - -#endif /* __ARCH_Z16_INCLUDE_ARCH_H */ diff --git a/arch/z16/include/inttypes.h b/arch/z16/include/inttypes.h deleted file mode 100644 index bcbec87765..0000000000 --- a/arch/z16/include/inttypes.h +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** - * arch/z16/include/inttypes.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z16_INCLUDE_INTTYPES_H -#define __ARCH_Z16_INCLUDE_INTTYPES_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#define PRId8 "d" -#define PRId16 "d" -#define PRId32 "d" - -#define PRIdPTR "d" - -#define PRIi8 "i" -#define PRIi16 "i" -#define PRIi32 "i" - -#define PRIiPTR "i" - -#define PRIo8 "o" -#define PRIo16 "o" -#define PRIo32 "o" - -#define PRIoPTR "o" - -#define PRIu8 "u" -#define PRIu16 "u" -#define PRIu32 "u" - -#define PRIuPTR "u" - -#define PRIx8 "x" -#define PRIx16 "x" -#define PRIx32 "x" - -#define PRIxPTR "x" - -#define PRIX8 "X" -#define PRIX16 "X" -#define PRIX32 "X" - -#define PRIXPTR "X" - -#define SCNd8 "hhd" -#define SCNd16 "hd" -#define SCNd32 "d" - -#define SCNdPTR "d" - -#define SCNi8 "hhi" -#define SCNi16 "hi" -#define SCNi32 "i" - -#define SCNiPTR "i" - -#define SCNo8 "hho" -#define SCNo16 "ho" -#define SCNo32 "o" - -#define SCNoPTR "o" - -#define SCNu8 "hhu" -#define SCNu16 "hu" -#define SCNu32 "u" - -#define SCNuPTR "u" - -#define SCNx8 "hhx" -#define SCNx16 "hx" -#define SCNx32 "x" - -#define SCNxPTR "x" - -#define INT8_C(x) x -#define INT16_C(x) x -#define INT32_C(x) x - -#define UINT8_C(x) x -#define UINT16_C(x) x -#define UINT32_C(x) x ## u - -#endif /* __ARCH_Z16_INCLUDE_INTTYPES_H */ diff --git a/arch/z16/include/irq.h b/arch/z16/include/irq.h deleted file mode 100644 index 162bbd2de6..0000000000 --- a/arch/z16/include/irq.h +++ /dev/null @@ -1,128 +0,0 @@ -/**************************************************************************** - * arch/z16/include/irq.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* This file should never be included directly but, rather, - * only indirectly through nuttx/irq.h - */ - -#ifndef __ARCH_Z16_INCLUDE_IRQ_H -#define __ARCH_Z16_INCLUDE_IRQ_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#ifndef __ASSEMBLY__ -# include -#endif - -#include -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -/* Return the current value of the stack pointer */ - -chipreg_t up_getsp(void); - -/* This holds a references to the current interrupt level - * register storage structure. It is non-NULL only during - * interrupt processing. - */ - -EXTERN volatile FAR chipreg_t *g_current_regs; - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Inline functions - ****************************************************************************/ - -/* This holds a references to the current interrupt level - * register storage structure. If is non-NULL only during - * interrupt processing. - */ - -static inline_function chipreg_t *up_current_regs(void) -{ - return (FAR chipreg_t *)g_current_regs; -} - -static inline_function void up_set_current_regs(FAR chipreg_t *regs) -{ - g_current_regs = regs; -} - -/**************************************************************************** - * Name: up_interrupt_context - * - * Description: - * Return true is we are currently executing in the interrupt - * handler context. - * - ****************************************************************************/ - -#define up_interrupt_context() (up_current_regs() != NULL) - -/**************************************************************************** - * Name: up_getusrpc - ****************************************************************************/ - -#define up_getusrpc(regs) \ - (((FAR chipreg_t *)((regs) ? (regs) : up_current_regs()))[REG_PC]) - -/**************************************************************************** - * Name: up_getusrsp - ****************************************************************************/ - -#define up_getusrsp(regs) \ - ((uintptr_t)((FAR uint32_t*)(regs))[REG_SP]) - -#undef EXTERN -#ifdef __cplusplus -} -#endif -#endif - -#endif /* __ARCH_Z16_INCLUDE_IRQ_H */ diff --git a/arch/z16/include/limits.h b/arch/z16/include/limits.h deleted file mode 100644 index e5f2db044e..0000000000 --- a/arch/z16/include/limits.h +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** - * arch/z16/include/limits.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z16_INCLUDE_LIMITS_H -#define __ARCH_Z16_INCLUDE_LIMITS_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#define CHAR_BIT 8 -#define SCHAR_MIN (-SCHAR_MAX - 1) -#define SCHAR_MAX 127 -#define UCHAR_MAX 255 - -/* These could be different on machines where char is unsigned */ - -#ifdef __CHAR_UNSIGNED__ -# define CHAR_MIN 0 -# define CHAR_MAX UCHAR_MAX -#else -# define CHAR_MIN SCHAR_MIN -# define CHAR_MAX SCHAR_MAX -#endif - -#define SHRT_MIN (-SHRT_MAX - 1) -#define SHRT_MAX 32767 -#define USHRT_MAX 65535U - -#define INT_MIN (-INT_MAX - 1) -#define INT_MAX 2147483647 -#define UINT_MAX 4294967295U - -#define LONG_MIN (-LONG_MAX - 1) -#define LONG_MAX 2147483647L -#define ULONG_MAX 4294967295UL - -#define LLONG_MIN (-LLONG_MAX - 1) -#define LLONG_MAX 2147483647LL -#define ULLONG_MAX 4294967295ULL - -/* A pointer is 4 bytes */ - -#define PTR_MIN (-PTR_MAX - 1) -#define PTR_MAX 2147483647 -#define UPTR_MAX 4294967295U - -#if !defined(__WCHAR_TYPE__) -# define WCHAR_MIN INT_MIN -# define WCHAR_MAX INT_MAX -#elif defined(__WCHAR_UNSIGNED__) -# define WCHAR_MIN 0 -# define WCHAR_MAX __WCHAR_MAX__ -#else -# define WCHAR_MIN (-__WCHAR_MAX__ - 1) -# define WCHAR_MAX __WCHAR_MAX__ -#endif - -#endif /* __ARCH_Z16_INCLUDE_LIMITS_H */ diff --git a/arch/z16/include/syscall.h b/arch/z16/include/syscall.h deleted file mode 100644 index e573a075dd..0000000000 --- a/arch/z16/include/syscall.h +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************************************** - * arch/z16/include/syscall.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* This file should never be included directly but, rather, only indirectly - * through include/syscall.h or include/sys/sycall.h - */ - -#ifndef __ARCH_Z16_INCLUDE_SYSCALL_H -#define __ARCH_Z16_INCLUDE_SYSCALL_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -/**************************************************************************** - * Inline functions - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -#undef EXTERN -#ifdef __cplusplus -} -#endif -#endif - -#endif /* __ARCH_Z16_INCLUDE_SYSCALL_H */ diff --git a/arch/z16/include/types.h b/arch/z16/include/types.h deleted file mode 100644 index e7facd444b..0000000000 --- a/arch/z16/include/types.h +++ /dev/null @@ -1,106 +0,0 @@ -/**************************************************************************** - * arch/z16/include/types.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* This file should never be included directly but, rather, - * only indirectly through sys/types.h - */ - -#ifndef __ARCH_Z16_INCLUDE_TYPES_H -#define __ARCH_Z16_INCLUDE_TYPES_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Type Declarations - ****************************************************************************/ - -#ifndef __ASSEMBLY__ - -/* These are the sizes of the standard integer types. NOTE that these type - * names have a leading underscore character. This file will be included - * (indirectly) by include/stdint.h and typedef'ed to the final name without - * the underscore character. This roundabout way of doings things allows - * the stdint.h to be removed from the include/ directory in the event that - * the user prefers to use the definitions provided by their toolchain header - * files - */ - -typedef signed char _int8_t; -typedef unsigned char _uint8_t; - -typedef signed short _int16_t; -typedef unsigned short _uint16_t; - -typedef signed int _int32_t; -typedef unsigned int _uint32_t; - -typedef _int32_t _intmax_t; -typedef _uint32_t _uintmax_t; - -#if defined(__WCHAR_TYPE__) -typedef __WCHAR_TYPE__ _wchar_t; -#else -typedef int _wchar_t; -#endif - -typedef int _wint_t; -typedef int _wctype_t; - -/* A size is 4 bytes */ - -#if defined(__SIZE_TYPE__) -/* If __SIZE_TYPE__ is defined we define ssize_t based on size_t. - * We simply change "unsigned" to "signed" for this single definition - * to make sure ssize_t and size_t only differ by their signedness. - */ - -#define unsigned signed -typedef __SIZE_TYPE__ _ssize_t; -#undef unsigned -typedef __SIZE_TYPE__ _size_t; -#elif defined(CONFIG_ARCH_SIZET_LONG) -typedef signed long _ssize_t; -typedef unsigned long _size_t; -#else -typedef signed int _ssize_t; -typedef unsigned int _size_t; -#endif - -/* This is the size of the interrupt state save returned by - * up_irq_save() - */ - -typedef unsigned short irqstate_t; - -#endif /* __ASSEMBLY__ */ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#endif /* __ARCH_Z16_INCLUDE_TYPES_H */ diff --git a/arch/z16/include/z16f/arch.h b/arch/z16/include/z16f/arch.h deleted file mode 100644 index e8cf513d17..0000000000 --- a/arch/z16/include/z16f/arch.h +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** - * arch/z16/include/z16f/arch.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* This file should never be included directly but, rather, - * only indirectly through nuttx/arch.h (via arch/arch.h) - */ - -#ifndef __ARCH_Z16_INCLUDE_Z16F_ARCH_H -#define __ARCH_Z16_INCLUDE_Z16F_ARCH_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -#undef EXTERN -#ifdef __cplusplus -} -#endif - -#endif /* __ARCH_Z16_INCLUDE_Z16F_ARCH_H */ diff --git a/arch/z16/include/z16f/chip.h b/arch/z16/include/z16f/chip.h deleted file mode 100644 index 54449a92f0..0000000000 --- a/arch/z16/include/z16f/chip.h +++ /dev/null @@ -1,59 +0,0 @@ -/**************************************************************************** - * arch/z16/include/z16f/chip.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z16_INCLUDE_Z16F_CHIP_H -#define __ARCH_Z16_INCLUDE_Z16F_CHIP_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -#undef EXTERN -#ifdef __cplusplus -} -#endif - -#endif /* __ARCH_Z16_INCLUDE_Z16F_CHIP_H */ diff --git a/arch/z16/include/z16f/irq.h b/arch/z16/include/z16f/irq.h deleted file mode 100644 index f896f65034..0000000000 --- a/arch/z16/include/z16f/irq.h +++ /dev/null @@ -1,243 +0,0 @@ -/**************************************************************************** - * arch/z16/include/z16f/irq.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* This file should never be included directly but, rather, - * only indirectly through nuttx/irq.h (via arch/irq.h) - */ - -#ifndef __ARCH_Z16_INCLUDE_Z16F_IRQ_H -#define __ARCH_Z16_INCLUDE_Z16F_IRQ_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -# include -#endif - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Interrupt Vectors - * (excluding reset and sysexec which are handled differently) - */ - -#define Z16F_IRQ_IRQ0 ( 0) /* First of 8 IRQs controlled by IRQ0 registers */ -#define Z16F_IRQ_ADC ( 0) /* Vector: 0x2C IRQ0.0 ADC */ -#define Z16F_IRQ_SPI ( 1) /* Vector: 0x28 IRQ0.1 SPI */ -#define Z16F_IRQ_I2C ( 2) /* Vector: 0x24 IRQ0.2 I2C */ -#define Z16F_IRQ_UART0TX ( 3) /* Vector: 0x20 IRQ0.3 UART0 TX */ -#define Z16F_IRQ_UART0RX ( 4) /* Vector: 0x1C IRQ0.4 UART0 RX */ -#define Z16F_IRQ_TIMER0 ( 5) /* Vector: 0x18 IRQ0.5 Timer 0 */ -#define Z16F_IRQ_TIMER1 ( 6) /* Vector: 0x14 IRQ0.6 Timer 1 */ -#define Z16F_IRQ_TIMER2 ( 7) /* Vector: 0x10 IRQ0.7 Timer 2 */ - -#define Z16F_IRQ_IRQ1 ( 8) /* First of 8 IRQs controlled by IRQ1 registers */ -#define Z16F_IRQ_P0AD ( 8) /* Vector: 0x4C IRQ1.0 Port A/D0, rising/falling edge */ -#define Z16F_IRQ_P1AD ( 9) /* Vector: 0x48 IRQ1.1 Port A/D1, rising/falling edge */ -#define Z16F_IRQ_P2AD (10) /* Vector: 0x44 IRQ1.2 Port A/D2, rising/falling edge */ -#define Z16F_IRQ_P3AD (11) /* Vector: 0x40 IRQ1.3 Port A/D3, rising/falling edge */ -#define Z16F_IRQ_P4AD (12) /* Vector: 0x3C IRQ1.4 Port A/D4, rising/falling edge */ -#define Z16F_IRQ_P5AD (13) /* Vector: 0x38 IRQ1.5 Port A/D5, rising/falling edge */ -#define Z16F_IRQ_P6AD (14) /* Vector: 0x34 IRQ1.6 Port A/D6, rising/falling edge */ -#define Z16F_IRQ_P7AD (15) /* Vector: 0x30 IRQ1.7 Port A/D7, rising/falling edge */ - -#define Z16F_IRQ_IRQ2 (16) /* First of 8 IRQs controlled by IRQ2 registers */ -#define Z16F_IRQ_C0 (16) /* Vector: IRQ2.0 0x6C Port C0, both edges DMA0 */ -#define Z16F_IRQ_C1 (17) /* Vector: IRQ2.1 0x68 Port C1, both edges DMA1 */ -#define Z16F_IRQ_C2 (18) /* Vector: IRQ2.2 0x64 Port C2, both edges DMA2 */ -#define Z16F_IRQ_C3 (19) /* Vector: IRQ2.3 0x60 Port C3, both edges DMA3 */ -#define Z16F_IRQ_PWMFAULT (20) /* Vector: IRQ2.4 0x5C PWM Fault */ -#define Z16F_IRQ_UART1TX (21) /* Vector: IRQ2.5 0x58 UART1 TX */ -#define Z16F_IRQ_UART1RX (22) /* Vector: IRQ2.6 0x54 UART1 RX */ -#define Z16F_IRQ_PWMTIMER (23) /* Vector: IRQ2.7 0x50 PWM Timer */ - -#define Z16F_IRQ_SYSTIMER Z16F_IRQ_TIMER0 -#define NR_IRQS (24) - -/* These macros will map an IRQ to a register bit position */ - -#define Z16F_IRQ0_BIT(i) (1 << ((i)-Z16F_IRQ_IRQ0)) -#define Z16F_IRQ1_BIT(i) (1 << ((i)-Z16F_IRQ_IRQ1)) -#define Z16F_IRQ2_BIT(i) (1 << ((i)-Z16F_IRQ_IRQ2)) - -/* IRQ Stack Frame Format - * - * This stack frame is created on each interrupt. These registers are stored - * in the TCB to many context switches. - * - * The following represent all of the "static" registers r8-r15. These - * are registers that whose value must be retained across function calls. - * These registers must be saved bothby interrupt handling context switch - * switch logic and also by user-initiated context switches. - * - * Registers are saved in the order consistent with pushmho , - * that is with r15 pushed first and r8 push last. Since the z16f has - * a "push-down" stack, the registers will be "in order" in memory. - */ - -#define REG_R8 ( 0) /* 32-bits: R8 */ -#define REG_R9 ( 2) /* 32-bits: R9 */ -#define REG_R10 ( 4) /* 32-bits: R10 */ -#define REG_R11 ( 6) /* 32-bits: R11 */ -#define REG_R12 ( 8) /* 32-bits: R12 */ -#define REG_R13 (10) /* 32-bits: R13 */ - -/* The frame pointer and the SP at the point of task resumption must - * always be saved. - */ - -#define REG_R14 (12) /* 32-bits: R14 = fp */ -#define REG_FP REG_R14 -#define REG_R15 (14) /* 32-bits: R15 = sp */ -#define REG_SP REG_R15 - -/* The following represent all of the "volatile" registers r0-r7. These - * are registers that whose value need not be retained across function - * calls. These registers must be saved by interrupt handling context - * switch logic but not by user-initiated context switches. - * - * Registers are saved in the order consistent with pushmlo , - * that is with r7 pushed first and r0 push last. Since the z16f has - * a "push-down" stack, the registers will be "in order" in memory. - */ - -#define REG_R0 (16) /* 32-bits: R0 */ -#define REG_R1 (18) /* 32-bits: R1 */ -#define REG_R2 (20) /* 32-bits: R2 */ -#define REG_R3 (22) /* 32-bits: R3 */ -#define REG_R4 (24) /* 32-bits: R4 */ -#define REG_R5 (26) /* 32-bits: R5 */ -#define REG_R6 (28) /* 32-bits: R6 */ -#define REG_R7 (30) /* 32-bits: R7 */ - -/* The following two offsets represent the state of the stack on entry - * into the interrupt handler: - * - * TOS[0] = PC[31:24] - * TOS[1] = PC[23:16] - * TOS[2] = PC[15:8] - * TOS[3] = PC[7:0] - * TOS[4] = 0 - * TOS[5] = flags - */ - -#define REG_PC (32) /* 32-bits: Return PC */ -#define REG_FLAGS (34) /* 16-bits: Flags register (with 0x00 padding) */ - -#define XCPTCONTEXT_REGS (35) -#define XCPTCONTEXT_SIZE (2 * XCPTCONTEXT_REGS) - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -#ifndef __ASSEMBLY__ - -/* This is the type of the register save array */ - -typedef uint16_t chipreg_t; - -/* This struct defines the way the registers are stored. */ - -struct xcptcontext -{ - /* Register save area */ - - uint16_t regs[XCPTCONTEXT_REGS]; - - /* The following retains that state during signal execution. - * - * REVISIT: Because there is only one copy of these save areas, - * only a single signal handler can be active. This precludes - * queuing of signal actions. As a result, signals received while - * another signal handler is executing will be ignored! - */ - - uint32_t saved_pc; /* Saved return address */ - uint16_t saved_i; /* Saved interrupt state */ -}; -#endif - -/* The ZDS-II provides built-in operations to test & disable and to restore - * the interrupt state. - * - * irqstate_t up_irq_save(void); - * void up_irq_restore(irqstate_t flags); - * void up_irq_enable(void); - * - * NOTE: These functions should never be called from application code and, - * as a general rule unless you really know what you are doing, this - * function should not be called directly from operation system code either: - * Typically, the wrapper functions, enter_critical_section() and - * leave_critical section(), are probably what you really want. - */ - -#ifdef __ZILOG__ -# define up_irq_save() TDI() -# define up_irq_restore(f) RI(f) -# define up_irq_enable() EI() -#endif - -/**************************************************************************** - * Inline functions - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -/* ZDS-II intrinsic functions (normally declared in zneo.h) */ - -intrinsic void EI(void); -intrinsic void DI(void); -intrinsic void RI(unsigned short); -intrinsic void SET_VECTOR(int, void (* func) (void)); -intrinsic unsigned short TDI(void); - -#ifndef __ZILOG__ -irqstate_t up_irq_save(void); -void up_irq_restore(irqstate_t flags); -#endif - -#undef EXTERN -#ifdef __cplusplus -} -#endif -#endif - -#endif /* __ARCH_Z16_INCLUDE_Z16F_IRQ_H */ diff --git a/arch/z16/src/.gitignore b/arch/z16/src/.gitignore deleted file mode 100644 index 5471a1013d..0000000000 --- a/arch/z16/src/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/board -/chip -/nuttx.linkcmd diff --git a/arch/z16/src/Makefile b/arch/z16/src/Makefile deleted file mode 100644 index 043ecfd3aa..0000000000 --- a/arch/z16/src/Makefile +++ /dev/null @@ -1,173 +0,0 @@ -############################################################################ -# arch/z16/src/Makefile -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -include $(TOPDIR)/tools/Make.defs -include chip/Make.defs - -COMPILER = ${shell basename "$(CC)"} -ARCHSRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src - -INCLUDES += ${INCDIR_PREFIX}$(ARCHSRCDIR)$(DELIM)chip -INCLUDES += ${INCDIR_PREFIX}$(ARCHSRCDIR)$(DELIM)common -INCLUDES += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)sched - -CFLAGS += $(INCLUDES) -CPPFLAGS += $(INCLUDES) - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) - LDFLAGS += @"$(ARCHSRCDIR)/nuttx.linkcmd" -else -ifeq ($(COMPILER),zneocc.exe) - LDFLAGS += @"${shell cygpath -w $(ARCHSRCDIR)/nuttx.linkcmd}" -endif -endif - -HEAD_ASRC = $(HEAD_SSRC:.S=$(ASMEXT)) -HEAD_OBJ = $(HEAD_SSRC:.S=$(OBJEXT)) -STARTUP_OBJS ?= $(HEAD_OBJ) - -SSRCS = $(CHIP_SSRCS) $(CMN_SSRCS) -ASRCS = $(SSRCS:.S=$(ASMEXT)) -AOBJS = $(SSRCS:.S=$(OBJEXT)) - -CSRCS = $(CHIP_CSRCS) $(CMN_CSRCS) -COBJS = $(CSRCS:.c=$(OBJEXT)) - -DEPSRCS = $(SSRCS) $(CSRCS) -OBJS = $(AOBJS) $(COBJS) - -VPATH = chip:common - -all: $(HEAD_OBJ) libarch$(LIBEXT) - -.PHONY: board/libboard$(LIBEXT) - -ifeq ($(COMPILER),zneocc.exe) -$(ASRCS) $(HEAD_ASRC): %$(ASMEXT): %.S - $(Q) $(CPP) $(CPPFLAGS) $< -o $@.tmp - $(Q) cat $@.tmp | sed -e "s/^#/;/g" > $@ - $(Q) rm $@.tmp - -$(AOBJS) $(HEAD_OBJ): %$(OBJEXT): %$(ASMEXT) - $(call ASSEMBLE, $<, $@) -else -$(OBJS) $(HEAD_OBJ): %$(OBJEXT): %.S - $(call ASSEMBLE, $<, $@) -endif - -$(COBJS): %$(OBJEXT): %.c - $(call COMPILE, $<, $@) - -libarch$(LIBEXT): $(OBJS) - $(call ARCHIVE, $@, $(OBJS)) - -board/libboard$(LIBEXT): - $(Q) $(MAKE) -C board libboard$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)" - -ifeq ($(COMPILER),zneocc.exe) -nuttx.linkcmd: $(LINKCMDTEMPLATE) - $(Q) cp -f $(LINKCMDTEMPLATE) nuttx.linkcmd -ifeq ($(CONFIG_WINDOWS_NATIVE),y) - @echo "$(TOPDIR)\nuttx"= \>>nuttx.linkcmd - @echo "$(ARCHSRCDIR)\$(HEAD_OBJ)", \>>nuttx.linkcmd - $(Q) for %%G in ($(LINKLIBS)) do ( echo "$(TOPDIR)\staging\%%G", \>>nuttx.linkcmd ) - @echo "$(ARCHSRCDIR)\board\libboard$(LIBEXT)", \>>nuttx.linkcmd - @echo "$(ZDSSTDLIBDIR)\chelpld$(LIBEXT)", \>>nuttx.linkcmd - @echo "$(ZDSSTDLIBDIR)\fpld$(LIBEXT)">>nuttx.linkcmd -else - @echo "\"${shell cygpath -w $(TOPDIR)/nuttx}\"= \\" >>nuttx.linkcmd - @echo " \"${shell cygpath -w $(ARCHSRCDIR)/$(HEAD_OBJ)}\", \\" >>nuttx.linkcmd - $(Q) ( for lib in $(LINKLIBS); do \ - echo " \"`cygpath -w $(TOPDIR)/staging/$${lib}`\", \\" >>nuttx.linkcmd; \ - done ; ) - @echo " \"${shell cygpath -w $(ARCHSRCDIR)/board/libboard$(LIBEXT)}\", \\" >>nuttx.linkcmd - @echo " \"${shell cygpath -w $(ZDSSTDLIBDIR)/chelpld$(LIBEXT)}\", \\" >>nuttx.linkcmd - @echo " \"${shell cygpath -w $(ZDSSTDLIBDIR)/fpld$(LIBEXT)}\"" >>nuttx.linkcmd -endif -else -nuttx.linkcmd: -endif - -nuttx$(EXEEXT): $(HEAD_OBJ) board/libboard$(LIBEXT) nuttx.linkcmd - @echo "LD: nuttx$(EXEEXT)" - $(Q) $(LD) $(LDFLAGS) - -.depend: Makefile chip/Make.defs $(DEPSRCS) $(TOPDIR)$(DELIM).config -ifeq ($(CONFIG_WINDOWS_NATIVE),y) - $(Q) if exist board$(DELIM)Makefile ( $(MAKE) -C board depend ) -else - $(Q) if [ -e board/Makefile ]; then \ - $(MAKE) -C board depend ; \ - fi -endif - $(Q) $(MKDEP) --dep-path chip --dep-path common "$(CC)" -- $(CFLAGS) -- $(DEPSRCS) >Make.dep - $(Q) touch $@ - -# This is part of the top-level export target - -export_startup: $(STARTUP_OBJS) -ifeq ($(CONFIG_WINDOWS_NATIVE),y) - $(Q) if exist "$(EXPORT_DIR)$(DELIM)startup" ( copy $(STARTUP_OBJS) "$(EXPORT_DIR)$(DELIM)startup$(DELIM)." /b /y) -else - $(Q) if [ -d "$(EXPORT_DIR)/startup" ]; then \ - cp -f $(STARTUP_OBJS) "$(EXPORT_DIR)/startup"; \ - else \ - echo "$(EXPORT_DIR)/startup does not exist"; \ - exit 1; \ - fi -endif - -# Dependencies - -depend: .depend - -context:: - -clean: -ifeq ($(CONFIG_WINDOWS_NATIVE),y) - $(Q) if exist board$(DELIM)Makefile ( $(MAKE) -C board clean ) -else - $(Q) if [ -e board/Makefile ]; then \ - $(MAKE) -C board clean ; \ - fi -endif -ifeq ($(COMPILER),zneocc.exe) - $(call DELFILE, nuttx.linkcmd) - $(call DELFILE, *.asm) - $(call DELFILE, *.tmp) - $(call DELFILE, *.map) -endif - $(call DELFILE, libarch$(LIBEXT)) - $(call CLEAN) - -distclean:: clean -ifeq ($(CONFIG_WINDOWS_NATIVE),y) - $(Q) if exist board$(DELIM)Makefile ( $(MAKE) -C board distclean ) -else - $(Q) if [ -e board/Makefile ]; then \ - $(MAKE) -C board distclean ; \ - fi -endif - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - --include Make.dep diff --git a/arch/z16/src/common/Kconfig b/arch/z16/src/common/Kconfig deleted file mode 100644 index cc2a3060a2..0000000000 --- a/arch/z16/src/common/Kconfig +++ /dev/null @@ -1,9 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_Z16 -comment "Common Configuration Options" - -endif diff --git a/arch/z16/src/common/z16_allocateheap.c b/arch/z16/src/common/z16_allocateheap.c deleted file mode 100644 index 6ece82daab..0000000000 --- a/arch/z16/src/common/z16_allocateheap.c +++ /dev/null @@ -1,91 +0,0 @@ -/**************************************************************************** - * arch/z16/src/common/z16_allocateheap.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include - -#include -#include -#include -#include - -#include "chip.h" -#include "z16_internal.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Use ZDS-II linker settings to get the unused external RAM and use this - * for the NuttX heap. - */ - -#ifndef CONFIG_HEAP1_BASE - extern _Far unsigned long far_heapbot; - #define CONFIG_HEAP1_BASE ((unsigned long)&far_heapbot) -#endif - -#ifndef CONFIG_HEAP1_END - extern _Far unsigned long far_heaptop; - #define CONFIG_HEAP1_END ((unsigned long)&far_heaptop) -#endif - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_allocate_heap - * - * Description: - * This function will be called to dynamically set aside the heap region. - * - ****************************************************************************/ - -void up_allocate_heap(FAR void **heap_start, size_t *heap_size) -{ - *heap_start = (FAR void *)CONFIG_HEAP1_BASE; - *heap_size = CONFIG_HEAP1_END - CONFIG_HEAP1_BASE; - board_autoled_on(LED_HEAPALLOCATE); -} - -/**************************************************************************** - * Name: z16_addregions - * - * Description: - * Memory may be added in non-contiguous chunks. Additional chunks are - * added by calling this function. - * - ****************************************************************************/ - -#if CONFIG_MM_REGIONS > 1 -void z16_addregion(void) -{ - kmm_addregion((FAR void *)CONFIG_HEAP2_BASE, CONFIG_HEAP2_SIZE); -} -#endif diff --git a/arch/z16/src/common/z16_copystate.c b/arch/z16/src/common/z16_copystate.c deleted file mode 100644 index e7a338a94b..0000000000 --- a/arch/z16/src/common/z16_copystate.c +++ /dev/null @@ -1,50 +0,0 @@ -/**************************************************************************** - * arch/z16/src/common/z16_copystate.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include "z16_internal.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: z16_copystate - ****************************************************************************/ - -/* Maybe a little faster than most memcpy's */ - -void z16_copystate(FAR chipreg_t *dest, FAR const chipreg_t *src) -{ - int i; - for (i = 0; i < XCPTCONTEXT_REGS; i++) - { - *dest++ = *src++; - } -} diff --git a/arch/z16/src/common/z16_createstack.c b/arch/z16/src/common/z16_createstack.c deleted file mode 100644 index 84b64fb5d9..0000000000 --- a/arch/z16/src/common/z16_createstack.c +++ /dev/null @@ -1,208 +0,0 @@ -/**************************************************************************** - * arch/z16/src/common/z16_createstack.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "chip.h" -#include "z16_internal.h" - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_create_stack - * - * Description: - * Allocate a stack for a new thread and setup up stack-related information - * in the TCB. - * - * The following TCB fields must be initialized by this function: - * - * - adj_stack_size: Stack size after adjustment for hardware, processor, - * etc. This value is retained only for debug purposes. - * - stack_alloc_ptr: Pointer to allocated stack - * - stack_base_ptr: Adjusted stack base pointer after the TLS Data and - * Arguments has been removed from the stack allocation. - * - * Input Parameters: - * - tcb: The TCB of new task - * - stack_size: The requested stack size. At least this much - * must be allocated. - * - ttype: The thread type. This may be one of following (defined in - * include/nuttx/sched.h): - * - * TCB_FLAG_TTYPE_TASK Normal user task - * TCB_FLAG_TTYPE_PTHREAD User pthread - * TCB_FLAG_TTYPE_KERNEL Kernel thread - * - * This thread type is normally available in the flags field of the TCB, - * however, there are certain contexts where the TCB may not be fully - * initialized when up_create_stack is called. - * - ****************************************************************************/ - -int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype) -{ -#ifdef CONFIG_TLS_ALIGNED - /* The allocated stack size must not exceed the maximum possible for the - * TLS feature. - */ - - DEBUGASSERT(stack_size <= TLS_MAXSTACK); - if (stack_size >= TLS_MAXSTACK) - { - stack_size = TLS_MAXSTACK; - } -#endif - - /* Is there already a stack allocated of a different size? Because of - * alignment issues, stack_size might erroneously appear to be of a - * different size. Fortunately, this is not a critical operation. - */ - - if (tcb->stack_alloc_ptr && tcb->adj_stack_size != stack_size) - { - /* Yes.. Release the old stack */ - - up_release_stack(tcb, ttype); - } - - /* Do we need to allocate a new stack? */ - - if (!tcb->stack_alloc_ptr) - { - /* Allocate the stack. If DEBUG is enabled (but not stack debug), - * then create a zeroed stack to make stack dumps easier to trace. - * If TLS is enabled, then we must allocate aligned stacks. - */ - -#ifdef CONFIG_TLS_ALIGNED -#ifdef CONFIG_MM_KERNEL_HEAP - /* Use the kernel allocator if this is a kernel thread */ - - if (ttype == TCB_FLAG_TTYPE_KERNEL) - { - tcb->stack_alloc_ptr = kmm_memalign(TLS_STACK_ALIGN, stack_size); - } - else -#endif - { - /* Use the user-space allocator if this is a task or pthread */ - - tcb->stack_alloc_ptr = kumm_memalign(TLS_STACK_ALIGN, stack_size); - } - -#else /* CONFIG_TLS_ALIGNED */ -#ifdef CONFIG_MM_KERNEL_HEAP - /* Use the kernel allocator if this is a kernel thread */ - - if (ttype == TCB_FLAG_TTYPE_KERNEL) - { - tcb->stack_alloc_ptr = kmm_malloc(stack_size); - } - else -#endif - { - /* Use the user-space allocator if this is a task or pthread */ - - tcb->stack_alloc_ptr = kumm_malloc(stack_size); - } -#endif /* CONFIG_TLS_ALIGNED */ - -#ifdef CONFIG_DEBUG_FEATURES - /* Was the allocation successful? */ - - if (!tcb->stack_alloc_ptr) - { - serr("ERROR: Failed to allocate stack, size %d\n", stack_size); - } -#endif - } - - /* Did we successfully allocate a stack? */ - - if (tcb->stack_alloc_ptr) - { - uintptr_t top_of_stack; - size_t size_of_stack; - - /* Yes.. If stack debug is enabled, then fill the stack with a - * recognizable value that we can use later to test for high - * water marks. - */ - -#ifdef CONFIG_STACK_COLORATION - memset(tcb->stack_alloc_ptr, 0xaa, stack_size); -#endif - - /* The ZNeo uses a push-down stack: the stack grows toward lower - * addresses in memory. The stack pointer register, points to the - * lowest, valid work address (the "top" of the stack). Items on - * the stack are referenced as positive word offsets from sp. - */ - - top_of_stack = (uintptr_t)tcb->stack_alloc_ptr + stack_size; - - /* Align the stack to word (4 byte) boundaries. This is probably - * a greater alignment than is required. - */ - - top_of_stack &= ~3; - size_of_stack = top_of_stack - (uintptr_t)tcb->stack_alloc_ptr; - - /* Save the adjusted stack values in the struct tcb_s */ - - tcb->stack_base_ptr = tcb->stack_alloc_ptr; - tcb->adj_stack_size = size_of_stack; - tcb->flags |= TCB_FLAG_FREE_STACK; - - board_autoled_on(LED_STACKCREATED); - return OK; - } - - return ERROR; -} diff --git a/arch/z16/src/common/z16_exit.c b/arch/z16/src/common/z16_exit.c deleted file mode 100644 index c254eb2f77..0000000000 --- a/arch/z16/src/common/z16_exit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * arch/z16/src/common/z16_exit.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include - -#include -#include - -#include "chip.h" -#include "task/task.h" -#include "sched/sched.h" -#include "z16_internal.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_exit - * - * Description: - * This function causes the currently executing task to cease - * to exist. This is a special case of task_delete() where the task to - * be deleted is the currently executing task. It is more complex because - * a context switch must be perform to the next ready to run task. - * - ****************************************************************************/ - -void up_exit(int status) -{ - FAR struct tcb_s *tcb = this_task(); - - /* Destroy the task at the head of the ready to run list. */ - - nxtask_exit(); - - /* Now, perform the context switch to the new ready-to-run task at the - * head of the list. - */ - - tcb = this_task(); - sinfo("New Active Task TCB=%p\n", tcb); - - /* Adjusts time slice for SCHED_RR & SCHED_SPORADIC cases */ - - nxsched_resume_scheduler(tcb); - g_running_tasks[this_cpu()] = tcb; - - /* Then switch contexts */ - - RESTORE_USERCONTEXT(tcb); -} diff --git a/arch/z16/src/common/z16_idle.c b/arch/z16/src/common/z16_idle.c deleted file mode 100644 index 5c24bd051d..0000000000 --- a/arch/z16/src/common/z16_idle.c +++ /dev/null @@ -1,86 +0,0 @@ -/**************************************************************************** - * arch/z16/src/common/z16_idle.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include -#include -#include - -#include "z16_internal.h" - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -#if defined(CONFIG_ARCH_LEDS) && defined(CONFIG_ARCH_BRINGUP) -static uint8_t g_ledtoggle = 0; -#endif - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_idle - * - * Description: - * up_idle() is the logic that will be executed when their - * is no other ready-to-run task. This is processor idle - * time and will continue until some interrupt occurs to - * cause a context switch from the idle task. - * - * Processing in this state may be processor-specific. e.g., - * this is where power management operations might be - * performed. - * - ****************************************************************************/ - -void up_idle(void) -{ -#if defined(CONFIG_ARCH_LEDS) && defined(CONFIG_ARCH_BRINGUP) - g_ledtoggle++; - if (g_ledtoggle == 0x80) - { - board_autoled_on(LED_IDLE); - } - else if (g_ledtoggle == 0x00) - { - board_autoled_off(LED_IDLE); - } -#endif - -#if defined(CONFIG_SUPPRESS_INTERRUPTS) || defined(CONFIG_SUPPRESS_TIMER_INTS) - /* If the system is idle and there are no timer interrupts, - * then process "fake" timer interrupts. Hopefully, something - * will wake up. - */ - - nxsched_process_timer(); -#endif -} diff --git a/arch/z16/src/common/z16_initialize.c b/arch/z16/src/common/z16_initialize.c deleted file mode 100644 index 8ec2bd3491..0000000000 --- a/arch/z16/src/common/z16_initialize.c +++ /dev/null @@ -1,94 +0,0 @@ -/**************************************************************************** - * arch/z16/src/common/z16_initialize.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include -#include - -#include "z16_internal.h" - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/* This holds a references to the current interrupt level - * register storage structure. It is non-NULL only during - * interrupt processing. - */ - -volatile FAR chipreg_t *g_current_regs; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_initialize - * - * Description: - * up_initialize will be called once during OS initialization after the - * basic OS services have been initialized. The architecture specific - * details of initializing the OS will be handled here. Such things as - * setting up interrupt service routines, starting the clock, and - * registering device drivers are some of the things that are different - * for each processor and hardware platform. - * - * up_initialize is called after the OS initialized but before the user - * initialization logic has been started and before the libraries have - * been initialized. OS services and driver services are available. - * - ****************************************************************************/ - -void up_initialize(void) -{ -#if CONFIG_MM_REGIONS > 1 - /* Add any extra memory fragments to the memory manager */ - - z16_addregion(); -#endif - -#ifdef CONFIG_PM - /* Initialize the power management subsystem. This MCU-specific function - * must be called *very* early in the initialization sequence *before* any - * other device drivers are initialized (since they may attempt to register - * with the power management subsystem). - */ - - up_pminitialize(); -#endif - - /* Initialize the serial device driver */ - -#ifdef USE_SERIALDRIVER - z16_serialinit(); -#endif - - /* Initialize the network */ - - z16_netinitialize(); - - board_autoled_on(LED_IRQSENABLED); -} diff --git a/arch/z16/src/common/z16_initialstate.c b/arch/z16/src/common/z16_initialstate.c deleted file mode 100644 index f062f69c90..0000000000 --- a/arch/z16/src/common/z16_initialstate.c +++ /dev/null @@ -1,67 +0,0 @@ -/**************************************************************************** - * arch/z16/src/common/z16_initialstate.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include - -#include "chip.h" -#include "z16_internal.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_initial_state - * - * Description: - * A new thread is being started and a new TCB - * has been created. This function is called to initialize - * the processor specific portions of the new TCB. - * - * This function must setup the initial architecture registers - * and/or stack so that execution will begin at tcb->start - * on the next context switch. - * - ****************************************************************************/ - -void up_initial_state(struct tcb_s *tcb) -{ - uint32_t *reg32 = (uint32_t *)tcb->xcp.regs; - - /* Initialize the initial exception register context structure */ - - memset(&tcb->xcp, 0, sizeof(struct xcptcontext)); -#ifndef CONFIG_SUPPRESS_INTERRUPTS - tcb->xcp.regs[REG_FLAGS] = (uint16_t)Z16F_CNTRL_FLAGS_IRQE; /* IRQE flag will enable interrupts */ -#endif - reg32[REG_SP / 2] = (uint32_t)tcb->stack_base_ptr + - tcb->adj_stack_size; - reg32[REG_PC / 2] = (uint32_t)tcb->start; -} diff --git a/arch/z16/src/common/z16_internal.h b/arch/z16/src/common/z16_internal.h deleted file mode 100644 index 55d6980853..0000000000 --- a/arch/z16/src/common/z16_internal.h +++ /dev/null @@ -1,162 +0,0 @@ -/**************************************************************************** - * arch/z16/src/common/z16_internal.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z16_SRC_COMMON_Z16_INTERNAL_H -#define __ARCH_Z16_SRC_COMMON_Z16_INTERNAL_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include "chip.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Bring-up debug configurations. These are here (vs defconfig) - * because these should only be controlled during low level - * board bring-up and not part of normal platform configuration. - */ - -#undef CONFIG_Z16_LOWPUTC /* Support z16_lowputc for debug */ -#undef CONFIG_Z16_LOWGETC /* support z16_lowgetc for debug */ - -/* Determine which (if any) console driver to use. If a console is enabled - * and no other console device is specified, then a serial console is - * assumed. - */ - -#if defined(CONFIG_Z16_LOWPUTC) || defined(CONFIG_Z16_LOWGETC) -# define USE_LOWUARTINIT 1 -#elif !defined(CONFIG_DEV_CONSOLE) -# undef USE_SERIALDRIVER -# undef USE_EARLYSERIALINIT -#else -# if defined(CONFIG_CONSOLE_SYSLOG) -# undef USE_SERIALDRIVER -# undef USE_EARLYSERIALINIT -# else -# define USE_SERIALDRIVER 1 -# define USE_EARLYSERIALINIT 1 -# endif -#endif - -/* If some other device is used as the console, then the serial driver may - * still be needed. Let's assume that if the upper half serial driver is - * built, then the lower half will also be needed. There is no need for - * the early serial initialization in this case. - */ - -#if !defined(USE_SERIALDRIVER) && defined(CONFIG_STANDARD_SERIAL) -# define USE_SERIALDRIVER 1 -#endif - -/* Align the stack to word (4 byte) boundaries. This is probablya greater - * alignment than is required. - */ - -#define STACK_ALIGNMENT 4 - -/* Stack alignment macros */ - -#define STACK_ALIGN_MASK (STACK_ALIGNMENT - 1) -#define STACK_ALIGN_DOWN(a) ((a) & ~STACK_ALIGN_MASK) -#define STACK_ALIGN_UP(a) (((a) + STACK_ALIGN_MASK) & ~STACK_ALIGN_MASK) - -/* Macros for portability */ - -#define IN_INTERRUPT (up_current_regs() != NULL) -#define SAVE_IRQCONTEXT(tcb) z16_copystate((tcb)->xcp.regs, up_current_regs()) -#define SET_IRQCONTEXT(tcb) up_set_current_regs((tcb)->xcp.regs) -#define SAVE_USERCONTEXT(tcb) up_saveusercontext((tcb)->xcp.regs) -#define RESTORE_USERCONTEXT(tcb) z16_restoreusercontext((tcb)->xcp.regs) -#define SIGNAL_RETURN(regs) z16_restoreusercontext(regs) - -/* Register access macros ***************************************************/ - -#define getreg8(a) (*(uint8_t volatile _Near*)(a)) -#define putreg8(v,a) (*(uint8_t volatile _Near*)(a) = (v)) -#define getreg16(a) (*(uint16_t volatile _Near*)(a)) -#define putreg16(v,a) (*(uint16_t volatile _Near*)(a) = (v)) -#define getreg32(a) (*(uint32_t volatile _Near*)(a)) -#define putreg32(v,a) (*(uint32_t volatile _Near*)(a) = (v)) - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -typedef void (*up_vector_t)(void); -#endif - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifndef __ASSEMBLY__ - -/* Defined in files with the same name as the function */ - -void z16_copystate(FAR chipreg_t *dest, FAR chipreg_t *src); -FAR chipreg_t *z16_doirq(int irq, FAR chipreg_t *regs); -void z16_restoreusercontext(FAR chipreg_t *regs); -void z16_sigdeliver(void); - -#if defined(CONFIG_Z16_LOWPUTC) || defined(CONFIG_Z16_LOWGETC) -void z16_lowputc(char ch); -#else -# define z16_lowputc(ch) -#endif - -/* Defined in xyz_allocateheap.c */ - -#if CONFIG_MM_REGIONS > 1 -void z16_addregion(void); -#endif - -/* Defined in xyz_serial.c */ - -#ifdef USE_SERIALDRIVER -void z16_serialinit(void); -#endif - -#ifdef USE_EARLYSERIALINIT -void z16_earlyserialinit(void); -#endif - -/* Defined in xyz_irq.c */ - -void z16_ack_irq(int irq); - -/* Defined in board/xyz_network.c */ - -#if defined(CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT) -void z16_netinitialize(void); -#else -# define z16_netinitialize() -#endif - -#endif /* __ASSEMBLY__ */ - -#endif /* __ARCH_Z16_SRC_COMMON_Z16_INTERNAL_H */ diff --git a/arch/z16/src/common/z16_registerdump.c b/arch/z16/src/common/z16_registerdump.c deleted file mode 100644 index 2a3874f3ae..0000000000 --- a/arch/z16/src/common/z16_registerdump.c +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** - * arch/z16/src/common/z16_registerdump.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include - -#include "z16_internal.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_dump_register - ****************************************************************************/ - -void up_dump_register(FAR void *dumpregs) -{ -#ifdef CONFIG_DEBUG_INFO - FAR volatile uint32_t *regs = dumpregs ? dumpregs : up_current_regs(); - - _alert("R0 :%08x R1 :%08x R2 :%08x R3 :%08x " - "R4 :%08x R5 :%08x R6 :%08x R7 :%08x\n" - regs[REG_R0 / 2], regs[REG_R1 / 2], regs[REG_R2 / 2], - regs[REG_R3 / 2], regs[REG_R4 / 2], regs[REG_R5 / 2], - regs[REG_R6 / 2], regs[REG_R7 / 2]); - _alert("R8 :%08x R9 :%08x R10:%08x R11:%08x R12:%08x R13:%08x\n" - regs[REG_R8 / 2], regs[REG_R9 / 2], regs[REG_R10 / 2], - regs[REG_R11 / 2], regs[REG_R12 / 2], regs[REG_R13 / 2]); - _alert("FP :%08x SP :%08x FLG:%04x\n" - regs[REG_R14 / 2], regs[REG_R15 / 2], regs[REG_FLAGS]); -#endif -} diff --git a/arch/z16/src/common/z16_releasestack.c b/arch/z16/src/common/z16_releasestack.c deleted file mode 100644 index a278b1cad9..0000000000 --- a/arch/z16/src/common/z16_releasestack.c +++ /dev/null @@ -1,89 +0,0 @@ -/**************************************************************************** - * arch/z16/src/common/z16_releasestack.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include - -#include -#include - -#include "z16_internal.h" - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_release_stack - * - * Description: - * A task has been stopped. Free all stack related resources retained in - * the defunct TCB. - * - * Input Parameters: - * - dtcb: The TCB containing information about the stack to be released - * - ttype: The thread type. This may be one of following (defined in - * include/nuttx/sched.h): - * - * TCB_FLAG_TTYPE_TASK Normal user task - * TCB_FLAG_TTYPE_PTHREAD User pthread - * TCB_FLAG_TTYPE_KERNEL Kernel thread - * - * This thread type is normally available in the flags field of the TCB, - * however, there are certain error recovery contexts where the TCB may - * not be fully initialized when up_release_stack is called. - * - * Returned Value: - * None - * - ****************************************************************************/ - -void up_release_stack(FAR struct tcb_s *dtcb, uint8_t ttype) -{ - /* Is there a stack allocated? */ - - if (dtcb->stack_alloc_ptr && (dtcb->flags & TCB_FLAG_FREE_STACK)) - { - kumm_free(dtcb->stack_alloc_ptr); - } - - /* Mark the stack freed */ - - dtcb->flags &= ~TCB_FLAG_FREE_STACK; - dtcb->stack_alloc_ptr = NULL; - dtcb->stack_base_ptr = NULL; - dtcb->adj_stack_size = 0; -} diff --git a/arch/z16/src/common/z16_schedulesigaction.c b/arch/z16/src/common/z16_schedulesigaction.c deleted file mode 100644 index 5a628ad586..0000000000 --- a/arch/z16/src/common/z16_schedulesigaction.c +++ /dev/null @@ -1,160 +0,0 @@ -/**************************************************************************** - * arch/z16/src/common/z16_schedulesigaction.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include - -#include -#include - -#include "sched/sched.h" -#include "z16_internal.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_schedule_sigaction - * - * Description: - * This function is called by the OS when one or more - * signal handling actions have been queued for execution. - * The architecture specific code must configure things so - * that the 'sigdeliver' callback is executed on the thread - * specified by 'tcb' as soon as possible. - * - * This function may be called from interrupt handling logic. - * - * This operation should not cause the task to be unblocked - * nor should it cause any immediate execution of sigdeliver. - * Typically, a few cases need to be considered: - * - * (1) This function may be called from an interrupt handler - * During interrupt processing, all xcptcontext structures - * should be valid for all tasks. That structure should - * be modified to invoke sigdeliver() either on return - * from (this) interrupt or on some subsequent context - * switch to the recipient task. - * (2) If not in an interrupt handler and the tcb is NOT - * the currently executing task, then again just modify - * the saved xcptcontext structure for the recipient - * task so it will invoke sigdeliver when that task is - * later resumed. - * (3) If not in an interrupt handler and the tcb IS the - * currently executing task -- just call the signal - * handler now. - * - * Assumptions: - * Called from critical section - * - ****************************************************************************/ - -void up_schedule_sigaction(FAR struct tcb_s *tcb) -{ - sinfo("tcb=%p, rtcb=%p current_regs=%p\n", tcb, - this_task(), up_current_regs()); - - /* First, handle some special cases when the signal is - * being delivered to the currently executing task. - */ - - if (tcb == this_task()) - { - /* CASE 1: We are not in an interrupt handler and - * a task is signalling itself for some reason. - */ - - if (!up_current_regs()) - { - /* In this case just deliver the signal now. */ - - (tcb->sigdeliver)(tcb); - tcb->sigdeliver = NULL; - } - - /* CASE 2: We are in an interrupt handler AND the interrupted - * task is the same as the one that must receive the signal, then - * we will have to modify the return state as well as the state - * in the TCB. - */ - - else - { - FAR uint32_t *current_pc = - (FAR uint32_t *)&up_current_regs()[REG_PC]; - - /* Save the return address and interrupt state. These will be - * restored by the signal trampoline after the signals have - * been delivered. - */ - - tcb->xcp.saved_pc = *current_pc; - tcb->xcp.saved_i = up_current_regs()[REG_FLAGS]; - - /* Then set up to vector to the trampoline with interrupts - * disabled - */ - - *current_pc = (uint32_t)z16_sigdeliver; - up_current_regs()[REG_FLAGS] = 0; - - /* And make sure that the saved context in the TCB is the - * same as the interrupt return context. - */ - - z16_copystate(tcb->xcp.regs, up_current_regs()); - } - } - - /* Otherwise, we are (1) signaling a task is not running from an - * interrupt handler or (2) we are not in an interrupt handler - * and the running task is signalling some non-running task. - */ - - else - { - FAR uint32_t *saved_pc = (FAR uint32_t *)&tcb->xcp.regs[REG_PC]; - - /* Save the return lr and cpsr and one scratch register - * These will be restored by the signal trampoline after - * the signals have been delivered. - */ - - tcb->xcp.saved_pc = *saved_pc; - tcb->xcp.saved_i = tcb->xcp.regs[REG_FLAGS]; - - /* Then set up to vector to the trampoline with interrupts - * disabled - */ - - *saved_pc = (uint32_t)z16_sigdeliver; - tcb->xcp.regs[REG_FLAGS] = 0; - } -} diff --git a/arch/z16/src/common/z16_sigdeliver.c b/arch/z16/src/common/z16_sigdeliver.c deleted file mode 100644 index f820350595..0000000000 --- a/arch/z16/src/common/z16_sigdeliver.c +++ /dev/null @@ -1,110 +0,0 @@ -/**************************************************************************** - * arch/z16/src/common/z16_sigdeliver.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "sched/sched.h" -#include "z16_internal.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: z16_sigdeliver - * - * Description: - * This is the a signal handling trampoline. When a signal action was - * posted. The task context was mucked with and forced to branch to this - * location with interrupts disabled. - * - ****************************************************************************/ - -void z16_sigdeliver(void) -{ - FAR struct tcb_s *rtcb = this_task(); - chipreg_t regs[XCPTCONTEXT_REGS]; - FAR uint32_t *regs32 = (FAR uint32_t *)regs; - - board_autoled_on(LED_SIGNAL); - - sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head); - DEBUGASSERT(rtcb->sigdeliver != NULL); - - /* Save the return state on the stack. */ - - z16_copystate(regs, rtcb->xcp.regs); - -#ifndef CONFIG_SUPPRESS_INTERRUPTS - /* Then make sure that interrupts are enabled. Signal handlers must always - * run with interrupts enabled. - */ - - up_irq_enable(); -#endif - - /* Deliver the signals */ - - (rtcb->sigdeliver)(rtcb); - - /* Output any debug messages BEFORE restoring errno (because they may - * alter errno), then disable interrupts again and restore the original - * errno that is needed by the user logic (it is probably EINTR). - */ - - sinfo("Resuming\n"); - up_irq_save(); - - /* Modify the saved return state with the actual saved values in the - * TCB. This depends on the fact that nested signal handling is - * not supported. Therefore, these values will persist throughout the - * signal handling action. - * - * Keeping this data in the TCB resolves a security problem in protected - * and kernel mode: The regs[] array is visible on the user stack and - * could be modified by a hostile program. - */ - - regs32[REG_PC / 2] = rtcb->xcp.saved_pc; - regs[REG_FLAGS] = rtcb->xcp.saved_i; - rtcb->sigdeliver = NULL; /* Allows next handler to be scheduled */ - - /* Then restore the correct state for this thread of execution. */ - - board_autoled_off(LED_SIGNAL); - SIGNAL_RETURN(regs); -} diff --git a/arch/z16/src/common/z16_stackframe.c b/arch/z16/src/common/z16_stackframe.c deleted file mode 100644 index 66944be726..0000000000 --- a/arch/z16/src/common/z16_stackframe.c +++ /dev/null @@ -1,100 +0,0 @@ -/**************************************************************************** - * arch/z16/src/common/z16_stackframe.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include -#include - -#include -#include - -#include "z16_internal.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_stack_frame - * - * Description: - * Allocate a stack frame in the TCB's stack to hold thread-specific data. - * This function may be called anytime after up_create_stack() or - * up_use_stack() have been called but before the task has been started. - * - * Thread data may be kept in the stack (instead of in the TCB) if it is - * accessed by the user code directly. This includes such things as - * argv[]. The stack memory is guaranteed to be in the same protection - * domain as the thread. - * - * The following TCB fields will be re-initialized: - * - * - adj_stack_size: Stack size after removal of the stack frame from - * the stack - * - stack_base_ptr: Adjusted stack base pointer after the TLS Data and - * Arguments has been removed from the stack allocation. - * - * Input Parameters: - * - tcb: The TCB of new task - * - frame_size: The size of the stack frame to allocate. - * - * Returned Value: - * - A pointer to bottom of the allocated stack frame. NULL will be - * returned on any failures. The alignment of the returned value is - * the same as the alignment of the stack itself. - * - ****************************************************************************/ - -FAR void *up_stack_frame(FAR struct tcb_s *tcb, size_t frame_size) -{ - FAR void *ret; - - /* Align the frame_size */ - - frame_size = STACK_ALIGN_UP(frame_size); - - /* Is there already a stack allocated? Is it big enough? */ - - if (!tcb->stack_alloc_ptr || tcb->adj_stack_size <= frame_size) - { - return NULL; - } - - ret = tcb->stack_base_ptr; - memset(ret, 0, frame_size); - - /* Save the adjusted stack values in the struct tcb_s */ - - tcb->stack_base_ptr = (FAR uint8_t *)tcb->stack_base_ptr + frame_size; - tcb->adj_stack_size -= frame_size; - - /* And return a pointer to the allocated memory */ - - return ret; -} diff --git a/arch/z16/src/common/z16_usestack.c b/arch/z16/src/common/z16_usestack.c deleted file mode 100644 index 90689d65d0..0000000000 --- a/arch/z16/src/common/z16_usestack.c +++ /dev/null @@ -1,111 +0,0 @@ -/**************************************************************************** - * arch/z16/src/common/z16_usestack.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "z16_internal.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_use_stack - * - * Description: - * Setup up stack-related information in the TCB using pre-allocated stack - * memory. This function is called only from nxtask_init() when a task or - * kernel thread is started (never for pthreads). - * - * The following TCB fields must be initialized: - * - * - adj_stack_size: Stack size after adjustment for hardware, - * processor, etc. This value is retained only for debug - * purposes. - * - stack_alloc_ptr: Pointer to allocated stack - * - stack_base_ptr: Adjusted stack base pointer after the TLS Data and - * Arguments has been removed from the stack allocation. - * - * Input Parameters: - * - tcb: The TCB of new task - * - stack_size: The allocated stack size. - * - * NOTE: Unlike up_stack_create() and up_stack_release, this function - * does not require the task type (ttype) parameter. The TCB flags will - * always be set to provide the task type to up_use_stack() if it needs - * that information. - * - ****************************************************************************/ - -int up_use_stack(FAR struct tcb_s *tcb, FAR void *stack, size_t stack_size) -{ - uintptr_t top_of_stack; - size_t size_of_stack; - -#ifdef CONFIG_TLS_ALIGNED - /* Make certain that the user provided stack is properly aligned */ - - DEBUGASSERT(((uintptr_t)stack & TLS_STACK_MASK) == 0); -#endif - - /* Is there already a stack allocated? */ - - if (tcb->stack_alloc_ptr) - { - /* Yes.. Release the old stack allocation */ - - up_release_stack(tcb, tcb->flags & TCB_FLAG_TTYPE_MASK); - } - - /* Save the new stack allocation */ - - tcb->stack_alloc_ptr = stack; - tcb->stack_base_ptr = (void *)STACK_ALIGN_UP((uintptr_t)stack); - - top_of_stack = STACK_ALIGN_DOWN((uintptr_t)stack + stack_size); - size_of_stack = top_of_stack - (uintptr_t)tcb->stack_base_ptr; - tcb->adj_stack_size = size_of_stack; - - /* If stack debug is enabled, then fill the stack with a recognizable value - * that we can use later to test for high water marks. - */ - -#ifdef CONFIG_STACK_COLORATION - memset(tcb->stack_alloc_ptr, 0xaa, stack_size); -#endif - - return OK; -} diff --git a/arch/z16/src/z16f/Kconfig b/arch/z16/src/z16f/Kconfig deleted file mode 100644 index 88a2ec2cd1..0000000000 --- a/arch/z16/src/z16f/Kconfig +++ /dev/null @@ -1,59 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_CHIP_Z16F -comment "Z16F Configuration Options" - -menu "Z16F Peripheral Selection" - -config Z16F_ESPI - bool "ESPI" - default n - select SPI - -# UART0/1 always enabled - -config Z16F_UART0 - bool "UART0" - default y - select UART0_SERIALDRIVER - -config Z16F_UART1 - bool "UART1" - default y - select UART1_SERIALDRIVER - -endmenu # Z16F Peripheral Selection - -menu "Z16F ESPI Configuration" - depends on Z16F_ESPI - -config Z16F_ESPI_REGDEBUG - bool "ESPI register-level debug" - default n - depends on DEBUG_FEATURES - -endmenu # Z16F ESPI Configuration - -# The ZiLOG ZDS-II Windows toolchain is the only toolchain available for -# the ZNeo. -# - -choice - prompt "ZDS-II Toolchain version" - default Z16F_ZDSII_V522 - -config Z16F_ZDSII_V501 - bool "ZDS-II 5.0.1" - -config Z16F_ZDSII_V521 - bool "ZDS-II 5.2.1" - -config Z16F_ZDSII_V522 - bool "ZDS-II 5.2.2" - -endchoice # ZDS-II Toolchain version - -endif # ARCH_CHIP_Z16F diff --git a/arch/z16/src/z16f/Make.defs b/arch/z16/src/z16f/Make.defs deleted file mode 100644 index d48204ad07..0000000000 --- a/arch/z16/src/z16f/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# arch/z16/src/z16f/Make.defs -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -HEAD_SSRC = z16f_head.S - -CMN_CSRCS = z16_allocateheap.c z16_copystate.c z16_createstack.c z16_doirq.c -CMN_CSRCS += z16_exit.c z16_initialstate.c z16_initialize.c z16_idle.c -CMN_CSRCS += z16_mdelay.c z16_nputs.c z16_registerdump.c z16_releasestack.c -CMN_CSRCS += z16_schedulesigaction.c z16_sigdeliver.c z16_switchcontext.c -CMN_CSRCS += z16_stackframe.c z16_udelay.c z16_usestack.c - -CHIP_SSRCS = z16f_lowuart.S z16f_saveusercontext.S z16f_restoreusercontext.S -CHIP_CSRCS = z16f_clkinit.c z16f_sysexec.c z16f_irq.c z16f_serial.c - -ifneq ($(CONFIG_SCHED_TICKLESS),y) -CHIP_CSRCS += z16f_timerisr.c -endif - -ifeq ($(CONFIG_Z16F_ESPI),y) -CHIP_CSRCS += z16f_espi.c -endif diff --git a/arch/z16/src/z16f/Toolchain.defs b/arch/z16/src/z16f/Toolchain.defs deleted file mode 100644 index 353cf10b62..0000000000 --- a/arch/z16/src/z16f/Toolchain.defs +++ /dev/null @@ -1,122 +0,0 @@ -############################################################################ -# arch/z16/src/z16f/Toolchain.defs -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -# These are the default directories where the ZDS-II toolchain is installed. -# NOTE that short 8.3 path names are used in order to avoid spaces. On my -# machine I have: -# -# Versions 5.0.1 -# C:\PROGRA~1\ = C:\Program Files\ -# C:\PROGRA~2\ = C:\Program Files (x86)\ -# -# Your PC may be configured differently. -# -# Version 5.2.1, the default install location is C:\ZiLOG - -ifeq ($(CONFIG_Z16F_ZDSII_V511),y) -INSTALLROOT = C:/PROGRA~2/ZiLOG -ZDSVERSION := 5.0.1 -else ifeq ($(CONFIG_Z16F_ZDSII_V521),y) -INSTALLROOT = C:/ZiLOG -ZDSVERSION := 5.2.1 -else ifeq ($(CONFIG_Z16F_ZDSII_V522),y) -INSTALLROOT = C:/ZiLOG -ZDSVERSION := 5.2.2 -endif - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) - ZDSINSTALLDIR = $(INSTALLROOT)/ZDSII_ZNEO_$(ZDSVERSION) - INSTALLDIR = $(shell echo $(ZDSINSTALLDIR)| sed -e "s/\//\\/g") - ZDSBINDIR = $(INSTALLDIR)\bin - ZDSSTDINCDIR = $(INSTALLDIR)\include\std - ZDSZILOGINCDIR = $(INSTALLDIR)\include\zilog - ZDSSTDLIBDIR = $(INSTALLDIR)\lib\std - ZDSZILOGLIBDIR = $(INSTALLDIR)\lib\zilog -else - ZDSINSTALLDIR = $(INSTALLROOT)/ZDSII_ZNEO_$(ZDSVERSION) - INSTALLDIR = $(shell cygpath -u "$(ZDSINSTALLDIR)") - ZDSBINDIR = $(INSTALLDIR)/bin - ZDSSTDINCDIR = $(INSTALLDIR)/include/std - ZDSZILOGINCDIR = $(INSTALLDIR)/include/zilog - ZDSSTDLIBDIR = $(INSTALLDIR)/lib/std - ZDSZILOGLIBDIR = $(INSTALLDIR)/lib/zilog - - # These are the same directories but with the directory separator - # character swapped as needed by the ZDS-II compiler - - WTOPDIR = $(shell cygpath -w "$(TOPDIR)") - WZDSSTDINCDIR = $(shell cygpath -w "$(ZDSSTDINCDIR)") - WZDSZILOGINCDIR = $(shell cygpath -w "$(ZDSZILOGINCDIR)") - WZDSSTDLIBDIR = $(shell cygpath -w "$(ZDSSTDLIBDIR)") - WZDSZILOGLIBDIR = $(shell cygpath -w "$(ZDSZILOGLIBDIR)") - - # Escaped versions - - ETOPDIR = $(shell echo "$(WTOPDIR)" | sed -e "s/ /%20/g") - EZDSSTDINCDIR = $(shell echo "$(WZDSSTDINCDIR)" | sed -e "s/ /%20/g") - EZDSZILOGINCDIR = $(shell echo "$(WZDSZILOGINCDIR)" | sed -e "s/ /%20/g") -endif - -# CPU Identification - -ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - ARCHOPTIMIZATION = -debug - ARCHASMOPTIMIZATION = -debug -else - ARCHOPTIMIZATION = -nodebug - ARCHASMOPTIMIZATION = -nodebug -endif - -ifeq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += -NOregvar -reduceopt -else - ARCHOPTIMIZATION += -regvar -endif - -# Tool names/paths - -CROSSDEV = -CC = $(ZDSBINDIR)$(DELIM)zneocc.exe -CPP = gcc -E -P -x c -LD = $(ZDSBINDIR)$(DELIM)zneolink.exe -AS = $(ZDSBINDIR)$(DELIM)zneoasm.exe -AR = $(ZDSBINDIR)$(DELIM)zneolib.exe - -# File extensions - -ASMEXT = .asm -OBJEXT = .obj -LIBEXT = .lib -EXEEXT = .hex - -# Loadable module definitions - -CMODULEFLAGS = $(CFLAGS) -fvisibility=hidden -LDMODULEFLAGS = -r -T $(call CONVERT_PATH,$(TOPDIR)/libs/libc/elf/gnu-elf.ld) - -# ELF module definitions - -CELFFLAGS = $(CFLAGS) -fvisibility=hidden -CXXELFFLAGS = $(CXXFLAGS) -fvisibility=hidden - -LDELFFLAGS = -r -e main -LDELFFLAGS += -T $(call CONVERT_PATH,$(TOPDIR)$(DELIM)libs$(DELIM)libc$(DELIM)elf$(DELIM)gnu-elf.ld) diff --git a/arch/z16/src/z16f/chip.h b/arch/z16/src/z16f/chip.h deleted file mode 100644 index e763081f76..0000000000 --- a/arch/z16/src/z16f/chip.h +++ /dev/null @@ -1,690 +0,0 @@ -/**************************************************************************** - * arch/z16/src/z16f/chip.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z16_SRC_Z16F_CHIP_H -#define __ARCH_Z16_SRC_Z16F_CHIP_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#ifndef __ASSEMBLY__ -# include -#endif - -#include -#if !defined(__ASSEMBLY__) && defined(CONFIG_Z16F_ESPI) -# include -#endif - -#include "z16_internal.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Hexadecimal Representation ***********************************************/ - -#ifdef __ASSEMBLY__ -# define _HX32(w) %##w -# define _HX8(b) %##b -#else -# define _HX32(w) 0x##w -# define _HX8(b) 0x##b -#endif - -/* Z16F Chip Variants *******************************************************/ - -#if defined(CONFIG_ARCH_CHIP_Z16F2810) -# define Z16F_INVMEM_SIZE (128*1024) -# define Z16F_IRAM_SIZE (4*1024) -# undef Z16F_HAVE_EXTMEM -# undef Z16F_HAVE_GPIO_PORTJ -# undef Z16F_HAVE_GPIO_PORTK -#elif defined(CONFIG_ARCH_CHIP_Z16F2811) -# define Z16F_INVMEM_SIZE (128*1024) -# define Z16F_IRAM_SIZE (4*1024) -# define Z16F_HAVE_EXTMEM 1 -# define Z16F_HAVE_GPIO_PORTJ 1 -# define Z16F_HAVE_GPIO_PORTK 1 -#elif defined(CONFIG_ARCH_CHIP_Z16F3211) -# define Z16F_INVMEM_SIZE (32*1024) -# define Z16F_IRAM_SIZE (2*1024) -# define Z16F_HAVE_EXTMEM 1 -#elif defined(CONFIG_ARCH_CHIP_Z16F6411) -# define Z16F_INVMEM_SIZE (64*1024) -# define Z16F_IRAM_SIZE (4*1024) -# define Z16F_HAVE_EXTMEM 1 -#else -# error "Z16F chip variant not specified" -#endif - -/* Flash option settings at address 0x00000000 ******************************/ - -#define Z16F_FLOPTION0 rom char _flash_option0 _At 0x0 -#define Z16F_FLOPTION1 rom char _flash_option1 _At 0x1 -#define Z16F_FLOPTION2 rom char _flash_option2 _At 0x2 -#define Z16F_FLOPTION3 rom char _flash_option3 _At 0x3 - -#define Z16F_FLOPTION0_OSCSEL _HX8(c0) /* Bits 6-7: OSC_SEL */ -#define Z16F_FLOPTION0_EXTRNRC _HX8(00) /* 00: On-chip oscillator with ext RC networks */ -#define Z16F_FLOPTION0_LOWFREQ _HX8(40) /* 01: Min. power with very low frequency crystals */ -#define Z16F_FLOPTION0_MEDFREQ _HX8(80) /* 10: Medium power with medium frequency crystals */ -#define Z16F_FLOPTION0_MAXPWR _HX8(c0) /* 11: Maximum power with high frequency crystals */ -#define Z16F_FLOPTION0_WDTRES _HX8(20) /* Bit 5: WDT Reset */ -#define Z16F_FLOPTION0_WDTA0 _HX8(10) /* Bit 4: WDT Always On */ -#define Z16F_FLOPTION0_VBOA0 _HX8(08) /* Bit 3: Voltage Brown-Out Protection Always On */ -#define Z16F_FLOPTION0_DBGUART _HX8(04) /* Bit 2: Debug UART Enable */ -#define Z16F_FLOPTION0_FWP _HX8(02) /* Bit 1: Flash Write Protect */ -#define Z16F_FLOPTION0_RP _HX8(01) /* Bit 0: Read Protect */ - -#define Z16F_FLOPTION1_RESVD _HX8(f8) /* Bits 3-7: Reserved */ -#define Z16F_FLOPTION1_MCEN _HX8(04) /* Bit 2: Motor control pins enable */ -#define Z16F_FLOPTION1_OFFH _HX8(02) /* Bit 1: High side OFF */ -#define Z16F_FLOPTION1_OFFL _HX8(01) /* Bit 0: Low side OFF */ - -#define Z16F_FLOPTION2_RESVD _HX8(ff) /* Bits 0-7: reserved */ - -#define Z16F_FLOPTION3_ROMLESS _HX8(80) /* Bit 7: ROMLESS 16 Select */ -#define Z16F_FLOPTION3_NORMAL _HX8(40) /* Bit 6: 1:Normal 0:Low power mode */ -#define Z16F_FLOPTION3_RESVD _HX8(3f) /* Bits 0-5: Reserved */ - -/* Memory areas ************************************************************* - * - * Internal non-volatile memory starts at address zero. The size - * of the internal non-volatile memory is chip-dependent. - */ - -#define Z16F_INVMEM_BASE _HX32(00000000) - -/* Most chip variants support external memory */ - -#ifdef Z16F_HAVE_EXTMEM -# define Z16F_EXTMEMCS0_BASE _HX32(00000000) /* External memory at CS0 */ -# define Z16F_EXTMEMCS0_SIZE _HX32(007e0000) /* (actual depends on board) */ -# define Z16F_EXTMEMCS1_BASE _HX32(ff800000) /* External memory at CS1 */ -# define Z16F_EXTMEMCS1_SIZE _HX32(00700000) /* (actual depends on board) */ -# define Z16F_EXTMEMCS2A_BASE _HX32(fff00000) /* External memory at CS2 */ -# define Z16F_EXTMEMCS2A_SIZE _HX32(000f8000) /* (actual depends on board) */ -# define Z16F_EXTMEMCS2B_BASE _HX32(ffffc000) /* External memory at CS2 */ -# define Z16F_EXTMEMCS2B_SIZE _HX32(00000800) /* (actual depends on board) */ -#endif - -/* Internal RAM always ends at 0xffbfff. The IRAM base address depends - * on the size of the IRAM supported by the chip. - */ - -#define Z16F_IRAM_BASE (_HX32(ffffc000) - Z16F_IRAM_SIZE) - -/* External memory mapped peripherals, internal I/O memory and SFRS */ - -#define Z16F_EXTIO_BASE _HX32(ffffc800) /* External peripherals CS3-5 */ -#define Z16F_EXTIO_SIZE _HX32(00001800) -#define Z16F_IIO_BASE _HX32(ffffe000) /* Internal I/O memory and SFRs */ -#define Z16F_IIO_SIZE _HX32(00001fff) - -/* Control Registers *******************************************************/ - -#define Z16F_CNTRL_PCOV _HX32(ffffe004) /* 32-bits: Program counter overflow */ -#define Z16F_CNTRL_SPOV _HX32(ffffe00c) /* 32-bits: Stack pointer overflow */ -#define Z16F_CNTRL_FLAGS _HX32(ffffe100) /* 8-bits: flags */ -#define Z16F_CNTRL_CPUCTL _HX32(ffffe102) /* 8-bits: CPU control */ - -/* Flag register bits *******************************************************/ - -#define Z16F_CNTRL_FLAGS_C _HX8(80) /* Bit 7: Carry flag */ -#define Z16F_CNTRL_FLAGS_Z _HX8(40) /* Bit 6: Zero flag */ -#define Z16F_CNTRL_FLAGS_S _HX8(20) /* Bit 5: Sign flag */ -#define Z16F_CNTRL_FLAGS_V _HX8(10) /* Bit 4: Overflow flag */ -#define Z16F_CNTRL_FLAGS_B _HX8(08) /* Bit 3: Blank flag */ -#define Z16F_CNTRL_FLAGS_F1 _HX8(04) /* Bit 2: User flag 1 */ -#define Z16F_CNTRL_FLAGS_CIRQE _HX8(02) /* Bit 1: Chained interrupt enable */ -#define Z16F_CNTRL_FLAGS_IRQE _HX8(01) /* Bit 0: Master interrupt enable */ - -/* CPU control register bits ************************************************/ - - /* Bits 7-2: Reserved, must be - * zero - */ - - /* Bits 1-0: DMA bandwidth - * control - */ - -#define Z16F_CNTRL_CPUCTL_BWALL _HX8(00) /* DMA can consume 100% bandwidth */ -#define Z16F_CNTRL_CPUCTL_BW11 _HX8(01) /* DMA can do 1 transaction per 1 cycle */ -#define Z16F_CNTRL_CPUCTL_BW12 _HX8(01) /* DMA can do 1 transaction per 2 cycles */ -#define Z16F_CNTRL_CPUCTL_BW13 _HX8(01) /* DMA can do 1 transaction per 3 cycles */ - -/* Trace registers **********************************************************/ - -#define Z16F_TRACE_CTL _HX32(ffffe013) /* 8-bit: Trace Control */ -#define Z16F_TRACE_ADDR _HX32(ffffe014) /* 32-bit: Trace Address */ - -/* Interrupt controller registers *******************************************/ - -#define Z16F_SYSEXCP _HX32(ffffe020) /* 16-bit: System Exception Status */ -# define Z16F_SYSEXCPH _HX32(ffffe020) /* 8-bit: System Exception Status High */ -# define Z16F_SYSEXCPL _HX32(ffffe021) /* 8-bit: System Exception Status Low */ -#define Z16F_LASTIRQ _HX32(ffffe023) /* 8-bit: Last IRQ Register */ -#define Z16F_IRQ0 _HX32(ffffe030) /* 8-bit: Interrupt Request 0 */ -#define Z16F_IRQ0_SET _HX32(ffffe031) /* 8-bit: Interrupt Request 0 Set */ -#define Z16F_IRQ0_EN _HX32(ffffe032) /* 16-bit: IRQ0 Enable */ -# define Z16F_IRQ0_ENH _HX32(ffffe032) /* 8-bit: IRQ0 Enable High Bit */ -# define Z16F_IRQ0_ENL _HX32(ffffe033) /* 8-bit: IRQ0 Enable Low Bit */ -#define Z16F_IRQ1 _HX32(ffffe034) /* 8-bit: Interrupt Request 1 */ -#define Z16F_IRQ1_SET _HX32(ffffe035) /* 8-bit: Interrupt Request 1 Set */ -#define Z16F_IRQ1_EN _HX32(ffffe036) /* 16-bit: IRQ1 Enable */ -# define Z16F_IRQ1_ENH _HX32(ffffe036) /* 8-bit: IRQ1 Enable High Bit */ -# define Z16F_IRQ1_ENL _HX32(ffffe037) /* 8-bit: IRQ1 Enable Low Bit */ -#define Z16F_IRQ2 _HX32(ffffe038) /* 8-bit: Interrupt Request 2 */ -#define Z16F_IRQ2_SET _HX32(ffffe039) /* 8-bit Interrupt Request 2 Set */ -#define Z16F_IRQ2_EN _HX32(ffffe03a) /* 16-bit: IRQ2 Enable */ -# define Z16F_IRQ2_ENH _HX32(ffffe03a) /* 8-bit: IRQ2 Enable High Bit */ -# define Z16F_IRQ2_ENL _HX32(ffffe03c) /* 8-bit: IRQ2 Enable Low Bit */ - -/* System exception status register bit definitions *************************/ - -#define Z16F_SYSEXCPH_SPOVF _HX8(80) /* Bit 7: Stack pointer overflow */ -#define Z16F_SYSEXCPH_PCOVF _HX8(40) /* Bit 6: Program counter overflow */ -#define Z16F_SYSEXCPH_DIV0 _HX8(20) /* Bit 5: Divide by zero */ -#define Z16F_SYSEXCPH_DIVOVF _HX8(10) /* Bit 4: Divide overflow */ -#define Z16F_SYSEXCPH_ILL _HX8(08) /* Bit 3: Illegal instruction */ - /* Bits 0-2: Reserved */ - /* Bits 3-7: Reserved */ -#define Z16F_SYSEXCPL_WDTOSC _HX8(04) /* Bit 2: WDT oscillator failure */ -#define Z16F_SYSEXCPL_PRIOSC _HX8(02) /* Bit 1: Primary oscillator failure */ -#define Z16F_SYSEXCPL_WDT _HX8(01) /* Bit 0: Watchdog timer interrupt */ - -#define Z16F_SYSEXCP_SPOVF (Z16F_SYSEXCPH_SPOVF << 8) -#define Z16F_SYSEXCP_PCOVF (Z16F_SYSEXCPH_PCOVF << 8) -#define Z16F_SYSEXCP_DIV0 (Z16F_SYSEXCPH_DIV0 << 8) -#define Z16F_SYSEXCP_DIVOVF (Z16F_SYSEXCPH_DIVOVF << 8) -#define Z16F_SYSEXCP_ILL (Z16F_SYSEXCPH_ILL << 8) -#define Z16F_SYSEXCP_WDTOSC Z16F_SYSEXCPL_WDTOSC -#define Z16F_SYSEXCP_PRIOSC Z16F_SYSEXCPL_PRIOSC -#define Z16F_SYSEXCP_WDT Z16F_SYSEXCPL_WDT - -/* External memory interface ************************************************/ - -#define Z16F_EXTCT _HX32(ffffe070) /* External Interface Control */ -#define Z16F_EXTCS0 _HX32(ffffe072) /* Chip Select 0 Control */ -# define Z16F_EXTCS0H _HX32(ffffe072) /* Chip Select 0 Control High */ -# define Z16F_EXTCS0L _HX32(ffffe073) /* Chip Select 0 Control Low */ -#define Z16F_EXTCS1 _HX32(ffffe074) /* Chip Select 1 Control */ -# define Z16F_EXTCS1H _HX32(ffffe074) /* Chip Select 1 Control High */ -# define Z16F_EXTCS1L _HX32(ffffe075) /* Chip Select 1 Control Low */ -#define Z16F_EXTCS2 _HX32(ffffe076) /* Chip Select 2 Control */ -# define Z16F_EXTCS2H _HX32(ffffe076) /* Chip Select 2 Control High */ -# define Z16F_EXTCS2L _HX32(ffffe077) /* Chip Select 2 Control Low */ -#define Z16F_EXTCS3 _HX32(ffffe078) /* Chip Select 3 Control */ -# define Z16F_EXTCS3H _HX32(ffffe078) /* Chip Select 3 Control High */ -# define Z16F_EXTCS3L _HX32(ffffe079) /* Chip Select 3 Control Low */ -#define Z16F_EXTCS4 _HX32(ffffe07a) /* Chip Select 4 Control */ -# define Z16F_EXTCS4H _HX32(ffffe07a) /* Chip Select 4 Control High */ -# define Z16F_EXTCS4L _HX32(ffffe07b) /* Chip Select 4 Control Low */ -#define Z16F_EXTCS5 _HX32(ffffe07c) /* Chip Select 5 Control */ -# define Z16F_EXTCS5H _HX32(ffffe07c) /* Chip Select 5 Control High */ -# define Z16F_EXTCS5L _HX32(ffffe07d) /* Chip Select 5 Control Low */ - -/* Oscillator control registers *********************************************/ - -#define Z16F_OSC_CTL _HX32(ffffe0A0) /* 8-bit: Oscillator Control */ -#define Z16F_OSC_DIV _HX32(ffffe0A1) /* 8-bit: Oscillator Divide */ - -/* Oscillator control register bits *****************************************/ - -#define Z16F_OSCCTL_INTEN _HX8(80) /* Bit 7: Internal oscillator enabled */ -#define Z16F_OSCCTL_XTLEN _HX8(40) /* Bit 6: Crystal oscillator enabled */ -#define Z16F_OSCCTL_WDTEN _HX8(20) /* Bit 5: Watchdog timer enabled */ -#define Z16F_OSCCTL_POFEN _HX8(10) /* Bit 4: Failure detection enabled */ -#define Z16F_OSCCTL_WDFEN _HX8(08) /* Bit 3: WD Failure detection enabled*/ -#define Z16F_OSCCTL_FLPEN _HX8(04) /* Bit 2: Flash low power enabled */ -#define Z16F_OSCCTL_INT56 _HX8(00) /* Bits 0-1=0: Internal 5.6 MHz */ -#define Z16F_OSCCTL_EXTCLK _HX8(02) /* Bits 0-1=2: External clock */ -#define Z16F_OSCCTL_WDT10KHZ _HX8(03) /* Bits 0-1=3: WD Timer 10 KHz*/ - -/* GPIO Port A-K ************************************************************/ - -#define Z16F_GPIOA_IN _HX32(ffffe100) /* 8-bits: Port A Input Data */ -#define Z16F_GPIOA_OUT _HX32(ffffe101) /* 8-bits: Port A Output Data */ -#define Z16F_GPIOA_DD _HX32(ffffe102) /* 8-bits: Port A Data Direction */ -#define Z16F_GPIOA_HDE _HX32(ffffe103) /* 8-bits: Port A High Drive Enable */ -#define Z16F_GPIOA_AF _HX32(ffffe104) /* 16-bits: Port A Alternate Function */ -# define Z16F_GPIOA_AFH _HX32(ffffe104) /* 8-bits: Port A Alternate Function High */ -# define Z16F_GPIOA_AFL _HX32(ffffe105) /* 8-bits: Port A Alternate Function Low */ -#define Z16F_GPIOA_OC _HX32(ffffe106) /* 8-bits: Port A Output Control */ -#define Z16F_GPIOA_PUE _HX32(ffffe107) /* 8-bits: Port A Pull-Up Enable */ -#define Z16F_GPIOA_SMRE _HX32(ffffe108) /* 8-bits: Port A Stop Mode Recovery En */ -#define Z16F_GPIOA_IMUX1 _HX32(ffffe10c) /* 8-bits: Port A IRQ Mux 1 */ -#define Z16F_GPIOA_IMUX _HX32(ffffe10e) /* 8-bits: Port A IRQ Mux */ -#define Z16F_GPIOA_IEDGE _HX32(ffffe10f) /* 8-bits: Port A IRQ Edge */ - -#define Z16F_GPIOB_IN _HX32(ffffe110) /* 8-bits: Port B Input Data */ -#define Z16F_GPIOB_OUT _HX32(ffffe111) /* 8-bits: Port B Output Data */ -#define Z16F_GPIOB_DD _HX32(ffffe112) /* 8-bits: Port B Data Direction */ -#define Z16F_GPIOB_HDE _HX32(ffffe113) /* 8-bits: Port B High Drive Enable */ -#define Z16F_GPIOB_AFL _HX32(ffffe115) /* 8-bits: Port B Alternate Function Low */ -#define Z16F_GPIOB_OC _HX32(ffffe116) /* 8-bits: Port B Output Control */ -#define Z16F_GPIOB_PUE _HX32(ffffe117) /* 8-bits: Port B Pull-Up Enable */ -#define Z16F_GPIOB_SMRE _HX32(ffffe118) /* 8-bits: Port B Stop Mode Recovery En */ - -#define Z16F_GPIOC_IN _HX32(ffffe120) /* 8-bits: Port C Input Data */ -#define Z16F_GPIOC_OUT _HX32(ffffe121) /* 8-bits: Port C Output Data */ -#define Z16F_GPIOC_DD _HX32(ffffe122) /* 8-bits: Port C Data Direction */ -#define Z16F_GPIOC_HDE _HX32(ffffe123) /* 8-bits: Port C High Drive Enable */ -#define Z16F_GPIOC_AF _HX32(ffffe124) /* 16-bits: Port C Alternate Function */ -# define Z16F_GPIOC_AFH _HX32(ffffe124) /* 8-bits: Port C Alternate Function High */ -# define Z16F_GPIOC_AFL _HX32(ffffe125) /* 8-bits: Port C Alternate Function Low */ -#define Z16F_GPIOC_OC _HX32(ffffe126) /* 8-bits: Port C Output Control */ -#define Z16F_GPIOC_PUE _HX32(ffffe127) /* 8-bits: Port C Pull-Up Enable */ -#define Z16F_GPIOC_SMRE _HX32(ffffe128) /* 8-bits: Port C Stop Mode Recovery En */ -#define Z16F_GPIOC_IMUX _HX32(ffffe12e) /* 8-bits: Port C IRQ Mux */ - -#define Z16F_GPIOD_IN _HX32(ffffe130) /* 8-bits: Port D Input Data */ -#define Z16F_GPIOD_OUT _HX32(ffffe131) /* 8-bits: Port D Output Data */ -#define Z16F_GPIOD_DD _HX32(ffffe132) /* 8-bits: Port D Data Direction */ -#define Z16F_GPIOD_HDE _HX32(ffffe133) /* 8-bits: Port D High Drive Enable */ -#define Z16F_GPIOD_AF _HX32(ffffe134) /* 16-bits: Port D Alternate Function */ -# define Z16F_GPIOD_AFH _HX32(ffffe134) /* 8-bits: Port D Alternate Function High */ -# define Z16F_GPIOD_AFL _HX32(ffffe135) /* 8-bits: Port D Alternate Function Low */ -#define Z16F_GPIOD_OC _HX32(ffffe136) /* 8-bits: Port D Output Control */ -#define Z16F_GPIOD_PUE _HX32(ffffe137) /* 8-bits: Port D Pull-Up Enable */ -#define Z16F_GPIOD_SMRE _HX32(ffffe138) /* 8-bits: Port D Stop Mode Recovery En */ - -#define Z16F_GPIOE_IN _HX32(ffffe140) /* 8-bits: Port E Input Data */ -#define Z16F_GPIOE_OUT _HX32(ffffe141) /* 8-bits: Port E Output Data */ -#define Z16F_GPIOE_DD _HX32(ffffe142) /* 8-bits: Port E Data Direction */ -#define Z16F_GPIOE_HDE _HX32(ffffe143) /* 8-bits: Port E High Drive Enable */ -#define Z16F_GPIOE_OC _HX32(ffffe146) /* 8-bits: Port E Output Control */ -#define Z16F_GPIOE_PUE _HX32(ffffe147) /* 8-bits: Port E Pull-Up Enable */ -#define Z16F_GPIOE_SMRE _HX32(ffffe148) /* 8-bits: Port E Stop Mode Recovery En */ - -#define Z16F_GPIOF_IN _HX32(ffffe150) /* 8-bits: Port F Input Data */ -#define Z16F_GPIOF_OUT _HX32(ffffe151) /* 8-bits: Port F Output Data */ -#define Z16F_GPIOF_DD _HX32(ffffe152) /* 8-bits: Port F Data Direction */ -#define Z16F_GPIOF_HDE _HX32(ffffe153) /* 8-bits: Port F High Drive Enable */ -#define Z16F_GPIOF_AFL _HX32(ffffe155) /* 8-bits: Port F Alternate Function Low */ -#define Z16F_GPIOF_OC _HX32(ffffe156) /* 8-bits: Port F Output Control */ -#define Z16F_GPIOF_PUE _HX32(ffffe157) /* 8-bits: Port F Pull-Up Enable */ -#define Z16F_GPIOF_SMRE _HX32(ffffe158) /* 8-bits: Port F Stop Mode Recovery En */ - -#define Z16F_GPIOG_IN _HX32(ffffe160) /* 8-bits: Port G Input Data */ -#define Z16F_GPIOG_OUT _HX32(ffffe161) /* 8-bits: Port G Output Data */ -#define Z16F_GPIOG_DD _HX32(ffffe162) /* 8-bits: Port G Data Direction */ -#define Z16F_GPIOG_HDE _HX32(ffffe163) /* 8-bits: Port G High Drive Enable */ -#define Z16F_GPIOG_AFL _HX32(ffffe165) /* 8-bits: Port G Alternate Function Low */ -#define Z16F_GPIOG_OC _HX32(ffffe166) /* 8-bits: Port G Output Control */ -#define Z16F_GPIOG_PUE _HX32(ffffe167) /* 8-bits: Port G Pull-Up Enable */ -#define Z16F_GPIOG_SMRE _HX32(ffffe168) /* 8-bits: Port G Stop Mode Recovery En */ - -#define Z16F_GPIOH_IN _HX32(ffffe170) /* 8-bits: Port H Input Data */ -#define Z16F_GPIOH_OUT _HX32(ffffe171) /* 8-bits: Port H Output Data */ -#define Z16F_GPIOH_DD _HX32(ffffe172) /* 8-bits: Port H Data Direction */ -#define Z16F_GPIOH_HDE _HX32(ffffe173) /* 8-bits: Port H High Drive Enable */ -#define Z16F_GPIOH_AF _HX32(ffffe174) /* 16-bits: Port H Alternate Function */ -# define Z16F_GPIOH_AFH _HX32(ffffe174) /* 8-bits: Port H Alternate Function High */ -# define Z16F_GPIOH_AFL _HX32(ffffe175) /* 8-bits: Port H Alternate Function LOw */ -#define Z16F_GPIOH_OC _HX32(ffffe176) /* 8-bits: Port H Output Control */ -#define Z16F_GPIOH_PUE _HX32(ffffe177) /* 8-bits: Port H Pull-Up Enable */ -#define Z16F_GPIOH_SMRE _HX32(ffffe178) /* 8-bits: Port H Stop Mode Recovery En */ - -#ifdef Z16F_HAVE_GPIO_PORTJ -# define Z16F_GPIOJ_IN _HX32(ffffe180) /* 8-bits: Port J Input Data */ -# define Z16F_GPIOJ_OUT _HX32(ffffe181) /* 8-bits: Port J Output Data */ -# define Z16F_GPIOJ_DD _HX32(ffffe182) /* 8-bits: Port J Data Direction */ -# define Z16F_GPIOJ_HDE _HX32(ffffe183) /* 8-bits: Port J High Drive Enable */ -# define Z16F_GPIOJ_OC _HX32(ffffe186) /* 8-bits: Port J Output Control */ -# define Z16F_GPIOJ_PUE _HX32(ffffe187) /* 8-bits: Port J Pull-Up Enable */ -# define Z16F_GPIOJ_SMRE _HX32(ffffe188) /* 8-bits: Port J Stop Mode Recovery En */ -#endif - -#ifdef Z16F_HAVE_GPIO_PORTK -# define Z16F_GPIOK_IN _HX32(ffffe190) /* 8-bits: Port K Input Data */ -# define Z16F_GPIOK_OUT _HX32(ffffe191) /* 8-bits: Port K Output Data */ -# define Z16F_GPIOK_DD _HX32(ffffe192) /* 8-bits: Port K Data Direction */ -# define Z16F_GPIOK_HDE _HX32(ffffe193) /* 8-bits: Port K High Drive Enable */ -# define Z16F_GPIOK_AFL _HX32(ffffe195) /* 8-bits: Port K Alternate Function Low */ -# define Z16F_GPIOK_OC _HX32(ffffe196) /* 8-bits: Port K Output Control */ -# define Z16F_GPIOK_PUE _HX32(ffffe197) /* 8-bits: Port K Pull-Up Enable */ -# define Z16F_GPIOK_SMRE _HX32(ffffe198) /* 8-bits: Port K Stop Mode Recovery En */ -#endif - -/* UART Register Offsets ****************************************************/ - -#define Z16F_UART_TXD _HX8(00) /* 8-bits: UART Transmit Data */ -#define Z16F_UART_RXD _HX8(00) /* 8-bits: UART Receive Data */ -#define Z16F_UART_STAT0 _HX8(01) /* 8-bits: UART Status 0 */ -#define Z16F_UART_CTL _HX8(02) /* 16-bits: UART Control */ -# define Z16F_UART_CTL0 _HX8(02) /* 8-bits: UART Control 0 */ -# define Z16F_UART_CTL1 _HX8(03) /* 8-bits: UART COntrol 1 */ -#define Z16F_UART_MDSTAT _HX8(04) /* 8-bits: UART Mode Select & Status */ -#define Z16F_UART_ADDR _HX8(05) /* 8-bits: UART Address Compare */ -#define Z16F_UART_BR _HX8(06) /* 16-bits: UART Baud Rate */ -# define Z16F_UART_BRH _HX8(06) /* 8-bits: UART Baud Rate High Byte */ -# define Z16F_UART_BRL _HX8(07) /* 8-bits: UART Baud Rate Low Byte */ - -#define Z16F_UART0_BASE _HX32(ffffe200) /* UART0 Register Base Address */ -#define Z16F_UART1_BASE _HX32(ffffe210) /* UART1 Register Base Address */ - -/* UART0/1 Registers ********************************************************/ - -#define Z16F_UART0_TXD _HX32(ffffe200) /* 8-bits: UART0 Transmit Data */ -#define Z16F_UART0_RXD _HX32(ffffe200) /* 8-bits: UART0 Receive Data */ -#define Z16F_UART0_STAT0 _HX32(ffffe201) /* 8-bits: UART0 Status 0 */ -#define Z16F_UART0_CTL _HX32(ffffe202) /* 16-bits: UART0 Control */ -# define Z16F_UART0_CTL0 _HX32(ffffe202) /* 8-bits: UART0 Control 0 */ -# define Z16F_UART0_CTL1 _HX32(ffffe203) /* 8-bits: UART0 COntrol 1 */ -#define Z16F_UART0_MDSTAT _HX32(ffffe204) /* 8-bits: UART0 Mode Select & Status */ -#define Z16F_UART0_ADDR _HX32(ffffe205) /* 8-bits: UART0 Address Compare */ -#define Z16F_UART0_BR _HX32(ffffe206) /* 16-bits: UART0 Baud Rate */ -# define Z16F_UART0_BRH _HX32(ffffe206) /* 8-bits: UART0 Baud Rate High Byte */ -# define Z16F_UART0_BRL _HX32(ffffe207) /* 8-bits: UART0 Baud Rate Low Byte */ - -#define Z16F_UART1_TXD _HX32(ffffe210) /* 8-bits: UART1 Transmit Data */ -#define Z16F_UART1_RXD _HX32(ffffe210) /* 8-bits: UART1 Receive Data */ -#define Z16F_UART1_STAT0 _HX32(ffffe211) /* 8-bits: UART1 Status 0 */ -#define Z16F_UART1_CTL _HX32(ffffe212) /* 16-bits: UART1 Control */ -# define Z16F_UART1_CTL0 _HX32(ffffe212) /* 8-bits: UART1 Control 0 */ -# define Z16F_UART1_CTL1 _HX32(ffffe213) /* 8-bits: UART1 COntrol 1 */ -#define Z16F_UART1_MDSTAT _HX32(ffffe214) /* 8-bits: UART1 Mode Select & Status */ -#define Z16F_UART1_ADDR _HX32(ffffe215) /* 8-bits: UART1 Address Compare */ -#define Z16F_UART1_BR _HX32(ffffe216) /* 16-bits: UART1 Baud Rate */ -# define Z16F_UART1_BRH _HX32(ffffe216) /* 8-bits: UART1 Baud Rate High Byte */ -# define Z16F_UART1_BRL _HX32(ffffe217) /* 8-bits: UART1 Baud Rate Low Byte */ - -/* UART0/1 Status 0 Register Bit Definitions ********************************/ - -#define Z16F_UARTSTAT0_RDA _HX8(80) /* Bit 7: Receive Data Available */ -#define Z16F_UARTSTAT0_PE _HX8(40) /* Bit 6: Parity Error */ -#define Z16F_UARTSTAT0_OE _HX8(20) /* Bit 5: Overrun Error */ -#define Z16F_UARTSTAT0_FE _HX8(10) /* Bit 4: Framing Error */ -#define Z16F_UARTSTAT0_BRKD _HX8(08) /* Bit 3: Break Detect */ -#define Z16F_UARTSTAT0_TDRE _HX8(04) /* Bit 2: Transmitter Data Register Empty */ -#define Z16F_UARTSTAT0_TXE _HX8(02) /* Bit 1: Transmitter Empty */ -#define Z16F_UARTSTAT0_CTS _HX8(01) /* Bit 0: Clear To Send */ - -/* UART0/1 Control 0/1 Register Bit Definitions *****************************/ - -#define Z16F_UARTCTL0_TEN _HX8(80) /* Bit 7: Transmit Enable */ -#define Z16F_UARTCTL0_REN _HX8(40) /* Bit 6: Receive Enable */ -#define Z16F_UARTCTL0_CTSE _HX8(20) /* Bit 5: CTS Enable */ -#define Z16F_UARTCTL0_PEN _HX8(10) /* Bit 4: Parity Enable */ -#define Z16F_UARTCTL0_PSEL _HX8(08) /* Bit 3: Odd Parity Select */ -#define Z16F_UARTCTL0_SBRK _HX8(04) /* Bit 2: Send Break */ -#define Z16F_UARTCTL0_STOP _HX8(02) /* Bit 1: Stop Bit Select */ -#define Z16F_UARTCTL0_LBEN _HX8(01) /* Bit 0: Loopback Enable */ - -#define Z16F_UARTCTL1_MPMD1 _HX8(80) /* Bit 7: Multiprocessor Mode (bit1) */ -#define Z16F_UARTCTL1_MPEN _HX8(40) /* Bit 6: Multiprocessor Enable */ -#define Z16F_UARTCTL1_MPMD0 _HX8(20) /* Bit 5: Multiprocessor Mode (bit0) */ -#define Z16F_UARTCTL1_MPBT _HX8(10) /* Bit 4: Multiprocessor Bit Transmit */ -#define Z16F_UARTCTL1_DEPOL _HX8(08) /* Bit 3: Driver Enable Polarity */ -#define Z16F_UARTCTL1_BRGCTL _HX8(04) /* Bit 2: Baud Rate Generator Control */ -#define Z16F_UARTCTL1_RDAIRQ _HX8(02) /* Bit 1: Receive Data Interrupt Enable */ -#define Z16F_UARTCTL1_IREN _HX8(01) /* Bit 0: Infrared Encoder/Decoder Enable */ - -/* UART0/1 Mode Status/Select Register Bit Definitions **********************/ - -#define Z16F_UARTMDSEL_NORMAL _HX8(00) /* Bits 5-7=0: Multiprocessor and Normal Mode */ -#define Z16F_UARTMDSEL_FILTER _HX8(20) /* Bits 5-7=1: Noise Filter Control/Status */ -#define Z16F_UARTMDSEL_LINP _HX8(40) /* Bits 5-7=2: LIN protocol Control/Status */ -#define Z16F_UARTMDSEL_HWREV _HX8(e0) /* Bits 5-7=7: LIN-UART Hardware Revision */ - /* Bits 0-4: Mode dependent status */ - -/* ESPI registers ***********************************************************/ - -#define Z16F_ESPI_DATA _HX32(ffffe260) /* 8-bit: ESPI Data */ -#define Z16F_ESPI_DCR _HX32(ffffe261) /* 8-bit: ESPI Transmit Data Command */ -#define Z16F_ESPI_CTL _HX32(ffffe262) /* 8-bit: ESPI Control */ -#define Z16F_ESPI_MODE _HX32(ffffe263) /* 8-bit: ESPI Mode */ -#define Z16F_ESPI_STAT _HX32(ffffe264) /* 8-bit: ESPI Status */ -#define Z16F_ESPI_STATE _HX32(ffffe265) /* 8-bit: ESPI State */ -#define Z16F_ESPI_BR _HX32(ffffe266) /* 16-bit: ESPI Baud Rate High Byte */ -# define Z16F_ESPI_BRH _HX32(ffffe266) /* 8-bit: ESPI Baud Rate High Byte */ -# define Z16F_ESPI_BRL _HX32(ffffe267) /* 8-bit: ESPI Baud Rate Low Byte */ - -/* ESPI register bit definitions ********************************************/ - -#define Z16F_ESPI_DCR_SSV _HX8(01) /* Bit 0: Slave Select Value */ -#define Z16F_ESPI_DCR_TEOF _HX8(02) /* Bit 1: Transmit End of Frame */ - -#define Z16F_ESPI_CTL_ESPIEN0 _HX8(01) /* Bit 0: ESPI Enable and Direction Control */ -#define Z16F_ESPI_CTL_MMEN _HX8(02) /* Bit 1: ESPI Master Mode Enable */ -#define Z16F_ESPI_CTL_WOR _HX8(04) /* Bit 2: Wire-OR (Open-Drain) Mode Enabled */ -#define Z16F_ESPI_CTL_CLKPOL _HX8(08) /* Bit 3: Clock Polarity */ -#define Z16F_ESPI_CTL_PHASE _HX8(10) /* Bit 4: Phase Select */ -#define Z16F_ESPI_CTL_BRGCTL _HX8(20) /* Bit 5: Baud Rate Generator Control */ -#define Z16F_ESPI_CTL_ESPIEN1 _HX8(40) /* Bit 6: ESPI Enable and Direction Control */ -#define Z16F_ESPI_CTL_DIRQE _HX8(80) /* Bit 7: Data Interrupt Request Enable */ - -#define Z16F_ESPI_MODE_SSPO _HX8(01) /* Bit 0: Slave Select Polarity */ -#define Z16F_ESPI_MODE_SSIO _HX8(02) /* Bit 1: Slave Select I/O */ -#define Z16F_ESPI_MODE_NUMBITS_SHIFT (2) /* Bits 2-4: Number of Data Bits Per Character */ -#define Z16F_ESPI_MODE_NUMBITS_MASK (7 << Z16F_ESPI_MODE_NUMBITS_SHIFT) -# define Z16F_ESPI_MODE_NUMBITS_8BITS (0 << Z16F_ESPI_MODE_NUMBITS_SHIFT) /* 8 bits */ -# define Z16F_ESPI_MODE_NUMBITS_1BIT (1 << Z16F_ESPI_MODE_NUMBITS_SHIFT) /* 1 bit */ -# define Z16F_ESPI_MODE_NUMBITS_2BITS (2 << Z16F_ESPI_MODE_NUMBITS_SHIFT) /* 2 bits */ -# define Z16F_ESPI_MODE_NUMBITS_3BITS (3 << Z16F_ESPI_MODE_NUMBITS_SHIFT) /* 3 bits */ -# define Z16F_ESPI_MODE_NUMBITS_4BITS (4 << Z16F_ESPI_MODE_NUMBITS_SHIFT) /* 4 bits */ -# define Z16F_ESPI_MODE_NUMBITS_5BITS (5 << Z16F_ESPI_MODE_NUMBITS_SHIFT) /* 5 bits */ -# define Z16F_ESPI_MODE_NUMBITS_6BITS (6 << Z16F_ESPI_MODE_NUMBITS_SHIFT) /* 6 bits */ -# define Z16F_ESPI_MODE_NUMBITS_7BITS (7 << Z16F_ESPI_MODE_NUMBITS_SHIFT) /* 7 bits */ -#define Z16F_ESPI_MODE_SSMD_SHIFT (5) /* Bits 5-7: SLAVE SELECT Mode */ -#define Z16F_ESPI_MODE_SSMD_MASK (7 << Z16F_ESPI_MODE_SSMD_SHIFT) -# define Z16F_ESPI_MODE_SSMD_SPI (0 << Z16F_ESPI_MODE_SSMD_SHIFT) /* SPI mode */ -# define Z16F_ESPI_MODE_SSMD_LPBK (1 << Z16F_ESPI_MODE_SSMD_SHIFT) /* LOOPBACK Mode */ -# define Z16F_ESPI_MODE_SSMD_I2S (2 << Z16F_ESPI_MODE_SSMD_SHIFT) /* I2S Mode */ - -#define Z16F_ESPI_STAT_SLAS _HX8(01) /* Bit 0: Slave Select */ -#define Z16F_ESPI_STAT_TFST _HX8(02) /* Bit 1: Transfer Status */ -#define Z16F_ESPI_STAT_RDRF _HX8(04) /* Bit 2: Receive Data Register Full */ -#define Z16F_ESPI_STAT_ROVR _HX8(08) /* Bit 3: Receive Overrun */ -#define Z16F_ESPI_STAT_ABT _HX8(10) /* Bit 4: Slave mode transaction abort */ -#define Z16F_ESPI_STAT_COL _HX8(20) /* Bit 5: Collision */ -#define Z16F_ESPI_STAT_TUND _HX8(40) /* Bit 6: Transmit Underrun */ -#define Z16F_ESPI_STAT_TDRE _HX8(80) /* Bit 7: Transmit Data Register Empty */ - -#define Z16F_ESPI_STATE_SHIFT (0) /* Bits 0-5: ESPI State Machine */ -#define Z16F_ESPI_STATE_MASK (0x3f << Z16F_ESPI_STATE_SHIFT) -# define Z16F_ESPI_STATE_IDLE (0x00 << Z16F_ESPI_STATE_SHIFT) /* Idle */ -# define Z16F_ESPI_STATE_SWAIT (0x01 << Z16F_ESPI_STATE_SHIFT) /* Slave Wait For SCK */ -# define Z16F_ESPI_STATE_I2SSD0 (0x02 << Z16F_ESPI_STATE_SHIFT) /* I2S slave mode start delay */ -# define Z16F_ESPI_STATE_I2SSD1 (0x03 << Z16F_ESPI_STATE_SHIFT) /* I2S slave mode start delay */ -# define Z16F_ESPI_STATE_SPIMD (0x10 << Z16F_ESPI_STATE_SHIFT) /* SPI master mode start delay */ -# define Z16F_ESPI_STATE_I2SMD0 (0x31 << Z16F_ESPI_STATE_SHIFT) /* I2S master mode start delay */ -# define Z16F_ESPI_STATE_I2SMD1 (0x32 << Z16F_ESPI_STATE_SHIFT) /* I2S master mode start delay */ -# define Z16F_ESPI_STATE_B7RCV (0x2e << Z16F_ESPI_STATE_SHIFT) /* Bit 7 Receive */ -# define Z16F_ESPI_STATE_B7XMT (0x2f << Z16F_ESPI_STATE_SHIFT) /* Bit 7 Transmit */ -# define Z16F_ESPI_STATE_B6RCV (0x2c << Z16F_ESPI_STATE_SHIFT) /* Bit 6 Receive */ -# define Z16F_ESPI_STATE_B6XMT (0x2d << Z16F_ESPI_STATE_SHIFT) /* Bit 6 Transmit */ -# define Z16F_ESPI_STATE_B5RCV (0x2a << Z16F_ESPI_STATE_SHIFT) /* Bit 5 Receive */ -# define Z16F_ESPI_STATE_B5XMT (0x2b << Z16F_ESPI_STATE_SHIFT) /* Bit 5 Transmit */ -# define Z16F_ESPI_STATE_B4RCV (0x28 << Z16F_ESPI_STATE_SHIFT) /* Bit 4 Receive */ -# define Z16F_ESPI_STATE_B4XMT (0x29 << Z16F_ESPI_STATE_SHIFT) /* Bit 4 Transmit */ -# define Z16F_ESPI_STATE_B3RCV (0x26 << Z16F_ESPI_STATE_SHIFT) /* Bit 3 Receive */ -# define Z16F_ESPI_STATE_B3XMT (0x27 << Z16F_ESPI_STATE_SHIFT) /* Bit 3 Transmit */ -# define Z16F_ESPI_STATE_B2RCV (0x24 << Z16F_ESPI_STATE_SHIFT) /* Bit 2 Receive */ -# define Z16F_ESPI_STATE_B2XMT (0x25 << Z16F_ESPI_STATE_SHIFT) /* Bit 2 Transmit */ -# define Z16F_ESPI_STATE_B1RCV (0x22 << Z16F_ESPI_STATE_SHIFT) /* Bit 1 Receive */ -# define Z16F_ESPI_STATE_B1XMT (0x23 << Z16F_ESPI_STATE_SHIFT) /* Bit 1 Transmit */ -# define Z16F_ESPI_STATE_B0RCV (0x20 << Z16F_ESPI_STATE_SHIFT) /* Bit 0 Receive */ -# define Z16F_ESPI_STATE_B0XMT (0x21 << Z16F_ESPI_STATE_SHIFT) /* Bit 0 Transmit */ -#define Z16F_ESPI_STATE_SDI _HX8(40) /* Bit 6: Serial Data Input */ -#define Z16F_ESPI_STATE_SCKI _HX8(80) /* Bit 7: Serial Clock Input */ - -/* Timer0/1/2 registers *****************************************************/ - -#define Z16F_TIMER0_HL _HX32(ffffe300) /* 16-bit: Timer 0 */ -# define Z16F_TIMER0_H _HX32(ffffe300) /* 8-bit: Timer 0 High Byte */ -# define Z16F_TIMER0_L _HX32(ffffe301) /* 8-bit: Timer 0 Low Byte */ -#define Z16F_TIMER0_R _HX32(ffffe302) /* 16-bit: Timer 0 Reload */ -# define Z16F_TIMER0_RH _HX32(ffffe302) /* 8-bit: Timer 0 Reload High Byte */ -# define Z16F_TIMER0_RL _HX32(ffffe303) /* 8-bit: Timer 0 Reload Low Byte */ -#define Z16F_TIMER0_PWM _HX32(ffffe304) /* 16-bit: Timer 0 PWM */ -# define Z16F_TIMER0_PWMH _HX32(ffffe304) /* 8-bit: Timer 0 PWM High Byte */ -# define Z16F_TIMER0_PWML _HX32(ffffe305) /* 8-bit: Timer 0 PWM Low Byte */ -#define Z16F_TIMER0_CTL _HX32(ffffe306) /* 16-bit: Timer 0 Control */ -# define Z16F_TIMER0_CTL0 _HX32(ffffe306) /* 8-bit: Timer 0 Control 0 */ -# define Z16F_TIMER0_CTL1 _HX32(ffffe307) /* 8-bit: Timer 0 Control 1 */ - -#define Z16F_TIMER1_HL _HX32(ffffe310) /* 16-bit: Timer 1 */ -# define Z16F_TIMER1_H _HX32(ffffe310) /* 8-bit: Timer 1 High Byte */ -# define Z16F_TIMER1_L _HX32(ffffe311) /* 8-bit: Timer 1 Low Byte */ -#define Z16F_TIMER1_R _HX32(ffffe312) /* 16-bit: Timer 1 Reload */ -# define Z16F_TIMER1_RH _HX32(ffffe312) /* 8-bit: Timer 1 Reload High Byte */ -# define Z16F_TIMER1_RL _HX32(ffffe313) /* 8-bit: Timer 1 Reload Low Byte */ -#define Z16F_TIMER1_PWM _HX32(ffffe314) /* 16-bit: Timer 1 PWM */ -# define Z16F_TIMER1_PWMH _HX32(ffffe314) /* 8-bit: Timer 1 PWM High Byte */ -# define Z16F_TIMER1_PWML _HX32(ffffe315) /* 8-bit: Timer 1 PWM Low Byte */ -#define Z16F_TIMER1_CTL _HX32(ffffe316) /* 16-bit: Timer 1 Control */ -# define Z16F_TIMER1_CTL0 _HX32(ffffe316) /* 8-bit: Timer 1 Control 0 */ -# define Z16F_TIMER1_CTL1 _HX32(ffffe317) /* 8-bit: Timer 1 Control 1 */ - -#define Z16F_TIMER2_HL _HX32(ffffe320) /* 16-bit: Timer 2 */ -# define Z16F_TIMER2_H _HX32(ffffe320) /* 8-bit: Timer 2 High Byte */ -# define Z16F_TIMER2_L _HX32(ffffe321) /* 8-bit: Timer 2 Low Byte */ -#define Z16F_TIMER2_R _HX32(ffffe322) /* 16-bit: Timer 2 Reload */ -# define Z16F_TIMER2_RH _HX32(ffffe322) /* 8-bit: Timer 2 Reload High Byte */ -# define Z16F_TIMER2_RL _HX32(ffffe323) /* 8-bit: Timer 2 Reload Low Byte */ -#define Z16F_TIMER2_PWM _HX32(ffffe324) /* 16-bit: Timer 2 PWM */ -# define Z16F_TIMER2_PWMH _HX32(ffffe324) /* 8-bit: Timer 2 PWM High Byte */ -# define Z16F_TIMER2_PWML _HX32(ffffe325) /* 8-bit: Timer 2 PWM Low Byte */ -#define Z16F_TIMER2_CTL _HX32(ffffe326) /* 16-bit: Timer 2 Control */ -# define Z16F_TIMER2_CTL0 _HX32(ffffe326) /* 8-bit: Timer 2 Control 0 */ -# define Z16F_TIMER2_CTL1 _HX32(ffffe327) /* 8-bit: Timer 2 Control 1 */ - -/* Common timer0/1/2 register bit definitions *******************************/ - -#define Z16F_TIMERCTL0_TMODE _HX8(80) /* Bit 7: Timer mode */ - /* Bits 5-6: Timer configuration, - * Interpretation depends on timer mode */ -#define Z16F_TIMERCTL0_RELOAD _HX8(00) /* Interrupt occurs on reload or capture */ -#define Z16F_TIMERCTL0_IDISABLED _HX8(40) /* Disabled */ -#define Z16F_TIMERCTL0_IINACTIVE _HX8(40) /* Interrupt occurs on inactive gate edge */ -#define Z16F_TIMERCTL0_ICAPTURE _HX8(40) /* Interrupt occurs on capture */ -#define Z16F_TIMERCTL0_IRELOAD _HX8(60) /* Interrupt occurs on reload */ -#define Z16F_TIMERCTL0_CASCADE _HX8(10) /* Bit 4: Timer is cascaded */ - /* Bits 1-2: PW mode */ -#define Z16F_TIMERCTL0_NODELAY _HZ8(00) /* No delay */ -#define Z16F_TIMERCTL0_DELAY2 _HZ8(01) /* 2 cycle delay */ -#define Z16F_TIMERCTL0_DELAY4 _HZ8(02) /* 4 cycle delay */ -#define Z16F_TIMERCTL0_DELAY8 _HZ8(03) /* 8 cycle delay */ -#define Z16F_TIMERCTL0_DELAY16 _HZ8(04) /* 16 cycle delay */ -#define Z16F_TIMERCTL0_DELAY32 _HZ8(05) /* 32 cycle delay */ -#define Z16F_TIMERCTL0_DELAY64 _HZ8(06) /* 64 cycle delay */ -#define Z16F_TIMERCTL0_DELAY128 _HZ8(07) /* 128 cycle delay */ - -#define Z16F_TIMERCTL1_TEN _HX8(80) /* Bit 7: Timer enable */ -#define Z16F_TIMERCTL1_TPOL _HX8(40) /* Bit 6: Input output polarity */ -#define Z16F_TIMERSCTL1_DIVMASK _HX8(38) /* Bits 3-5: Timer prescale value */ -# define Z16F_TIMERSCTL1_DIV1 _HX8(00) /* Divide by 1 */ -# define Z16F_TIMERSCTL1_DIV2 _HX8(08) /* Divide by 2 */ -# define Z16F_TIMERSCTL1_DIV4 _HX8(10) /* Divide by 4 */ -# define Z16F_TIMERSCTL1_DIV8 _HX8(18) /* Divide by 8 */ -# define Z16F_TIMERSCTL1_DIV16 _HX8(20) /* Divide by 16 */ -# define Z16F_TIMERSCTL1_DIV32 _HX8(28) /* Divide by 32 */ -# define Z16F_TIMERSCTL1_DIV64 _HX8(30) /* Divide by 64 */ -# define Z16F_TIMERSCTL1_DIV128 _HX8(38) /* Divide by 128 */ -#define Z16F_TIMERSCTL1_MODEMASK _HX8(07) /* Bits 0-2: Timer mode + CTL0 TMODE bit*/ -# define Z16F_TIMERSCTL1_ONESHOT _HX8(00) /* One shot mode (CTL0 TMOD = 0) */ -# define Z16F_TIMERSCTL1_PWMDO _HX8(00) /* One shot mode (CTL0 TMOD = 1) */ -# define Z16F_TIMERSCTL1_CONT _HX8(01) /* Continuous mode (CTL0 TMOD = 0)*/ -# define Z16F_TIMERSCTL1_CAPRST _HX8(01) /* Capture restart mode (CTL0 TMOD = 1)*/ -# define Z16F_TIMERSCTL1_COUNTER _HX8(02) /* Counter mode (CTL0 TMOD = 0)*/ -# define Z16F_TIMERSCTL1_CMPCNTR _HX8(02) /* Comparator counter mode (CTL0 TMOD = 1)*/ -# define Z16F_TIMERSCTL1_PWMSO _HX8(03) /* PWM single output mode (CTL0 TMOD = 0)*/ -# define Z16F_TIMERSCTL1_TRIGOS _HX8(03) /* Triggered one shot (CTL0 TMOD = 1)*/ -# define Z16F_TIMERSCTL1_CAPTURE _HX8(04) /* Capture mode (CTL0 TMOD = 0)*/ -# define Z16F_TIMERSCTL1_COMPARE _HX8(05) /* Compare mode (CTL0 TMOD = 0)*/ -# define Z16F_TIMERSCTL1_GATED _HX8(06) /* Gated mode (CTL0 TMOD = 0)*/ -# define Z16F_TIMERSCTL1_CAPCMP _HX8(07) /* Capture/Compare mode (CTL0 TMOD = 0)*/ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -/* The following two routines are called from the low-level reset logic. - * z16f_board_initialize() must be provided by the board-specific logic; - * z16f_lowuartinit() is called only if debugging support for z16_lowputc - * (or getc) is enabled. - */ - -void z16f_board_initialize(void); -#if defined(CONFIG_Z16_LOWPUTC) || defined(CONFIG_Z16_LOWGETC) -void z16f_lowuartinit(void); -#endif - -/* This function handles Z16F system exceptions */ - -void z16f_sysexec(FAR chipreg_t *regs); - -/* Entry point to reset the processor */ - -void z16f_reset(void); - -/* The following must be provided by board-specific logic that uses the ZNeo - * ESPI - */ - -#ifdef CONFIG_Z16F_ESPI - -struct spi_dev_s; /* Forward reference */ - -/* Initialize the selected SPI port */ - -FAR struct spi_dev_s *z16_spibus_initialize(int port); - -/* Select an SPI device (see include/nuttx/spi/spi.h) */ - -void z16f_espi_select(FAR struct spi_dev_s *dev, uint32_t devid, - bool selected); - -/* Provide SPI device status (see include/nuttx/spi/spi.h) */ - -uint8_t z16f_espi_status(FAR struct spi_dev_s *dev, uint32_t devid); - -/* Select CMD/DATA options (often used with LCD devices) */ - -#ifdef CONFIG_SPI_CMDDATA -int z16f_espi_cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd); -#endif -#endif - -#undef EXTERN -#ifdef __cplusplus -} -#endif -#endif /* __ASSEMBLY__ */ - -#endif /* __ARCH_Z16_SRC_Z16F_CHIP_H */ diff --git a/arch/z16/src/z16f/z16f_clkinit.c b/arch/z16/src/z16f/z16f_clkinit.c deleted file mode 100644 index afa3672bb6..0000000000 --- a/arch/z16/src/z16f/z16f_clkinit.c +++ /dev/null @@ -1,258 +0,0 @@ -/**************************************************************************** - * arch/z16/src/z16f/z16f_clkinit.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include "chip.h" -#include "z16_internal.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* System clock source value from ZDS target settings */ - -extern _Erom unsigned long SYS_CLK_SRC; -#define _DEFSRC ((unsigned long)&SYS_CLK_SRC) - -/* System clock frequency value from ZDS target settings */ - -extern _Erom unsigned long SYS_CLK_FREQ; -#define _DEFCLK ((unsigned long)&SYS_CLK_FREQ) - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -#ifdef CONFIG_DEBUG_FEATURES -/**************************************************************************** - * System clock initialization--DEBUG. Code Using Frequency Input from - * ZDS IDE. - * - * The sysclk_init function below uses the flexibility of the ZDS debug - * environment to allow the user to experiment with different clock frequency - * settings to help determine the frequency requirements of his Project. The - * function allows the selection of internal 5.56 MHz, the 10 KHz Watch Dog - * timer or an external clock Source. ZNEO supports clock frequency division - * with the Clock Division Register. The clock division Register will divide - * by (a minimum of) 2 or more. An assumed clock value of 5.5 MHz internal - * or an external clock of 20 MHz was used as the crystal frequency to match - * the Demo Target. The User can enter a new frequency in the OTHER clock - * dialog Target Setting. The clock frequency is passed with the variable - * _DEFFREQ and the clock source is _DEFSRC. - * - * NOTE: - * The UART output is designed to work with 5.56 MHz internal and 20 MHz - * External clock frequencies at the Default Baud rate of 57.6K Baud. - * Entering different clock frequencies may cause the UART to stop - * transmitting unless the user makes changes to the UART routines. - * - * Function Not Recommended for Release Code. - * - ****************************************************************************/ - -static void z16f_sysclkinit(int clockid, uint32_t frequency) -{ - int count; - int temp_oscdiv; - - /* _DEFSRC (SCKSEL Bits 1,0) is passed to program view the .linkcmd file */ - - if ((getreg8(Z16F_OSC_CTL) & 0x03) != clockid) - { - switch (clockid) - { - /* 0: Internal precision oscillator functions as system clock - * at 5.6 MHz - */ - - case 0: - { - /* Enable 5.6 MHz clock RESET DEFAULT */ - - putreg8(0xe7, Z16F_OSC_CTL); /* Unlock the crystal oscillator */ - putreg8(0x18, Z16F_OSC_CTL); - putreg8(0xa0, Z16F_OSC_CTL); - - /* Wait for oscillator to stabilize */ - - for (count = 0; count < 10000; count++); - - /* Select 5.6 MHz clock (SCKSEL=0) */ - - putreg8(0xe7, Z16F_OSC_CTL); /* Unlock the crystal oscillator */ - putreg8(0x18, Z16F_OSC_CTL); - putreg8(0xa0, Z16F_OSC_CTL); - } - break; - - /* 1: Crystal oscillator or external clock driver functions as - * system clock - */ - - case 1: - { - /* No divider for the oscillator */ - - putreg8(0x00, Z16F_OSC_DIV); - - /* Enable external oscillator */ - - putreg8(0xe7, Z16F_OSC_CTL); /* Unlock the crystal oscillator */ - putreg8(0x18, Z16F_OSC_CTL); - putreg8(0xe0, Z16F_OSC_CTL); /* INTEN+XTLEN+WDTEN */ - - /* Wait for oscillator to stabilize */ - - for (count = 0; count < 10000; count++); - - /* select external oscillator (SCKSEL=2) */ - - putreg8(0xe7, Z16F_OSC_CTL); /* Unlock the crystal oscillator */ - putreg8(0x18, Z16F_OSC_CTL); - putreg8(0xe0 | 1, Z16F_OSC_CTL); - } - break; - - /* 2: Reserved */ - - default: - case 2: - { - /* Reserved */ - } - break; - - /* Watchdog Timer oscillator functions as system clock. */ - - case 3: - { - /* Enable watchdog timer clock */ - - putreg8(0xe7, Z16F_OSC_CTL); /* Unlock the crystal oscillator */ - putreg8(0x18, Z16F_OSC_CTL); - putreg8(0xb0, Z16F_OSC_CTL); - - /* Wait for oscillator to stabilize */ - - for (count = 0; count < 10000; count++); - - /* Select watch dog timer clock (SKCSEL=3) */ - - putreg8(0xe7, Z16F_OSC_CTL); /* Unlock the crystal oscillator */ - putreg8(0x18, Z16F_OSC_CTL); - putreg8(0xb0 | 3, Z16F_OSC_CTL); - } - break; - } - } - - /* Check SysClock Frequency. - * divide the clock if the user has selected the OTHER option for - * frequency. - */ - - if (((clockid == 0) && (frequency < 3000000ul)) || - ((clockid == 1) && (frequency <= 10000000ul))) - { - if (clockid == 0) - { - temp_oscdiv = (5526000ul / (frequency + 1)); - - /* Example @ 32 KHz: 0xAC (172 decimal) */ - } - else - { - temp_oscdiv = ((20000000ul / (frequency +1)) + 1); - } - - /* Unlock and Set the Oscillator Division Register (Z16F_OSC_DIV) */ - - putreg8(0xe7, Z16F_OSC_CTL); /* Unlock the crystal oscillator */ - putreg8(0x18, Z16F_OSC_CTL); - putreg8(temp_oscdiv, Z16F_OSC_DIV); - } - - /* Wait for oscillator to stabilize */ - - for (count = 0; count < 10000; count++); -} - -#else /* CONFIG_DEBUG_FEATURES */ -/**************************************************************************** - * System Clock Initialization Recommended for Release Code - * - * The z16f_sysclkinit function below allows the user to switch from - * Internal to External Clock source and should be used for clock frequency - * switching to the External Clock. Note the delay to allow the clock to - * stabilize. - ****************************************************************************/ - -static void z16f_sysclkinit(int clockid, uint32_t frequency) -{ - int count; - - /* In this configuration, we support only the external oscillator/clock - * the source of the system clock (__DEFCLK is ignored). - */ - - if ((getreg8(Z16F_OSC_CTL) & 0x03) != 1) - { - /* No divider for the oscillator */ - - putreg8(0x00, Z16F_OSC_DIV); - - /* Enable external oscillator */ - - putreg8(0xe7, Z16F_OSC_CTL); /* Unlock the crystal oscillator */ - putreg8(0x18, Z16F_OSC_CTL); - putreg8(0xe0, Z16F_OSC_CTL); /* INTEN+XTLEN+WDTEN */ - - /* Wait for oscillator to stabilize */ - - for (count = 0; count < 10000; count++); - - /* Select external oscillator (SCLKSEL=1) */ - - putreg8(0xe7, Z16F_OSC_CTL); /* Unlock the crystal oscillator */ - putreg8(0x18, Z16F_OSC_CTL); - putreg8(0xe0 | 1, Z16F_OSC_CTL); /* Use the external osc/clock as system clock */ - } -} -#endif /* CONFIG_DEBUG_FEATURES */ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: z16f_clkinit - ****************************************************************************/ - -void z16f_clkinit(void) -{ - /* _DEFSRC (SCKSEL Bits 1,0) is passed to program view the .linkcmd file */ - - z16f_sysclkinit(_DEFSRC, _DEFCLK); -} diff --git a/arch/z16/src/z16f/z16f_espi.c b/arch/z16/src/z16f/z16f_espi.c deleted file mode 100644 index d075115825..0000000000 --- a/arch/z16/src/z16f/z16f_espi.c +++ /dev/null @@ -1,851 +0,0 @@ -/**************************************************************************** - * arch/z16/src/z16f/z16f_espi.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "chip.h" -#include "z16_internal.h" - -#ifdef CONFIG_Z16F_ESPI - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/* The overall state of one SPI controller */ - -struct z16f_spi_s -{ - struct spi_dev_s spi; /* Externally visible part of the SPI interface */ - mutex_t lock; /* Assures mutually exclusive access to SPI */ - bool initialized; /* TRUE: Controller has been initialized */ - uint8_t nbits; /* Width of word in bits (1-8) */ - uint8_t mode; /* Mode 0,1,2,3 */ - uint32_t frequency; /* Requested clock frequency */ - uint32_t actual; /* Actual clock frequency */ - - /* Debug stuff */ - -#ifdef CONFIG_Z16F_ESPI_REGDEBUG - bool wr; /* Last was a write */ - uint16_t regval; /* Last value */ - int ntimes; /* Number of times */ - uintptr_t regaddr; /* Last address */ -#endif -}; - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -/* Helpers */ - -#ifdef CONFIG_Z16F_ESPI_REGDEBUG -static bool spi_checkreg(FAR struct z16f_spi_s *priv, bool wr, - uint16_t regval, uintptr_t regaddr); -static uint8_t spi_getreg8(FAR struct z16f_spi_s *priv, uintptr_t regaddr); -static void spi_putreg8(FAR struct z16f_spi_s *priv, uint8_t regval, - uintptr_t regaddr); -static void spi_putreg16(FAR struct z16f_spi_s *priv, uint16_t regval, - uintptr_t regaddr); -#else -# define spi_getreg8(priv,regaddr) getreg8(regaddr) -# define spi_putreg8(priv,regval,regaddr) putreg8(regval, regaddr) -# define spi_putreg16(priv,regval,regaddr) putreg16(regval, regaddr) -#endif - -#ifdef CONFIG_DEBUG_SPI_INFO -static void spi_dumpregs(FAR struct z16f_spi_s *priv, const char *msg); -#else -# define spi_dumpregs(priv,msg) -#endif - -static void spi_flush(FAR struct z16f_spi_s *priv); - -/* SPI methods */ - -static int spi_lock(FAR struct spi_dev_s *dev, bool lock); -static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, - uint32_t frequency); -static void spi_setmode(FAR struct spi_dev_s *dev, enum spi_mode_e mode); -static void spi_setbits(FAR struct spi_dev_s *dev, int nbits); -static uint32_t spi_send(FAR struct spi_dev_s *dev, uint32_t wd); -static void spi_exchange(FAR struct spi_dev_s *dev, - FAR const void *txbuffer, FAR void *rxbuffer, - size_t nwords); -#ifndef CONFIG_SPI_EXCHANGE -static void spi_sndblock(FAR struct spi_dev_s *dev, - FAR const void *buffer, size_t nwords); -static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, - size_t nwords); -#endif - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/* SEPI driver operations */ - -static const struct spi_ops_s g_epsiops = -{ - spi_lock, - z16f_espi_select, - spi_setfrequency, - spi_setmode, - spi_setbits, -#ifdef CONFIG_SPI_HWFEATURES - NULL, /* hwfeatures: Not supported */ -#endif - z16f_espi_status, -#ifdef CONFIG_SPI_CMDDATA - z16f_espi_cmddata, -#endif - spi_send, -#ifdef CONFIG_SPI_EXCHANGE - spi_exchange, -#else - spi_sndblock, - spi_recvblock, -#endif - NULL /* registercallback: Not implemented */ -}; - -/* ESPI driver state */ - -static struct z16f_spi_s g_espi = -{ - { - &g_epsiops - }, - NXMUTEX_INITIALIZER -}; - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: spi_checkreg - * - * Description: - * Check if the current register access is a duplicate of the preceding. - * - * Input Parameters: - * wr - true:write false:read - * regval - The value to be written - * regaddr - The address of the register to write to - * - * Returned Value: - * true: This is the first register access of this type. - * false: This is the same as the preceding register access. - * - ****************************************************************************/ - -#ifdef CONFIG_Z16F_ESPI_REGDEBUG -static bool spi_checkreg(FAR struct z16f_spi_s *priv, bool wr, - uint16_t regval, uintptr_t regaddr) -{ - if (wr == priv->wr && /* Same kind of access? */ - regval == priv->regval && /* Same value? */ - regaddr == priv->regaddr) /* Same address? */ - { - /* Yes, then just keep a count of the number of times we did this. */ - - priv->ntimes++; - return false; - } - else - { - /* Did we do the previous operation more than once? */ - - if (priv->ntimes > 0) - { - /* Yes... show how many times we did it */ - - syslog(LOG_INFO, "...[Repeats %d times]...\n", priv->ntimes); - } - - /* Save information about the new access */ - - priv->wr = wr; - priv->regval = regval; - priv->regaddr = regaddr; - priv->ntimes = 0; - } - - /* Return true if this is the first time that we have done this operation */ - - return true; -} -#endif - -/**************************************************************************** - * Name: spi_getreg8 - * - * Description: - * Read an SPI register - * - ****************************************************************************/ - -#ifdef CONFIG_Z16F_ESPI_REGDEBUG -static uint8_t spi_getreg8(FAR struct z16f_spi_s *priv, uintptr_t regaddr) -{ - uint8_t regval = getreg8(regaddr); - - if (spi_checkreg(priv, false, (uint16_t)regval, regaddr)) - { - syslog(LOG_INFO, "%06x->%02x\n", regaddr, regval); - } - - return regval; -} -#endif - -/**************************************************************************** - * Name: spi_putreg8 - * - * Description: - * Write a value to an SPI register - * - ****************************************************************************/ - -#ifdef CONFIG_Z16F_ESPI_REGDEBUG -static void spi_putreg8(FAR struct z16f_spi_s *priv, uint8_t regval, - uintptr_t regaddr) -{ - if (spi_checkreg(priv, true, (uint16_t)regval, regaddr)) - { - syslog(LOG_INFO, "%06x<-%02x\n", regaddr, regval); - } - - putreg8(regval, regaddr); -} -#endif - -/**************************************************************************** - * Name: spi_putreg16 - * - * Description: - * Write a value to an SPI register - * - ****************************************************************************/ - -#ifdef CONFIG_Z16F_ESPI_REGDEBUG -static void spi_putreg16(FAR struct z16f_spi_s *priv, uint16_t regval, - uintptr_t regaddr) -{ - if (spi_checkreg(priv, true, regval, regaddr)) - { - syslog(LOG_INFO, "%06x<-%04x\n", regaddr, regval); - } - - putreg8(regval, regaddr); -} -#endif - -/**************************************************************************** - * Name: spi_dumpregs - * - * Description: - * Dump the contents of all SPI registers - * - * Input Parameters: - * priv - The SPI controller to dump - * msg - Message to print before the register data - * - * Returned Value: - * None - * - ****************************************************************************/ - -#ifdef CONFIG_DEBUG_SPI_INFO -static void spi_dumpregs(FAR struct z16f_spi_s *priv, FAR const char *msg) -{ - spiinfo("%s:\n", msg); - spiinfo(" DCR: %02x CTL: %02x MODE: %02x STAT: %02x\n", - getreg8(Z16F_ESPI_DCR), getreg8(Z16F_ESPI_CTL), - getreg8(Z16F_ESPI_MODE), getreg8(Z16F_ESPI_STAT)); - spiinfo(" STATE: %02x BR: %02x %02x\n", - getreg8(Z16F_ESPI_STATE), getreg8(Z16F_ESPI_BRH), - getreg8(Z16F_ESPI_BRL)); -} -#endif - -/**************************************************************************** - * Name: spi_flush - * - * Description: - * Make sure that there are now dangling SPI transfer in progress - * - * Input Parameters: - * priv - SPI controller state - * - * Returned Value: - * None - * - ****************************************************************************/ - -static void spi_flush(FAR struct z16f_spi_s *priv) -{ - /* Make sure the no transfer is in progress... waiting if necessary */ - - while ((spi_getreg8(priv, Z16F_ESPI_STAT) & Z16F_ESPI_STAT_TFST) != 0); - - /* Then make sure that there is no pending RX data .. reading as - * discarding as necessary. - */ - - while ((spi_getreg8(priv, Z16F_ESPI_STAT) & Z16F_ESPI_STAT_RDRF) != 0) - { - spi_getreg8(priv, Z16F_ESPI_DATA); - } -} - -/**************************************************************************** - * Name: spi_lock - * - * Description: - * On SPI buses where there are multiple devices, it will be necessary to - * lock SPI to have exclusive access to the buses for a sequence of - * transfers. The bus should be locked before the chip is selected. After - * locking the SPI bus, the caller should then also call the setfrequency, - * setbits, and setmode methods to make sure that the SPI is properly - * configured for the device. If the SPI bus is being shared, then it - * may have been left in an incompatible state. - * - * Input Parameters: - * dev - Device-specific state data - * lock - true: Lock SPI bus, false: unlock SPI bus - * - * Returned Value: - * None - * - ****************************************************************************/ - -static int spi_lock(FAR struct spi_dev_s *dev, bool lock) -{ - FAR struct z16f_spi_s *priv = (FAR struct z16f_spi_s *)dev; - int ret; - - spiinfo("lock=%d\n", lock); - if (lock) - { - ret = nxmutex_lock(&priv->lock); - } - else - { - ret = nxmutex_unlock(&priv->lock); - } - - return ret; -} - -/**************************************************************************** - * Name: spi_setfrequency - * - * Description: - * Set the SPI frequency. - * - * Input Parameters: - * dev - Device-specific state data - * frequency - The SPI frequency requested - * - * Returned Value: - * Returns the actual frequency selected - * - ****************************************************************************/ - -static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, - uint32_t frequency) -{ - FAR struct z16f_spi_s *priv = (FAR struct z16f_spi_s *)dev; - uint32_t actual; - uint32_t brg; - - spiinfo("frequency=%d\n", frequency); - - /* Check if the requested frequency is the same as the frequency - * selection. - */ - - if (priv->frequency == frequency) - { - /* We are already at this frequency. Return the actual. */ - - return priv->actual; - } - - /* Fbaud = Fsystem / (2 * BRG) - * BRG = Fsystem / (2 * Fbaud) - * - * Example, Fsystem = 18.432MHz, Fbaud = 9600 - * BRG = 960 - */ - - brg = (BOARD_SYSTEM_FREQUENCY >> 1) / frequency; - if (brg > 0xffff) - { - brg = 0xffff; - } - - /* Save the new BRG setting */ - - spi_putreg16(priv, (uint16_t)brg, Z16F_ESPI_BR); - - /* Calculate the new actual frequency */ - - actual = (BOARD_SYSTEM_FREQUENCY >> 1) / brg; - spiinfo("BR=%04x actual=%ld\n", (unsigned int)brg, (long)actual); - - /* Save the frequency setting */ - - priv->frequency = frequency; - priv->actual = actual; - - spiinfo("Frequency %d->%d\n", frequency, actual); - return actual; -} - -/**************************************************************************** - * Name: spi_setmode - * - * Description: - * Set the SPI mode. Optional. See enum spi_mode_e for mode definitions - * - * Input Parameters: - * dev - Device-specific state data - * mode - The SPI mode requested - * - * Returned Value: - * none - * - ****************************************************************************/ - -static void spi_setmode(FAR struct spi_dev_s *dev, enum spi_mode_e mode) -{ - FAR struct z16f_spi_s *priv = (FAR struct z16f_spi_s *)dev; - uint8_t regval; - - spiinfo("mode=%d\n", mode); - - /* Has the mode changed? */ - - if (mode != priv->mode) - { - /* Yes... Set the mode appropriately: - * - * SPI CPOL CPHA - * MODE - * 0 0 0 - * 1 0 1 - * 2 1 0 - * 3 1 1 - */ - - regval = spi_getreg8(priv, Z16F_ESPI_CTL); - regval &= ~(Z16F_ESPI_CTL_PHASE | Z16F_ESPI_CTL_CLKPOL); - - switch (mode) - { - case SPIDEV_MODE0: /* CPOL=0; NCPHA=1 */ - break; - - case SPIDEV_MODE1: /* CPOL=0; NCPHA=0 */ - regval |= Z16F_ESPI_CTL_PHASE; - break; - - case SPIDEV_MODE2: /* CPOL=1; NCPHA=1 */ - regval |= Z16F_ESPI_CTL_CLKPOL; - break; - - case SPIDEV_MODE3: /* CPOL=1; NCPHA=0 */ - regval |= (Z16F_ESPI_CTL_PHASE | Z16F_ESPI_CTL_CLKPOL); - break; - - default: - DEBUGPANIC(); - return; - } - - spi_putreg8(priv, regval, Z16F_ESPI_CTL); - spiinfo("ESPI CTL: %02x\n", regval); - - /* Save the mode so that subsequent re-configurations will be faster */ - - priv->mode = mode; - } -} - -/**************************************************************************** - * Name: spi_setbits - * - * Description: - * Set the number if bits per word. - * - * Input Parameters: - * dev - Device-specific state data - * nbits - The number of bits requested - * - * Returned Value: - * none - * - ****************************************************************************/ - -static void spi_setbits(FAR struct spi_dev_s *dev, int nbits) -{ - FAR struct z16f_spi_s *priv = (FAR struct z16f_spi_s *)dev; - uint8_t regval; - - spiinfo("nbits=%d\n", nbits); - DEBUGASSERT(priv && nbits > 0 && nbits <= 8); - - /* Has the number of bits changed? */ - - if (nbits != priv->nbits) - { - /* Yes... Set number of bits appropriately */ - - regval = spi_getreg8(priv, Z16F_ESPI_MODE); - regval &= ~Z16F_ESPI_MODE_NUMBITS_MASK; - - /* The register value of zero is 8-bit */ - - if (nbits < 8) - { - regval |= ((uint8_t)nbits << Z16F_ESPI_MODE_NUMBITS_SHIFT); - } - - spi_putreg8(priv, regval, Z16F_ESPI_MODE); - spiinfo("ESPI MODE: %02x\n", regval); - - /* Save the selection so that subsequent re-configurations will be - * faster. - */ - - priv->nbits = nbits; - } -} - -/**************************************************************************** - * Name: spi_send - * - * Description: - * Exchange one word on SPI - * - * Input Parameters: - * dev - Device-specific state data - * wd - The word to send. the size of the data is determined by the - * number of bits selected for the SPI interface. - * - * Returned Value: - * response - * - ****************************************************************************/ - -static uint32_t spi_send(FAR struct spi_dev_s *dev, uint32_t wd) -{ - uint8_t txbyte; - uint8_t rxbyte; - - /* spi_exchange can do this. Note: right now, this only deals with 8-bit - * words. If the SPI interface were configured for words of other sizes, - * this would fail. - */ - - txbyte = (uint8_t)wd; - rxbyte = (uint8_t)0; - spi_exchange(dev, &txbyte, &rxbyte, 1); - - spiinfo("Sent %02x received %02x\n", txbyte, rxbyte); - return (uint32_t)rxbyte; -} - -/**************************************************************************** - * Name: spi_exchange - * - * Description: - * Exchange a block of data from SPI. - * - * Input Parameters: - * dev - Device-specific state data - * txbuffer - A pointer to the buffer of data to be sent - * rxbuffer - A pointer to the buffer in which to receive data - * nwords - the length of data that to be exchanged in units of words. - * The wordsize is determined by the number of bits-per-word - * selected for the SPI interface. If nbits <= 8, the data is - * packed into uint8_t's; if nbits >8, the data is packed into - * uint16_t's - * - * Returned Value: - * None - * - ****************************************************************************/ - -static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer, - FAR void *rxbuffer, size_t nwords) -{ - FAR struct z16f_spi_s *priv = (struct z16f_spi_s *)dev; - uint8_t data; - FAR uint8_t *rxptr = rxbuffer; - FAR const uint8_t *txptr = txbuffer; - - spiinfo("txbuffer=%p rxbuffer=%p nwords=%d\n", txbuffer, rxbuffer, nwords); - - /* Make sure that any previous transfer is flushed from the hardware */ - - spi_flush(priv); - - /* Make sure the TEOF bit is not set (SSV must also be zero) */ - - spi_putreg8(priv, 0, Z16F_ESPI_CTL); - - /* Loop, sending each word in the user-provided data buffer. - * - * Note 2: This loop might be made more efficient. Would logic - * like the following improve the throughput? Or would it - * just add the risk of overruns? - * - * Get byte 1; - * Send byte 1; Now word 1 is "in flight" - * nwords--; - * for ( ; byte > 0; byte--) - * { - * Get byte N. - * Wait for TDRE meaning that byte N-1 has moved to the shift - * register. - * Disable interrupts to keep the following atomic - * Send byte N. Now both work N-1 and N are "in flight" - * Wait for RDRF meaning that byte N-1 is available - * Read byte N-1. - * Re-enable interrupts. - * Save byte N-1. - * } - * Wait for RDRF meaning that the final byte is available - * Read the final byte. - * Save the final byte. - */ - - for (; nwords > 0; nwords--) - { - /* Get the data to send (0xff if there is no data source). */ - - if (txptr) - { - data = *txptr++; - } - else - { - data = 0xff; - } - - /* Do we need to set the TEOF bit in the CTL register too? */ - - if (nwords == 1) - { - spi_putreg8(priv, Z16F_ESPI_DCR_TEOF, Z16F_ESPI_CTL); - } - - /* Wait for any transmit data register to be empty. */ - - while ((spi_getreg8(priv, Z16F_ESPI_STAT) & Z16F_ESPI_STAT_TDRE) == 0); - - /* Write the data to transmitted to the Transmit Data Register (TDR) */ - - spi_putreg8(priv, data, Z16F_ESPI_DATA); - - /* Wait for the read data to be available in the data register. */ - - while ((spi_getreg8(priv, Z16F_ESPI_STAT) & Z16F_ESPI_STAT_RDRF) == 0); - - /* Read the received data from the SPI Data Register. */ - - data = spi_getreg8(priv, Z16F_ESPI_DATA); - if (rxptr) - { - *rxptr++ = (uint8_t)data; - } - } -} - -/**************************************************************************** - * Name: spi_sndblock - * - * Description: - * Send a block of data on SPI - * - * Input Parameters: - * dev - Device-specific state data - * buffer - A pointer to the buffer of data to be sent - * nwords - the length of data to send from the buffer in number of words. - * The wordsize is determined by the number of bits-per-word - * selected for the SPI interface. If nbits <= 8, the data is - * packed into uint8_t's; if nbits >8, the data is packed into - * uint16_t's - * - * Returned Value: - * None - * - ****************************************************************************/ - -#ifndef CONFIG_SPI_EXCHANGE -static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer, - size_t nwords) -{ - /* spi_exchange can do this. */ - - spi_exchange(dev, buffer, NULL, nwords); -} -#endif - -/**************************************************************************** - * Name: spi_recvblock - * - * Description: - * Revice a block of data from SPI - * - * Input Parameters: - * dev - Device-specific state data - * buffer - A pointer to the buffer in which to receive data - * nwords - the length of data that can be received in the buffer in number - * of words. The wordsize is determined by the number of - * bits-per-word selected for the SPI interface. If nbits <= 8, - * the data is packed into uint8_t's; if nbits >8, the data is - * packed into uint16_t's - * - * Returned Value: - * None - * - ****************************************************************************/ - -#ifndef CONFIG_SPI_EXCHANGE -static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, - size_t nwords) -{ - /* spi_exchange can do this. */ - - spi_exchange(dev, NULL, buffer, nwords); -} -#endif - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: z16_spibus_initialize - * - * Description: - * Initialize the selected SPI port - * - * Input Parameters: - * port - Identifies the "logical" SPI port. Must be zero in this case. - * - * Returned Value: - * Valid SPI device structure reference on success; a NULL on failure - * - ****************************************************************************/ - -FAR struct spi_dev_s *z16_spibus_initialize(int port) -{ - FAR struct z16f_spi_s *priv; - irqstate_t flags; - uint8_t regval; - - spiinfo("port: %d\n", port); - DEBUGASSERT(port == 0); - - /* Check if we have already initialized the ESPI */ - - priv = &g_espi; - if (priv->initialized) - { - /* Initialize the ESPI state structure */ - - flags = enter_critical_section(); - - /* Set up the SPI pin configuration (board-specific logic is required - * to configure and manage all chip selects). - * - * SCK - PC3, Alternate function 1 - * MOSI - PC4, Alternate function 1 - * MISO - PC5, Alternate function 1 - */ - - regval = spi_getreg8(priv, Z16F_GPIOC_AFL); - regval |= 0x38; - spi_putreg8(priv, regval, Z16F_GPIOC_AFL); - - regval = spi_getreg8(priv, Z16F_GPIOC_AFH); - regval &= ~0x38; - spi_putreg8(priv, regval, Z16F_GPIOC_AFH); - - /* Initialize the ESPI peripheral. Master, Mode 0, 8-bits, 400KHz */ - - spi_putreg8(priv, 0x00, Z16F_ESPI_CTL); /* Disabled the ESPI */ - spi_putreg8(priv, 0x00, Z16F_ESPI_DCR); /* Disabled slave select; clear TEOF */ - - regval = Z16F_ESPI_MODE_SSIO | Z16F_ESPI_MODE_NUMBITS_8BITS | - Z16F_ESPI_MODE_SSMD_SPI; - spi_putreg8(priv, regval, Z16F_ESPI_MODE); /* SPI mode, 8-bit */ - - regval = Z16F_ESPI_CTL_ESPIEN0 | Z16F_ESPI_CTL_MMEN | - Z16F_ESPI_CTL_ESPIEN1; - spi_putreg8(priv, 0x00, Z16F_ESPI_CTL); /* TX/RX mode, Master mode */ - - /* Make sure that we are all in agreement about the configuration and - * set the BRG for 400KHz operation. - */ - - spi_setfrequency(&priv->spi, 400000); - spi_setmode(&priv->spi, SPIDEV_MODE0); - spi_setbits(&priv->spi, 8); - - /* Now we are initialized */ - - priv->initialized = true; - leave_critical_section(flags); - } - - spi_dumpregs(priv, "After initialization"); - return &priv->spi; -} - -#endif /* CONFIG_Z16F_ESPI */ diff --git a/arch/z16/src/z16f/z16f_head.S b/arch/z16/src/z16f/z16f_head.S deleted file mode 100644 index 94bb61154c..0000000000 --- a/arch/z16/src/z16f/z16f_head.S +++ /dev/null @@ -1,475 +0,0 @@ -/************************************************************************** - * arch/z16/src/z16f/z16f_head.S - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - **************************************************************************/ - -/************************************************************************** - * Included Files - **************************************************************************/ - -#include -#include -#include -#include "z16_internal.h" - -/************************************************************************** - * Pre-processor Definitions - **************************************************************************/ - -/************************************************************************** - * External References / External Definitions - **************************************************************************/ - - xref _z16f_clkinit:EROM - xref _z16f_board_initialize:EROM -#ifdef CONFIG_ARCH_LEDS - xref _board_autoled_initialize:EROM -#endif -#if defined(USE_LOWUARTINIT) - xref _z16f_lowuartinit:EROM -#elif defined(USE_EARLYSERIALINIT) - xref _z16_earlyserialinit:EROM -#endif - xref _nx_start:EROM - xref _z16_doirq:EROM - xref _z16f_sysexec:EROM - xdef _z16f_reset - - xref _low_nearbss:RAM - xref _len_nearbss - xref _low_farbss:ERAM - xref _len_farbss:ERAM - xref _low_neardata:RAM - xref _len_neardata - xref _low_near_romdata:EROM - xref _low_fardata:ERAM - xref _len_fardata:ERAM - xref _low_far_romdata:EROM - xref far_heapbot:ERAM - xref _far_stack:ERAM - xref _near_stack:RAM - -/************************************************************************** - * Flash Option Byte Setup - **************************************************************************/ - - define FOPTIONSEG, SPACE=ROM, ORG=0 - segment FOPTIONSEG - db BOARD_FLOPTION0 - db BOARD_FLOPTION1 - db BOARD_FLOPTION2 - db BOARD_FLOPTION3 - -/************************************************************************** - * vectors - **************************************************************************/ - - vector RESET=_z16f_reset - vector SYSEXC=_sysexc_isr - vector TIMER2=_timer2_isr - vector TIMER1=_timer1_isr - vector TIMER0=_timer0_isr - vector UART0_RX=_uart0rx_isr - vector UART0_TX=_uart0tx_isr - vector I2C=_i2c_isr - vector SPI=_spi_isr - vector ADC=_adc_isr - vector P7AD=_p7ad_isr - vector P6AD=_p6ad_isr - vector P5AD=_p5ad_isr - vector P4AD=_p4ad_isr - vector P3AD=_p3ad_isr - vector P2AD=_p2ad_isr - vector P1AD=_p1ad_isr - vector P0AD=_p0ad_isr - vector PWM_TIMER=_pwmtimer_isr - vector UART1_RX=_uart1rx_isr - vector UART1_TX=_uart1tx_isr - vector PWM_FAULT=_pwmfault_isr - vector C3=_c3_isr - vector C2=_c3_isr - vector C1=_c2_isr - vector C0=_c0_isr - -/************************************************************************** - * Equates - **************************************************************************/ - -/************************************************************************** - * Data Allocation - **************************************************************************/ - -/************************************************************************** - * Code - **************************************************************************/ - - define CODESEG, SPACE=EROM - segment CODESEG - -/************************************************************************** - * Name: _z16f_reset - * - * Description: - * Reset entry point - * - **************************************************************************/ - -_z16f_reset: - /* Initialize the init/idle task stack */ - - ld sp, #(_near_stack+1) /* Set Stack Pointer to the top of internal RAM */ - clr fp - - /* Initialize clocking */ - - call _z16f_clkinit - - /* Initialize onboard LEDs */ - -#ifdef CONFIG_ARCH_LEDS - call _board_autoled_initialize -#endif - /* Perform VERY early UART initialization so that we can use it here */ - -#ifdef USE_LOWUARTINIT - call _z16f_lowuartinit /* Initialize the UART for debugging */ -#endif - /* Initialize the hardware stack overflow register */ - -#ifdef CONFIG_Z16F_INITSPOV - ld r0, #(_near_stack_bot+1) - ld spov, r0 -#endif - /* Clear BSS */ - - lea r0, _low_nearbss - ld r1, #_len_nearbss+1 - jp _z16f_reset2 -_z16f_reset1: - ld.b (r0++), #0 -_z16f_reset2: - djnz r1, _z16f_reset1 - - lea r0, _low_farbss - ld r1, #_len_farbss+1 - jp _z16f_reset4 -_z16f_reset3: - ld.b (r0++), #0 -_z16f_reset4: - djnz r1, _z16f_reset3 - - /* Copy ROM data into RAM */ - - lea r0, _low_near_romdata - lea r1, _low_neardata - ld r2, #_len_neardata+1 - jp _z16f_reset6 -_z16f_reset5: - ld.b r3, (r0++) - ld.b (r1++), r3 -_z16f_reset6: - djnz r2, _z16f_reset5 - - lea r0, _low_far_romdata - lea r1, _low_fardata - ld r2, #_len_fardata+1 - jp _z16f_reset8 -_z16f_reset7: - ld.b r3, (r0++) - ld.b (r1++), r3 -_z16f_reset8: - djnz r2, _z16f_reset7 - - /* Perform low-level hardware initialization */ - - call _z16f_board_initialize /* Perform low-level hardware initialization */ - -#ifdef USE_EARLYSERIALINIT - /* Perform early serial initialization */ - - call _z16_earlyserialinit -#endif - /* Start NuttX */ - - call _nx_start /* Start the operating system */ -_halt1: /* _nx_start() should not return */ - halt - jp _halt1 - -/************************************************************************** - * Name: _sysexec_isr - * - * Description: - * System exception interrupt handler. On entry, the stack looks like - * this: - * - * TOS[0] = PC[31:24] - * TOS[1] = PC[23:16] - * TOS[2] = PC[15:8] - * TOS[3] = PC[7:0] - * TOS[4] = 0 - * TOS[5] = flags - * - **************************************************************************/ - -_sysexc_isr: - pushmlo /* Save r0-r7 on the stack */ - - /* Calculate the value of the SP BEFORE the interrupt occurred and - * push that as the saved value of r15=sp - */ - - ld r1, #-6 /* return(4) + flags(1) + padding(1) */ - add r1, sp /* r1 = Value of the SP before the interrupt */ - push r1 /* Push r1 in the spot for the saved SP */ - - /* Save all of the remaining registers */ - - pushmhi - - /* SP now holds the address of the beginning of the save structure - * on the stack. Now handle the system exception with arg1(r1)=address - * of the register save structure. - */ - - ld r1, sp - call _z16f_sysexec /* Handle in C logic */ - -_halt2: /* _z16f_sysexec() should not return */ - halt - jp _halt2 - -/************************************************************************** - * Name: Interrupt handlers - * - * Description: - * All interrupts will be vectored to the following locations. - * On entry, the stack contains the following: - * - * TOS[0] = PC[31:24] - * TOS[1] = PC[23:16] - * TOS[2] = PC[15:8] - * TOS[3] = PC[7:0] - * TOS[4] = 0 - * TOS[5] = flags - * - **************************************************************************/ - -_timer2_isr: - pushmlo /* Save r0-r7 on the stack */ - ld r1, #Z16F_IRQ_TIMER2 /* r1 = Timer 2 IRQ number */ - jp _common_isr /* Join common interrupt handling logic */ - -_timer1_isr: - pushmlo /* Save r0-r7 on the stack */ - ld r1, #Z16F_IRQ_TIMER1 /* r1 = Timer 1 IRQ number */ - jp _common_isr /* Join common interrupt handling logic */ - -_timer0_isr: - pushmlo /* Save r0-r7 on the stack */ - ld r1, #Z16F_IRQ_TIMER0 /* r1 = Timer 0 IRQ number */ - jp _common_isr /* Join common interrupt handling logic */ - -_uart0rx_isr: - pushmlo /* Save r0-r7 on the stack */ - ld r1, #Z16F_IRQ_UART0RX /* r1 = UART0 RX IRQ number */ - jp _common_isr /* Join common interrupt handling logic */ - -_uart0tx_isr: - pushmlo /* Save r0-r7 on the stack */ - ld r1, #Z16F_IRQ_UART0TX /* r1 = UART0 TX IRQ number */ - jp _common_isr /* Join common interrupt handling logic */ - -_i2c_isr: - pushmlo /* Save r0-r7 on the stack */ - ld r1, #Z16F_IRQ_I2C /* r1 = I2C IRQ number */ - jp _common_isr /* Join common interrupt handling logic */ - -_spi_isr: - pushmlo /* Save r0-r7 on the stack */ - ld r1, #Z16F_IRQ_SPI /* r1 = SPI IRQ number */ - jp _common_isr /* Join common interrupt handling logic */ - -_adc_isr: - pushmlo /* Save r0-r7 on the stack */ - ld r1, #Z16F_IRQ_ADC /* r1 = ADC IRQ number */ - jp _common_isr /* Join common interrupt handling logic */ - -_p7ad_isr: - pushmlo /* Save r0-r7 on the stack */ - ld r1, #Z16F_IRQ_P7AD /* r1 = Port A/D7, rising/falling edge IRQ number */ - jp _common_isr /* Join common interrupt handling logic */ - -_p6ad_isr: - pushmlo /* Save r0-r7 on the stack */ - ld r1, #Z16F_IRQ_P6AD /* r1 = Port A/D6, rising/falling edge IRQ number */ - jp _common_isr /* Join common interrupt handling logic */ - -_p5ad_isr: - pushmlo /* Save r0-r7 on the stack */ - ld r1, #Z16F_IRQ_P5AD /* r1 = Port A/D5, rising/falling edge IRQ number */ - jp _common_isr /* Join common interrupt handling logic */ - -_p4ad_isr: - pushmlo /* Save r0-r7 on the stack */ - ld r1, #Z16F_IRQ_P4AD /* r1 = Port A/D4, rising/falling edge IRQ number */ - jp _common_isr /* Join common interrupt handling logic */ - -_p3ad_isr: - pushmlo /* Save r0-r7 on the stack */ - ld r1, #Z16F_IRQ_P3AD /* r1 = Port A/D3, rising/falling edgeEXEC IRQ number */ - jp _common_isr /* Join common interrupt handling logic */ - -_p2ad_isr: - pushmlo /* Save r0-r7 on the stack */ - ld r1, #Z16F_IRQ_P2AD /* r1 = Port A/D2, rising/falling edge IRQ number */ - jp _common_isr /* Join common interrupt handling logic */ - -_p1ad_isr: - pushmlo /* Save r0-r7 on the stack */ - ld r1, #Z16F_IRQ_P1AD /* r1 = Port A/D1, rising/falling edge IRQ number */ - jp _common_isr /* Join common interrupt handling logic */ - -_p0ad_isr: - pushmlo /* Save r0-r7 on the stack */ - ld r1, #Z16F_IRQ_P0AD /* r1 = Port A/D0, rising/falling edge IRQ number */ - jp _common_isr /* Join common interrupt handling logic */ - -_pwmtimer_isr: - pushmlo /* Save r0-r7 on the stack */ - ld r1, #Z16F_IRQ_PWMTIMER /* r1 = PWM Timer IRQ number */ - jp _common_isr /* Join common interrupt handling logic */ - -_uart1rx_isr: - pushmlo /* Save r0-r7 on the stack */ - ld r1, #Z16F_IRQ_UART1RX /* r1 = UART1 RX IRQ number */ - jp _common_isr /* Join common interrupt handling logic */ - -_uart1tx_isr: - pushmlo /* Save r0-r7 on the stack */ - ld r1, #Z16F_IRQ_UART1TX /* r1 = UART1 TX IRQ number */ - jp _common_isr /* Join common interrupt handling logic */ - -_pwmfault_isr: - pushmlo /* Save r0-r7 on the stack */ - ld r1, #Z16F_IRQ_PWMFAULT /* r1 = PWM Fault IRQ number */ - jp _common_isr /* Join common interrupt handling logic */ - -_c3_isr: - pushmlo /* Save r0-r7 on the stack */ - ld r1, #Z16F_IRQ_C3 /* r1 = Port C3, both edges DMA3 IRQ number */ - jp _common_isr /* Join common interrupt handling logic */ - -_c2_isr: - pushmlo /* Save r0-r7 on the stack */ - ld r1, #Z16F_IRQ_C2 /* r1 = Port C2, both edges DMA2 IRQ number */ - jp _common_isr /* Join common interrupt handling logic */ - -_c1_isr: - pushmlo /* Save r0-r7 on the stack */ - ld r1, #Z16F_IRQ_C1 /* r1 = Port C1, both edges DMA1 IRQ number */ - jp _common_isr /* Join common interrupt handling logic */ - -_c0_isr: - pushmlo /* Save r0-r7 on the stack */ - ld r1, #Z16F_IRQ_C0 /* r1 = Port C0, both edges DMA0 IRQ number */ - /* Join common interrupt handling logic */ - -/************************************************************************** - * Name: _common_isr - * - * Description: - * Common interrupt handling logic. - * - * On entry: - * - * r1 = IRQ number - * - * And the stack contains the following: - * - * TOS[ 0- 3] = r0 - * TOS[ 4- 7] = r1 - * TOS[ 8-11] = r2 - * TOS[12-15] = r3 - * TOS[16-19] = r4 - * TOS[20-23] = r5 - * TOS[24-27] = r6 - * TOS[28-31] = r7 - * TOS[32-35] = return PC - * TOS[36-37] = flags (with padding) - * - **************************************************************************/ - -_common_isr: - /* Calculate the value of the SP BEFORE the interrupt occurred and - * push that as the saved value of r15=sp - */ - - ld r2, #(9*4+2) /* See stack accounting above */ - add r2, sp /* r1 = Value of the SP before the interrupt */ - push r2 /* Push r1 in the spot for the saved SP */ - - /* Save all of the remaining registers */ - - pushmhi - - /* SP now holds the address of the beginning of the save structure - * on the stack. Now handle the interrupt with arg1(r1)=IRQ number and - * arg2(r2)=address of the register save structure. - */ - - ld r2, sp - call _z16_doirq - - /* Upon return, _z16_doirq will provide that address of the save structure - * to use to return from the interrupt in r0. This may or may not be the - * same value as sp. - */ - - cp r0, sp /* Check if we are performing a context switch */ - jp nz, _common_switch /* Jump if yes, else use faster return */ - popmhi /* Restore r8-r14 */ - add sp, #4 /* Skip over restore of r15=sp */ - popmlo /* Restore r0-r7 */ - iret - - /* We are not returning to the same thread that was interrupted. In this case, - * r0 is not in the stack but, instead, refers to a storage structure in the TCB - */ - -_common_switch: - ld sp, 2*REG_SP(r0) /* sp=Value of SP on return from interrupt */ - ld.w r1, 2*REG_FLAGS(r0) /* r1=padded flags value */ - push.w r1 /* Push padded flags value onto the stack */ - ld r1, 2*REG_PC(r0) /* r1=return address */ - push r1 /* Push the return address onto the stack */ - ld r7, 2*REG_R7(r0) /* Recover saved r7 */ - push r7 /* And save on the stack so that we can use r7 */ - ld r7, sp /* r7=saved sp */ - - ld sp, r0 /* sp=Pointer to register save structure */ - popmhi /* Restore r8-r14 */ - add sp, #4 /* Skip over restore of r15=sp */ - popmlo /* Restore r0-r6 */ - ld sp, r7 /* Switch back to the correct stack */ - pop r7 /* Recover r7 from the stack */ - iret /* Return from interrupt */ - - end diff --git a/arch/z16/src/z16f/z16f_irq.c b/arch/z16/src/z16f/z16f_irq.c deleted file mode 100644 index 33c62f44f1..0000000000 --- a/arch/z16/src/z16f/z16f_irq.c +++ /dev/null @@ -1,188 +0,0 @@ -/**************************************************************************** - * arch/z16/src/z16f/z16f_irq.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include - -#include -#include - -#include "chip.h" -#include "z16_internal.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_irqinitialize - ****************************************************************************/ - -void up_irqinitialize(void) -{ - /* Clear and disable all interrupts. Set all to priority 0. */ - - putreg8(0xff, Z16F_IRQ0); - putreg8(0xff, Z16F_IRQ1); - putreg8(0xff, Z16F_IRQ2); - - putreg16(0x0000, Z16F_IRQ0_EN); - putreg16(0x0000, Z16F_IRQ1_EN); - putreg16(0x0000, Z16F_IRQ2_EN); - - /* And finally, enable interrupts */ - -#ifndef CONFIG_SUPPRESS_INTERRUPTS - EI(); -#endif -} - -/**************************************************************************** - * Name: up_disable_irq - * - * Description: - * Disable the IRQ specified by 'irq' - * - ****************************************************************************/ - -void up_disable_irq(int irq) -{ - /* System exceptions cannot be disabled */ - - if (irq >= Z16F_IRQ_IRQ0) - { - /* Disable the interrupt by clearing the corresponding bit in the - * appropriate IRQ enable high register. The enable low - * register is assumed to be zero, resulting interrupt disabled. - */ - - if (irq < Z16F_IRQ_IRQ1) - { - putreg8((getreg8(Z16F_IRQ0_ENH) & ~Z16F_IRQ0_BIT(irq)), - Z16F_IRQ0_ENH); - } - else if (irq < Z16F_IRQ_IRQ2) - { - putreg8((getreg8(Z16F_IRQ1_ENH) & ~Z16F_IRQ1_BIT(irq)), - Z16F_IRQ1_ENH); - } - else if (irq < NR_IRQS) - { - putreg8((getreg8(Z16F_IRQ2_ENH) & ~Z16F_IRQ2_BIT(irq)), - Z16F_IRQ2_ENH); - } - } -} - -/**************************************************************************** - * Name: up_enable_irq - * - * Description: - * Enable the IRQ specified by 'irq' - * - ****************************************************************************/ - -void up_enable_irq(int irq) -{ - /* System exceptions cannot be disabled */ - - if (irq >= Z16F_IRQ_IRQ0) - { - /* Enable the interrupt by setting the corresponding bit in the - * appropriate IRQ enable register. The enable low - * register is assumed to be zero, resulting in "nominal" interrupt - * priority. - */ - - if (irq < Z16F_IRQ_IRQ1) - { - putreg8((getreg8(Z16F_IRQ0_ENH) | Z16F_IRQ0_BIT(irq)), - Z16F_IRQ0_ENH); - } - else if (irq < Z16F_IRQ_IRQ2) - { - putreg8((getreg8(Z16F_IRQ1_ENH) | Z16F_IRQ1_BIT(irq)), - Z16F_IRQ1_ENH); - } - else if (irq < NR_IRQS) - { - putreg8((getreg8(Z16F_IRQ2_ENH) | Z16F_IRQ2_BIT(irq)), - Z16F_IRQ2_ENH); - } - } -} - -/**************************************************************************** - * Name: z16_ack_irq - * - * Description: - * Acknowledge the interrupt - * - ****************************************************************************/ - -void z16_ack_irq(int irq) -{ - /* System exceptions cannot be disabled or acknowledged */ - - if (irq >= Z16F_IRQ_IRQ0) - { - /* Acknowledge the interrupt by setting the corresponding bit in the - * IRQ status register. - */ - - if (irq < Z16F_IRQ_IRQ1) - { - putreg8(Z16F_IRQ0_BIT(irq), Z16F_IRQ0); - } - else if (irq < Z16F_IRQ_IRQ2) - { - putreg8(Z16F_IRQ1_BIT(irq), Z16F_IRQ2); - } - else if (irq < NR_IRQS) - { - putreg8(Z16F_IRQ2_BIT(irq), Z16F_IRQ2); - } - } -} - -/**************************************************************************** - * Name: up_prioritize_irq - * - * Description: - * Set interrupt priority - * - ****************************************************************************/ - -#ifdef CONFIG_ARCH_IRQPRIO -int up_prioritize_irq(int irq, int priority) -{ - /* To be provided */ - - return -ENOSYS; -} -#endif diff --git a/arch/z16/src/z16f/z16f_lowuart.S b/arch/z16/src/z16f/z16f_lowuart.S deleted file mode 100644 index fb416e594a..0000000000 --- a/arch/z16/src/z16f/z16f_lowuart.S +++ /dev/null @@ -1,258 +0,0 @@ -/************************************************************************* - * arch/z16/src/z16f/z16f_lowuart.asm - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - *************************************************************************/ - -/************************************************************************* - * Included Files - *************************************************************************/ - -#include -#include "chip.h" -#include "z16_internal.h" - -#ifdef USE_LOWUARTINIT - -/************************************************************************* - * Pre-processor Definitions - *************************************************************************/ - -#ifndef CONFIG_Z16F_UART0 -# undef CONFIG_UART0_SERIAL_CONSOLE -#endif - -#ifndef CONFIG_Z16F_UART1 -# undef CONFIG_UART1_SERIAL_CONSOLE -#endif - -#if defined(CONFIG_UART0_SERIAL_CONSOLE) || defined(CONFIG_UART1_SERIAL_CONSOLE) -# define HAVE_Z16F_SERIAL_CONSOLE -#endif - -/************************************************************************* - * External References / External Definitions - *************************************************************************/ - - xdef _z16f_lowuartinit - xref _SYS_CLK_FREQ:EROM -#ifdef CONFIG_Z16_LOWPUTC - xdef _z16_lowputc -#endif -#ifdef CONFIG_Z16_LOWGETC - xdef _z16_lowgetc -#endif - -/************************************************************************* - * Data Allocation - *************************************************************************/ - - define CODESEG, SPACE=EROM - segment CODESEG - -/************************************************************************* - * Code - *************************************************************************/ - -/************************************************************************* - * Name: z16f_lowuartinit - * - * Description: - * Initialize UART0 or UART1 - * - * Input Parameters: - * None - * - *************************************************************************/ - -_z16f_lowuartinit: - -#ifdef HAVE_Z16F_SERIAL_CONSOLE - /* Calculate and set the baud rate generation register */ - -#ifdef CONFIG_UART1_SERIAL_CONSOLE - ld r3, #CONFIG_UART1_BAUD /* r3 = Selected UART1 baud */ -#else - ld r3, #CONFIG_UART0_BAUD /* r3 = Selected UART0 (default) baud */ -#endif - ld r0, r3 /* r0 = baud */ - sll r0, #3 /* r0 = baud * 8 */ - add r0, #_SYS_CLK_FREQ /* r3 = freq + baud * 8 */ - sll r3, #4 /* r3 = baud * 16 */ - udiv r0, r3 /* BRG = (freq + baud * 8)/(baud * 16) */ - - /* Hacks to get a serial console available ASAP */ - -#ifdef CONFIG_UART1_SERIAL_CONSOLE - ld.w Z16F_UART1_BR, r0 /* Z16F_UART1_BR = BRG */ - - /* Set the GPIO Alternate Function Register Lo (AFL) register */ - - ld r0, #%30 - or.b Z16F_GPIOD_AFL, r0 /* Z16F_GPIOD_AFL |= %30 */ - - /* Enable UART receive (REN) and transmit (TEN) */ - - clr.b Z16F_UART1_CTL1 /* Z16F_UART1_CTL1 = 0 */ - ld r0, #(Z16F_UARTCTL0_TEN|Z16F_UARTCTL0_REN) - ld.b Z16F_UART1_CTL0, r0 /* Z16F_UART1_CTL0 = %c0 */ - -#else - ld.w Z16F_UART0_BR, r0 /* Z16F_UART0_BR = BRG */ - - /* Set the GPIO Alternate Function Register Lo (AFL) register */ - - ld r0, #%30 - or.b Z16F_GPIOA_AFL, r0 /* Z16F_GPIOA_AFL |= %30 */ - - /* Enable UART receive (REN) and transmit (TEN) */ - - clr.b Z16F_UART0_CTL1 /* Z16F_UART0_CTL1 = 0 */ - ld r0, #(Z16F_UARTCTL0_TEN|Z16F_UARTCTL0_REN) - ld.b Z16F_UART0_CTL0, r0 /* Z16F_UART0_CTL0 = %c0 */ - -#endif -#endif /* HAVE_Z16F_SERIAL_CONSOLE */ - - ret /* Return */ - -#endif /* USE_LOWUARTINIT */ - -/************************************************************************* - * Name: _z16_lowputc - * - * Description: - * Send one character to the selected serial console - * - * Input Parameters: - * r1 = character - * - * Returned Value: - * None - * - * Modifies r0 (and maybe r1) - * - *************************************************************************/ - -#ifdef CONFIG_Z16_LOWPUTC -_z16_lowputc: - -#ifdef HAVE_Z16F_SERIAL_CONSOLE - /* Check if the character to output is a linefeed */ - - ext.ub r0, r1 /* r0=Character masked to 8-bits */ - cp r0, #10 /* Is it a linefeed ('\n') */ - jp ne, _z16f_xmitc /* No? Jump to _z16f_xmitc with character in r1 */ - - /* Output a carriage return before the linefeed */ - - ld r1, #13 /* Output carriage reuturn ('\r') */ - call _z16f_xmitc /* Call _z16f_xmitc with r1='\r' */ - ld r1, #10 /* Restore r1=linefeed to output */ - /* Fall through to _z16f_xmitc with linefeed in r1 */ -#endif /* HAVE_Z16F_SERIAL_CONSOLE */ - -/************************************************************************* - * Name: _z16f_xmitc - * - * Description: - * Send one character on the selected port (really a part of z16_lowputc) - * - * Input Parameters: - * r1 = character - * - * Returned Value: - * None - * - * Modifies r0 - * - *************************************************************************/ - -_z16f_xmitc: -_z16f_xmitc1: - -#ifdef HAVE_Z16F_SERIAL_CONSOLE - ld r0, Z16F_UARTSTAT0_TDRE /* TDRE=Transmitter Data Register Empty */ - -#ifdef CONFIG_UART1_SERIAL_CONSOLE - tm.b Z16F_UART1_STAT0, r0 /* r0 = Z16F_UART1_STAT0 */ - jp eq, _z16f_xmitc1 /* While (!(Z16F_UART1_STAT0 & TDRE)) */ - ld.b Z16F_UART1_TXD, r1 /* Z16F_UART1_TXD = r1 (character) */ - -#else - tm.b Z16F_UART0_STAT0, r0 /* r0 = Z16F_UART0_STAT1 */ - jp eq, _z16f_xmitc1 /* While (!(Z16F_UART0_STAT0 & TDRE)) */ - ld.b Z16F_UART0_TXD, r1 /* Z16F_UART0_TXD = r1 (character) */ - -#endif -#endif /* HAVE_Z16F_SERIAL_CONSOLE */ - - ret /* Return */ - -#endif /* CONFIG_Z16_LOWPUTC */ - -/************************************************************************* - * Name: _z16_lowgetc - * - * Description: - * Get a character from the serial port - * - * Input Parameters: - * None - * - * Returned Value: - * R0 = Character read - * - *************************************************************************/ - -#ifdef CONFIG_Z16_LOWGETC -_z16_lowgetc: -_z16_lowgetc1: - -#ifdef HAVE_Z16F_SERIAL_CONSOLE - ld r0, #Z16F_UARTSTAT0_RDA /* RDA=Receive data available */ - -#ifdef CONFIG_UART1_SERIAL_CONSOLE - tm.b Z16F_UART1_STAT0, r0 - jp eq, _z16_lowgetc1 /* While (!Z16F_UART1_STAT0 & RDA)) */ - ld.ub r0, Z16F_UART1_RXD /* r0 = Z16F_UART1_RXD */ - -#else - tm.b Z16F_UART0_STAT0,r0 /* While (!Z16F_UART0_STAT0 & RDA) */ - jp eq, _z16_lowgetc1 - ld.ub r0, Z16F_UART0_RXD /* r0 = Z16F_UART0_RXD */ - -#endif - - cp r0, #%0d /* Test for '\r' */ - jp eq, _z16_lowgetc2 - - cp r0, #%0d /* Test \r + high bit */ - jp ne, _z16_lowgetc3 - -_z16_lowgetc2: - ld r0, #%0a /* Convert '\r' to '\n' */ - -_z16_lowgetc3: /* Return value in r0 */ -#endif /* HAVE_Z16F_SERIAL_CONSOLE */ - - ret /* Return */ -#endif - - end diff --git a/arch/z16/src/z16f/z16f_restoreusercontext.S b/arch/z16/src/z16f/z16f_restoreusercontext.S deleted file mode 100644 index 94fc90b6d8..0000000000 --- a/arch/z16/src/z16f/z16f_restoreusercontext.S +++ /dev/null @@ -1,88 +0,0 @@ -/************************************************************************* - * arch/z16/src/z16f/z16f_restoreusercontext.asm - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - *************************************************************************/ - -/************************************************************************* - * Included Files - *************************************************************************/ - -#include -#include -#include "chip.h" - -/************************************************************************* - * External References / External Definitions - *************************************************************************/ - - xdef _z16_restoreusercontext - -/************************************************************************* - * Data Allocation - *************************************************************************/ - - define CODESEG, SPACE=EROM - segment CODESEG - -/************************************************************************* - * Code - *************************************************************************/ - -/************************************************************************* - * Name: z16_restoreusercontext - * - * Description: - * Restore the current user context. - * - * Input Parameters: - * r1: pointer to the register save array in the XCPT structure - * - *************************************************************************/ - -_z16_restoreusercontext: - /* Disable interrupts while we are accessing the TCB's register - * save structure. The correct interrupt state will be restored - * by the iret instruction below. - */ - - di - - /* Set up the stack for return from 'interrupt' */ - - ld sp, 2*REG_SP(r1) /* sp=Value of SP on return */ - ld.w r2, 2*REG_FLAGS(r1) /* r1=padded flags value */ - push.w r2 /* Push padded flags value onto the stack */ - ld r2, 2*REG_PC(r1) /* r2=return address */ - push r2 /* Push the return address onto the stack */ - ld r7, 2*REG_R7(r1) /* r7=saved value of r7 */ - push r7 /* Save this so that we can use r7 */ - ld r7, sp /* r7=saved SP value */ - - /* Restore registers and return from interrupt */ - - ld sp, r1 /* sp=Pointer to register save structure */ - popmhi /* Restore r8-r14 */ - add sp, #4 /* Skip over restore of r15=sp */ - popmlo /* Restore r0-r6 */ - ld sp, r7 /* Switch to the correct stack for return */ - pop r7 /* Recover the saved value of r7 from the stack */ - iret2 /* Return from interrupt */ - - end diff --git a/arch/z16/src/z16f/z16f_saveusercontext.S b/arch/z16/src/z16f/z16f_saveusercontext.S deleted file mode 100644 index a3a6cc4e2d..0000000000 --- a/arch/z16/src/z16f/z16f_saveusercontext.S +++ /dev/null @@ -1,106 +0,0 @@ -/************************************************************************* - * arch/z16/src/z16f/z16f_saveusercontext.asm - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - *************************************************************************/ - -/************************************************************************* - * Included Files - *************************************************************************/ - -#include -#include -#include "chip.h" - -/************************************************************************* - * External References / External Definitions - *************************************************************************/ - - xdef _up_saveusercontext - -/************************************************************************* - * Data Allocation - *************************************************************************/ - - define CODESEG, SPACE=EROM - segment CODESEG - -/************************************************************************* - * Code - *************************************************************************/ - -/************************************************************************* - * Name: up_saveusercontext - * - * Description: - * Save the current user context. - * r0-r7: These are caller saved registers and do not need to be stored - * here - * r8-r13: There callee saved registers must be preserved - * r14: Frame pointer - * r15: Stack pointer (with return address on stack) - * - * Input Parameters: - * r1: pointer to the register save array in the XCPT structure - * - *************************************************************************/ - -_up_saveusercontext: - /* Save the flags (needed to restore the interrupt state) */ - - ld.ub r3, Z16F_CNTRL_FLAGS /* Fetch the flags register (zero padded) */ - ld.w 2*REG_FLAGS(r1), r3 /* Save 16-bit value */ - - /* Save r8-R13 */ - - ld 2*REG_R8(r1), r8 /* Save r8 */ - ld 2*REG_R9(r1), r9 /* Save r9 */ - ld 2*REG_R10(r1), r10 /* Save r10 */ - ld 2*REG_R11(r1), r11 /* Save r11 */ - ld 2*REG_R12(r1), r12 /* Save r12 */ - ld 2*REG_R13(r1), r13 /* Save r13 */ - - /* Save the stack pointer and the frame pointer */ - - ld 2*REG_FP(r1), fp /* Save the frame pointer */ - ld r0, #4 /* 4 bytes of return address on stack */ - add r0, sp /* Value of stack pointer on return */ - ld 2*REG_SP(r1), r0 /* Save the stack pointer value on return */ - - /* Save the return address at the top of the stack */ - - ld r0, (sp) /* Save the return address */ - ld 2*REG_PC(r1), r0 - - /* Set the return value so that if when the task is restarted - * (via z16f_restoreusercontext() or via interrupt handling return), - * the returned value will be 1 - */ - - ld r0, #1 - ld 2*REG_R0(r1), r0 - - /* But always return 0 when returning from this function. The - * apparent return value tells the higher level logic whether the - * user context was saved or restored (in the spirit of setjmp and longjmp) - */ - - clr r0 /* Always returns 0 */ - ret - end diff --git a/arch/z16/src/z16f/z16f_serial.c b/arch/z16/src/z16f/z16f_serial.c deleted file mode 100644 index 2bd41173ab..0000000000 --- a/arch/z16/src/z16f/z16f_serial.c +++ /dev/null @@ -1,839 +0,0 @@ -/**************************************************************************** - * arch/z16/src/z16f/z16f_serial.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "chip.h" -#include "z16_internal.h" - -#ifdef USE_SERIALDRIVER - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* System clock frequency value from ZDS target settings */ - -extern _Erom unsigned long SYS_CLK_FREQ; -#define _DEFCLK ((unsigned long)&SYS_CLK_FREQ) - -#define STATE_DISABLED 0 -#define STATE_RXENABLED 1 -#define STATE_TXENABLED 2 - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -struct z16f_uart_s -{ - uint32_t uartbase; /* Base address of UART registers */ - uint32_t baud; /* Configured baud */ - bool rxenabled; /* RX interrupt enabled */ - bool txenabled; /* TX interrupt enabled */ - uint8_t rxirq; /* RX IRQ associated with this UART */ - uint8_t txirq; /* RX IRQ associated with this UART */ - uint8_t parity; /* 0=none, 1=odd, 2=even */ - spinlock_t lock; /* */ - bool stopbits2; /* true: Configure with 2 stop bits instead of 1 */ -}; - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -static int z16f_setup(struct uart_dev_s *dev); -static void z16f_shutdown(struct uart_dev_s *dev); -static int z16f_attach(struct uart_dev_s *dev); -static void z16f_detach(struct uart_dev_s *dev); -static int z16f_rxinterrupt(int irq, void *context, void *arg); -static int z16f_txinterrupt(int irq, void *context, void *arg); -static int z16f_ioctl(struct file *filep, int cmd, unsigned long arg); -static int z16f_receive(struct uart_dev_s *dev, uint32_t *status); -static void z16f_rxint(struct uart_dev_s *dev, bool enable); -static bool z16f_rxavailable(struct uart_dev_s *dev); -static void z16f_send(struct uart_dev_s *dev, int ch); -static void z16f_txint(struct uart_dev_s *dev, bool enable); -static bool z16f_txready(struct uart_dev_s *dev); -static bool z16f_txempty(struct uart_dev_s *dev); - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -static const struct uart_ops_s g_uart_ops = -{ - z16f_setup, /* setup */ - z16f_shutdown, /* shutdown */ - z16f_attach, /* attach */ - z16f_detach, /* detach */ - z16f_ioctl, /* ioctl */ - z16f_receive, /* receive */ - z16f_rxint, /* rxint */ - z16f_rxavailable, /* rxavailable */ -#ifdef CONFIG_SERIAL_IFLOWCONTROL - NULL, /* rxflowcontrol */ -#endif - z16f_send, /* send */ - z16f_txint, /* txint */ - z16f_txready, /* txready */ - z16f_txempty /* txempty */ -}; - -/* I/O buffers */ - -#ifdef CONFIG_Z16F_UART0 -static char g_uart0rxbuffer[CONFIG_UART0_RXBUFSIZE]; -static char g_uart0txbuffer[CONFIG_UART0_TXBUFSIZE]; -#endif - -#ifdef CONFIG_Z16F_UART1 -static char g_uart1rxbuffer[CONFIG_UART1_RXBUFSIZE]; -static char g_uart1txbuffer[CONFIG_UART1_TXBUFSIZE]; -#endif - -#ifdef CONFIG_Z16F_UART0 -/* This describes the state of the ZNEO uart0 port. */ - -static struct z16f_uart_s g_uart0priv = -{ - Z16F_UART0_BASE, /* uartbase */ - CONFIG_UART0_BAUD, /* baud */ - false, /* rxenabled */ - false, /* txenabled */ - Z16F_IRQ_UART0RX, /* rxirq */ - Z16F_IRQ_UART0TX, /* txirq */ - CONFIG_UART0_PARITY, /* parity */ - SP_UNLOCKED, /* Spinlock */ - CONFIG_UART0_2STOP /* stopbits2 */ -}; - -static uart_dev_t g_uart0port; -#endif - -#ifdef CONFIG_Z16F_UART1 -/* This describes the state of the ZNEO uart1 port. */ - -static struct z16f_uart_s g_uart1priv = -{ - Z16F_UART1_BASE, /* uartbase */ - CONFIG_UART1_BAUD, /* baud */ - false, /* rxenabled */ - false, /* txenabled */ - Z16F_IRQ_UART1RX, /* rxirq */ - Z16F_IRQ_UART1TX, /* txirq */ - CONFIG_UART1_PARITY, /* parity */ - SP_UNLOCKED, /* Spinlock */ - CONFIG_UART1_2STOP /* stopbits2 */ -}; - -static uart_dev_t g_uart1port; -#endif - -/* Now, which one with be tty0/console and which tty1? */ - -#ifndef CONFIG_Z16F_UART0 -# undef CONFIG_UART0_SERIAL_CONSOLE -#endif - -#ifndef CONFIG_Z16F_UART1 -# undef CONFIG_UART1_SERIAL_CONSOLE -#endif - -/* First pick the console and ttys0. This could be either of UART0-1 */ - -#if defined(CONFIG_UART0_SERIAL_CONSOLE) -# define CONSOLE_DEV g_uart0port /* UART0 is console */ -# define TTYS0_DEV g_uart0port /* UART0 is ttyS0 */ -# define UART0_ASSIGNED 1 -#elif defined(CONFIG_UART1_SERIAL_CONSOLE) -# define CONSOLE_DEV g_uart1port /* UART1 is console */ -# define TTYS0_DEV g_uart1port /* UART1 is ttyS0 */ -# define UART1_ASSIGNED 1 -#else -# undef CONSOLE_DEV /* No console */ -# if defined(CONFIG_Z16F_UART0) -# define TTYS0_DEV g_uart0port /* UART0 is ttyS0 */ -# define UART0_ASSIGNED 1 -# elif defined(CONFIG_Z16F_UART1) -# define TTYS0_DEV g_uart1port /* UART1 is ttyS0 */ -# define UART1_ASSIGNED 1 -# endif -#endif - -/* Pick ttys1. This could be either of UART0-1 excluding the console UART. */ - -#if defined(CONFIG_Z16F_UART0) && !defined(UART0_ASSIGNED) -# define TTYS1_DEV g_uart0port /* UART0 is ttyS1 */ -# define UART0_ASSIGNED 1 -#elif defined(CONFIG_Z16F_UART1) && !defined(UART1_ASSIGNED) -# define TTYS1_DEV g_uart1port /* UART1 is ttyS1 */ -# define UART1_ASSIGNED 1 -#endif - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: z16f_disableuartirq - ****************************************************************************/ - -static uint8_t z16f_disableuartirq(struct uart_dev_s *dev) -{ - struct z16f_uart_s *priv = (struct z16f_uart_s *)dev->priv; - irqstate_t flags = spin_lock_irqsave(&priv->lock); - uint8_t state = priv->rxenabled ? STATE_RXENABLED : - STATE_DISABLED | - priv->txenabled ? STATE_TXENABLED : - STATE_DISABLED; - - z16f_txint_nolock(dev, false); - z16f_rxint_nolock(dev, false); - - spin_unlock_irqrestore(&priv->lock, flags); - return state; -} - -/**************************************************************************** - * Name: z16f_restoreuartirq - ****************************************************************************/ - -static void z16f_restoreuartirq(struct uart_dev_s *dev, uint8_t state) -{ - struct z16f_uart_s *priv = (struct z16f_uart_s *)dev->priv; - irqstate_t flags = spin_lock_irqsave(&priv->lock); - - z16f_txint_nolock(dev, (state & STATE_TXENABLED) ? true : false); - z16f_rxint_nolock(dev, (state & STATE_RXENABLED) ? true : false); - - spin_unlock_irqrestore(&priv->lock, flags); -} - -/**************************************************************************** - * Name: z16f_consoleput - ****************************************************************************/ - -#ifdef CONSOLE_DEV -static void z16f_consoleput(uint8_t ch) -{ - struct z16f_uart_s *priv = (struct z16f_uart_s *)CONSOLE_DEV.priv; - int tmp; - - for (tmp = 1000 ; tmp > 0 ; tmp--) - { - if (z16f_txready(&CONSOLE_DEV)) - { - break; - } - } - - putreg8(ch, priv->uartbase + Z16F_UART_TXD); -} -#endif - -/**************************************************************************** - * Name: z16f_setup - * - * Description: - * Configure the UART baud, parity, etc. This method is called the first - * time that the serial port is opened. - * - ****************************************************************************/ - -static int z16f_setup(struct uart_dev_s *dev) -{ -#ifndef CONFIG_SUPPRESS_UART_CONFIG - struct z16f_uart_s *priv = (struct z16f_uart_s *)dev->priv; - uint32_t brg; - uint8_t ctl0; - uint8_t ctl1; - - /* Calculate and set the baud rate generation register. - * BRG = (freq + baud * 8)/(baud * 16) - */ - - brg = (_DEFCLK + (priv->baud << 3)) / (priv->baud << 4); - putreg16((uint16_t)brg, priv->uartbase + Z16F_UART_BR); - - /* Configure STOP bits */ - - ctl0 = 0; - ctl1 = 0; - - if (priv->stopbits2) - { - ctl0 |= Z16F_UARTCTL0_STOP; - } - - /* Configure parity */ - - if (priv->parity == 1) - { - ctl0 |= (Z16F_UARTCTL0_PEN | Z16F_UARTCTL0_PSEL); - } - else if (priv->parity == 2) - { - ctl0 |= Z16F_UARTCTL0_PEN; - } - - putreg8(ctl0, priv->uartbase + Z16F_UART_CTL0); - putreg8(ctl1, priv->uartbase + Z16F_UART_CTL1); - - /* Enable UART receive (REN) and transmit (TEN) */ - - ctl0 |= (Z16F_UARTCTL0_TEN | Z16F_UARTCTL0_REN); - putreg8(ctl0, priv->uartbase + Z16F_UART_CTL0); -#endif - - return OK; -} - -/**************************************************************************** - * Name: z16f_shutdown - * - * Description: - * Disable the UART. This method is called when the serial port is closed - * - ****************************************************************************/ - -static void z16f_shutdown(struct uart_dev_s *dev) -{ - z16f_disableuartirq(dev); -} - -/**************************************************************************** - * Name: z16f_attach - * - * Description: - * Configure the UART to operation in interrupt driven mode. This method - * is called when the serial port is opened. Normally, this is just after - * the the setup() method is called, however, the serial console may - * operate in a non-interrupt driven mode during the boot phase. - * - * RX and TX interrupts are not enabled when by the attach method (unless - * the hardware supports multiple levels of interrupt enabling). The RX - * and TX interrupts are not enabled until the txint() and rxint() methods - * are called. - * - ****************************************************************************/ - -static int z16f_attach(struct uart_dev_s *dev) -{ - struct z16f_uart_s *priv = (struct z16f_uart_s *)dev->priv; - int ret; - - /* Attach the RX IRQ */ - - ret = irq_attach(priv->rxirq, z16f_rxinterrupt, dev); - if (ret == OK) - { - /* Attach the TX IRQ */ - - ret = irq_attach(priv->txirq, z16f_txinterrupt, dev); - if (ret != OK) - { - irq_detach(priv->rxirq); - } - } - - return ret; -} - -/**************************************************************************** - * Name: z16f_detach - * - * Description: - * Detach UART interrupts. This method is called when the serial port is - * closed normally just before the shutdown method is called. The - * exception is the serial console which is never shutdown. - * - ****************************************************************************/ - -static void z16f_detach(struct uart_dev_s *dev) -{ - struct z16f_uart_s *priv = (struct z16f_uart_s *)dev->priv; - - up_disable_irq(priv->rxirq); - up_disable_irq(priv->txirq); - - irq_detach(priv->rxirq); - irq_detach(priv->txirq); -} - -/**************************************************************************** - * Name: z16f_rxinterrupt - * - * Description: - * This is the UART interrupt handler. It will be invoked when an RX - * event occurs at the Z16F's LIN-UART. - * - ****************************************************************************/ - -static int z16f_rxinterrupt(int irq, void *context, void *arg) -{ - struct uart_dev_s *dev = (struct uart_dev_s *)arg; - struct z16f_uart_s *priv; - uint8_t status; - - DEBUGASSERT(dev != NULL && dev->priv != NULL); - priv = (struct z16f_uart_s *)dev->priv; - - /* Check the LIN-UART status 0 register to determine whether the source of - * the interrupt is error, break, or received data - */ - - status = getreg8(priv->uartbase + Z16F_UART_STAT0); - - /* REVISIT error and break handling */ - - /* Check if received data is available */ - - if (status & Z16F_UARTSTAT0_RDA) - { - /* Handle an incoming, received byte */ - - uart_recvchars(dev); - } - - return OK; -} - -/**************************************************************************** - * Name: z16f_txinterrupt - * - * Description: - * This is the UART TX interrupt handler. This interrupt handler will - * be invoked when the X16F LIN UART transmit data register is empty. - * - ****************************************************************************/ - -static int z16f_txinterrupt(int irq, void *context, FAR void *arg) -{ - struct uart_dev_s *dev = (struct uart_dev_s *)arg; - struct z16f_uart_s *priv; - uint8_t status; - - DEBUGASSERT(dev != NULL && dev->priv != NULL); - priv = (struct z16f_uart_s *)dev->priv; - - /* Verify that the transmit data register is empty */ - - status = getreg8(priv->uartbase + Z16F_UART_STAT0); - if (status & Z16F_UARTSTAT0_TDRE) - { - /* Handle outgoing, transmit bytes */ - - uart_xmitchars(dev); - } - - return OK; -} - -/**************************************************************************** - * Name: z16f_ioctl - * - * Description: - * All ioctl that are not handled by the upper half serial driver will be - * routed through this method - * - ****************************************************************************/ - -static int z16f_ioctl(struct file *filep, int cmd, unsigned long arg) -{ - return -ENOTTY; -} - -/**************************************************************************** - * Name: z16f_receive - * - * Description: - * Called (usually) from the interrupt level to receive one character from - * the UART. Error bits associated with the receipt are provided in the - * return 'status'. - * - ****************************************************************************/ - -static int z16f_receive(struct uart_dev_s *dev, uint32_t *status) -{ - struct z16f_uart_s *priv = (struct z16f_uart_s *)dev->priv; - uint8_t rxd; - uint8_t stat0; - - rxd = getreg8(priv->uartbase + Z16F_UART_RXD); - stat0 = getreg8(priv->uartbase + Z16F_UART_STAT0); - *status = (uint32_t)rxd | (((uint32_t)stat0) << 8); - - return rxd; -} - -/**************************************************************************** - * Name: z16f_rxint - * - * Description: - * Call to enable or disable RX interrupts - * - ****************************************************************************/ - -static void z16f_rxint_nolock(struct uart_dev_s *dev, bool enable) -{ - struct z16f_uart_s *priv = (struct z16f_uart_s *)dev->priv; - - if (enable) - { -#ifndef CONFIG_SUPPRESS_SERIAL_INTS - up_enable_irq(priv->rxirq); -#endif - } - else - { - up_disable_irq(priv->rxirq); - } - - priv->rxenabled = enable; -} - -static void z16f_rxint(struct uart_dev_s *dev, bool enable) -{ - struct z16f_uart_s *priv = (struct z16f_uart_s *)dev->priv; - irqstate_t flags = spin_lock_irqsave(&priv->lock); - - z16f_rxint_nolock(dev, enable); - spin_unlock_irqrestore(&priv->lock, flags); -} - -/**************************************************************************** - * Name: z16f_rxavailable - * - * Description: - * Return true if the receive FIFO is not empty - * - ****************************************************************************/ - -static bool z16f_rxavailable(struct uart_dev_s *dev) -{ - struct z16f_uart_s *priv = (struct z16f_uart_s *)dev->priv; - return ((getreg8(priv->uartbase + Z16F_UART_STAT0) & - Z16F_UARTSTAT0_RDA) != 0); -} - -/**************************************************************************** - * Name: z16f_send - * - * Description: - * This method will send one byte on the UART - * - ****************************************************************************/ - -static void z16f_send(struct uart_dev_s *dev, int ch) -{ - struct z16f_uart_s *priv = (struct z16f_uart_s *)dev->priv; - putreg8(ch, priv->uartbase + Z16F_UART_TXD); -} - -/**************************************************************************** - * Name: z16f_txint - * - * Description: - * Call to enable or disable TX interrupts - * - ****************************************************************************/ - -static void z16f_txint_nolock(struct uart_dev_s *dev, bool enable) -{ - struct z16f_uart_s *priv = (struct z16f_uart_s *)dev->priv; - - if (enable) - { -#ifndef CONFIG_SUPPRESS_SERIAL_INTS - up_enable_irq(priv->txirq); -#endif - - /* Fake a TX interrupt here by just calling uart_xmitchars() with - * interrupts disabled (note this may recurse). - */ - - uart_xmitchars(dev); - } - else - { - up_disable_irq(priv->txirq); - } - - priv->txenabled = enable; -} - -static void z16f_txint(struct uart_dev_s *dev, bool enable) -{ - struct z16f_uart_s *priv = (struct z16f_uart_s *)dev->priv; - irqstate_t flags = spin_lock_irqsave(&priv->lock); - - z16f_txint_nolock(dev, enable); - spin_unlock_irqrestore(&priv->lock, flags); -} - -/**************************************************************************** - * Name: z16f_txready - * - * Description: - * Return true if the transmit FIFO is not full - * - ****************************************************************************/ - -static bool z16f_txready(struct uart_dev_s *dev) -{ - struct z16f_uart_s *priv = (struct z16f_uart_s *)dev->priv; - return ((getreg8(priv->uartbase + Z16F_UART_STAT0) & - Z16F_UARTSTAT0_TDRE) != 0); -} - -/**************************************************************************** - * Name: z16f_txempty - * - * Description: - * Return true if the transmit FIFO is empty - * - ****************************************************************************/ - -static bool z16f_txempty(struct uart_dev_s *dev) -{ - struct z16f_uart_s *priv = (struct z16f_uart_s *)dev->priv; - return ((getreg8(priv->uartbase + Z16F_UART_STAT0) & - Z16F_UARTSTAT0_TXE) != 0); -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -#ifdef USE_EARLYSERIALINIT - -/**************************************************************************** - * Name: z16_earlyserialinit - * - * Description: - * Performs the low level UART initialization early in debug so that the - * serial console will be available during boot-up. This must be called - * before z16f_serialinit. - * - ****************************************************************************/ - -void z16_earlyserialinit(void) -{ - uint8_t regval; - - /* Configure UART alternate pin functions. This may duplicate logic in - * z16f_lowuartinit() or z16f_board_initialize(). - */ - -#ifdef CONFIG_Z16F_UART0 - /* UART0 is PA4 and PA5, alternate function 1 */ - - regval = getreg8(Z16F_GPIOA_AFL); - regval |= 0x30; - putreg8(regval, Z16F_GPIOA_AFL); - - regval = getreg8(Z16F_GPIOA_AFH); - regval &= ~0x30; - putreg8(regval, Z16F_GPIOA_AFH); - - /* Initialize the UART structure */ - - memset(&g_uart0port, 0, sizeof(uart_dev_t)); -#ifdef CONFIG_UART0_SERIAL_CONSOLE - g_uart0port.isconsole = true; -#endif - g_uart0port.xmit.size = CONFIG_UART0_TXBUFSIZE; - g_uart0port.xmit.buffer = g_uart0txbuffer; - g_uart0port.recv.size = CONFIG_UART0_RXBUFSIZE; - g_uart0port.recv.buffer = g_uart0rxbuffer; - g_uart0port.ops = &g_uart_ops; - g_uart0port.priv = &g_uart0priv; -#endif - -#ifdef CONFIG_Z16F_UART1 - /* UART1 is PD4 and PD5, alternate function 1 */ - - regval = getreg8(Z16F_GPIOD_AFL); - regval |= 0x30; - putreg8(regval, Z16F_GPIOD_AFL); - - regval = getreg8(Z16F_GPIOD_AFH); - regval &= ~0x30; - putreg8(regval, Z16F_GPIOD_AFH); - - /* Initialize the UART structure */ - - memset(&g_uart1port, 0, sizeof(uart_dev_t)); -#ifdef CONFIG_UART1_SERIAL_CONSOLE - g_uart1port.isconsole = true; -#endif - g_uart1port.xmit.size = CONFIG_UART1_TXBUFSIZE; - g_uart1port.xmit.buffer = g_uart1txbuffer; - g_uart1port.recv.size = CONFIG_UART1_RXBUFSIZE; - g_uart1port.recv.buffer = g_uart1rxbuffer; - g_uart1port.ops = &g_uart_ops; - g_uart1port.priv = &g_uart1priv; -#endif - - /* Disable UART interrupts */ - -#ifdef TTYS0_DEV - z16f_disableuartirq(&TTYS0_DEV); -#endif - -#ifdef TTYS1_DEV - z16f_disableuartirq(&TTYS1_DEV); -#endif - - /* Configuration any serial console */ - -#ifdef CONSOLE_DEV - CONSOLE_DEV.isconsole = true; - z16f_setup(&CONSOLE_DEV); -#endif -} -#endif - -/**************************************************************************** - * Name: z16_serialinit - * - * Description: - * Register serial console and serial ports. This assumes that - * z16_earlyserialinit was called previously. - * - ****************************************************************************/ - -void z16_serialinit(void) -{ -#ifdef CONSOLE_DEV - uart_register("/dev/console", &CONSOLE_DEV); -#endif -#ifdef TTYS0_DEV - uart_register("/dev/ttyS0", &TTYS0_DEV); -#endif -#ifdef TTYS1_DEV - uart_register("/dev/ttyS1", &TTYS1_DEV); -#endif -} - -/**************************************************************************** - * Name: up_putc - * - * Description: - * Provide priority, low-level access to support OS debug writes - * - ****************************************************************************/ - -#ifdef CONSOLE_DEV -void up_putc(int ch) -{ - uint8_t state; - - /* Keep interrupts disabled so that we do not interfere with normal - * driver operation. - * - * REVISIT: I can imagine scenarios where the follow logic gets preempted - * and the UART interrupts get left in a bad state. - */ - - state = z16f_disableuartirq(&CONSOLE_DEV); - - /* Output the character */ - - z16f_consoleput((uint8_t)ch); - - /* It is important to restore the TX interrupt while the send is pending. - * otherwise, TRDE interrupts can be lost since they do not pend after the - * TRDE false->true transition. - */ - - z16f_restoreuartirq(&CONSOLE_DEV, state); -} -#endif - -#else /* USE_SERIALDRIVER */ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#ifdef CONFIG_UART1_SERIAL_CONSOLE -# define z16f_contrde() \ - ((getreg8(Z16F_UART1_STAT0) & Z16F_UARTSTAT0_TDRE) != 0) -# define z16f_contxd(ch) \ - putreg8((uint8_t)(ch), Z16F_UART1_TXD) -#else -# define z16f_contrde() \ - ((getreg8(Z16F_UART0_STAT0) & Z16F_UARTSTAT0_TDRE) != 0) -# define z16f_contxd(ch) \ - putreg8((uint8_t)(ch), Z16F_UART0_TXD) -#endif - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: z16f_putc - ****************************************************************************/ - -static void z16f_putc(int ch) -{ - int tmp; - for (tmp = 1000 ; tmp > 0 && !z16f_contrde(); tmp--); - z16f_contxd(ch); -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_putc - ****************************************************************************/ - -void up_putc(int ch) -{ - /* Output character */ - - z16f_putc(ch); -} - -#endif /* USE_SERIALDRIVER */ diff --git a/arch/z16/src/z16f/z16f_sysexec.c b/arch/z16/src/z16f/z16f_sysexec.c deleted file mode 100644 index 90c672e3b7..0000000000 --- a/arch/z16/src/z16f/z16f_sysexec.c +++ /dev/null @@ -1,110 +0,0 @@ -/**************************************************************************** - * arch/z16/src/z16f/z16f_sysexec.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include - -#include - -#include "chip.h" -#include "z16_internal.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Function: z16f_sysexec - * - * Description: - * Handle a Z16F system exception - * - ****************************************************************************/ - -void z16f_sysexec(FAR chipreg_t *regs) -{ - struct tcb_s **running_task = &g_running_tasks[this_cpu()]; - uint16_t excp; - - z16_copystate((*running_task)->xcp.regs, regs) - - /* Save that register reference so that it can be used for built-in - * diagnostics. - */ - - up_set_current_regs(regs); - - /* The cause of the system exception is indicated in the SYSEXCPH&L - * registers - */ - - excp = getreg16(Z16F_SYSEXCP); - if ((excp & Z16F_SYSEXCP_SPOVF) != 0) - { - _err("ERROR: SP OVERFLOW\n"); - } - - if ((excp & Z16F_SYSEXCP_PCOVF) != 0) - { - _err("ERROR: PC OVERFLOW\n"); - } - - if ((excp & Z16F_SYSEXCP_DIV0) != 0) - { - _err("ERROR: Divide by zero\n"); - } - - if ((excp & Z16F_SYSEXCP_DIVOVF) != 0) - { - _err("ERROR: Divide overflow\n"); - } - - if ((excp & Z16F_SYSEXCP_ILL) != 0) - { - _err("ERROR: Illegal instruction\n"); - } - - if ((excp & Z16F_SYSEXCP_WDTOSC) != 0) - { - _err("ERROR: WDT oscillator failure\n"); - } - - if ((excp & Z16F_SYSEXCP_PRIOSC) != 0) - { - _err("ERROR: Primary Oscillator Failure\n"); - } - - if ((excp & Z16F_SYSEXCP_WDT) != 0) - { - _err("ERROR: Watchdog timeout\n"); - z16f_reset(); - } - - PANIC_WITH_REGS("panic", regs); -} diff --git a/arch/z16/src/z16f/z16f_timerisr.c b/arch/z16/src/z16f/z16f_timerisr.c deleted file mode 100644 index e234637102..0000000000 --- a/arch/z16/src/z16f/z16f_timerisr.c +++ /dev/null @@ -1,218 +0,0 @@ -/**************************************************************************** - * arch/z16/src/z16f/z16f_timerisr.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include - -#include -#include - -#include "chip.h" -#include "clock/clock.h" -#include "z16_internal.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* The desired timer interrupt frequency is provided by the definition - * CLOCKS_PER_SEC (see include/time.h). CLOCKS_PER_SEC defines the desired - * number of system clock ticks per second. That value is a user - * configurable setting that defaults to 100 (100 ticks per second = 10 MS - * interval). - * - * The RCC feeds the Cortex System Timer (SysTick) with the AHB clock (HCLK) - * divided by 8. The SysTick can work either with this clock or with the - * Cortex clock (HCLK), configurable in the SysTick Control and Status - * register. - */ - -/* System clock frequency value from ZDS target settings */ - -extern _Erom uint8_t SYS_CLK_FREQ; -#define _DEFCLK ((uint32_t)&SYS_CLK_FREQ) - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Function: z16f_timerisr - * - * Description: - * The timer ISR will perform a variety of services for various portions - * of the system. - * - ****************************************************************************/ - -static int z16f_timerisr(int irq, uint32_t *regs, void *arg) -{ - /* Process timer interrupt */ - - nxsched_process_timer(); - return 0; -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Function: up_timer_initialize - * - * Description: - * This function is called during start-up to initialize - * the timer interrupt. - * - ****************************************************************************/ - -void up_timer_initialize(void) -{ - uint32_t reload; - uint32_t scaledfreq; - uint32_t rawdiv; - uint8_t divider; - uint8_t regval; - int shift; - - up_disable_irq(Z16F_IRQ_SYSTIMER); - - /* Disable the timer and configure for divide by 1 and continuous mode. */ - - regval = Z16F_TIMERSCTL1_DIV1 | Z16F_TIMERSCTL1_CONT; - putreg8(regval, Z16F_TIMER0_CTL1); - - /* Assign an initial timer value */ - - putreg16(0x0001, Z16F_TIMER0_HL); - - /* Calculate timer reload value (continuous mode) - * - * timer_period = reload_value * divisor / system_clock_frequency - * timer_frequency = system_clock_frequency / divisor / reload_value - * or - * reload_value = (system_clock_frequency / timer_frequency / divisor - * - * The prescale value ranges from 1 to 128, the reload value must be less - * then or equal to 0xffff. We would like to select the smallest prescaler - * value and the largest reload value for the greatest accuracy. - * - * Example: system_clock_frequency=20MHz, timer_frequency=100Hz: - * scaledfreq = 20,000,000 / 100 - * = 200,000 - * rawdiv = (200,000 >> 16) + 1 - * = 4 - * divider = Z16F_TIMERSCTL1_DIV4 - * shift = 2 - * reload = 200,000 >> 2 - * = 50,000 - * - * Example: system_clock_frequency=18.432MHz, timer_frequency=100Hz: - * scaledfreq = 20,000,000 / 100 - * = 200,000 - * divisor = ((18,432,000 / 100) >> 16) + 1 - * = 3 -> 4 (need to go up to next power of two) - * reload_value = 20,000,000 / 100 / 4 - * = 56,080 - */ - -#if 0 /* Does not work ??? */ - scaledfreq = _DEFCLK / CLOCKS_PER_SEC; -#else - scaledfreq = (BOARD_SYSTEM_FREQUENCY / CLOCKS_PER_SEC); -#endif - - rawdiv = (scaledfreq >> 16) + 1; - if (rawdiv < 2) - { - divider = Z16F_TIMERSCTL1_DIV1; - shift = 0; - } - else if (rawdiv < 3) - { - divider = Z16F_TIMERSCTL1_DIV2; - shift = 1; - } - else if (rawdiv < 7) - { - divider = Z16F_TIMERSCTL1_DIV4; - shift = 2; - } - else if (rawdiv < 15) - { - divider = Z16F_TIMERSCTL1_DIV8; - shift = 3; - } - else if (rawdiv < 31) - { - divider = Z16F_TIMERSCTL1_DIV16; - shift = 4; - } - else if (rawdiv < 63) - { - divider = Z16F_TIMERSCTL1_DIV32; - shift = 5; - } - else if (rawdiv < 127) - { - divider = Z16F_TIMERSCTL1_DIV64; - shift = 6; - } - else - { - divider = Z16F_TIMERSCTL1_DIV128; - shift = 7; - } - - reload = scaledfreq >> shift; - DEBUGASSERT(reload <= 0xffff); - - /* Set the timer reload value */ - - putreg16((uint16_t)reload, Z16F_TIMER0_R); - - /* Set the prescale value */ - - regval = getreg8(Z16F_TIMER0_CTL1); - regval &= ~Z16F_TIMERSCTL1_DIVMASK; - regval |= divider; - putreg8(regval, Z16F_TIMER0_CTL1); - - /* Enable the timer */ - - regval |= Z16F_TIMERCTL1_TEN; - putreg8(regval, Z16F_TIMER0_CTL1); - - /* Set the timer priority */ - - /* Attach and enable the timer interrupt (leaving at priority 0) */ - - irq_attach(Z16F_IRQ_SYSTIMER, (xcpt_t)z16f_timerisr, NULL); - up_enable_irq(Z16F_IRQ_SYSTIMER); -} diff --git a/arch/z80/Kconfig b/arch/z80/Kconfig deleted file mode 100644 index 724c07fa89..0000000000 --- a/arch/z80/Kconfig +++ /dev/null @@ -1,64 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_Z80 -choice - prompt "ZiLOG 8-bit MCU" - default ARCH_CHIP_Z80 - -config ARCH_CHIP_Z80 - bool "Classic z80" - select ARCH_NOINTC - select MM_SMALL - ---help--- - Classic ZiLOG z80 chip - -config ARCH_CHIP_Z180 - bool "z180 Family" - select MM_SMALL - select ARCH_NOINTC - select ARCH_HAVE_ADDRENV - select ARCH_ADDRENV - ---help--- - ZiLOG z80 architecture with MMU - -config ARCH_CHIP_EZ80 - bool "eZ80 Family (ez80 Acclaim)" - select CYGWIN_WINTOOL if WINDOWS_CYGWIN - select MM_SMALL if EZ80_Z80MODE - select ARCH_HAVE_PHY - ---help--- - ZiLOG z80 architecture with 24-bit addressability - -config ARCH_CHIP_Z8 - bool "z8 Family" - select CYGWIN_WINTOOL if WINDOWS_CYGWIN - select MM_SMALL - select ENDIAN_BIG - ---help--- - ZiLOG z8 architecture - -config ARCH_CHIP_Z80_CUSTOM - bool "Custom Z80 chip" - select ARCH_CHIP_CUSTOM - ---help--- - Select this option if there is no directory for the chip under arch/z80/src/. - -endchoice - -config ARCH_CHIP - string - default "z80" if ARCH_CHIP_Z80 - default "z180" if ARCH_CHIP_Z180 - default "z8" if ARCH_CHIP_Z8 - default "ez80" if ARCH_CHIP_EZ80 - -source "arch/z80/src/common/Kconfig" -source "arch/z80/src/z80/Kconfig" -source "arch/z80/src/z180/Kconfig" -source "arch/z80/src/z8/Kconfig" -source "arch/z80/src/ez80/Kconfig" - -endif diff --git a/arch/z80/include/.gitignore b/arch/z80/include/.gitignore deleted file mode 100644 index af8911db06..0000000000 --- a/arch/z80/include/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/board -/chip diff --git a/arch/z80/include/arch.h b/arch/z80/include/arch.h deleted file mode 100644 index a5d7f23b13..0000000000 --- a/arch/z80/include/arch.h +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************************************** - * arch/z80/include/arch.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* This file should never be included directly but, rather, only indirectly - * through nuttx/arch.h - */ - -#ifndef __ARCH_Z80_INCLUDE_ARCH_H -#define __ARCH_Z80_INCLUDE_ARCH_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Inline functions - ****************************************************************************/ - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -#undef EXTERN -#ifdef __cplusplus -} -#endif - -#endif /* __ARCH_Z80_INCLUDE_ARCH_H */ diff --git a/arch/z80/include/ez80/arch.h b/arch/z80/include/ez80/arch.h deleted file mode 100644 index 9d3eb4b1b0..0000000000 --- a/arch/z80/include/ez80/arch.h +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** - * arch/z80/include/ez80/arch.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* This file should never be included directly but, rather, - * only indirectly through nuttx/arch.h (via arch/arch.h) - */ - -#ifndef __ARCH_Z80_INCLUDE_EZ80_ARCH_H -#define __ARCH_Z80_INCLUDE_EZ80_ARCH_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -#undef EXTERN -#ifdef __cplusplus -} -#endif - -#endif /* __ARCH_Z80_INCLUDE_EZ80_ARCH_H */ diff --git a/arch/z80/include/ez80/inttypes.h b/arch/z80/include/ez80/inttypes.h deleted file mode 100644 index 6bcf8d832a..0000000000 --- a/arch/z80/include/ez80/inttypes.h +++ /dev/null @@ -1,208 +0,0 @@ -/**************************************************************************** - * arch/z80/include/ez80/inttypes.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z80_INCLUDE_EZ80_INTTYPES_H -#define __ARCH_Z80_INCLUDE_EZ80_INTTYPES_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#ifdef CONFIG_EZ80_Z80MODE - -# define PRId8 "d" -# define PRId16 "d" -# define PRId32 "ld" - -# define PRIdPTR "d" - -# define PRIi8 "i" -# define PRIi16 "i" -# define PRIi32 "li" - -# define PRIiPTR "i" - -# define PRIo8 "o" -# define PRIo16 "o" -# define PRIo32 "lo" - -# define PRIoPTR "o" - -# define PRIu8 "u" -# define PRIu16 "u" -# define PRIu32 "lu" - -# define PRIuPTR "u" - -# define PRIx8 "x" -# define PRIx16 "x" -# define PRIx32 "lx" - -# define PRIxPTR "x" - -# define PRIX8 "X" -# define PRIX16 "X" -# define PRIX32 "lX" - -# define PRIXPTR "X" - -# define SCNd8 "hhd" -# define SCNd16 "hd" -# define SCNd32 "ld" - -# define SCNdPTR "hd" - -# define SCNi8 "hhi" -# define SCNi16 "hi" -# define SCNi32 "li" - -# define SCNiPTR "hi" - -# define SCNo8 "hho" -# define SCNo16 "ho" -# define SCNo32 "lo" - -# define SCNoPTR "ho" - -# define SCNu8 "hhu" -# define SCNu16 "hu" -# define SCNu32 "lu" - -# define SCNuPTR "hu" - -# define SCNx8 "hhx" -# define SCNx16 "hx" -# define SCNx32 "lx" - -# define SCNxPTR "hx" - -# define INT8_C(x) x -# define INT16_C(x) x -# define INT24_C(x) x -# define INT32_C(x) x ## l - -# define UINT8_C(x) x -# define UINT16_C(x) x -# define UINT24_C(x) x -# define UINT32_C(x) x ## ul - -#else - -# define PRId8 "d" -# define PRId16 "d" -# define PRId32 "ld" - -# define PRIdPTR "d" - -# define PRIi8 "i" -# define PRIi16 "i" -# define PRIi32 "li" - -# define PRIiPTR "i" - -# define PRIo8 "o" -# define PRIo16 "o" -# define PRIo32 "lo" - -# define PRIoPTR "o" - -# define PRIu8 "u" -# define PRIu16 "u" -# define PRIu32 "lu" - -# define PRIuPTR "u" - -# define PRIx8 "x" -# define PRIx16 "x" -# define PRIx32 "lx" - -# define PRIxPTR "x" - -# define PRIX8 "X" -# define PRIX16 "X" -# define PRIX32 "lX" - -# define PRIXPTR "X" - -# define SCNd8 "hhd" -# define SCNd16 "hd" -# define SCNd32 "ld" - -# define SCNdPTR "d" - -# define SCNi8 "hhi" -# define SCNi16 "hi" -# define SCNi32 "li" - -# define SCNiPTR "i" - -# define SCNo8 "hho" -# define SCNo16 "ho" -# define SCNo32 "lo" - -# define SCNoPTR "o" - -# define SCNu8 "hhu" -# define SCNu16 "hu" -# define SCNu32 "lu" - -# define SCNuPTR "u" - -# define SCNx8 "hhx" -# define SCNx16 "hx" -# define SCNx32 "lx" - -# define SCNxPTR "x" - -# define INT8_C(x) x -# define INT16_C(x) x -# define INT24_C(x) x -# define INT32_C(x) x ## l - -# define UINT8_C(x) x -# define UINT16_C(x) x -# define UINT24_C(x) x -# define UINT32_C(x) x ## ul - -# ifdef __clang__ -# define PRId64 "lld" -# define PRIi64 "lli" -# define PRIo64 "llo" -# define PRIu64 "llu" -# define PRIx64 "llx" -# define PRIX64 "llX" -# define SCNd64 "lld" -# define SCNi64 "lli" -# define SCNo64 "llo" -# define SCNu64 "llu" -# define SCNx64 "llx" -# define INT64_C(x) x ## ll -# define UINT64_C(x) x ## ull -# endif - -#endif - -#endif /* __ARCH_Z80_INCLUDE_EZ80_INTTYPES_H */ diff --git a/arch/z80/include/ez80/io.h b/arch/z80/include/ez80/io.h deleted file mode 100644 index 1422dff1ae..0000000000 --- a/arch/z80/include/ez80/io.h +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** - * arch/z80/include/ez80/io.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* This file should never be included directly but, rather, only indirectly - * through arch/io.h - */ - -#ifndef __ARCH_Z80_INCLUDE_EZ80_IO_H -#define __ARCH_Z80_INCLUDE_EZ80_IO_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -void outp(uint16_t p, uint8_t c); -uint8_t inp(uint16_t p); - -#undef EXTERN -#ifdef __cplusplus -} -#endif -#endif - -#endif /* __ARCH_Z80_INCLUDE_EZ80_IO_H */ diff --git a/arch/z80/include/ez80/irq.h b/arch/z80/include/ez80/irq.h deleted file mode 100644 index 339eca4e10..0000000000 --- a/arch/z80/include/ez80/irq.h +++ /dev/null @@ -1,304 +0,0 @@ -/**************************************************************************** - * arch/z80/include/ez80/irq.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* This file should never be included directly but, rather, only indirectly - * through nuttx/irq.h (via arch/irq.h) - */ - -#ifndef __ARCH_Z80_INCLUDE_EZ80_IRQ_H -#define __ARCH_Z80_INCLUDE_EZ80_IRQ_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -# include -#endif - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* ez80 Interrupt Numbers ***************************************************/ - -#if defined(CONFIG_ARCH_CHIP_EZ80F91) -# define EZ80_EMACRX_IRQ (0) /* Vector 0x40 */ -# define EZ80_EMACTX_IRQ (1) /* Vector 0x44 */ -# define EZ80_EMACSYS_IRQ (2) /* Vector 0x48 */ -# define EZ80_PLL_IRQ (3) /* Vector 0x4c */ -# define EZ80_FLASH_IRQ (4) /* Vector 0x50 */ - -# define EZ80_TIMER0_IRQ (5) /* Vector 0x54 */ -# define EZ80_TIMER1_IRQ (6) /* Vector 0x58 */ -# define EZ80_TIMER2_IRQ (7) /* Vector 0x5c */ -# define EZ80_TIMER3_IRQ (8) /* Vector 0x60 */ - -# define EZ80_RTC_IRQ (9) /* Vector 0x6C */ -# define EZ80_UART0_IRQ (10) /* Vector 0x70 */ -# define EZ80_UART1_IRQ (11) /* Vector 0x74 */ - -# define EZ80_I2C_IRQ (12) /* Vector 0x78 */ -# define EZ80_SPI_IRQ (13) /* Vector 0x7c */ - -# define EZ80_PORTA0_IRQ (14) /* Vector 0x80 */ -# define EZ80_PORTA1_IRQ (15) /* Vector 0x84 */ -# define EZ80_PORTA2_IRQ (16) /* Vector 0x88 */ -# define EZ80_PORTA3_IRQ (17) /* Vector 0x8c */ -# define EZ80_PORTA4_IRQ (18) /* Vector 0x90 */ -# define EZ80_PORTA5_IRQ (19) /* Vector 0x94 */ -# define EZ80_PORTA6_IRQ (20) /* Vector 0x98 */ -# define EZ80_PORTA7_IRQ (21) /* Vector 0x9c */ - -# define EZ80_PORTB0_IRQ (22) /* Vector 0xa0 */ -# define EZ80_PORTB1_IRQ (23) /* Vector 0xa4 */ -# define EZ80_PORTB2_IRQ (24) /* Vector 0xa8 */ -# define EZ80_PORTB3_IRQ (25) /* Vector 0xac */ -# define EZ80_PORTB4_IRQ (26) /* Vector 0xb0 */ -# define EZ80_PORTB5_IRQ (27) /* Vector 0xb4 */ -# define EZ80_PORTB6_IRQ (28) /* Vector 0xb8 */ -# define EZ80_PORTB7_IRQ (29) /* Vector 0xbc */ - -# define EZ80_PORTC0_IRQ (30) /* Vector 0xc0 */ -# define EZ80_PORTC1_IRQ (31) /* Vector 0xc4 */ -# define EZ80_PORTC2_IRQ (32) /* Vector 0xc8 */ -# define EZ80_PORTC3_IRQ (33) /* Vector 0xcc */ -# define EZ80_PORTC4_IRQ (34) /* Vector 0xd0 */ -# define EZ80_PORTC5_IRQ (35) /* Vector 0xd4 */ -# define EZ80_PORTC6_IRQ (36) /* Vector 0xd8 */ -# define EZ80_PORTC7_IRQ (37) /* Vector 0xdc */ - -# define EZ80_PORTD0_IRQ (38) /* Vector 0xe0 */ -# define EZ80_PORTD1_IRQ (39) /* Vector 0xe4 */ -# define EZ80_PORTD2_IRQ (40) /* Vector 0xe8 */ -# define EZ80_PORTD3_IRQ (41) /* Vector 0xec */ -# define EZ80_PORTD4_IRQ (42) /* Vector 0xf0 */ -# define EZ80_PORTD5_IRQ (43) /* Vector 0xf4 */ -# define EZ80_PORTD6_IRQ (44) /* Vector 0xf8 */ -# define EZ80_PORTD7_IRQ (45) /* Vector 0xfc */ - -# define NR_IRQS (46) -#elif defined(CONFIG_ARCH_CHIP_EZ80F92) || defined(CONFIG_ARCH_CHIP_EZ80F93) - -# /* Vectors 0x00-0x06 unused */ -# define EZ80_FLASH_IRQ (0) /* Vector 0x08 */ - -# define EZ80_TIMER0_IRQ (1) /* Vector 0x0a */ -# define EZ80_TIMER1_IRQ (2) /* Vector 0x0c */ -# define EZ80_TIMER2_IRQ (3) /* Vector 0x0e */ -# define EZ80_TIMER3_IRQ (4) /* Vector 0x10 */ -# define EZ80_TIMER4_IRQ (5) /* Vector 0x12 */ -# define EZ80_TIMER5_IRQ (6) /* Vector 0x14 */ - -# define EZ80_RTC_IRQ (7) /* Vector 0x16 */ -# define EZ80_UART0_IRQ (8) /* Vector 0x18 */ -# define EZ80_UART1_IRQ (9) /* Vector 0x1a */ - -# define EZ80_I2C_IRQ (10) /* Vector 0x1c */ -# define EZ80_SPI_IRQ (11) /* Vector 0x1e */ -# /* Vectors 0x20-0x2e unused */ - -# define EZ80_PORTB0_IRQ (12) /* Vector 0x30 */ -# define EZ80_PORTB1_IRQ (13) /* Vector 0x32 */ -# define EZ80_PORTB2_IRQ (14) /* Vector 0x34 */ -# define EZ80_PORTB3_IRQ (15) /* Vector 0x36 */ -# define EZ80_PORTB4_IRQ (16) /* Vector 0x38 */ -# define EZ80_PORTB5_IRQ (17) /* Vector 0x3a */ -# define EZ80_PORTB6_IRQ (18) /* Vector 0x3c */ -# define EZ80_PORTB7_IRQ (19) /* Vector 0x3e */ - -# define EZ80_PORTC0_IRQ (20) /* Vector 0x40 */ -# define EZ80_PORTC1_IRQ (21) /* Vector 0x42 */ -# define EZ80_PORTC2_IRQ (22) /* Vector 0x44 */ -# define EZ80_PORTC3_IRQ (23) /* Vector 0x46 */ -# define EZ80_PORTC4_IRQ (24) /* Vector 0x48 */ -# define EZ80_PORTC5_IRQ (25) /* Vector 0x4a */ -# define EZ80_PORTC6_IRQ (26) /* Vector 0x4c */ -# define EZ80_PORTC7_IRQ (27) /* Vector 0x4e */ - -# define EZ80_PORTD0_IRQ (28) /* Vector 0x50 */ -# define EZ80_PORTD1_IRQ (29) /* Vector 0x52 */ -# define EZ80_PORTD2_IRQ (30) /* Vector 0x54 */ -# define EZ80_PORTD3_IRQ (31) /* Vector 0x56 */ -# define EZ80_PORTD4_IRQ (32) /* Vector 0x58 */ -# define EZ80_PORTD5_IRQ (33) /* Vector 0x5a */ -# define EZ80_PORTD6_IRQ (34) /* Vector 0x5c */ -# define EZ80_PORTD7_IRQ (35) /* Vector 0x5e */ -# /* Vectors 0x60-0x66 unused */ - -# define NR_IRQS (36) -#endif - -#define EZ80_IRQ_SYSTIMER EZ80_TIMER0_IRQ - -/* IRQ Management Macros ****************************************************/ - -/* IRQ State Save Format **************************************************** - * - * These indices describe how the ez8 context is save in the state save array - * - * Byte offsets: - */ - -/* IRQ Stack Frame Format - * - * This stack frame is created on each interrupt. These registers are stored - * in the TCB to many context switches. - */ - -/* chipreg_t indices */ - -#define XCPT_I (0) /* Index 0: 16-bit interrupt vector register */ -#define XCPT_BC (1) /* Index 1: Saved 16-bit BC register */ -#define XCPT_DE (2) /* Index 2: Saved 16-bit DE register */ -#define XCPT_IX (3) /* Index 3: Saved 16-bit IX register */ -#define XCPT_IY (4) /* Index 4: Saved 16-bit IY register */ -#define XCPT_SP (5) /* Index 5: Saved 16-bit SP at time of interrupt */ -#define XCPT_HL (6) /* Index 6: Saved 16-bit HL register */ -#define XCPT_AF (7) /* Index 7: Saved 16-bit AF register */ -#define XCPT_PC (8) /* Index 8: Offset to 16-bit PC at time of interrupt */ -#define XCPTCONTEXT_REGS (9) - -#ifdef CONFIG_EZ80_Z80MODE -/* Byte offsets */ - -# define XCPT_I_OFFSET (2*XCPT_I) /* Offset 0: 16-bit interrupt vector register */ -# define XCPT_IF_OFFSET (2*XCPT_I+0) /* Offset 1: Saved flags. P set if interrupts enabled */ -# define XCPT_IA_OFFSET (2*XCPT_I+1) /* Offset 2: Saved lower 8-bits of interrupt vector register */ -# define XCPT_BC_OFFSET (2*XCPT_BC) /* Offset 2: Saved 16-bit BC register */ -# define XCPT_C_OFFSET (2*XCPT_BC+0) /* Offset 2: Saved 8-bit C register */ -# define XCPT_B_OFFSET (2*XCPT_BC+1) /* Offset 3: Saved 8-bit D register */ -# define XCPT_DE_OFFSET (2*XCPT_DE) /* Offset 4: Saved 16-bit DE register */ -# define XCPT_E_OFFSET (2*XCPT_DE+0) /* Offset 4: Saved 8-bit E register */ -# define XCPT_D_OFFSET (2*XCPT_DE+1) /* Offset 5: Saved 8-bit D register */ -# define XCPT_IX_OFFSET (2*XCPT_IX) /* Offset 6: Saved 16-bit IX register */ -# define XCPT_IY_OFFSET (2*XCPT_IY) /* Offset 8: Saved 16-bit IY register */ -# define XCPT_SP_OFFSET (2*XCPT_SP) /* Offset 10: Saved 16-bit SP at time of interrupt */ -# define XCPT_HL_OFFSET (2*XCPT_HL) /* Offset 12: Saved 16-bit HL register */ -# define XCPT_L_OFFSET (2*XCPT_HL+0) /* Offset 12: Saved 8-bit L register */ -# define XCPT_H_OFFSET (2*XCPT_HL+1) /* Offset 13: Saved 8-bit H register */ -# define XCPT_AF_OFFSET (2*XCPT_AF) /* Offset 14: Saved 16-bit AF register */ -# define XCPT_F_OFFSET (2*XCPT_AF+0) /* Offset 14: Saved flags */ -# define XCPT_A_OFFSET (2*XCPT_AF+1) /* Offset 15: Saved 8-bit A register */ -# define XCPT_PC_OFFSET (2*XCPT_PC) /* Offset 16: Offset to 16-bit PC at time of interrupt */ -# define XCPTCONTEXT_SIZE (2*XCPTCONTEXT_REGS) -#else -/* Byte offsets */ - -# define XCPT_I_OFFSET (3*XCPT_I) /* Offset 0: Saved 24-bit interrupt vector register */ -# define XCPT_IF_OFFSET (3*XCPT_I+0) /* Offset 0: Saved flags. P set if interrupts enabled */ -# define XCPT_IA_OFFSET (3*XCPT_I+1) /* Offset 1: Saved lower 8-bits of interrupt vector register */ -# define XCPT_BC_OFFSET (3*XCPT_BC) /* Offset 3: Saved 24-bit BC register */ -# define XCPT_C_OFFSET (3*XCPT_BC+0) /* Offset 3: Saved 8-bit C register */ -# define XCPT_B_OFFSET (3*XCPT_BC+1) /* Offset 4: Saved 8-bit B register */ -# define XCPT_DE_OFFSET (3*XCPT_DE) /* Offset 6: Saved 24-bit DE register */ -# define XCPT_E_OFFSET (3*XCPT_DE+0) /* Offset 6: Saved 8-bit E register */ -# define XCPT_D_OFFSET (3*XCPT_DE+1) /* Offset 7: Saved 8-bit D register */ -# define XCPT_IX_OFFSET (3*XCPT_IX) /* Offset 9: Saved 24-bit IX register */ -# define XCPT_IY_OFFSET (3*XCPT_IY) /* Offset 12: Saved 24-bit IY register */ -# define XCPT_SP_OFFSET (3*XCPT_SP) /* Offset 15: Saved 24-bit SP at time of interrupt */ -# define XCPT_HL_OFFSET (3*XCPT_HL) /* Offset 18: Saved 24-bit HL register */ -# define XCPT_L_OFFSET (3*XCPT_HL+0) /* Offset 18: Saved 8-bit L register */ -# define XCPT_H_OFFSET (3*XCPT_HL+1) /* Offset 19: Saved 8-bit H register */ -# define XCPT_AF_OFFSET (3*XCPT_AF) /* Offset 21: Saved AF register */ -# define XCPT_F_OFFSET (3*XCPT_AF+0) /* Offset 21: Saved AF register */ -# define XCPT_A_OFFSET (3*XCPT_AF+1) /* Offset 22: Saved 8-bit A register */ -# define XCPT_PC_OFFSET (3*XCPT_PC) /* Offset 24: Offset to 24-bit PC at time of interrupt */ -# define XCPTCONTEXT_SIZE (3*XCPTCONTEXT_REGS) -#endif - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -#ifndef __ASSEMBLY__ - -/* This is the type of the register save array */ - -#ifdef CONFIG_EZ80_Z80MODE -typedef uint16_t chipreg_t; -#else -typedef uint24_t chipreg_t; -#endif - -/* This struct defines the way the registers are stored. */ - -struct xcptcontext -{ - /* Register save area */ - - chipreg_t regs[XCPTCONTEXT_REGS]; - - /* The following retains that state during signal execution - * - * REVISIT: Because there is only one copy of these save areas, - * only a single signal handler can be active. This precludes - * queuing of signal actions. As a result, signals received while - * another signal handler is executing will be ignored! - */ - - chipreg_t saved_pc; /* Saved return address */ - chipreg_t saved_i; /* Saved interrupt state */ -}; -#endif - -/**************************************************************************** - * Inline functions - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -/* Name: up_irq_save, up_irq_restore, and friends. - * - * NOTE: These functions should never be called from application code and, - * as a general rule unless you really know what you are doing, this - * function should not be called directly from operation system code either: - * Typically, the wrapper functions, enter_critical_section() and - * leave_critical section(), are probably what you really want. - */ - -irqstate_t up_irq_save(void); -void up_irq_restore(irqstate_t flags); -irqstate_t up_irq_enable(void); - -#undef EXTERN -#ifdef __cplusplus -} -#endif -#endif - -#endif /* __ARCH_Z80_INCLUDE_EZ80_IRQ_H */ diff --git a/arch/z80/include/ez80/limits.h b/arch/z80/include/ez80/limits.h deleted file mode 100644 index 7508f657a3..0000000000 --- a/arch/z80/include/ez80/limits.h +++ /dev/null @@ -1,96 +0,0 @@ -/**************************************************************************** - * arch/z80/include/ez80/limits.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z80_INCLUDE_EZ80_LIMITS_H -#define __ARCH_Z80_INCLUDE_EZ80_LIMITS_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#define CHAR_BIT 8 -#define SCHAR_MIN (-SCHAR_MAX - 1) -#define SCHAR_MAX 127 -#define UCHAR_MAX 255 - -/* These could be different on machines where char is unsigned */ - -#ifdef __CHAR_UNSIGNED__ -# define CHAR_MIN 0 -# define CHAR_MAX UCHAR_MAX -#else -# define CHAR_MIN SCHAR_MIN -# define CHAR_MAX SCHAR_MAX -#endif - -#define SHRT_MIN (-SHRT_MAX - 1) -#define SHRT_MAX 32767 -#define USHRT_MAX 65535U - -#define INT_MIN (-INT_MAX - 1) -#define INT_MAX 32767 -#define UINT_MAX 65535U - -/* These change on 32-bit and 64-bit platforms */ - -#define LONG_MIN (-LONG_MAX - 1) -#define LONG_MAX 2147483647L -#define ULONG_MAX 4294967295UL - -/* A pointer is 2 or 3 bytes, depending upon if the ez80 is in z80 - * compatibility mode or not - * - * Z80 mode - 16 bits - * ADL mode - 24 bits - */ - -#define PTR_MIN (-PTR_MAX - 1) -#ifdef CONFIG_EZ80_Z80MODE -# define PTR_MAX 32767 -# define UPTR_MAX 65535U -#else -# define PTR_MAX 8388607 -# define UPTR_MAX 16777215U -#endif - -#ifdef __clang__ -# define LLONG_MIN (-LLONG_MAX - 1) -# define LLONG_MAX 9223372036854775807LL -# define ULLONG_MAX 18446744073709551615ULL -#endif - -#if !defined(__WCHAR_TYPE__) -# define WCHAR_MIN INT_MIN -# define WCHAR_MAX INT_MAX -#elif defined(__WCHAR_UNSIGNED__) -# define WCHAR_MIN 0 -# define WCHAR_MAX __WCHAR_MAX__ -#else -# define WCHAR_MIN (-__WCHAR_MAX__ - 1) -# define WCHAR_MAX __WCHAR_MAX__ -#endif - -#endif /* __ARCH_Z80_INCLUDE_EZ80_LIMITS_H */ diff --git a/arch/z80/include/ez80/types.h b/arch/z80/include/ez80/types.h deleted file mode 100644 index 04f977a8c0..0000000000 --- a/arch/z80/include/ez80/types.h +++ /dev/null @@ -1,135 +0,0 @@ -/**************************************************************************** - * arch/z80/include/ez80/types.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* This file should never be included directly but, rather, only indirectly - * through sys/types.h - */ - -#ifndef __ARCH_Z80_INCLUDE_EZ80_TYPES_H -#define __ARCH_Z80_INCLUDE_EZ80_TYPES_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Type Declarations - ****************************************************************************/ - -#ifndef __ASSEMBLY__ - -/* These are the sizes of the standard integer types. NOTE that these type - * names have a leading underscore character. This file will be included - * (indirectly) by include/stdint.h and typedef'ed to the final name without - * the underscore character. This roundabout way of doings things allows - * the stdint.h to be removed from the include/ directory in the event that - * the user prefers to use the definitions provided by their toolchain header - * files - * - * These are the sizes of the types supported by the ZiLOG compiler: - * - * int - 24-bits - * short - 16-bits - * long - 32-bits - * char - 8-bits - * float - 32-bits - * - * Clang additionally supports: - * - * long long - 64-bits - */ - -typedef signed char _int8_t; -typedef unsigned char _uint8_t; - -typedef signed short _int16_t; -typedef unsigned short _uint16_t; - -typedef signed int _int24_t; -typedef unsigned int _uint24_t; -#define __INT24_DEFINED - -typedef signed long _int32_t; -typedef unsigned long _uint32_t; - -#ifdef __clang__ -typedef signed long long _int64_t; -typedef unsigned long long _uint64_t; -#define __INT64_DEFINED -typedef _int64_t _intmax_t; -typedef _uint64_t _uintmax_t; -#else -typedef _int32_t _intmax_t; -typedef _uint32_t _uintmax_t; -#endif - -#if defined(__WCHAR_TYPE__) -typedef __WCHAR_TYPE__ _wchar_t; -#else -typedef int _wchar_t; -#endif - -typedef int _wint_t; -typedef int _wctype_t; - -/* A pointer is 2 or 3 bytes, depending upon if the ez80 is in z80 - * compatibility mode or not - * - * Z80 mode - 16 bits - * ADL mode - 24 bits - */ - -#if defined(__SIZE_TYPE__) -/* If __SIZE_TYPE__ is defined we define ssize_t based on size_t. - * We simply change "unsigned" to "signed" for this single definition - * to make sure ssize_t and size_t only differ by their signedness. - */ - -#define unsigned signed -typedef __SIZE_TYPE__ _ssize_t; -#undef unsigned -typedef __SIZE_TYPE__ _size_t; -#elif defined(CONFIG_EZ80_Z80MODE) -typedef signed short _ssize_t; -typedef unsigned short _size_t; -#else -typedef signed int _ssize_t; -typedef unsigned int _size_t; -#endif - -/* This is the size of the interrupt state save returned by up_irq_save(). - * It holds the AF register pair + a zero pad byte - */ - -typedef _uint24_t irqstate_t; - -#endif /* __ASSEMBLY__ */ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#endif /* __ARCH_Z80_INCLUDE_EZ80_TYPES_H */ diff --git a/arch/z80/include/inttypes.h b/arch/z80/include/inttypes.h deleted file mode 100644 index 1c877c4db9..0000000000 --- a/arch/z80/include/inttypes.h +++ /dev/null @@ -1,36 +0,0 @@ -/**************************************************************************** - * arch/z80/include/inttypes.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z80_INCLUDE_INTTYPES_H -#define __ARCH_Z80_INCLUDE_INTTYPES_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#endif /* __ARCH_Z80_INCLUDE_INTTYPES_H */ diff --git a/arch/z80/include/io.h b/arch/z80/include/io.h deleted file mode 100644 index 382bc4bf86..0000000000 --- a/arch/z80/include/io.h +++ /dev/null @@ -1,48 +0,0 @@ -/**************************************************************************** - * arch/z80/include/io.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z80_INCLUDE_IO_H -#define __ARCH_Z80_INCLUDE_IO_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#endif /* __ARCH_Z80_INCLUDE_IO_H */ diff --git a/arch/z80/include/irq.h b/arch/z80/include/irq.h deleted file mode 100644 index c27006ebe3..0000000000 --- a/arch/z80/include/irq.h +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************************** - * arch/z80/include/irq.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* This file should never be included directly but, rather, - * only indirectly through nuttx/irq.h - */ - -#ifndef __ARCH_Z80_INCLUDE_IRQ_H -#define __ARCH_Z80_INCLUDE_IRQ_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -/* Return the current value of the stack pointer */ - -uintptr_t up_getsp(void); - -/**************************************************************************** - * Name: up_getusrpc - ****************************************************************************/ - -#define up_getusrpc(regs) \ - (((FAR chipreg_t *)((regs) ? (regs) : up_current_regs()))[XCPT_PC]) - -/**************************************************************************** - * Name: up_getusrsp - ****************************************************************************/ - -#define up_getusrsp(regs) \ - ((uintptr_t)((FAR chipreg_t*)(regs))[XCPT_SP]) - -#undef EXTERN -#ifdef __cplusplus -} -#endif - -#endif /* __ARCH_Z80_INCLUDE_IRQ_H */ diff --git a/arch/z80/include/limits.h b/arch/z80/include/limits.h deleted file mode 100644 index e6ea25a52d..0000000000 --- a/arch/z80/include/limits.h +++ /dev/null @@ -1,36 +0,0 @@ -/**************************************************************************** - * arch/z80/include/limits.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z80_INCLUDE_LIMITS_H -#define __ARCH_Z80_INCLUDE_LIMITS_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#endif /* __ARCH_Z80_INCLUDE_LIMITS_H */ diff --git a/arch/z80/include/syscall.h b/arch/z80/include/syscall.h deleted file mode 100644 index e0cbfca49b..0000000000 --- a/arch/z80/include/syscall.h +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** - * arch/z80/include/syscall.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* This file should never be included directly but, rather, only indirectly - * through include/syscall.h or include/sys/sycall.h - */ - -#ifndef __ARCH_Z80_INCLUDE_SYSCALL_H -#define __ARCH_Z80_INCLUDE_SYSCALL_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -/**************************************************************************** - * Inline functions - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#endif /* __ARCH_Z80_INCLUDE_SYSCALL_H */ diff --git a/arch/z80/include/types.h b/arch/z80/include/types.h deleted file mode 100644 index f52ed126f2..0000000000 --- a/arch/z80/include/types.h +++ /dev/null @@ -1,48 +0,0 @@ -/**************************************************************************** - * arch/z80/include/types.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* This file should never be included directly but, rather, only indirectly - * through sys/types.h - */ - -#ifndef __ARCH_Z80_INCLUDE_TYPES_H -#define __ARCH_Z80_INCLUDE_TYPES_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Type Declarations - ****************************************************************************/ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#endif /* __ARCH_Z80_INCLUDE_TYPES_H */ diff --git a/arch/z80/include/z180/arch.h b/arch/z80/include/z180/arch.h deleted file mode 100644 index 5a1bdcd705..0000000000 --- a/arch/z80/include/z180/arch.h +++ /dev/null @@ -1,85 +0,0 @@ -/**************************************************************************** - * arch/z80/include/z180/arch.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* This file should never be included directly but, rather, only indirectly - * through nuttx/arch.h (via arch/arch.h) - */ - -#ifndef __ARCH_Z80_INCLUDE_Z180_ARCH_H -#define __ARCH_Z80_INCLUDE_Z180_ARCH_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -/* The z180 address environment is represented in hardware as the 8-bit - * Common Base Register (CBR). CBR specifies the base address (on 4KB - * boundaries) used to generate a 20-bit physical address for Common Area 1 - * accesses. CBR is the upper 8-bits of the 20-bit address; the lower - * 14-bits of the base address are implicitly zero (hence the 4KB boundary - * alignment). - */ - -#ifdef CONFIG_ARCH_ADDRENV - -/* At the task-level, the z180 address environment is represented as struct - * z180_cbr_s which is defined in irq.h. - */ - -struct z180_cbr_s; -typedef FAR struct z180_cbr_s *arch_addrenv_t; -#endif - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -#undef EXTERN -#ifdef __cplusplus -} -#endif - -#endif /* __ARCH_Z80_INCLUDE_Z180_ARCH_H */ diff --git a/arch/z80/include/z180/chip.h b/arch/z80/include/z180/chip.h deleted file mode 100644 index fe3eb4eaf8..0000000000 --- a/arch/z80/include/z180/chip.h +++ /dev/null @@ -1,456 +0,0 @@ -/**************************************************************************** - * arch/z80/include/z180/chip.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z80_INCLUDE_Z180_CHIP_H -#define __ARCH_Z80_INCLUDE_Z180_CHIP_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -# include -#endif - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Bits in the Z180 FLAGS register ******************************************/ - -#define Z180_C_FLAG 0x01 /* Bit 0: Carry flag */ -#define Z180_N_FLAG 0x02 /* Bit 1: Add/Subtract flag */ -#define Z180_PV_FLAG 0x04 /* Bit 2: Parity/Overflow flag */ -#define Z180_H_FLAG 0x10 /* Bit 4: Half carry flag */ -#define Z180_Z_FLAG 0x40 /* Bit 5: Zero flag */ -#define Z180_S_FLAG 0x80 /* Bit 7: Sign flag */ - -/* Z180 Chip Definitions ****************************************************/ - -/* Z800180 - * - * The 8-bit Z80180 MPU provides the benefits of reduced system costs and - * also provides full backward compatibility with existing ZiLOG Z80 devices. - * Reduced system costs are obtained by incorporating several key system - * functions on-chip with the CPU. These key functions include I/O devices - * such as DMA, UART, and timer channels. Also included on-chip are wait- - * state generators, a clock oscillator, and an interrupt controller. The - * Z80180 MPU is housed in 80-pin QFP, 68-pin PLCC, and 64-pin DIP packages. - * - * Z80180 Features - * - * Enhanced Z80 CPU - * 1 MB MMU - * 2 DMA channels* - * 2 UARTs* (up to 512 Kbps) - * Two 16-Bit Timers - * Clock Serial I/O - * On-Chip Oscillator - * Power-Down Mode* - * Divide-by-One/Divide-by-Two/Multiply-by-Two Clock Options* - * Programmable Driver Strength for EMI Tuning - * - * * Enhanced on the Z8S180 and Z8L180 MPUs - */ - -#if defined(CONFIG_ARCH_CHIP_Z8018006VSG) || /* 68-pin PLCC */ \ - defined(CONFIG_ARCH_CHIP_Z8018010VSG) || /* 68-pin PLCC */ \ - defined(CONFIG_ARCH_CHIP_Z8018008VSG) || /* 68-pin PLCC */ \ - defined(CONFIG_ARCH_CHIP_Z8018010FSG) || /* 80-pin QFP (11 pins N/C) */ \ - defined(CONFIG_ARCH_CHIP_Z8018008VEG) || /* 68-pin PLCC */ \ - defined(CONFIG_ARCH_CHIP_Z8018006VEG) /* 68-pin PLCC */ - -# undef HAVE_Z8S180 /* Not Z8S180 (5V) or Z8L180 (3.3V) core */ -# define HAVE_Z8X180 1 /* Z8x180 registers */ -# undef HAVE_Z8X181 /* Z8x181 registers */ -# undef HAVE_Z8X182 /* Z8x182 registers */ -# define HAVE ROM 0 /* No on-chip ROM */ -# define HAVE_SERIALIO 1 /* Have clocked serial I/O */ -# undef HAVE_WDT /* No Watchdog timer */ -# define HAVE_NTIMERS16 2 /* Two (2) 16-bit timers */ -# define HAVE_NCTCS 0 /* No Counter/Timers (CTCs) */ -# define HAVE_NDMA 2 /* Two (2) DMA channels */ -# define HAVE_NUARTS 2 /* Two (2) UARTs (up to 512 Kbps) */ -# define HAVE_NSCC 0 /* No serial communication controller */ -# define HAVE_NESCC 0 /* No Enhanced Serial Communication Controllers */ -# undef HAVE_16550 /* No 16550 MIMIC */ -# define HAVE_NIOLINES 0 /* No I/O lines */ -# define HAVE_NPAR8 0 /* No 8-bit parallel ports */ -# undef HAVE_IEEE1284 /* No bidirectional centronics interface (IEEE 1284) */ - -#elif defined(CONFIG_ARCH_CHIP_Z8018006PSG) || /* 64-pin DIP 6 MHz 5V */ \ - defined(CONFIG_ARCH_CHIP_Z8018008FSG) || /* 80-pin QFP (11 pins N/C) 8MHz 5V */ \ - defined(CONFIG_ARCH_CHIP_Z8018010PSG) || /* 64-pin DIP 10MHz 5V */ \ - defined(CONFIG_ARCH_CHIP_Z8018006PEG) || /* 64-pin DIP 6MHz 5V */ \ - defined(CONFIG_ARCH_CHIP_Z8018010VEG) || /* 68-pin PLCC 10MHz 5V */ \ - defined(CONFIG_ARCH_CHIP_Z8018010PEG) || /* 64-pin DIP 10MHz 5V */ \ - defined(CONFIG_ARCH_CHIP_Z8018008PSG) || /* 64-pin DIP 8MHz 5V */ \ - defined(CONFIG_ARCH_CHIP_Z8018006FSG) /* 80-pin QFP (11 pins N/C) 6MHz 5V */ - -# undef HAVE_Z8S180 /* Not Z8S180 (5V) or Z8L180 (3.3V) core */ -# define HAVE_Z8X180 1 /* Z8x180 registers */ -# undef HAVE_Z8X181 /* Z8x181 registers */ -# undef HAVE_Z8X182 /* Z8x182 registers */ -# define HAVE ROM 0 /* No on-chip ROM */ -# undef HAVE_SERIALIO /* No clocked serial I/O ? */ -# undef HAVE_WDT /* No Watchdog timer */ -# define HAVE_NTIMERS16 2 /* Two (2) 16-bit timers */ -# define HAVE_NCTCS 0 /* No Counter/Timers (CTCs) */ -# define HAVE_NDMA 2 /* Two (2) DMA channels */ -# define HAVE_NUARTS 2 /* Two (2) UARTs (up to 512 Kbps) */ -# define HAVE_NSCC 0 /* No serial communication controller */ -# define HAVE_NESCC 0 /* No Enhanced Serial Communication Controllers */ -# undef HAVE_16550 /* No 16550 MIMIC */ -# define HAVE_NIOLINES 0 /* No I/O lines */ -# define HAVE_NPAR8 0 /* No 8-bit parallel ports */ -# undef HAVE_IEEE1284 /* No bidirectional centronics interface (IEEE 1284) */ - -#elif defined(CONFIG_ARCH_CHIP_Z8018000XSO)|| \ - defined(CONFIG_ARCH_CHIP_Z8018010FEG)|| \ - defined(CONFIG_ARCH_CHIP_Z8018000WSO)|| \ - defined(CONFIG_ARCH_CHIP_Z8018008PEG)|| - -# undef HAVE_Z8S180 /* Not Z8S180 (5V) or Z8L180 (3.3V) core */ -# define HAVE_Z8X180 1 /* Z8x180 registers */ -# undef HAVE_Z8X181 /* Z8x181 registers */ -# undef HAVE_Z8X182 /* Z8x182 registers */ -# define HAVE ROM 0 /* No on-chip ROM */ -# define HAVE_SERIALIO 1 /* Have clocked serial I/O */ -# undef HAVE_WDT /* No Watchdog timer */ -# define HAVE_NTIMERS16 2 /* Two (2) 16-bit timers */ -# define HAVE_NCTCS 0 /* No Counter/Timers (CTCs) */ -# define HAVE_NDMA 2 /* Two (2) DMA channels */ -# define HAVE_NUARTS 2 /* Two (2) UARTs (up to 512 Kbps) */ -# define HAVE_NSCC 0 /* No serial communication controller */ -# define HAVE_NESCC 0 /* No Enhanced Serial Communication Controllers */ -# undef HAVE_16550 /* No 16550 MIMIC */ -# define HAVE_NIOLINES 0 /* No I/O lines */ -# define HAVE_NPAR8 0 /* No 8-bit parallel ports */ -# undef HAVE_IEEE1284 /* No bidirectional centronics interface (IEEE 1284) */ - -/* Z80181 - * - * The Z80181 SAC Smart Access Controller is an 8-bit CMOS microprocessor - * that combines a Z180-compatible MPU, one channel of the Z85C30 Serial - * Communications Controller, a Z80 CTC, two 8-bit general-purpose parallel - * ports, and two Chip Select signals, into a single 100-pin Quad Flat Pack - * package. - * - * Z80181 Features - * - * Enhanced Z80 CPU - * 1 MB MMU - * 2 DMAs - * 2 UARTs - * Two 16-Bit Timers - * Clock Serial I/O - * 1 Channel SCC - * 1 8-Bit Counter/Timer - * 16 I/O Lines - * Emulation Mode - */ - -#elif defined(CONFIG_ARCH_CHIP_Z8018110FEG) /* 100-pin QFP */ - -# undef HAVE_Z8S180 /* Not Z8S180 (5V) or Z8L180 (3.3V) core */ -# undef HAVE_Z8X180 /* Z8x180 registers */ -# define HAVE_Z8X181 1 /* Z8x181 registers */ -# undef HAVE_Z8X182 /* Z8x182 registers */ -# define HAVE ROM 0 /* No on-chip ROM */ -# define HAVE_SERIALIO 1 /* Have clocked serial I/O */ -# undef HAVE_WDT /* No Watchdog timer */ -# define HAVE_NTIMERS16 2 /* Two (2) 16-bit timers */ -# define HAVE_NCTCS 1 /* One (1) 8-bit counter/timer */ -# define HAVE_NDMA 2 /* Two (2) DMA channels */ -# define HAVE_NUARTS 2 /* Two (2) UARTs (up to 512 Kbps) */ -# define HAVE_NSCC 1 /* One (1) Z85C30 serial communication controller */ -# define HAVE_NESCC 0 /* No Enhanced Serial Communication Controllers */ -# undef HAVE_16550 /* No 16550 MIMIC */ -# define HAVE_NIOLINES 16 /* Sixteen (16) I/O lines */ -# define HAVE_NPAR8 0 /* No 8-bit parallel ports */ -# undef HAVE_IEEE1284 /* No bidirectional centronics interface (IEEE 1284) */ - -/* Z80182 - * - * The Z80182 and Z8L182 MPUs are smart peripheral controller ICs for modems, - * fax, voice messaging, and other communications applications. It uses the - * Z80180 microprocessor linked with two channels of the industry-standard - * Z85230 ESCC, 24 bits of parallel I/O, and a 16550 MIMIC for direct - * connection to the IBM PC, XT, or AT bus - * - * Z80182 Features - * - * Enhanced Z80 CPU - * 1 MB MMU - * 2 DMAs - * 2 UARTs (up to 512 Kbps) - * Two 16-Bit Timers - * Clock Serial I/O - * Power-Down Mode - * Divide-by-One/Divide-by-Two/Multiply-by-Two Clock Options - * Enhanced Serial Communication Controller (ESCC) - * (2 Channels) with 32-Bit CRC - * 16550 MIMIC - * 24 Parallel I/O - * 3.3 V and 5 V Version - */ - -#elif defined(CONFIG_ARCH_CHIP_Z8018233FSG) || /* 100-pin QFP */ \ - defined(CONFIG_ARCH_CHIP_Z8018220AEG) || /* 100-pin LQFP 20MHz 5V */ \ - defined(CONFIG_ARCH_CHIP_Z8018216FSG) || /* 100-pin QFP 16MHz 5V */ \ - defined(CONFIG_ARCH_CHIP_Z8018216ASG) || /* 100-pin LQFP */ \ - defined(CONFIG_ARCH_CHIP_Z8018233ASG) /* 100-pin LQFP 33MHz 5V */ - -# undef HAVE_Z8S180 /* Not Z8S180 (5V) or Z8L180 (3.3V) core */ -# undef HAVE_Z8X180 /* Z8x180 registers */ -# undef HAVE_Z8X181 /* Z8x181 registers */ -# define HAVE_Z8X182 1 /* Z8x182 registers */ -# define HAVE ROM 0 /* No on-chip ROM */ -# define HAVE_SERIALIO 1 /* Have clocked serial I/O */ -# undef HAVE_WDT /* No Watchdog timer */ -# define HAVE_NTIMERS16 2 /* Two (2) 16-bit timers ? */ -# define HAVE_NCTCS 0 /* No Counter/Timers (CTCs) */ -# define HAVE_NDMA 2 /* Two (2) DMA channels */ -# define HAVE_NUARTS 2 /* Two (2) UARTs (up to 512 Kbps) */ -# define HAVE_NSCC 0 /* No Z85C30 serial communication controller */ -# define HAVE_NESCC 2 /* Two (2) Z85230 Enhanced Serial Communication Controllers */ -# define HAVE_16550 1 /* Have 16550 MIMIC */ -# define HAVE_NIOLINES 0 /* No I/O lines */ -# define HAVE_NPAR8 3 /* Three (3) 8-bit parallel ports (24-bit) */ -# undef HAVE_IEEE1284 /* No bidirectional centronics interface (IEEE 1284) */ - -/* Z80195 - * - * The Z80195 MPU is a smart peripheral controller device designed for - * general data communications applications, and architected specifically - * to accommodate all input and output (I/O) requirements for serial and - * parallel connectivity. Combining a high-performance CPU core with a - * variety of system and I/O resources, the Z80195 is useful in a broad - * range of applications. - * - * Z80195 Features - * - * Enhanced Z80 CPU - * 1 MB MMU - * 2 DMAs - * 2 UARTs (up to 512 Kbps) - * Two 16-Bit Timers - * 4 Counter/Timers - * Clock Serial I/O - * Power-Down Mode - * 32 K ROM (185) - * 1 Ch ESCC - * IEEE 1284 Bi-Directional Centronics Parallel Port - * 7 or 24 Bits of I/O - */ - -#elif defined(CONFIG_ARCH_CHIP_Z8019520FSG) || /* 100-pin QFP 20MHz 5V */ \ - defined(CONFIG_ARCH_CHIP_Z8019533FSG) /* 100-pin QFP 33MHz 5V */ - -# undef HAVE_Z8S180 /* No Z8S180 (5V) or Z8L180 (3.3V) core */ -# undef HAVE ROM 0 /* No 32KB on-chip ROM (z80185 only) */ -# define HAVE_SERIALIO 1 /* Have clocked serial I/O */ -# defube HAVE_WDT 1 /* Have Watchdog timer */ -# define HAVE_NTIMERS16 2 /* Two (2) 16-bit counter/timers */ -# define HAVE_NCTCS 4 /* Four (4) Counter/Timers (CTCs) */ -# define HAVE_NDMA 2 /* Two (2) DMA channels */ -# define HAVE_NUARTS 2 /* Two (2) UARTs (up to 512 Kbps) */ -# define HAVE_NSCC 0 /* No Z85C30 serial communication controller */ -# define HAVE_NESCC 1 /* One (1) Enhanced Serial Communication Controllers (EMSCC) */ -# undef HAVE_16550 /* No 16550 MIMIC */ -# define HAVE_NIOLINES 0 /* No I/O lines */ -# define HAVE_NPAR8 2 /* Two (s) 8-bit parallel ports (or 17-bit IEEE 1284) */ -# define HAVE_IEEE1284 1 /* Have bidirectional centronics interface (IEEE 1284) */ - -/* Z8L180 - * - * The enhanced Z8S180/Z8L180 significantly improves on previous Z80180 - * models, while still providing full backward compatibility with existing - * ZiLOG Z80 devices. The Z8S180/Z8L180 now offers faster execution speeds, - * power-saving modes, and EMI noise reduction. - * - * Z8L180 Features - * - * Enhanced Z80 CPU - * 1 MB MMU - * 2 DMAs* - * 2 UARTs* (up to 512 Kbps) - * Two 16-Bit Timers - * Clock Serial I/O - * On-Chip Oscillator - * Power-Down Mode* - * Divide-by-One/Divide-by-Two/Multiply-by-Two Clock Options* - * Programmable Driver Strength for EMI Tuning - * - * * Enhanced on the Z8S180 and Z8L180 MPUs. - */ - -#elif defined(CONFIG_ARCH_CHIP_Z8L18020VSG) || /* 68-pinn PLCC */ \ - defined(CONFIG_ARCH_CHIP_Z8L18020FSG) || /* 80-pin GFP 20MHz 3.3V */ \ - defined(CONFIG_ARCH_CHIP_Z8L18020PSG) - -# define HAVE_Z8S180 1 /* Uses Z8S180 (5V) or Z8L180 (3.3V) core */ -# define HAVE_Z8X180 1 /* Z8x180 registers */ -# undef HAVE_Z8X181 /* Z8x181 registers */ -# undef HAVE_Z8X182 /* Z8x182 registers */ -# define HAVE ROM 0 /* No on-chip ROM */ -# define HAVE_SERIALIO 1 /* Have clocked serial I/O */ -# undef HAVE_WDT /* No Watchdog timer */ -# define HAVE_NTIMERS16 2 /* Two (2) 16-bit timers */ -# define HAVE_NCTCS 0 /* No Counter/Timers (CTCs) */ -# define HAVE_NDMA 2 /* Two (2) DMA channels */ -# define HAVE_NUARTS 2 /* Two (2) UARTs (up to 512 Kbps) */ -# define HAVE_NSCC 0 /* No serial communication controller */ -# define HAVE_NESCC 0 /* No Enhanced Serial Communication Controllers */ -# undef HAVE_16550 /* No 16550 MIMIC */ -# define HAVE_NIOLINES 0 /* No I/O lines */ -# define HAVE_NPAR8 0 /* No 8-bit parallel ports */ -# undef HAVE_IEEE1284 /* No bidirectional centronics interface (IEEE 1284) */ - -/* Z8L182 - * - * The Z80182/Z8L182 is a smart peripheral controller IC for modem (in - * particular V. Fast applications), fax, voice messaging and other - * communications applications. It uses the Z80180 microprocessor (Z8S180 - * MPU core) linked with two channels of the industry standard Z85230 ESCC - * (Enhanced Serial Communications Controller), 24 bits of parallel I/O, - * and a 16550 MIMIC for direct connection to the IBM PC, XT, AT bus. - * - * Z8L182 Features - * - * Enhanced Z80 CPU - * 1 MB MMU - * 2 DMAs - * 2 UARTs (up to 512 Kbps) - * Two 16-Bit Timers - * Clock Serial I/O - * Power-Down Mode - * Divide-by-One/Divide-by-Two/Multiply-by-Two Clock Options - * ESCC (2 Channels) with 32-Bit CRC - * 16550 MIMIC - * 24 Parallel I/O - * 3.3 V and 5 V Version - */ - -#elif defined(CONFIG_ARCH_CHIP_Z8L18220ASG) || /* 100-pin LQFP */ \ - defined(CONFIG_ARCH_CHIP_Z8L18220FSG) || /* 100-pin QFP 20MHz 3.3V */ \ - defined(CONFIG_ARCH_CHIP_Z8L18220AEG) - -# define HAVE_Z8S180 1 /* Uses Z8S180 (5V) or Z8L180 (3.3V) core */ -# undef HAVE_Z8X180 /* Z8x180 registers */ -# undef HAVE_Z8X181 /* Z8x181 registers */ -# define HAVE_Z8X182 1 /* Z8x182 registers */ -# define HAVE ROM 0 /* No on-chip ROM */ -# define HAVE_SERIALIO 1 /* Have clocked serial I/O */ -# undef HAVE_WDT /* No Watchdog timer */ -# define HAVE_NTIMERS16 2 /* Two (2) 16-bit timers ? */ -# define HAVE_NCTCS 0 /* No Counter/Timers (CTCs) */ -# define HAVE_NDMA 2 /* Two (2) DMA channels */ -# define HAVE_NUARTS 2 /* Two (2) UARTs (up to 512 Kbps) */ -# define HAVE_NSCC 0 /* No Z85C30 serial communication controller */ -# define HAVE_NESCC 2 /* Two (2) Z85230 Enhanced Serial Communication Controllers */ -# define HAVE_16550 1 /* Have 16550 MIMIC */ -# define HAVE_NIOLINES 0 /* No I/O lines */ -# define HAVE_NPAR8 3 /* Three (3) 8-bit parallel ports (24-bit) */ -# undef HAVE_IEEE1284 /* No bidirectional centronics interface (IEEE 1284) */ - -/* Z8SL180 - * - * The enhanced Z8S180/Z8L180 significantly improves on previous Z80180 - * models, while still providing full backward compatibility with existing - * ZiLOG Z80 devices. The Z8S180/Z8L180 now offers faster execution speeds, - * power-saving modes, and EMI noise reduction.This enhanced Z180 design - * also incorporates additional feature enhancements to the ASCIs, DMAs, - * and STANDBY mode power consumption. With the addition of ESCC-like - * Baud Rate Generators (BRGs), the two ASCIs offer the flexibility and - * capability to transfer data asynchronously at rates of up to 512 Kbps. - * - * Z8S180 Features - * - * External Memory - 1 - * Voltage Range - 5.0V - * Communications Controller - CSIO, UART - * Other Features - 1MB MMU, 2xDMAs, 2xUARTs - * Speed (MHz) - 20, 10, 33 - * Core / CPU Used - Z180 - * Pin Count - 64, 68, 80 - * Timers - 2 - * I/O - Clock Serial - * Package - DIP, PLCC, QFP - */ - -#elif defined(CONFIG_ARCH_CHIP_Z8S18020VSG) || /* 68-pin PLCC */ \ - defined(CONFIG_ARCH_CHIP_Z8S18020VSG1960) || /* 68-pin PLCC */ \ - defined(CONFIG_ARCH_CHIP_Z8S18033VSG) || /* 68-pin PLCC */ \ - defined(CONFIG_ARCH_CHIP_Z8S18010FSG) || /* 80-pin QFP */ \ - defined(CONFIG_ARCH_CHIP_Z8S18010VEG) || /* 68-pin PLCC */ \ - defined(CONFIG_ARCH_CHIP_Z8S18020VEG) || /* 68-pin PLCC */ \ - defined(CONFIG_ARCH_CHIP_Z8S18010VSG) || /* 68-pin PLCC */ \ - defined(CONFIG_ARCH_CHIP_Z8S18020PSG) || /* 64-pin DIP 10Mhz 5V */ \ - defined(CONFIG_ARCH_CHIP_Z8S18033FSG) || /* 80-pin QFP 33MHz 5V */ \ - defined(CONFIG_ARCH_CHIP_Z8S18033FEG) || /* 80-pin QFP 33MHz 5V */ \ - defined(CONFIG_ARCH_CHIP_Z8S18020FSG) || /* 80-pin QFP 20MHz 5V */ \ - defined(CONFIG_ARCH_CHIP_Z8S18033VEG) || /* 68-pin PLCC 33MHz 5V */ \ - defined(CONFIG_ARCH_CHIP_Z8S18010PSG) || /* 64-pin DIP 10MHz 5V */ \ - defined(CONFIG_ARCH_CHIP_Z8S18020FEG) || \ - defined(CONFIG_ARCH_CHIP_Z8S18010PEG) || \ - defined(CONFIG_ARCH_CHIP_Z8S18010FEG) - -# define HAVE_Z8S180 1 /* Uses Z8S180 (5V) or Z8L180 (3.3V) core */ -# define HAVE_Z8X180 1 /* Z8x180 registers */ -# undef HAVE_Z8X181 /* Z8x181 registers */ -# undef HAVE_Z8X182 /* Z8x182 registers */ -# define HAVE ROM 0 /* No on-chip ROM */ -# define HAVE_SERIALIO 1 /* Have clocked serial I/O */ -# undef HAVE_WDT /* No Watchdog timer */ -# define HAVE_NTIMERS16 2 /* Two (2) 16-bit timers */ -# define HAVE_NCTCS 0 /* No Counter/Timers (CTCs) */ -# define HAVE_NDMA 2 /* Two (2) DMA channels */ -# define HAVE_NUARTS 2 /* Two (2) UARTs (up to 512 Kbps) */ -# define HAVE_NSCC 0 /* No serial communication controller */ -# define HAVE_NESCC 0 /* No Enhanced Serial Communication Controllers */ -# undef HAVE_16550 /* No 16550 MIMIC */ -# define HAVE_NIOLINES 0 /* No I/O lines */ -# define HAVE_NPAR8 0 /* No 8-bit parallel ports */ -# undef HAVE_IEEE1284 /* No bidirectional centronics interface (IEEE 1284) */ - -#else -# error "Unrecognized/undefined Z180 chip" -#endif - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -/**************************************************************************** - * Inline functions - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#endif /* __ARCH_Z80_INCLUDE_Z180_CHIP_H */ diff --git a/arch/z80/include/z180/inttypes.h b/arch/z80/include/z180/inttypes.h deleted file mode 100644 index 347d9d3044..0000000000 --- a/arch/z80/include/z180/inttypes.h +++ /dev/null @@ -1,110 +0,0 @@ -/**************************************************************************** - * arch/z80/include/z180/inttypes.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z80_INCLUDE_Z180_INTTYPES_H -#define __ARCH_Z80_INCLUDE_Z180_INTTYPES_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#define PRId8 "d" -#define PRId16 "d" -#define PRId32 "ld" - -#define PRIdPTR "d" - -#define PRIi8 "i" -#define PRIi16 "i" -#define PRIi32 "li" - -#define PRIiPTR "i" - -#define PRIo8 "o" -#define PRIo16 "o" -#define PRIo32 "lo" - -#define PRIoPTR "o" - -#define PRIu8 "u" -#define PRIu16 "u" -#define PRIu32 "lu" - -#define PRIuPTR "u" - -#define PRIx8 "x" -#define PRIx16 "x" -#define PRIx32 "lx" - -#define PRIxPTR "x" - -#define PRIX8 "X" -#define PRIX16 "X" -#define PRIX32 "lX" - -#define PRIXPTR "X" - -#define SCNd8 "hhd" -#define SCNd16 "d" -#define SCNd32 "ld" - -#define SCNdPTR "d" - -#define SCNi8 "hhi" -#define SCNi16 "i" -#define SCNi32 "li" - -#define SCNiPTR "i" - -#define SCNo8 "hho" -#define SCNo16 "o" -#define SCNo32 "lo" - -#define SCNoPTR "o" - -#define SCNu8 "hhu" -#define SCNu16 "u" -#define SCNu32 "lu" - -#define SCNuPTR "u" - -#define SCNx8 "hhx" -#define SCNx16 "x" -#define SCNx32 "lx" - -#define SCNxPTR "x" - -#define INT8_C(x) x -#define INT16_C(x) x -#define INT24_C(x) x -#define INT32_C(x) x ## l - -#define UINT8_C(x) x -#define UINT16_C(x) x -#define UINT24_C(x) x -#define UINT32_C(x) x ## ul - -#endif /* __ARCH_Z80_INCLUDE_Z180_INTTYPES_H */ diff --git a/arch/z80/include/z180/io.h b/arch/z80/include/z180/io.h deleted file mode 100644 index 90704dd166..0000000000 --- a/arch/z80/include/z180/io.h +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************************** - * arch/z80/include/z180/io.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* This file should never be included directly but, rather, only indirectly - * through arch/io.h - */ - -#ifndef __ARCH_Z80_INCLUDE_Z180_IO_H -#define __ARCH_Z80_INCLUDE_Z180_IO_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -/**************************************************************************** - * Inline functions - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -void outp(char p, char c); -char inp(char p); - -#undef EXTERN -#ifdef __cplusplus -} -#endif -#endif - -#endif /* __ARCH_Z80_INCLUDE_Z180_IO_H */ diff --git a/arch/z80/include/z180/irq.h b/arch/z80/include/z180/irq.h deleted file mode 100644 index 3afec62107..0000000000 --- a/arch/z80/include/z180/irq.h +++ /dev/null @@ -1,231 +0,0 @@ -/**************************************************************************** - * arch/z80/include/z180/irq.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* This file should never be included directly but, rather, only indirectly - * through nuttx/irq.h (via arch/irq.h) - */ - -#ifndef __ARCH_Z80_INCLUDE_Z180_IRQ_H -#define __ARCH_Z80_INCLUDE_Z180_IRQ_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -# include -#endif - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Z180 Interrupts */ - -/* Resets */ - - /* RST 0 is the power-up interrupt vector */ -#define Z180_RST1 (0) /* RST 1 */ -#define Z180_RST2 (1) /* RST 2 */ -#define Z180_RST3 (2) /* RST 3 */ -#define Z180_RST4 (3) /* RST 4 */ -#define Z180_RST5 (4) /* RST 5 */ -#define Z180_RST6 (5) /* RST 6 */ -#define Z180_RST7 (6) /* RST 7 */ - -/* TRAP Interrupt - * - * The Z8X180 generates a non-maskable TRAP interrupt when an undefined Op - * Code fetch occurs. When a TRAP interrupt occurs the Z8X180 operates as - * follows: - * - * 1. The TRAP bit in the Interrupt TRAP/Control (ITC) register is set to 1. - * 2. The current PC (Program Counter) is saved on the stack. - * 3. The Z8X180 vectors to logical address 0 (which may or may not be the - * same as reset which vectors to physical address 0x00000). - * - * The state of the UFO (Undefined Fetch Object) bit in ITC allows TRAP - * manipulation software to correctly adjust the stacked PC, depending on - * whether the second or third byte of the Op Code generated the TRAP. If - * UFO is 0, the starting address of the invalid instruction is equal to - * the stacked PC-1. If UFO is 1, the starting address of the invalid - * instruction is equal to the stacked PC-2. - */ - -#define Z180_TRAP (7) - -/* INT0 - * - * INT0 (only) has 3 different software programmable interrupt response - * modes: Mode 0, Mode 1 and Mode 2. - * - * - INT0 Mode 0. During the interrupt acknowledge cycle, an instruction - * is fetched from the data bus (DO-D7) at the rising edge of T3. - * - * - INT0 Mode 1. The PC is stacked and instruction execution restarts at - * logical address 0x0038. - * - * - INT0 Mode 2. The restart address is obtained by reading the contents - * of a table residing in memory. The vector table consists of up to - * 128 two-byte restart addresses stored in low byte, high byte order. - * - * This is similar to normal vector mode interrupts (like INT1 and 2): - * The 256-bit table address comes from I, however the lower-order 8 - * bits of the vector is fetched from the data bus. - */ - -#define Z180_INT0 (8) - -/* Vector Interrupts - * - * Normal vector interrupts use a vector table with 16 entries (2 bytes - * per entry). Each entry holds the address of the interrupt handler. - * The vector table address is determined by 11-bits from the I and IL - * registers. The vector table must be aligned on 32-byte address - * boundaries. - */ - -#define Z180_INT1 (9) /* Vector offset 0: External /INT1 */ -#define Z180_INT2 (10) /* Vector offset 2: External /INT2 */ -#define Z180_PRT0 (11) /* Vector offset 4: PRT channel 0 */ -#define Z180_PRT1 (12) /* Vector offset 6: PRT channel 1 */ -#define Z180_DMA0 (13) /* Vector offset 8: DMA channel 0 */ -#define Z180_DMA1 (14) /* Vector offset 10: DMA Channel 1 */ -#define Z180_CSIO (15) /* Vector offset 12: Clocked serial I/O */ -#define Z180_ASCI0 (16) /* Vector offset 14: Async channel 0 */ -#define Z180_ASCI1 (18) /* Vector offset 16: Async channel 1 */ -#define Z180_UNUSED (19) /* Vector offset 18-20: unused */ - -#define Z180_IRQ_SYSTIMER Z180_RST7 -#define NR_IRQS (20) - -/* IRQ Stack Frame Format - * - * This stack frame is created on each interrupt. These registers are stored - * in the TCB to many context switches. - */ - -#define XCPT_I (0) /* Offset 0: Saved I w/interrupt state in carry */ -#define XCPT_BC (1) /* Offset 1: Saved BC register */ -#define XCPT_DE (2) /* Offset 2: Saved DE register */ -#define XCPT_IX (3) /* Offset 3: Saved IX register */ -#define XCPT_IY (4) /* Offset 4: Saved IY register */ -#define XCPT_SP (5) /* Offset 5: Offset to SP at time of interrupt */ -#define XCPT_HL (6) /* Offset 6: Saved HL register */ -#define XCPT_AF (7) /* Offset 7: Saved AF register */ -#define XCPT_PC (8) /* Offset 8: Offset to PC at time of interrupt */ - -#define XCPTCONTEXT_REGS (9) -#define XCPTCONTEXT_SIZE (2 * XCPTCONTEXT_REGS) - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -#ifndef __ASSEMBLY__ - -/* This is the type of the register save array */ - -typedef uint16_t chipreg_t; - -/* Common Area 1 holds the code and data that is unique to a particular task - * and shared by all pthreads created from that task. Each task will then - * have its own copy of struct z180_cbr_s. This structure is created with - * a reference count of one when the task is created. - * - * When the task creates additional threads, the reference count is - * incremented and the CBR value is shared. When each thread exits, the - * reference count id decremented. When the reference count is decremented, - * the physical memory underlying the CBR is finally released. - */ - -struct z180_cbr_s -{ - uint8_t cbr; /* The CBR value used by the thread */ - uint8_t crefs; /* The number of task groups using this CBR value (0 or 1) */ - uint8_t pages; /* The number of 4KB pages of physical memory in the allocation */ -}; - -/* This struct defines the way the registers and z180-state information are - * stored. - */ - -struct xcptcontext -{ - /* Register save area */ - - chipreg_t regs[XCPTCONTEXT_REGS]; - - /* The following retains that state during signal execution - * - * REVISIT: Because there is only one copy of these save areas, - * only a single signal handler can be active. This precludes - * queuing of signal actions. As a result, signals received while - * another signal handler is executing will be ignored! - */ - - uint16_t saved_pc; /* Saved return address */ - uint16_t saved_i; /* Saved interrupt state */ -}; -#endif - -/**************************************************************************** - * Inline functions - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -/* Name: up_irq_save, up_irq_restore, and friends. - * - * NOTE: This function should never be called from application code and, - * as a general rule unless you really know what you are doing, this - * function should not be called directly from operation system code either: - * Typically, the wrapper functions, enter_critical_section() and - * leave_critical section(), are probably what you really want. - */ - -irqstate_t up_irq_save(void) __naked; -void up_irq_restore(irqstate_t flags) __naked; -irqstate_t up_irq_enable(void); - -#undef EXTERN -#ifdef __cplusplus -} -#endif -#endif - -#endif /* __ARCH_Z80_INCLUDE_Z180_IRQ_H */ diff --git a/arch/z80/include/z180/limits.h b/arch/z80/include/z180/limits.h deleted file mode 100644 index d1de6330e8..0000000000 --- a/arch/z80/include/z180/limits.h +++ /dev/null @@ -1,84 +0,0 @@ -/**************************************************************************** - * arch/z80/include/z180/limits.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z80_INCLUDE_Z180_LIMITS_H -#define __ARCH_Z80_INCLUDE_Z180_LIMITS_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#define CHAR_BIT 8 -#define SCHAR_MIN (-SCHAR_MAX - 1) -#define SCHAR_MAX 127 -#define UCHAR_MAX 255 - -/* These could be different on machines where char is unsigned */ - -#ifdef __CHAR_UNSIGNED__ -# define CHAR_MIN 0 -# define CHAR_MAX UCHAR_MAX -#else -# define CHAR_MIN SCHAR_MIN -# define CHAR_MAX SCHAR_MAX -#endif - -#define SHRT_MIN (-SHRT_MAX - 1) -#define SHRT_MAX 32767 -#define USHRT_MAX 65535U - -#define INT_MIN (-INT_MAX - 1) -#define INT_MAX 32767 -#define UINT_MAX 65535U - -/* These change on 32-bit and 64-bit platforms */ - -#define LONG_MIN (-LONG_MAX - 1) -#define LONG_MAX 2147483647L -#define ULONG_MAX 4294967295UL - -#define LLONG_MIN (-LLONG_MAX - 1) -#define LLONG_MAX 9223372036854775807LL -#define ULLONG_MAX 18446744073709551615ULL - -/* A pointer is 2 bytes */ - -#define PTR_MIN (-PTR_MAX - 1) -#define PTR_MAX 32767 -#define UPTR_MAX 65535U - -#if !defined(__WCHAR_TYPE__) -# define WCHAR_MIN INT_MIN -# define WCHAR_MAX INT_MAX -#elif defined(__WCHAR_UNSIGNED__) -# define WCHAR_MIN 0 -# define WCHAR_MAX __WCHAR_MAX__ -#else -# define WCHAR_MIN (-__WCHAR_MAX__ - 1) -# define WCHAR_MAX __WCHAR_MAX__ -#endif - -#endif /* __ARCH_Z80_INCLUDE_Z180_LIMITS_H */ diff --git a/arch/z80/include/z180/types.h b/arch/z80/include/z180/types.h deleted file mode 100644 index 625e3ed066..0000000000 --- a/arch/z80/include/z180/types.h +++ /dev/null @@ -1,113 +0,0 @@ -/**************************************************************************** - * arch/z80/include/z180/types.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* This file should never be included directly but, rather, only indirectly - * through sys/types.h - */ - -#ifndef __ARCH_Z80_INCLUDE_Z180_TYPES_H -#define __ARCH_Z80_INCLUDE_Z180_TYPES_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Type Declarations - ****************************************************************************/ - -#ifndef __ASSEMBLY__ - -/* These are the sizes of the standard integer types. NOTE that these type - * names have a leading underscore character. This file will be included - * (indirectly) by include/stdint.h and typedef'ed to the final name without - * the underscore character. This roundabout way of doings things allows - * the stdint.h to be removed from the include/ directory in the event that - * the user prefers to use the definitions provided by their toolchain header - * files - * - * These are the sizes of the standard SDCC types - * - * For SDCC, sizeof(int) is 16 and sizeof(long) is 32. long long and double - * are not supported. - * - * Generic pointers are 3 bytes in length with the first byte holding data - * space information. - */ - -typedef signed char _int8_t; -typedef unsigned char _uint8_t; - -typedef signed int _int16_t; -typedef unsigned int _uint16_t; - -typedef signed long _int32_t; -typedef unsigned long _uint32_t; - -typedef signed long long _int64_t; -typedef unsigned long long _uint64_t; -#define __INT64_DEFINED - -typedef _int64_t _intmax_t; -typedef _uint64_t _uintmax_t; - -#if defined(__WCHAR_TYPE__) -typedef __WCHAR_TYPE__ _wchar_t; -#else -typedef int _wchar_t; -#endif - -typedef int _wint_t; -typedef int _wctype_t; - -/* A size is 2 bytes */ - -#if defined(__SIZE_TYPE__) -/* If __SIZE_TYPE__ is defined we define ssize_t based on size_t. - * We simply change "unsigned" to "signed" for this single definition - * to make sure ssize_t and size_t only differ by their signedness. - */ - -#define unsigned signed -typedef __SIZE_TYPE__ _ssize_t; -#undef unsigned -typedef __SIZE_TYPE__ _size_t; -#else -typedef signed int _ssize_t; -typedef unsigned int _size_t; -#endif - -/* This is the size of the interrupt state save returned by up_irq_save() */ - -typedef _uint16_t irqstate_t; - -#endif /* __ASSEMBLY__ */ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#endif /* __ARCH_Z80_INCLUDE_Z180_TYPES_H */ diff --git a/arch/z80/include/z8/arch.h b/arch/z80/include/z8/arch.h deleted file mode 100644 index ed861684e9..0000000000 --- a/arch/z80/include/z8/arch.h +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** - * arch/z80/include/z8/arch.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* This file should never be included directly but, rather, - * only indirectly through nuttx/arch.h (via arch/arch.h) - */ - -#ifndef __ARCH_Z80_INCLUDE_Z8_ARCH_H -#define __ARCH_Z80_INCLUDE_Z8_ARCH_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -#undef EXTERN -#ifdef __cplusplus -} -#endif - -#endif /* __ARCH_Z80_INCLUDE_Z8_ARCH_H */ diff --git a/arch/z80/include/z8/inttypes.h b/arch/z80/include/z8/inttypes.h deleted file mode 100644 index 380585429d..0000000000 --- a/arch/z80/include/z8/inttypes.h +++ /dev/null @@ -1,110 +0,0 @@ -/**************************************************************************** - * arch/z80/include/z8/inttypes.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z80_INCLUDE_Z8_INTTYPES_H -#define __ARCH_Z80_INCLUDE_Z8_INTTYPES_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#define PRId8 "d" -#define PRId16 "d" -#define PRId32 "ld" - -#define PRIdPTR "d" - -#define PRIi8 "i" -#define PRIi16 "i" -#define PRIi32 "li" - -#define PRIiPTR "i" - -#define PRIo8 "o" -#define PRIo16 "o" -#define PRIo32 "lo" - -#define PRIoPTR "o" - -#define PRIu8 "u" -#define PRIu16 "u" -#define PRIu32 "lu" - -#define PRIuPTR "u" - -#define PRIx8 "x" -#define PRIx16 "x" -#define PRIx32 "lx" - -#define PRIxPTR "x" - -#define PRIX8 "X" -#define PRIX16 "X" -#define PRIX32 "lX" - -#define PRIXPTR "X" - -#define SCNd8 "hhd" -#define SCNd16 "d" -#define SCNd32 "ld" - -#define SCNdPTR "d" - -#define SCNi8 "hhi" -#define SCNi16 "i" -#define SCNi32 "li" - -#define SCNiPTR "i" - -#define SCNo8 "hho" -#define SCNo16 "o" -#define SCNo32 "lo" - -#define SCNoPTR "o" - -#define SCNu8 "hhu" -#define SCNu16 "u" -#define SCNu32 "lu" - -#define SCNuPTR "u" - -#define SCNx8 "hhx" -#define SCNx16 "x" -#define SCNx32 "lx" - -#define SCNxPTR "x" - -#define INT8_C(x) x -#define INT16_C(x) x -#define INT24_C(x) x -#define INT32_C(x) x ## l - -#define UINT8_C(x) x -#define UINT16_C(x) x -#define UINT24_C(x) x -#define UINT32_C(x) x ## ul - -#endif /* __ARCH_Z80_INCLUDE_Z8_INTTYPES_H */ diff --git a/arch/z80/include/z8/irq.h b/arch/z80/include/z8/irq.h deleted file mode 100644 index 37148633b8..0000000000 --- a/arch/z80/include/z8/irq.h +++ /dev/null @@ -1,362 +0,0 @@ -/**************************************************************************** - * arch/z80/include/z8/irq.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* This file should never be included directly but, rather, - * only indirectly through nuttx/irq.h (via arch/irq.h) - */ - -#ifndef __ARCH_Z80_INCLUDE_Z8_IRQ_H -#define __ARCH_Z80_INCLUDE_Z8_IRQ_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -# include -#endif - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* This is similar configuration information that is contained in ez8.h. - * However, this file must be include-able by assembly language files and, - * hence, cannot include ez8.h. The logic is fragmentary at present. - */ - -#ifndef ENCORE_VECTORS -# if defined(_Z8ENCORE_F642X) || defined(_Z8ENCORE_64K_SERIES) -# define ENCORE_VECTORS 1 -# endif - -# if defined(_Z8ENCORE_F640X) || defined(_Z8ENCORE_640_FAMILY) -# define ENCORE_VECTORS 1 -# endif - -# if defined(_Z8ENCORE_F08X) || defined(_Z8ENCORE_8K_SERIES) -# define ENCORE_VECTORS 1 -# endif - -# if defined(_Z8ENCORE_4K_SERIES) -# define ENCORE_VECTORS 1 -# endif -#endif - -/* ez8 Interrupt Numbers ****************************************************/ - -#if defined(ENCORE_VECTORS) - -# define Z8_WDT_IRQ 0 -# define Z8_TRAP_IRQ 1 -# define Z8_TIMER2_IRQ 2 /* Only if EZ8_TIMER3 defined */ -# define Z8_TIMER1_IRQ 3 -# define Z8_TIMER0_IRQ 4 -# define Z8_UART0_RX_IRQ 5 /* Only if EZ8_UART0 defined */ -# define Z8_UART0_TX_IRQ 6 /* Only if EZ8_UART0 defined */ -# define Z8_I2C_IRQ 7 /* Only if EZ8_I2C defined */ -# define Z8_SPI_IRQ 8 /* Only if EZ8_SPI defined */ -# define Z8_ADC_IRQ 9 /* Only if EZ8_ADC defined */ -# define Z8_P7AD_IRQ 10 -# define Z8_P6AD_IRQ 11 -# define Z8_P5AD_IRQ 12 -# define Z8_P4AD_IRQ 13 -# define Z8_P3AD_IRQ 14 -# define Z8_P2AD_IRQ 15 -# define Z8_P1AD_IRQ 16 -# define Z8_P0AD_IRQ 17 -# define Z8_TIMER3_IRQ 18 /* Only if EZ8_TIMER4 defined */ -# define Z8_UART1_RX_IRQ 19 /* Only if EZ8_UART1 defined */ -# define Z8_UART1_TX_IRQ 20 /* Only if EZ8_UART1 defined */ -# define Z8_DMA_IRQ 21 /* Only if EZ8_DMA defined */ -# define Z8_C3_IRQ 22 /* Only if EZ8_PORT1 defined */ -# define Z8_C2_IRQ 23 /* Only if EZ8_PORT1 defined */ -# define Z8_C1_IRQ 24 /* Only if EZ8_PORT1 defined */ -# define Z8_C0_IRQ 25 /* Only if EZ8_PORT1 defined */ - -# define NR_IRQS (26) - -#elif defined(ENCORE_XP_VECTORS) - -# define Z8_WDT_IRQ 0 -# define Z8_TRAP_IRQ 1 -# define Z8_TIMER2_IRQ 2 /* Only if EZ8_TIMER3 defined */ -# define Z8_TIMER1_IRQ 3 -# define Z8_TIMER0_IRQ 4 -# define Z8_UART0_RX_IRQ 5 /* Only if EZ8_UART0 defined */ -# define Z8_UART0_TX_IRQ 6 /* Only if EZ8_UART0 defined */ -# define Z8_I2C_IRQ 7 /* Only if EZ8_I2C defined */ -# define Z8_SPI_IRQ 8 /* Only if EZ8_SPI defined */ -# define Z8_ADC_IRQ 9 /* Only if EZ8_ADC or EZ8_ADC_NEW defined */ -# define Z8_P7AD_IRQ 10 -# define Z8_P6AD_IRQ 11 -# define Z8_P5AD_IRQ 12 -# define Z8_P4AD_IRQ 13 -# define Z8_P3AD_IRQ 14 -# define Z8_P2AD_IRQ 15 -# define Z8_P1AD_IRQ 16 -# define Z8_P0AD_IRQ 17 -# define Z8_TIMER3_IRQ 18 /* Only if EZ8_TIMER4 defined */ -# define Z8_UART1_RX_IRQ 19 /* Only if EZ8_UART1 defined */ -# define Z8_UART1_TX_IRQ 20 /* Only if EZ8_UART1 defined */ -# define Z8_DMA_IRQ 21 /* Only if EZ8_DMA defined */ -# define Z8_C3_IRQ 22 /* Only if EZ8_PORT1 defined */ -# define Z8_C2_IRQ 23 /* Only if EZ8_PORT1 defined */ -# define Z8_C1_IRQ 24 /* Only if EZ8_PORT1 defined */ -# define Z8_C0_IRQ 25 /* Only if EZ8_PORT1 defined */ -# define Z8_POTRAP_IRQ 27 -# define Z8_WOTRAP_IRQ 28 - -# define NR_IRQS (29) - -#elif defined(ENCORE_XP16K_VECTORS) - -# define Z8_WDT_IRQ 0 -# define Z8_TRAP_IRQ 1 -# define Z8_TIMER2_IRQ 2 /* Only if EZ8_TIMER3 defined */ -# define Z8_TIMER1_IRQ 3 -# define Z8_TIMER0_IRQ 4 -# define Z8_UART0_RX_IRQ 5 /* Only if EZ8_UART0 defined */ -# define Z8_UART0_TX_IRQ 6 /* Only if EZ8_UART0 defined */ -# define Z8_I2C_IRQ 7 /* Only if EZ8_I2C defined */ -# define Z8_SPI_IRQ 8 /* Only if EZ8_ESPI defined */ -# define Z8_ADC_IRQ 9 /* Only if EZ8_ADC_NEW defined */ -# define Z8_P7AD_IRQ 10 -# define Z8_P6AD_IRQ 11 -# define Z8_P5AD_IRQ 12 -# define Z8_P4AD_IRQ 13 -# define Z8_P3AD_IRQ 14 -# define Z8_P2AD_IRQ 15 -# define Z8_P1AD_IRQ 16 -# define Z8_P0AD_IRQ 17 -# define Z8_MCT_IRQ 19 /* Only if EZ8_MCT defined */ -# define Z8_UART1_RX_IRQ 20 /* Only if EZ8_UART1 defined */ -# define Z8_UART1_TX_IRQ 21 /* Only if EZ8_UART1 defined */ -# define Z8_C3_IRQ 22 -# define Z8_C2_IRQ 23 -# define Z8_C1_IRQ 24 -# define Z8_C0_IRQ 25 -# define Z8_POTRAP_IRQ 27 -# define Z8_WOTRAP_IRQ 28 - -# define NR_IRQS (29) - -#elif defined(ENCORE_MC_VECTORS) - -# define Z8_WDT_IRQ 0 -# define Z8_TRAP_IRQ 1 -# define Z8_PWMTIMER_IRQ 2 -# define Z8_PWMFAULT_IRQ 3 -# define Z8_ADC_IRQ 4 /* Only if EZ8_ADC_NEW defined */ -# define Z8_CMP_IRQ 5 -# define Z8_TIMER0_IRQ 6 -# define Z8_UART0_RX_IRQ 7 /* Only if EZ8_UART0 defined */ -# define Z8_UART0_TX_IRQ 8 /* Only if EZ8_UART0 defined */ -# define Z8_SPI_IRQ 9 /* Only if EZ8_SPI defined */ -# define Z8_I2C_IRQ 10 /* Only if EZ8_I2C defined */ -# define Z8_C0_IRQ 12 -# define Z8_PB_IRQ 13 -# define Z8_P7AP3A_IRQ 14 -# define Z8_P6AP2A_IRQ 15 -# define Z8_P5AP1A_IRQ 16 -# define Z8_P4AP0A_IRQ 17 -# define Z8_POTRAP_IRQ 27 -# define Z8_WOTRAP_IRQ 28 - -# define NR_IRQS (29) - -#endif - -#define Z8_IRQ_SYSTIMER Z8_TIMER0_IRQ - -/* IRQ Management Macros ****************************************************/ - -/* These macros map IRQ numbers to IRQ registers and bits. - * WARNING: These have only been verified for the Z8F640X family! - */ - -#ifdef ENCORE_VECTORS - -# define Z8_IRQ0_MIN Z8_TIMER2_IRQ -# define Z8_IRQ0_BIT(irq) (1 << (Z8_ADC_IRQ - (irq))) -# define Z8_IRQ0_MAX Z8_ADC_IRQ - -# define Z8_IRQ1_MIN Z8_P7AD_IRQ -# define Z8_IRQ1_BIT(irq) (1 << (Z8_P0AD_IRQ - (irq))) -# define Z8_IRQ1_MAX Z8_P0AD_IRQ - -# define Z8_IRQ2_MIN Z8_TIMER3_IRQ -# define Z8_IRQ2_BIT(irq) (1 << (Z8_C0_IRQ - (irq))) -# define Z8_IRQ2_MAX Z8_C0_IRQ - -#else -# error "Add IRQ support for Z8F family" -#endif - -/* IRQ State Save Format **************************************************** - * - * These indices describe how the ez8 context is save in the state save array - * - * Byte offsets: - */ - -#define XCPT8_R0 (0) /* Offset 0-15: R0-R15 */ -#define XCPT8_R1 (1) -#define XCPT8_R2 (2) -#define XCPT8_R3 (3) -#define XCPT8_R4 (4) -#define XCPT8_R5 (5) -#define XCPT8_R6 (6) -#define XCPT8_R7 (7) -#define XCPT8_R8 (8) -#define XCPT8_R9 (9) -#define XCPT8_R10 (10) -#define XCPT8_R11 (11) -#define XCPT8_R12 (12) -#define XCPT8_R13 (13) -#define XCPT8_R14 (14) -#define XCPT8_R15 (15) -#define XCPT8_SPH (16) /* Offset 16: SP[8:15] */ -#define XCPT8_SPL (17) /* Offset 17: SP[0:7] */ -#define XCPT8_RP (18) /* Offset 18: Register pointer */ -#define XCPT8_FLAGS (19) /* Offset 19: FLAGS */ -#define XCPT8_PCH (20) /* Offset 20: PC[8:15] */ -#define XCPT8_PCL (21) /* Offset 21: PC[0:7] */ - -/* 16-bit "word" offsets */ - -#define XCPT_RR0 (0) /* Indices 0-7: RR0-RR14 */ -#define XCPT_RR2 (1) -#define XCPT_RR4 (2) -#define XCPT_RR6 (3) -#define XCPT_RR8 (4) -#define XCPT_RR10 (5) -#define XCPT_RR12 (6) -#define XCPT_RR14 (7) -#define XCPT_IRQCTL (8) /* Index 8: IRQCTL register */ -#define XCPT_SP (9) /* Index 9: SP[8:15] */ -#define XCPT_RPFLAGS (10) /* Index 10: RP (MS) and FLAGS (LS) */ -#define XCPT_PC (11) /* Index 11: PC[8:15] */ - -#define XCPTCONTEXT_REGS (12) - -/* Byte offsets: */ - -#define XCPT_R0_OFFS (2*XCPT_RR0) /* Offset 0-15: R0-R15 */ -#define XCPT_R1_OFFS (2*XCPT_RR0+1) -#define XCPT_R2_OFFS (2*XCPT_RR2) -#define XCPT_R3_OFFS (2*XCPT_RR2+1) -#define XCPT_R4_OFFS (2*XCPT_RR4) -#define XCPT_R5_OFFS (2*XCPT_RR4+1) -#define XCPT_R6_OFFS (2*XCPT_RR6) -#define XCPT_R7_OFFS (2*XCPT_RR6+1) -#define XCPT_R8_OFFS (2*XCPT_RR8) -#define XCPT_R9_OFFS (2*XCPT_RR8+1) -#define XCPT_R10_OFFS (2*XCPT_RR10) -#define XCPT_R11_OFFS (2*XCPT_RR10+1) -#define XCPT_R12_OFFS (2*XCPT_RR12) -#define XCPT_R13_OFFS (2*XCPT_RR12+1) -#define XCPT_R14_OFFS (2*XCPT_RR14) -#define XCPT_R15_OFFS (2*XCPT_RR14+1) -#define XCPT_UNUSED_OFFS (2*XCPT_IRQCTL) /* Offset 16: Unused (zero) */ -#define XCPT_IRQCTL_OFFS (2*XCPT_IRQCTL+1) /* offset 17: IRQCTL register */ -#define XCPT_SPH_OFFS (2*XCPT_SP) /* Offset 18: SP[8:15] */ -#define XCPT_SPL_OFFS (2*XCPT_SP+1) /* Offset 19: SP[0:7] */ -#define XCPT_RP_OFFS (2*XCPT_RPFLAGS) /* Offset 20: Register pointer */ -#define XCPT_FLAGS_OFFS (2*XCPT_RPFLAGS+1) /* Offset 21: FLAGS */ -#define XCPT_PCH_OFFS (2*XCPT_PC) /* Offset 22: PC[8:15] */ -#define XCPT_PCL_OFFS (2*XCPT_PC+1) /* Offset 23: PC[0:7] */ - -#define XCPTCONTEXT_SIZE (2*XCPTCONTEXT_REGS) - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -#ifndef __ASSEMBLY__ - -/* This is the type of the register save array */ - -typedef uint16_t chipreg_t; - -/* This struct defines the way the registers are stored. */ - -struct xcptcontext -{ - /* Register save area */ - - chipreg_t regs[XCPTCONTEXT_REGS]; - - /* The following retains that state during signal execution - * - * REVISIT: Because there is only one copy of these save areas, - * only a single signal handler can be active. This precludes - * queuing of signal actions. As a result, signals received while - * another signal handler is executing will be ignored! - */ - - uint16_t saved_pc; /* Saved return address */ - uint16_t saved_irqctl; /* Saved interrupt state */ -}; -#endif - -/**************************************************************************** - * Inline functions - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -/* Name: up_irq_save, up_irq_restore, and friends. - * - * NOTE: These functions should never be called from application code and, - * as a general rule unless you really know what you are doing, this - * function should not be called directly from operation system code either: - * Typically, the wrapper functions, enter_critical_section() and - * leave_critical section(), are probably what you really want. - */ - -irqstate_t up_irq_save(void); -void up_irq_restore(irqstate_t flags); -irqstate_t up_irq_enable(void); - -#undef EXTERN -#ifdef __cplusplus -} -#endif -#endif - -#endif /* __ARCH_Z80_INCLUDE_Z8_IRQ_H */ diff --git a/arch/z80/include/z8/limits.h b/arch/z80/include/z8/limits.h deleted file mode 100644 index 1a8b3ffd3c..0000000000 --- a/arch/z80/include/z8/limits.h +++ /dev/null @@ -1,80 +0,0 @@ -/**************************************************************************** - * arch/z80/include/z8/limits.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z80_INCLUDE_Z8_LIMITS_H -#define __ARCH_Z80_INCLUDE_Z8_LIMITS_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#define CHAR_BIT 8 -#define SCHAR_MIN (-SCHAR_MAX - 1) -#define SCHAR_MAX 127 -#define UCHAR_MAX 255 - -/* These could be different on machines where char is unsigned */ - -#ifdef __CHAR_UNSIGNED__ -# define CHAR_MIN 0 -# define CHAR_MAX UCHAR_MAX -#else -# define CHAR_MIN SCHAR_MIN -# define CHAR_MAX SCHAR_MAX -#endif - -#define SHRT_MIN (-SHRT_MAX - 1) -#define SHRT_MAX 32767 -#define USHRT_MAX 65535U - -#define INT_MIN (-INT_MAX - 1) -#define INT_MAX 32767 -#define UINT_MAX 65535U - -/* These change on 32-bit and 64-bit platforms */ - -#define LONG_MIN (-LONG_MAX - 1) -#define LONG_MAX 2147483647L -#define ULONG_MAX 4294967295UL - -/* A pointer is 2 bytes */ - -#define PTR_MIN (-PTR_MAX - 1) -#define PTR_MAX 32767 -#define UPTR_MAX 65535U - -#if !defined(__WCHAR_TYPE__) -# define WCHAR_MIN INT_MIN -# define WCHAR_MAX INT_MAX -#elif defined(__WCHAR_UNSIGNED__) -# define WCHAR_MIN 0 -# define WCHAR_MAX __WCHAR_MAX__ -#else -# define WCHAR_MIN (-__WCHAR_MAX__ - 1) -# define WCHAR_MAX __WCHAR_MAX__ -#endif - -#endif /* __ARCH_Z80_INCLUDE_Z8_LIMITS_H */ diff --git a/arch/z80/include/z8/types.h b/arch/z80/include/z8/types.h deleted file mode 100644 index bc0d667f49..0000000000 --- a/arch/z80/include/z8/types.h +++ /dev/null @@ -1,117 +0,0 @@ -/**************************************************************************** - * arch/z80/include/z8/types.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* This file should never be included directly but, rather, only indirectly - * through sys/types.h - */ - -#ifndef __ARCH_Z80_INCLUDE_Z8_TYPES_H -#define __ARCH_Z80_INCLUDE_Z8_TYPES_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Type Declarations - ****************************************************************************/ - -#ifndef __ASSEMBLY__ - -/* These are the sizes of the standard integer types. NOTE that these type - * names have a leading underscore character. This file will be included - * (indirectly) by include/stdint.h and typedef'ed to the final name without - * the underscore character. This roundabout way of doings things allows - * the stdint.h to be removed from the include/ directory in the event that - * the user prefers to use the definitions provided by their toolchain header - * files - * - * These are the sizes of the types supported by the ZiLOG Z8Encore! - * compiler: - * - * int - 16-bits - * short - 16-bits - * long - 32-bits - * char - 8-bits - * float - 32-bits - * double - 32-bits - * - * Pointers: - * - * near pointer - 8-bits - * far pointer - 16-bits - * rom pointer - 16-bits - */ - -typedef signed char _int8_t; -typedef unsigned char _uint8_t; - -typedef signed int _int16_t; -typedef unsigned int _uint16_t; - -typedef signed long _int32_t; -typedef unsigned long _uint32_t; - -typedef _int32_t _intmax_t; -typedef _uint32_t _uintmax_t; - -#if defined(__WCHAR_TYPE__) -typedef __WCHAR_TYPE__ _wchar_t; -#else -typedef int _wchar_t; -#endif - -typedef int _wint_t; -typedef int _wctype_t; - -/* A size is 2 bytes */ - -#if defined(__SIZE_TYPE__) -/* If __SIZE_TYPE__ is defined we define ssize_t based on size_t. - * We simply change "unsigned" to "signed" for this single definition - * to make sure ssize_t and size_t only differ by their signedness. - */ - -#define unsigned signed -typedef __SIZE_TYPE__ _ssize_t; -#undef unsigned -typedef __SIZE_TYPE__ _size_t; -#else -typedef signed int _ssize_t; -typedef unsigned int _size_t; -#endif - -/* This is the size of the interrupt state save returned by up_irq_save() */ - -typedef _uint8_t irqstate_t; - -#endif /* __ASSEMBLY__ */ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#endif /* __ARCH_Z80_INCLUDE_Z8_TYPES_H */ diff --git a/arch/z80/include/z80/arch.h b/arch/z80/include/z80/arch.h deleted file mode 100644 index 5e60b81299..0000000000 --- a/arch/z80/include/z80/arch.h +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** - * arch/z80/include/z80/arch.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* This file should never be included directly but, rather, - * only indirectly through nuttx/arch.h (via arch/arch.h) - */ - -#ifndef __ARCH_Z80_INCLUDE_Z80_ARCH_H -#define __ARCH_Z80_INCLUDE_Z80_ARCH_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -#undef EXTERN -#ifdef __cplusplus -} -#endif - -#endif /* __ARCH_Z80_INCLUDE_Z80_ARCH_H */ diff --git a/arch/z80/include/z80/chip.h b/arch/z80/include/z80/chip.h deleted file mode 100644 index de52854fb2..0000000000 --- a/arch/z80/include/z80/chip.h +++ /dev/null @@ -1,66 +0,0 @@ -/**************************************************************************** - * arch/z80/include/z80/chip.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z80_INCLUDE_Z80_CHIP_H -#define __ARCH_Z80_INCLUDE_Z80_CHIP_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -# include -#endif - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Bits in the Z80 FLAGS register *******************************************/ - -#define Z80_C_FLAG 0x01 /* Bit 0: Carry flag */ -#define Z80_N_FLAG 0x02 /* Bit 1: Add/Subtract flag */ -#define Z80_PV_FLAG 0x04 /* Bit 2: Parity/Overflow flag */ -#define Z80_H_FLAG 0x10 /* Bit 4: Half carry flag */ -#define Z80_Z_FLAG 0x40 /* Bit 5: Zero flag */ -#define Z80_S_FLAG 0x80 /* Bit 7: Sign flag */ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -#undef EXTERN -#ifdef __cplusplus -} -#endif -#endif - -#endif /* __ARCH_Z80_INCLUDE_Z80_CHIP_H */ diff --git a/arch/z80/include/z80/inttypes.h b/arch/z80/include/z80/inttypes.h deleted file mode 100644 index c5cd59e547..0000000000 --- a/arch/z80/include/z80/inttypes.h +++ /dev/null @@ -1,110 +0,0 @@ -/**************************************************************************** - * arch/z80/include/z80/inttypes.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z80_INCLUDE_Z80_INTTYPES_H -#define __ARCH_Z80_INCLUDE_Z80_INTTYPES_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#define PRId8 "d" -#define PRId16 "d" -#define PRId32 "ld" - -#define PRIdPTR "d" - -#define PRIi8 "i" -#define PRIi16 "i" -#define PRIi32 "li" - -#define PRIiPTR "i" - -#define PRIo8 "o" -#define PRIo16 "o" -#define PRIo32 "lo" - -#define PRIoPTR "o" - -#define PRIu8 "u" -#define PRIu16 "u" -#define PRIu32 "lu" - -#define PRIuPTR "u" - -#define PRIx8 "x" -#define PRIx16 "x" -#define PRIx32 "lx" - -#define PRIxPTR "x" - -#define PRIX8 "X" -#define PRIX16 "X" -#define PRIX32 "lX" - -#define PRIXPTR "X" - -#define SCNd8 "hhd" -#define SCNd16 "d" -#define SCNd32 "ld" - -#define SCNdPTR "d" - -#define SCNi8 "hhi" -#define SCNi16 "i" -#define SCNi32 "li" - -#define SCNiPTR "i" - -#define SCNo8 "hho" -#define SCNo16 "o" -#define SCNo32 "lo" - -#define SCNoPTR "o" - -#define SCNu8 "hhu" -#define SCNu16 "u" -#define SCNu32 "lu" - -#define SCNuPTR "u" - -#define SCNx8 "hhx" -#define SCNx16 "x" -#define SCNx32 "lx" - -#define SCNxPTR "x" - -#define INT8_C(x) x -#define INT16_C(x) x -#define INT24_C(x) x -#define INT32_C(x) x ## l - -#define UINT8_C(x) x -#define UINT16_C(x) x -#define UINT24_C(x) x -#define UINT32_C(x) x ## ul - -#endif /* __ARCH_Z80_INCLUDE_Z80_INTTYPES_H */ diff --git a/arch/z80/include/z80/io.h b/arch/z80/include/z80/io.h deleted file mode 100644 index f3fe4c706a..0000000000 --- a/arch/z80/include/z80/io.h +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************************** - * arch/z80/include/z80/io.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* This file should never be included directly but, rather, only indirectly - * through arch/io.h - */ - -#ifndef __ARCH_Z80_INCLUDE_Z80_IO_H -#define __ARCH_Z80_INCLUDE_Z80_IO_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -/**************************************************************************** - * Inline functions - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -void outp(char p, char c); -char inp(char p); - -#undef EXTERN -#ifdef __cplusplus -} -#endif -#endif - -#endif /* __ARCH_Z80_INCLUDE_Z80_IO_H */ diff --git a/arch/z80/include/z80/irq.h b/arch/z80/include/z80/irq.h deleted file mode 100644 index 956b2d6461..0000000000 --- a/arch/z80/include/z80/irq.h +++ /dev/null @@ -1,146 +0,0 @@ -/**************************************************************************** - * arch/z80/include/z80/irq.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* This file should never be included directly but, rather, - * only indirectly through nuttx/irq.h (via arch/irq.h) - */ - -#ifndef __ARCH_Z80_INCLUDE_Z80_IRQ_H -#define __ARCH_Z80_INCLUDE_Z80_IRQ_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -# include -#endif - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Z80 Interrupts */ - -#define Z80_RST0 (0) -#define Z80_RST1 (1) -#define Z80_RST2 (2) -#define Z80_RST3 (3) -#define Z80_RST4 (4) -#define Z80_RST5 (5) -#define Z80_RST6 (6) -#define Z80_RST7 (7) - -#define Z80_IRQ_SYSTIMER Z80_RST7 -#define NR_IRQS (8) - -/* IRQ Stack Frame Format - * - * This stack frame is created on each interrupt. These registers are stored - * in the TCB to many context switches. - */ - -#define XCPT_I (0) /* Offset 0: Saved I w/interrupt state in carry */ -#define XCPT_BC (1) /* Offset 1: Saved BC register */ -#define XCPT_DE (2) /* Offset 2: Saved DE register */ -#define XCPT_IX (3) /* Offset 3: Saved IX register */ -#define XCPT_IY (4) /* Offset 4: Saved IY register */ -#define XCPT_SP (5) /* Offset 5: Offset to SP at time of interrupt */ -#define XCPT_HL (6) /* Offset 6: Saved HL register */ -#define XCPT_AF (7) /* Offset 7: Saved AF register */ -#define XCPT_PC (8) /* Offset 8: Offset to PC at time of interrupt */ - -#define XCPTCONTEXT_REGS (9) -#define XCPTCONTEXT_SIZE (2 * XCPTCONTEXT_REGS) - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -#ifndef __ASSEMBLY__ - -/* This is the type of the register save array */ - -typedef uint16_t chipreg_t; - -/* This struct defines the way the registers are stored. */ - -struct xcptcontext -{ - /* Register save area */ - - chipreg_t regs[XCPTCONTEXT_REGS]; - - /* The following retains that state during signal execution. - * - * REVISIT: Because there is only one copy of these save areas, - * only a single signal handler can be active. This precludes - * queuing of signal actions. As a result, signals received while - * another signal handler is executing will be ignored! - */ - - uint16_t saved_pc; /* Saved return address */ - uint16_t saved_i; /* Saved interrupt state */ -}; -#endif - -/**************************************************************************** - * Inline functions - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -/* Name: up_irq_save, up_irq_restore, and friends. - * - * NOTE: This function should never be called from application code and, - * as a general rule unless you really know what you are doing, this - * function should not be called directly from operation system code either: - * Typically, the wrapper functions, enter_critical_section() and - * leave_critical section(), are probably what you really want. - */ - -irqstate_t up_irq_save(void) __naked; -void up_irq_restore(irqstate_t flags) __naked; -irqstate_t up_irq_enable(void); - -#undef EXTERN -#ifdef __cplusplus -} -#endif -#endif - -#endif /* __ARCH_Z80_INCLUDE_Z80_IRQ_H */ diff --git a/arch/z80/include/z80/limits.h b/arch/z80/include/z80/limits.h deleted file mode 100644 index e73fa7a865..0000000000 --- a/arch/z80/include/z80/limits.h +++ /dev/null @@ -1,84 +0,0 @@ -/**************************************************************************** - * arch/z80/include/z80/limits.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z80_INCLUDE_Z80_LIMITS_H -#define __ARCH_Z80_INCLUDE_Z80_LIMITS_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#define CHAR_BIT 8 -#define SCHAR_MIN (-SCHAR_MAX - 1) -#define SCHAR_MAX 127 -#define UCHAR_MAX 255 - -/* These could be different on machines where char is unsigned */ - -#ifdef __CHAR_UNSIGNED__ -# define CHAR_MIN 0 -# define CHAR_MAX UCHAR_MAX -#else -# define CHAR_MIN SCHAR_MIN -# define CHAR_MAX SCHAR_MAX -#endif - -#define SHRT_MIN (-SHRT_MAX - 1) -#define SHRT_MAX 32767 -#define USHRT_MAX 65535U - -#define INT_MIN (-INT_MAX - 1) -#define INT_MAX 32767 -#define UINT_MAX 65535U - -/* These change on 32-bit and 64-bit platforms */ - -#define LONG_MIN (-LONG_MAX - 1) -#define LONG_MAX 2147483647L -#define ULONG_MAX 4294967295UL - -#define LLONG_MIN (-LLONG_MAX - 1) -#define LLONG_MAX 9223372036854775807LL -#define ULLONG_MAX 18446744073709551615ULL - -/* A pointer is 2 bytes */ - -#define PTR_MIN (-PTR_MAX - 1) -#define PTR_MAX 32767 -#define UPTR_MAX 65535U - -#if !defined(__WCHAR_TYPE__) -# define WCHAR_MIN INT_MIN -# define WCHAR_MAX INT_MAX -#elif defined(__WCHAR_UNSIGNED__) -# define WCHAR_MIN 0 -# define WCHAR_MAX __WCHAR_MAX__ -#else -# define WCHAR_MIN (-__WCHAR_MAX__ - 1) -# define WCHAR_MAX __WCHAR_MAX__ -#endif - -#endif /* __ARCH_Z80_INCLUDE_Z80_LIMITS_H */ diff --git a/arch/z80/include/z80/types.h b/arch/z80/include/z80/types.h deleted file mode 100644 index 0d6ddae35a..0000000000 --- a/arch/z80/include/z80/types.h +++ /dev/null @@ -1,113 +0,0 @@ -/**************************************************************************** - * arch/z80/include/z80/types.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* This file should never be included directly but, rather, only indirectly - * through sys/types.h - */ - -#ifndef __ARCH_Z80_INCLUDE_Z80_TYPES_H -#define __ARCH_Z80_INCLUDE_Z80_TYPES_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Type Declarations - ****************************************************************************/ - -#ifndef __ASSEMBLY__ - -/* These are the sizes of the standard integer types. NOTE that these type - * names have a leading underscore character. This file will be included - * (indirectly) by include/stdint.h and typedef'ed to the final name without - * the underscore character. This roundabout way of doings things allows - * the stdint.h to be removed from the include/ directory in the event that - * the user prefers to use the definitions provided by their toolchain header - * files - * - * These are the sizes of the standard SDCC types - * - * For SDCC, sizeof(int) is 16 and sizeof(long) is 32. long long and double - * are not supported. - * - * Generic pointers are 3 bytes in length with the first byte holding data - * space information. - */ - -typedef signed char _int8_t; -typedef unsigned char _uint8_t; - -typedef signed int _int16_t; -typedef unsigned int _uint16_t; - -typedef signed long _int32_t; -typedef unsigned long _uint32_t; - -typedef signed long long _int64_t; -typedef unsigned long long _uint64_t; -#define __INT64_DEFINED - -typedef _int64_t _intmax_t; -typedef _uint64_t _uintmax_t; - -#if defined(__WCHAR_TYPE__) -typedef __WCHAR_TYPE__ _wchar_t; -#else -typedef int _wchar_t; -#endif - -typedef int _wint_t; -typedef int _wctype_t; - -/* A size is 2 bytes */ - -#if defined(__SIZE_TYPE__) -/* If __SIZE_TYPE__ is defined we define ssize_t based on size_t. - * We simply change "unsigned" to "signed" for this single definition - * to make sure ssize_t and size_t only differ by their signedness. - */ - -#define unsigned signed -typedef __SIZE_TYPE__ _ssize_t; -#undef unsigned -typedef __SIZE_TYPE__ _size_t; -#else -typedef signed int _ssize_t; -typedef unsigned int _size_t; -#endif - -/* This is the size of the interrupt state save returned by up_irq_save() */ - -typedef _uint16_t irqstate_t; - -#endif /* __ASSEMBLY__ */ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#endif /* __ARCH_Z80_INCLUDE_Z80_TYPES_H */ diff --git a/arch/z80/src/.gitignore b/arch/z80/src/.gitignore deleted file mode 100644 index b9a85219a9..0000000000 --- a/arch/z80/src/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -/z80_mem.h -/asm_mem.h -/board -/chip -/*.rst -/*.lnk -/*.mem -/*.linkcmd -/*.noi diff --git a/arch/z80/src/Makefile b/arch/z80/src/Makefile deleted file mode 100644 index 09fee43216..0000000000 --- a/arch/z80/src/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -############################################################################ -# arch/z80/src/Makefile -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -# Makefile fragments - -include $(TOPDIR)/tools/Make.defs -include chip/Make.defs - -# Compiler-Dependent Make: SDCC, Clang, or ZiLOG ZDS-II - -COMPILER = ${shell basename "$(CC)"} -ifeq ($(patsubst %-clang,clang,$(COMPILER)),clang) - - include Makefile.clang - -else ifeq ($(COMPILER),sdcc) - - # Check for SDCC native windows build - - ifeq ($(CONFIG_WINDOWS_NATIVE),y) - - # SDCC Windows native build - - include Makefile.sdccw - else - - # SDCC in a POSIX environment (Linux, macOS, or Cygwin/MSYS) - - include Makefile.sdccl - endif -else - - # Check for ZDSII native windows build - - ifeq ($(CONFIG_WINDOWS_NATIVE),y) - - # ZDSII Windows native build - - include Makefile.zdsiiw - else - - # ZDSII in a POSIX environment (Cygwin/MSYS) - - include Makefile.zdsiil - endif -endif diff --git a/arch/z80/src/Makefile.clang b/arch/z80/src/Makefile.clang deleted file mode 100644 index ac4f581687..0000000000 --- a/arch/z80/src/Makefile.clang +++ /dev/null @@ -1,135 +0,0 @@ -############################################################################ -# arch/z80/src/Makefile.clang -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -# Directories - -ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src -BOARDDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src/board - -# Tools - -CFLAGS += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)chip -CFLAGS += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)common -CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)sched -CFLAGS += -I. - -CPPFLAGS += -D__ASSEMBLY__ - -############################################################################ -# Files and directories - -# There should be one head source (.asm file) -# -HEAD_OBJ = $(HEAD_ASRC:$(ASMEXT)=$(OBJEXT)) -STARTUP_OBJS ?= $(HEAD_OBJ) - -# Assembly sources and objects - -ASRCS = $(CHIP_ASRCS) $(CMN_ASRCS) -AOBJS = $(ASRCS:$(ASMEXT)=$(OBJEXT)) - -CSRCS = $(CHIP_CSRCS) $(CMN_CSRCS) -COBJS = $(CSRCS:.c=$(OBJEXT)) - -# All sources and objects - -SRCS = $(ASRCS) $(CSRCS) -OBJS = $(AOBJS) $(COBJS) - -# Sources that can have dependencies (no .asm files) - -DEPSRCS = $(CSRCS) - -VPATH = chip:common:board - -############################################################################ -# Targets - -all: $(HEAD_OBJ) libarch$(LIBEXT) - -.PHONY: board$(DELIM)libboard$(LIBEXT) - -$(AOBJS) $(HEAD_OBJ): %$(OBJEXT): %$(ASMEXT) - $(call ASSEMBLE, $<, $@) - -$(COBJS): %$(OBJEXT): %.c - $(call COMPILE, $<, $@) - -# TODO will I need the asm_mem.h hack of SDCC? - -libarch$(LIBEXT): $(OBJS) - $(call ARCHIVE, $@, $(OBJS)) - -board$(DELIM)libboard$(LIBEXT): - $(Q) $(MAKE) -C board libboard$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)" - -LIBPATHS += -L"$(TOPDIR)$(DELIM)staging" -LIBPATHS += -L"$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board" - -LDLIBS += $(patsubst %.a,%,$(patsubst lib%,-l%,$(LINKLIBS))) -lboard - -NUTTX = "$(TOPDIR)$(DELIM)nuttx$(EXEEXT)" - -nuttx$(EXEEXT): $(HEAD_OBJ) board$(DELIM)libboard$(LIBEXT) $(LINKCMD) - $(Q) echo "LD: nuttx into $(NUTTX)" - $(Q) "$(LD)" -o $(NUTTX) $(HEAD_OBJ) -T $(LINKCMD) --orphan-handling=error --print-memory-usage \ - $(LIBPATHS) "-(" $(LDLIBS) "-)" $(LDFLAGS) - -.depend: Makefile chip$(DELIM)Make.defs $(DEPSRCS) $(TOPDIR)$(DELIM).config - $(Q) if [ -e board$(DELIM)Makefile ]; then \ - $(MAKE) -C board depend ; \ - fi - $(Q) $(MKDEP) --dep-path chip --dep-path common "$(CC)" -- $(CFLAGS) -- $(DEPSRCS) >Make.dep - $(Q) touch $@ - -# This is part of the top-level export target - -export_startup: $(STARTUP_OBJS) - $(Q) if [ -d "$(EXPORT_DIR)$(DELIM)startup" ]; then \ - cp -f $(STARTUP_OBJS) "$(EXPORT_DIR)$(DELIM)startup"; \ - else \ - echo "$(EXPORT_DIR)$(DELIM)startup does not exist"; \ - exit 1; \ - fi - -# Dependencies - -depend: .depend - -context:: - -clean: - $(Q) if [ -e board$(DELIM)Makefile ]; then \ - $(MAKE) -C board clean ; \ - fi - $(call DELFILE, *.map) - $(call DELFILE, libarch$(LIBEXT)) - $(call CLEAN) - -distclean:: clean - $(Q) if [ -e board$(DELIM)Makefile ]; then \ - $(MAKE) -C board distclean ; \ - fi - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - --include Make.dep diff --git a/arch/z80/src/Makefile.sdccl b/arch/z80/src/Makefile.sdccl deleted file mode 100644 index db8de5a267..0000000000 --- a/arch/z80/src/Makefile.sdccl +++ /dev/null @@ -1,227 +0,0 @@ -############################################################################ -# arch/z80/src/Makefile.sdccl -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -# Tools -# CFLAGS, CPPFLAGS, ASFLAGS, LDFLAGS are set in $(TOPDIR)/Make.defs - -ARCH_SRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src - -CFLAGS += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM) -CFLAGS += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)chip -CFLAGS += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)common -CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)sched - -CPPFLAGS += -D__ASSEMBLY__ - -# Files and directories -# There should be one head source (.asm file) - -HEAD_OBJ = $(HEAD_ASRC:$(ASMEXT)=$(OBJEXT)) -STARTUP_OBJS ?= $(HEAD_OBJ) - -# Assembly sources and objects - -ASRCS = $(CHIP_ASRCS) $(CMN_ASRCS) -AOBJS = $(ASRCS:$(ASMEXT)=$(OBJEXT)) - -# C sources and objects - -CSRCS = $(CHIP_CSRCS) $(CMN_CSRCS) -COBJS = $(CSRCS:.c=$(OBJEXT)) - -# All sources and objects - -SRCS = $(ASRCS) $(CSRCS) -OBJS = $(AOBJS) $(COBJS) - -# Sources that can have dependencies (no .asm files) - -DEPSRCS = $(CSRCS) - -# Directories - -ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src -BOARDDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src/board - -VPATH = chip:common:board - -# Targets - -all: $(HEAD_OBJ) libarch$(LIBEXT) - -.PHONY: board/libboard$(LIBEXT) nuttx.lnk - -$(AOBJS) $(HEAD_OBJ): %$(OBJEXT): %$(ASMEXT) - $(call ASSEMBLE, $<, $@) - -$(COBJS): %$(OBJEXT): %.c - $(call COMPILE, $<, $@) - -# This is a kludge to work around some conflicting symbols in the SDCC libraries - -$(TOPDIR)/staging/$(SDCCLIB): $(SDCC_LIBDIR)/$(SDCCLIB) - $(Q) cp $(SDCC_LIBDIR)/$(SDCCLIB) $(TOPDIR)/staging/$(SDCCLIB) - $(Q) sdar d $(TOPDIR)/staging/$(SDCCLIB) calloc.rel - $(Q) sdar d $(TOPDIR)/staging/$(SDCCLIB) malloc.rel - $(Q) sdar d $(TOPDIR)/staging/$(SDCCLIB) realloc.rel - $(Q) sdar d $(TOPDIR)/staging/$(SDCCLIB) free.rel - $(Q) sdar d $(TOPDIR)/staging/$(SDCCLIB) printf_large.rel - $(Q) sdar d $(TOPDIR)/staging/$(SDCCLIB) sprintf.rel - $(Q) sdar d $(TOPDIR)/staging/$(SDCCLIB) vprintf.rel -ifneq ($(CONFIG_LIBC_ARCH_STRCPY),y) - $(Q) sdar d $(TOPDIR)/staging/$(SDCCLIB) strcpy.rel -endif -ifneq ($(CONFIG_LIBC_ARCH_STRLEN),y) - $(Q) sdar d $(TOPDIR)/staging/$(SDCCLIB) strlen.rel -endif - $(Q) sdar d $(TOPDIR)/staging/$(SDCCLIB) _strcat.rel -ifneq ($(CONFIG_LIBC_ARCH_STRCHR),y) - $(Q) sdar d $(TOPDIR)/staging/$(SDCCLIB) _strchr.rel -endif -ifneq ($(CONFIG_LIBC_ARCH_STRCMP),y) - $(Q) sdar d $(TOPDIR)/staging/$(SDCCLIB) _strcmp.rel -endif - $(Q) sdar d $(TOPDIR)/staging/$(SDCCLIB) _strcspn.rel - $(Q) sdar d $(TOPDIR)/staging/$(SDCCLIB) _strncat.rel - $(Q) sdar d $(TOPDIR)/staging/$(SDCCLIB) _strncmp.rel -ifneq ($(CONFIG_LIBC_ARCH_STRNCPY),y) - $(Q) sdar d $(TOPDIR)/staging/$(SDCCLIB) _strncpy.rel -endif - $(Q) sdar d $(TOPDIR)/staging/$(SDCCLIB) _strpbrk.rel - $(Q) sdar d $(TOPDIR)/staging/$(SDCCLIB) _strrchr.rel - $(Q) sdar d $(TOPDIR)/staging/$(SDCCLIB) _strspn.rel - $(Q) sdar d $(TOPDIR)/staging/$(SDCCLIB) _strstr.rel - $(Q) sdar d $(TOPDIR)/staging/$(SDCCLIB) _strtok.rel - $(Q) sdar d $(TOPDIR)/staging/$(SDCCLIB) _memchr.rel -ifneq ($(CONFIG_LIBC_ARCH_MEMCMP),y) - $(Q) sdar d $(TOPDIR)/staging/$(SDCCLIB) _memcmp.rel -endif -ifneq ($(CONFIG_LIBC_ARCH_MEMCPY),y) - $(Q) sdar d $(TOPDIR)/staging/$(SDCCLIB) _memcpy.rel -endif -ifneq ($(CONFIG_LIBC_ARCH_MEMSET),y) - $(Q) sdar d $(TOPDIR)/staging/$(SDCCLIB) _memset.rel -endif - -# Create a header file that contains addressing information needed by the -# assemlby language start-up code. Locate the IDLE thread stack at the -# end of RAM. The heap then extends from s__HEAP to the bottom of the -# IDLE thread stack - -asm_mem.h: - @echo " CONFIG_STACK_END == ($(CONFIG_RAM_SIZE) - 1)" >> asm_mem.h - @echo " CONFIG_STACK_BASE == (CONFIG_STACK_END - $(CONFIG_IDLETHREAD_STACKSIZE))" >> asm_mem.h - -# Combine all objects in this directory into a library - -libarch$(LIBEXT): asm_mem.h $(OBJS) - $(call ARCHIVE, $@, $(OBJS)) - -# This builds the libboard library in the board/ subdirectory - -board/libboard$(LIBEXT): - $(Q) $(MAKE) -C board libboard$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)" - -# This target builds the final executable - -nuttx.lnk: - @echo "LD: nuttx.lnk" - @echo "--" >nuttx.lnk # Non-interactive - @echo "-k $(BOARDDIR)" >>nuttx.lnk # Path to board library - @echo "-k $(TOPDIR)/staging" >>nuttx.lnk # Path to top-level staging directory - @echo "-l libboard$(LIBEXT)" >>nuttx.lnk # Name of board library - $(Q) for LIB in $(LINKLIBS); do \ - echo "-l $(TOPDIR)/staging/$$LIB" >> nuttx.lnk ;\ - done - @echo "-l $(SDCCLIB)" >>nuttx.lnk # Name of SDCC z80 library -ifneq ($(CONFIG_LINKER_HOME_AREA),) - @echo "-b _HOME=$(CONFIG_LINKER_HOME_AREA)" >>nuttx.lnk # Start of _HOME area -endif -ifneq ($(CONFIG_LINKER_CODE_AREA),) - @echo "-b _CODE=$(CONFIG_LINKER_CODE_AREA)" >>nuttx.lnk # Start of _CODE area -else - @echo "-b _CODE=0x0200" >>nuttx.lnk # Start of _CODE area -endif -ifneq ($(CONFIG_LINKER_DATA_AREA),) - @echo "-b _DATA=$(CONFIG_LINKER_DATA_AREA)" >>nuttx.lnk -else - @echo "-b _DATA=0x8000" >>nuttx.lnk # Start of _DATA area -endif - @echo "-i" >>nuttx.lnk # Intel hex format - @echo "-x" >>nuttx.lnk # Hexadecimal - @echo "-m" >>nuttx.lnk # Generate a map file - @echo "-j" >>nuttx.lnk # Generate a symbol file - @echo "nuttx.ihx" >>nuttx.lnk # Path to head object - @echo "$(HEAD_OBJ)" >>nuttx.lnk # Path to head object - @echo "-e" >>nuttx.lnk # End of script - -nuttx$(EXEEXT): asm_mem.h $(TOPDIR)/staging/$(SDCCLIB) $(HEAD_OBJ) board/libboard$(LIBEXT) nuttx.lnk - @echo "LD: nuttx.ihx" - $(Q) $(LD) -f nuttx.lnk - $(Q) cp -f nuttx.map $(TOPDIR)/. -ifeq ($(EXEEXT),.cmd) - sed s/:00000001FF/:00520001AD/ nuttx.ihx | \ - hex2cmd > $(TOPDIR)/nuttx.cmd -else - $(Q) packihx nuttx.ihx > $(TOPDIR)/nuttx$(EXEEXT) -endif - -# This is part of the top-level export target - -export_startup: $(STARTUP_OBJS) - $(Q) if [ -d "$(EXPORT_DIR)/startup" ]; then \ - cp -f $(STARTUP_OBJS) "$(EXPORT_DIR)/startup"; \ - else \ - echo "$(EXPORT_DIR)/startup does not exist"; \ - exit 1; \ - fi - -# Build dependencies - -.depend: Makefile asm_mem.h chip/Make.defs $(DEPSRCS) $(TOPDIR)$(DELIM).config - $(Q) if [ -e board/Makefile ]; then \ - $(MAKE) -C board depend ; \ - fi - $(Q) $(MKDEP) --dep-path chip --dep-path common "$(CC)" -- $(CFLAGS) -- $(DEPSRCS) >Make.dep - $(Q) touch $@ - -depend: .depend - -context:: - -clean: - $(Q) if [ -e board/Makefile ]; then \ - $(MAKE) -C board clean ; \ - fi - $(call DELFILE, asm_mem.h) - $(call DELFILE, nuttx.*) - $(call DELFILE, libarch$(LIBEXT)) - $(call CLEAN) - -distclean:: clean - $(Q) if [ -e board/Makefile ]; then \ - $(MAKE) -C board distclean ; \ - fi - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - --include Make.dep diff --git a/arch/z80/src/Makefile.sdccw b/arch/z80/src/Makefile.sdccw deleted file mode 100644 index 9f76c32479..0000000000 --- a/arch/z80/src/Makefile.sdccw +++ /dev/null @@ -1,212 +0,0 @@ -############################################################################ -# arch/z80/src/Makefile.sdccw -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -# Tools -# CFLAGS, CPPFLAGS, ASFLAGS, LDFLAGS are set in $(TOPDIR)\Make.defs - -CFLAGS += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)chip -CFLAGS += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)common -CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)sched - -CPPFLAGS += -D__ASSEMBLY__ - -# Files and directories -# There should be one head source (.asm file) - -HEAD_OBJ = $(HEAD_ASRC:$(ASMEXT)=$(OBJEXT)) -STARTUP_OBJS ?= $(HEAD_OBJ) - -# Assembly sources and objects - -ASRCS = $(CHIP_ASRCS) $(CMN_ASRCS) -AOBJS = $(ASRCS:$(ASMEXT)=$(OBJEXT)) - -# C sources and objects - -CSRCS = $(CHIP_CSRCS) $(CMN_CSRCS) -COBJS = $(CSRCS:.c=$(OBJEXT)) - -# All sources and objects - -SRCS = $(ASRCS) $(CSRCS) -OBJS = $(AOBJS) $(COBJS) - -# Sources that can have dependencies (no .asm files) - -DEPSRCS = $(CSRCS) - -# Directories - -ARCH_SRCDIR = $(TOPDIR)\arch\$(CONFIG_ARCH)\src -BOARDDIR = $(TOPDIR)\arch\$(CONFIG_ARCH)\src\board - -VPATH = chip:common:board - -# Targets - -all: $(HEAD_OBJ) libarch$(LIBEXT) - -.PHONY: board\libboard$(LIBEXT) nuttx.lnk - -$(AOBJS) $(HEAD_OBJ): %$(OBJEXT): %$(ASMEXT) - $(call ASSEMBLE, $<, $@) - -$(COBJS): %$(OBJEXT): %.c - $(call COMPILE, $<, $@) - -# This is a kludge to work around some conflicting symbols in the SDCC libraries - -$(TOPDIR)\staging\$(SDCCLIB): $(SDCC_LIBDIR)\$(SDCCLIB) - $(Q) cp $(SDCC_LIBDIR)\$(SDCCLIB) $(TOPDIR)\staging\$(SDCCLIB) - $(Q) sdar d $(TOPDIR)\staging\$(SDCCLIB) calloc.rel - $(Q) sdar d $(TOPDIR)\staging\$(SDCCLIB) malloc.rel - $(Q) sdar d $(TOPDIR)\staging\$(SDCCLIB) realloc.rel - $(Q) sdar d $(TOPDIR)\staging\$(SDCCLIB) free.rel - $(Q) sdar d $(TOPDIR)\staging\$(SDCCLIB) printf_large.rel - $(Q) sdar d $(TOPDIR)\staging\$(SDCCLIB) sprintf.rel - $(Q) sdar d $(TOPDIR)\staging\$(SDCCLIB) vprintf.rel -ifneq ($(CONFIG_LIBC_ARCH_STRCPY),y) - $(Q) sdar d $(TOPDIR)\staging\$(SDCCLIB) strcpy.rel -endif -ifneq ($(CONFIG_LIBC_ARCH_STRLEN),y) - $(Q) sdar d $(TOPDIR)\staging\$(SDCCLIB) strlen.rel -endif - $(Q) sdar d $(TOPDIR)\staging\$(SDCCLIB) _strcat.rel -ifneq ($(CONFIG_LIBC_ARCH_STRCHR),y) - $(Q) sdar d $(TOPDIR)\staging\$(SDCCLIB) _strchr.rel -endif -ifneq ($(CONFIG_LIBC_ARCH_STRCMP),y) - $(Q) sdar d $(TOPDIR)\staging\$(SDCCLIB) _strcmp.rel -endif - $(Q) sdar d $(TOPDIR)\staging\$(SDCCLIB) _strcspn.rel - $(Q) sdar d $(TOPDIR)\staging\$(SDCCLIB) _strncat.rel - $(Q) sdar d $(TOPDIR)\staging\$(SDCCLIB) _strncmp.rel -ifneq ($(CONFIG_LIBC_ARCH_STRNCPY),y) - $(Q) sdar d $(TOPDIR)\staging\$(SDCCLIB) _strncpy.rel -endif - $(Q) sdar d $(TOPDIR)\staging\$(SDCCLIB) _strpbrk.rel - $(Q) sdar d $(TOPDIR)\staging\$(SDCCLIB) _strrchr.rel - $(Q) sdar d $(TOPDIR)\staging\$(SDCCLIB) _strspn.rel - $(Q) sdar d $(TOPDIR)\staging\$(SDCCLIB) _strstr.rel - $(Q) sdar d $(TOPDIR)\staging\$(SDCCLIB) _strtok.rel - $(Q) sdar d $(TOPDIR)\staging\$(SDCCLIB) _memchr.rel -ifneq ($(CONFIG_LIBC_ARCH_MEMCMP),y) - $(Q) sdar d $(TOPDIR)\staging\$(SDCCLIB) _memcmp.rel -endif -ifneq ($(CONFIG_LIBC_ARCH_MEMCPY),y) - $(Q) sdar d $(TOPDIR)\staging\$(SDCCLIB) _memcpy.rel -endif -ifneq ($(CONFIG_LIBC_ARCH_MEMSET),y) - $(Q) sdar d $(TOPDIR)\staging\$(SDCCLIB) _memset.rel -endif - -# Create a header file that contains addressing information needed by the -# assemlby language start-up code. Locate the IDLE thread stack at the -# end of RAM. The heap then extends from s__HEAP to the bottom of the -# IDLE thread stack - -asm_mem.h: - @echo CONFIG_STACK_END == ($(CONFIG_RAM_SIZE) - 1)>>asm_mem.h - @echo CONFIG_STACK_BASE == (CONFIG_STACK_END - $(CONFIG_IDLETHREAD_STACKSIZE))>>asm_mem.h - -# Combine all objects in this directory into a library - -libarch$(LIBEXT): asm_mem.h $(OBJS) - $(call ARCHIVE, $@, $(OBJS)) - -# This builds the libboard library in the board\ subdirectory - -board\libboard$(LIBEXT): - $(Q) $(MAKE) -C board libboard$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)" - -# This target builds the final executable - -nuttx.lnk: - @echo LD: nuttx.lnk - @echo -->nuttx.lnk - @echo -k $(BOARDDIR)>>nuttx.lnk - @echo -k $(TOPDIR)\staging>>nuttx.lnk - @echo -l libboard$(LIBEXT)>>nuttx.lnk - $(Q) for %%G in ($(LINKLIBS)) do ( echo -l $(TOPDIR)\staging\%%G>> nuttx.lnk ) - @echo -l $(SDCCLIB)>>nuttx.lnk -ifneq ($(CONFIG_LINKER_HOME_AREA),) - @echo -b _HOME=$(CONFIG_LINKER_HOME_AREA)>>nuttx.lnk -endif -ifneq ($(CONFIG_LINKER_CODE_AREA),) - @echo -b _CODE=$(CONFIG_LINKER_CODE_AREA)>>nuttx.lnk -else - @echo -b _CODE=0x0200>>nuttx.lnk -endif -ifneq ($(CONFIG_LINKER_DATA_AREA),) - @echo -b _DATA=$(CONFIG_LINKER_DATA_AREA)>>nuttx.lnk -else - @echo -b _DATA=0x8000>>nuttx.lnk -endif - @echo -i>>nuttx.lnk - @echo -x>>nuttx.lnk - @echo -m>>nuttx.lnk - @echo -j>>nuttx.lnk - @echo nuttx.ihx>>nuttx.lnk - @echo $(HEAD_OBJ)>>nuttx.lnk - @echo -e>>nuttx.lnk - -nuttx$(EXEEXT): asm_mem.h $(TOPDIR)\staging\$(SDCCLIB) $(HEAD_OBJ) board\libboard$(LIBEXT) nuttx.lnk - @echo LD: nuttx.ihx - $(Q) $(LD) -f nuttx.lnk - $(Q) cp -f nuttx.map $(TOPDIR)\. -ifeq ($(EXEEXT),.cmd) - sed s/:00000001FF/:00520001AD/ nuttx.ihx | \ - hex2cmd > $(TOPDIR)\nuttx.cmd -else - $(Q) packihx nuttx.ihx > $(TOPDIR)\nuttx$(EXEEXT) -endif - -# This is part of the top-level export target - -export_startup: $(STARTUP_OBJS) - $(Q) if not exist board\Makefile ( echo $(EXPORT_DIR)\startup does not exist ) - $(Q) if exist board\Makefile ( cp -f $(STARTUP_OBJS) "$(EXPORT_DIR)\startup" ) - -# Build dependencies - -.depend: Makefile asm_mem.h chip\Make.defs $(DEPSRCS) $(TOPDIR)$(DELIM).config - $(Q) if exist board\Makefile ( $(MAKE) -C board depend ) - $(Q) $(MKDEP) --dep-path chip --dep-path common "$(CC)" -- $(CFLAGS) -- $(DEPSRCS) >Make.dep - $(Q) touch $@ - -depend: .depend - -context:: - -clean: - $(Q) if exist board\Makefile ( $(MAKE) -C board clean ) - $(call DELFILE, asm_mem.h) - $(call DELFILE, nuttx.*) - $(call DELFILE, libarch$(LIBEXT)) - $(call CLEAN) - -distclean:: clean - $(Q) if exist board\Makefile ( $(MAKE) -C board distclean ) - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - --include Make.dep diff --git a/arch/z80/src/Makefile.zdsiil b/arch/z80/src/Makefile.zdsiil deleted file mode 100644 index 7374a3cde6..0000000000 --- a/arch/z80/src/Makefile.zdsiil +++ /dev/null @@ -1,167 +0,0 @@ -############################################################################ -# arch/z80/src/Makefile.zdsiil -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -include $(TOPDIR)\Make.defs - -############################################################################ -# Tools - -SCHEDSRCDIR = $(TOPDIR)$(DELIM)sched -ARCHSRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src -ARCHCHIPDIR = $(ARCHSRCDIR)$(DELIM)chip -ARCHCMDDIR = $(ARCHSRCDIR)$(DELIM)common - -WSCHEDSRCDIR = ${shell cygpath -w $(SCHEDSRCDIR)} -WARCHCHIPDIR = ${shell cygpath -w $(ARCHCHIPDIR)} -WARCHCMNDIR = ${shell cygpath -w $(ARCHCMDDIR)} -USRINCLUDES = -usrinc:'$(WSCHEDSRCDIR);$(WARCHCHIPDIR);$(WARCHCMNDIR)' - -INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES) -CFLAGS := $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(INCLUDES) $(ARCHDEFINES) -CPPFLAGS += -I$(ARCHSRCDIR) -I$(ZDSSTDINCDIR) -I$(ZDSZILOGINCDIR) -LDFLAGS += @nuttx.linkcmd - -############################################################################ -# Files and directories - -ifneq ($(HEAD_SSRC),) -HEAD_GENSRC = $(HEAD_SSRC:.S=$(ASMEXT)) -HEAD_OBJ = $(HEAD_SSRC:.S=$(OBJEXT)) -else -HEAD_OBJ = $(HEAD_ASRC:$(ASMEXT)=$(OBJEXT)) -endif - -STARTUP_OBJS ?= $(HEAD_OBJ) - -SSRCS = $(CHIP_SSRCS) $(CMN_SSRCS) -ASRCS = $(CHIP_ASRCS) $(CMN_ASRCS) -GENSRCS = $(SSRCS:.S=$(ASMEXT)) -AOBJS = $(SSRCS:.S=$(OBJEXT)) $(ASRCS:$(ASMEXT)=$(OBJEXT)) - -CSRCS = $(CHIP_CSRCS) $(CMN_CSRCS) -COBJS = $(CSRCS:.c=$(OBJEXT)) - -DEPSRCS = $(SSRCS) $(CSRCS) -OBJS = $(AOBJS) $(COBJS) - -VPATH = chip:common - -############################################################################ -# Targets - -all: $(HEAD_OBJ) libarch$(LIBEXT) - -.PHONY: board$(DELIM)libboard$(LIBEXT) - -$(HEAD_GENSRC) $(GENSRCS) : %$(ASMEXT): %.S - $(Q) $(CPP) $(CPPFLAGS) $< -o $@.tmp - $(Q) cat $@.tmp | sed -e "s/^#/;/g" > $@ - $(Q) rm $@.tmp - -$(AOBJS) $(HEAD_OBJ): %$(OBJEXT): %$(ASMEXT) - $(call ASSEMBLE, $<, $@) - -$(COBJS): %$(OBJEXT): %.c - $(call COMPILE, $<, $@) - -libarch$(LIBEXT): $(OBJS) - $(call ARCHIVE, $@, $(OBJS)) - -board$(DELIM)libboard$(LIBEXT): - $(Q) $(MAKE) -C board libboard$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)" - -nuttx.linkcmd: $(LINKCMDTEMPLATE) - $(Q) cp -f $(LINKCMDTEMPLATE) nuttx.linkcmd - @echo "\"${shell cygpath -w "$(TOPDIR)/nuttx"}\"= \\" >>nuttx.linkcmd - @echo " \"${shell cygpath -w "$(ARCHSRCDIR)/$(HEAD_OBJ)"}\", \\" >>nuttx.linkcmd - $(Q) ( for lib in $(LINKLIBS); do \ - echo " \"`cygpath -w "$(TOPDIR)/staging/$${lib}"`\", \\" >>nuttx.linkcmd; \ - done ; ) - @echo " \"${shell cygpath -w "$(ARCHSRCDIR)/board/libboard$(LIBEXT)"}\", \\" >>nuttx.linkcmd -ifeq ($(CONFIG_ARCH_CHIP_Z8F640X),y) - @echo " \"${shell cygpath -w "$(ZDSSTDLIBDIR)/chelprevaaD$(LIBEXT)"}\", \\" >>nuttx.linkcmd - @echo " \"${shell cygpath -w "$(ZDSSTDLIBDIR)/crtrevaaLDD$(LIBEXT)"}\", \\" >>nuttx.linkcmd - @echo " \"${shell cygpath -w "$(ZDSSTDLIBDIR)/fprevaaLDD$(LIBEXT)"}\", \\" >>nuttx.linkcmd - @echo " \"${shell cygpath -w "$(ZDSZILOGLIBDIR)/csiorevaaLDD$(LIBEXT)"}\", \\" >>nuttx.linkcmd - @echo " \"${shell cygpath -w "$(ZDSZILOGLIBDIR)/zsldevinitdummy$(LIBEXT)"}\"" >>nuttx.linkcmd -endif -ifeq ($(CONFIG_ARCH_CHIP_Z8F642X),y) - @echo " \"${shell cygpath -w "$(ZDSSTDLIBDIR)/chelpD$(LIBEXT)"}\", \\" >>nuttx.linkcmd - @echo " \"${shell cygpath -w "$(ZDSSTDLIBDIR)/crtLDD$(LIBEXT)"}\", \\" >>nuttx.linkcmd - @echo " \"${shell cygpath -w "$(ZDSSTDLIBDIR)/fpdumyLD$(LIBEXT)"}\", \\" >>nuttx.linkcmd - @echo " \"${shell cygpath -w "$(ZDSZILOGLIBDIR)/csioLDD$(LIBEXT)"}\", \\" >>nuttx.linkcmd - @echo " \"${shell cygpath -w "$(ZDSZILOGLIBDIR)/zsldevinitdummy$(LIBEXT)"}\"" >>nuttx.linkcmd -endif -ifeq ($(CONFIG_ARCH_CHIP_EZ80),y) # EZ80F91 and EZ80F92 - @echo " \"${shell cygpath -w "$(ZDSSTDLIBDIR)/chelp$(LIBEXT)"}\", \\" >>nuttx.linkcmd - @echo " \"${shell cygpath -w "$(ZDSSTDLIBDIR)/crt$(LIBEXT)"}\", \\" >>nuttx.linkcmd - @echo " \"${shell cygpath -w "$(ZDSSTDLIBDIR)/fplib$(LIBEXT)"}\", \\" >>nuttx.linkcmd - @echo " \"${shell cygpath -w "$(ZDSZILOGLIBDIR)/gpio$(LIBEXT)"}\", \\" >>nuttx.linkcmd - @echo " \"${shell cygpath -w "$(ZDSZILOGLIBDIR)/uartf91$(LIBEXT)"}\"" >>nuttx.linkcmd -endif - -nuttx$(EXEEXT): $(HEAD_OBJ) board$(DELIM)libboard$(LIBEXT) nuttx.linkcmd - @echo "LD: nuttx$(EXEEXT)" - $(Q) "$(LD)" $(LDFLAGS) - -.depend: Makefile chip$(DELIM)Make.defs $(DEPSRCS) $(TOPDIR)$(DELIM).config - $(Q) if [ -e board$(DELIM)Makefile ]; then \ - $(MAKE) -C board depend ; \ - fi - $(Q) $(MKDEP) --dep-path chip --dep-path common "$(CC)" -- $(CFLAGS) -- $(DEPSRCS) >Make.dep - $(Q) touch $@ - -# This is part of the top-level export target - -export_startup: $(STARTUP_OBJS) - $(Q) if [ -d "$(EXPORT_DIR)$(DELIM)startup" ]; then \ - cp -f $(STARTUP_OBJS) "$(EXPORT_DIR)$(DELIM)startup"; \ - else \ - echo "$(EXPORT_DIR)$(DELIM)startup does not exist"; \ - exit 1; \ - fi - -# Dependencies - -depend: .depend - -context:: - -clean: - $(Q) if [ -e board$(DELIM)Makefile ]; then \ - $(MAKE) -C board clean ; \ - fi - $(call DELFILE, nuttx.linkcmd) - $(call DELFILE, *.asm) - $(call DELFILE, *.tmp) - $(call DELFILE, *.map) - $(call DELFILE, libarch$(LIBEXT)) - $(call CLEAN) - -distclean:: clean - $(Q) if [ -e board$(DELIM)Makefile ]; then \ - $(MAKE) -C board distclean ; \ - fi - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - --include Make.dep diff --git a/arch/z80/src/Makefile.zdsiiw b/arch/z80/src/Makefile.zdsiiw deleted file mode 100644 index 6443db9ee5..0000000000 --- a/arch/z80/src/Makefile.zdsiiw +++ /dev/null @@ -1,145 +0,0 @@ -############################################################################ -# arch/z80/src/Makefile.zdsiiw -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -include $(TOPDIR)\Make.defs - -# Tools - -SCHEDSRCDIR = $(TOPDIR)$(DELIM)sched -ARCHSRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src -USRINCLUDES = -usrinc:"$(SCHEDSRCDIR);$(ARCHSRCDIR)$(DELIM)chip;$(ARCHSRCDIR)$(DELIM)common" - -INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES) -CFLAGS := $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(INCLUDES) $(ARCHDEFINES) -CPPFLAGS += -I$(ARCHSRCDIR) -I$(ZDSSTDINCDIR) -I$(ZDSZILOGINCDIR) -LDFLAGS += @nuttx.linkcmd - -# Files and directories - -ifneq ($(HEAD_SSRC),) -HEAD_GENSRC = $(HEAD_SSRC:.S=$(ASMEXT)) -HEAD_OBJ = $(HEAD_SSRC:.S=$(OBJEXT)) -else -HEAD_OBJ = $(HEAD_ASRC:$(ASMEXT)=$(OBJEXT)) -endif - -STARTUP_OBJS ?= $(HEAD_OBJ) - -SSRCS = $(CHIP_SSRCS) $(CMN_SSRCS) -ASRCS = $(CHIP_ASRCS) $(CMN_ASRCS) -GENSRCS = $(SSRCS:.S=$(ASMEXT)) -AOBJS = $(SSRCS:.S=$(OBJEXT)) $(ASRCS:$(ASMEXT)=$(OBJEXT)) - -CSRCS = $(CHIP_CSRCS) $(CMN_CSRCS) -COBJS = $(CSRCS:.c=$(OBJEXT)) - -DEPSRCS = $(SSRCS) $(CSRCS) -OBJS = $(AOBJS) $(COBJS) - -VPATH = chip:common - -# Targets - -all: $(HEAD_OBJ) libarch$(LIBEXT) - -.PHONY: board$(DELIM)libboard$(LIBEXT) - -$(HEAD_GENSRC) $(GENSRCS) : %$(ASMEXT): %.S - $(Q) $(CPP) $(CPPFLAGS) $< -o $@.tmp - $(Q) cat $@.tmp | sed -e "s/^#/;/g" > $@ - $(Q) rm $@.tmp - -$(AOBJS) $(HEAD_OBJ): %$(OBJEXT): %$(ASMEXT) - $(call ASSEMBLE, $<, $@) - -$(COBJS): %$(OBJEXT): %.c - $(call COMPILE, $<, $@) - -libarch$(LIBEXT): $(OBJS) - $(call ARCHIVE, $@, $(OBJS)) - -board$(DELIM)libboard$(LIBEXT): - $(Q) $(MAKE) -C board libboard$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)" - -nuttx.linkcmd: $(LINKCMDTEMPLATE) - $(Q) cp -f $(LINKCMDTEMPLATE) nuttx.linkcmd - @echo "$(TOPDIR)\nuttx"= \>>nuttx.linkcmd - @echo "$(ARCHSRCDIR)\$(HEAD_OBJ)", \>>nuttx.linkcmd - $(Q) for %%G in ($(LINKLIBS)) do ( echo "$(TOPDIR)\staging\%%G", \>>nuttx.linkcmd ) - @echo "$(ARCHSRCDIR)\board\libboard$(LIBEXT)", \>>nuttx.linkcmd -ifeq ($(CONFIG_ARCH_CHIP_Z8F640X),y) - @echo "$(ZDSSTDLIBDIR)\chelprevaaD$(LIBEXT)", \>>nuttx.linkcmd - @echo "$(ZDSSTDLIBDIR)\crtrevaaLDD$(LIBEXT)", \>>nuttx.linkcmd - @echo "$(ZDSSTDLIBDIR)\fprevaaLDD$(LIBEXT)", \>>nuttx.linkcmd - @echo "$(ZDSZILOGLIBDIR)\csiorevaaLDD$(LIBEXT)", \>>nuttx.linkcmd - @echo "$(ZDSZILOGLIBDIR)\zsldevinitdummy$(LIBEXT)">>nuttx.linkcmd -endif -ifeq ($(CONFIG_ARCH_CHIP_Z8F642X),y) - @echo "$(ZDSSTDLIBDIR)\chelpD$(LIBEXT)", \>>nuttx.linkcmd - @echo "$(ZDSSTDLIBDIR)\crtLDD$(LIBEXT)", \>>nuttx.linkcmd - @echo "$(ZDSSTDLIBDIR)\fpdumyLD$(LIBEXT)", \>>nuttx.linkcmd - @echo "$(ZDSZILOGLIBDIR)\csioLDD$(LIBEXT)", \>>nuttx.linkcmd - @echo "$(ZDSZILOGLIBDIR)\zsldevinitdummy$(LIBEXT)">>nuttx.linkcmd -endif -ifeq ($(CONFIG_ARCH_CHIP_EZ80),y) # EZ80F91 and EZ80F92 - @echo "$(ZDSSTDLIBDIR)\chelp$(LIBEXT)", \>>nuttx.linkcmd - @echo "$(ZDSSTDLIBDIR)\crt$(LIBEXT)", \>>nuttx.linkcmd - @echo "$(ZDSSTDLIBDIR)\fplib$(LIBEXT)", \>>nuttx.linkcmd - @echo "$(ZDSZILOGLIBDIR)\gpio$(LIBEXT)", \>>nuttx.linkcmd - @echo "$(ZDSZILOGLIBDIR)\uartf91$(LIBEXT)">>nuttx.linkcmd -endif - -nuttx$(EXEEXT): $(HEAD_OBJ) board$(DELIM)libboard$(LIBEXT) nuttx.linkcmd - @echo "LD: nuttx$(EXEEXT)" - $(Q) "$(LD)" $(LDFLAGS) - -.depend: Makefile chip$(DELIM)Make.defs $(DEPSRCS) $(TOPDIR)$(DELIM).config - $(Q) if exist board$(DELIM)Makefile ( $(MAKE) -C board depend ) - $(Q) $(MKDEP) --dep-path chip --dep-path common "$(CC)" -- $(CFLAGS) -- $(DEPSRCS) >Make.dep - $(Q) touch $@ - -# This is part of the top-level export target - -export_startup: $(STARTUP_OBJS) - $(Q) if exist "$(EXPORT_DIR)$(DELIM)startup" ( copy $(STARTUP_OBJS) "$(EXPORT_DIR)$(DELIM)startup$(DELIM)." /b /y) - -# Dependencies - -depend: .depend - -context:: - -clean: - $(Q) if exist board$(DELIM)Makefile ( $(MAKE) -C board clean ) - $(call DELFILE, nuttx.linkcmd) - $(call DELFILE, *.asm) - $(call DELFILE, *.tmp) - $(call DELFILE, *.map) - $(call DELFILE, libarch$(LIBEXT)) - $(call CLEAN) - -distclean:: clean - $(Q) if exist board$(DELIM)Makefile ( $(MAKE) -C board distclean ) - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - --include Make.dep diff --git a/arch/z80/src/common/Kconfig b/arch/z80/src/common/Kconfig deleted file mode 100644 index a31d4502c4..0000000000 --- a/arch/z80/src/common/Kconfig +++ /dev/null @@ -1,7 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_Z80 -endif diff --git a/arch/z80/src/common/z80_allocateheap.c b/arch/z80/src/common/z80_allocateheap.c deleted file mode 100644 index ad25d1b55b..0000000000 --- a/arch/z80/src/common/z80_allocateheap.c +++ /dev/null @@ -1,96 +0,0 @@ -/**************************************************************************** - * arch/z80/src/common/z80_allocateheap.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include - -#include -#include -#include -#include - -#include "z80_internal.h" - -#ifdef SDCC -/* For the SDCC toolchain, the arch/z80/src/Makefile will parse the map file - * to determine how much memory is available for the heap. This parsed data - * is provided via the auto-generated file z80_mem.h - */ - -# include "z80_mem.h" - -#else -/* For other toolchains, the architecture must provide a header file in the - * chip subdirectory to provide the heap parameters (if they are not defined - * in the configuration file ) - */ - -# include "chip/z80_mem.h" -#endif - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_allocate_heap - * - * Description: - * This function will be called to dynamically set aside the heap region. - * - * For the kernel build (CONFIG_BUILD_KERNEL=y) with both kernel- and - * user-space heaps (CONFIG_MM_KERNEL_HEAP=y), this function provides the - * size of the unprotected, user-space heap. - * - * If a protected kernel-space heap is provided, the kernel heap must be - * allocated (and protected) by an analogous up_allocate_kheap(). - * - ****************************************************************************/ - -void up_allocate_heap(FAR void **heap_start, size_t *heap_size) -{ - *heap_start = (FAR void *)CONFIG_HEAP1_BASE; - *heap_size = CONFIG_HEAP1_END - CONFIG_HEAP1_BASE; - board_autoled_on(LED_HEAPALLOCATE); -} - -/**************************************************************************** - * Name: z80_addregions - * - * Description: - * Memory may be added in non-contiguous chunks. Additional chunks are - * added by calling this function. - * - ****************************************************************************/ - -#if CONFIG_MM_REGIONS > 1 -void z80_addregion(void) -{ - kmm_addregion((FAR void *)CONFIG_HEAP2_BASE, CONFIG_HEAP2_SIZE); -} -#endif diff --git a/arch/z80/src/common/z80_createstack.c b/arch/z80/src/common/z80_createstack.c deleted file mode 100644 index c61a7c057d..0000000000 --- a/arch/z80/src/common/z80_createstack.c +++ /dev/null @@ -1,212 +0,0 @@ -/**************************************************************************** - * arch/z80/src/common/z80_createstack.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "z80_internal.h" - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_create_stack - * - * Description: - * Allocate a stack for a new thread and setup up stack-related information - * in the TCB. - * - * The following TCB fields must be initialized by this function: - * - * - adj_stack_size: Stack size after adjustment for hardware, processor, - * etc. This value is retained only for debug purposes. - * - stack_alloc_ptr: Pointer to allocated stack - * - stack_base_ptr: Adjusted stack base pointer after the TLS Data and - * Arguments has been removed from the stack allocation. - * - * Input Parameters: - * - tcb: The TCB of new task - * - stack_size: The requested stack size. At least this much - * must be allocated. - * - ttype: The thread type. This may be one of following (defined in - * include/nuttx/sched.h): - * - * TCB_FLAG_TTYPE_TASK Normal user task - * TCB_FLAG_TTYPE_PTHREAD User pthread - * TCB_FLAG_TTYPE_KERNEL Kernel thread - * - * This thread type is normally available in the flags field of the TCB, - * however, there are certain contexts where the TCB may not be fully - * initialized when up_create_stack is called. - * - * If CONFIG_BUILD_KERNEL is defined, then this thread type may affect - * how the stack is allocated. For example, kernel thread stacks should - * be allocated from protected kernel memory. Stacks for user tasks and - * threads must come from memory that is accessible to user code. - * - ****************************************************************************/ - -int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype) -{ -#ifdef CONFIG_TLS_ALIGNED - /* The allocated stack size must not exceed the maximum possible for the - * TLS feature. - */ - - DEBUGASSERT(stack_size <= TLS_MAXSTACK); - if (stack_size >= TLS_MAXSTACK) - { - stack_size = TLS_MAXSTACK; - } -#endif - - /* Is there already a stack allocated of a different size? Because of - * alignment issues, stack_size might erroneously appear to be of a - * different size. Fortunately, this is not a critical operation. - */ - - if (tcb->stack_alloc_ptr && tcb->adj_stack_size != stack_size) - { - /* Yes.. Release the old stack */ - - up_release_stack(tcb, ttype); - } - - /* Do we need to allocate a new stack? */ - - if (!tcb->stack_alloc_ptr) - { - /* Allocate the stack. If DEBUG is enabled (but not stack debug), - * then create a zeroed stack to make stack dumps easier to trace. - * If TLS is enabled, then we must allocate aligned stacks. - */ - -#ifdef CONFIG_TLS_ALIGNED -#ifdef CONFIG_MM_KERNEL_HEAP - /* Use the kernel allocator if this is a kernel thread */ - - if (ttype == TCB_FLAG_TTYPE_KERNEL) - { - tcb->stack_alloc_ptr = kmm_memalign(TLS_STACK_ALIGN, stack_size); - } - else -#endif - { - /* Use the user-space allocator if this is a task or pthread */ - - tcb->stack_alloc_ptr = kumm_memalign(TLS_STACK_ALIGN, stack_size); - } - -#else /* CONFIG_TLS_ALIGNED */ -#ifdef CONFIG_MM_KERNEL_HEAP - /* Use the kernel allocator if this is a kernel thread */ - - if (ttype == TCB_FLAG_TTYPE_KERNEL) - { - tcb->stack_alloc_ptr = kmm_malloc(stack_size); - } - else -#endif - { - /* Use the user-space allocator if this is a task or pthread */ - - tcb->stack_alloc_ptr = kumm_malloc(stack_size); - } -#endif /* CONFIG_TLS_ALIGNED */ - -#ifdef CONFIG_DEBUG_FEATURES - /* Was the allocation successful? */ - - if (!tcb->stack_alloc_ptr) - { - serr("ERROR: Failed to allocate stack, size %d\n", stack_size); - } -#endif - } - - /* Did we successfully allocate a stack? */ - - if (tcb->stack_alloc_ptr) - { - uintptr_t top_of_stack; - size_t size_of_stack; - - /* Yes.. If stack debug is enabled, then fill the stack with a - * recognizable value that we can use later to test for high - * water marks. - */ - -#ifdef CONFIG_STACK_COLORATION - memset(tcb->stack_alloc_ptr, 0xaa, stack_size); -#endif - - /* The Z80 family uses a push-down stack: the stack grows - * toward loweraddresses in memory. The stack pointer - * register, points to the lowest, valid work address - * (the "top" of the stack). Items on the stack are - * referenced as positive word offsets from sp. - */ - - top_of_stack = (uintptr_t)tcb->stack_alloc_ptr + stack_size; - - /* The Z80 stack does not need to be aligned. Here is is aligned at - * word (4 byte) boundary. - */ - - top_of_stack &= ~3; - size_of_stack = top_of_stack - (uintptr_t)tcb->stack_alloc_ptr; - - /* Save the adjusted stack values in the struct tcb_s */ - - tcb->stack_base_ptr = tcb->stack_alloc_ptr; - tcb->adj_stack_size = size_of_stack; - tcb->flags |= TCB_FLAG_FREE_STACK; - - board_autoled_on(LED_STACKCREATED); - return OK; - } - - return ERROR; -} diff --git a/arch/z80/src/common/z80_idle.c b/arch/z80/src/common/z80_idle.c deleted file mode 100644 index 5922d69dec..0000000000 --- a/arch/z80/src/common/z80_idle.c +++ /dev/null @@ -1,94 +0,0 @@ -/**************************************************************************** - * arch/z80/src/common/z80_idle.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include -#include -#include - -#include "z80_internal.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -#if defined(CONFIG_ARCH_LEDS) && defined(CONFIG_ARCH_BRINGUP) -static uint8_t g_ledtoggle = 0; -#endif - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_idle - * - * Description: - * up_idle() is the logic that will be executed when their - * is no other ready-to-run task. This is processor idle - * time and will continue until some interrupt occurs to - * cause a context switch from the idle task. - * - * Processing in this state may be processor-specific. e.g., - * this is where power management operations might be - * performed. - * - ****************************************************************************/ - -void up_idle(void) -{ -#if defined(CONFIG_ARCH_LEDS) && defined(CONFIG_ARCH_BRINGUP) - g_ledtoggle++; - if (g_ledtoggle == 0x80) - { - board_autoled_on(LED_IDLE); - } - else if (g_ledtoggle == 0x00) - { - board_autoled_off(LED_IDLE); - } -#endif - -#if defined(CONFIG_SUPPRESS_INTERRUPTS) || defined(CONFIG_SUPPRESS_TIMER_INTS) - /* If the system is idle and there are no timer interrupts, - * then process "fake" timer interrupts. Hopefully, something - * will wake up. - */ - - nxsched_process_timer(); -#endif -} diff --git a/arch/z80/src/common/z80_initialize.c b/arch/z80/src/common/z80_initialize.c deleted file mode 100644 index 55d0a6de91..0000000000 --- a/arch/z80/src/common/z80_initialize.c +++ /dev/null @@ -1,106 +0,0 @@ -/**************************************************************************** - * arch/z80/src/common/z80_initialize.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include -#include - -#include "chip/switch.h" -#include "z80_internal.h" - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/* This holds a references to the current interrupt level register storage - * structure. It is non-NULL only during interrupt processing. - */ - -volatile FAR chipreg_t *g_current_regs; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_initialize - * - * Description: - * up_initialize will be called once during OS initialization after the - * basic OS services have been initialized. The architecture specific - * details of initializing the OS will be handled here. Such things as - * setting up interrupt service routines, starting the clock, and - * registering device drivers are some of the things that are different - * for each processor and hardware platform. - * - * up_initialize is called after the OS initialized but before the user - * initialization logic has been started and before the libraries have - * been initialized. OS services and driver services are available. - * - ****************************************************************************/ - -void up_initialize(void) -{ - /* Initialize global variables */ - - INIT_IRQCONTEXT(); - -#if CONFIG_MM_REGIONS > 1 - /* Add any extra memory fragments to the memory manager */ - - z80_addregion(); -#endif - -#ifdef CONFIG_PM - /* Initialize the power management subsystem. This MCU-specific function - * must be called *very* early in the initialization sequence *before* any - * other device drivers are initialized (since they may attempt to register - * with the power management subsystem). - */ - - up_pminitialize(); -#endif - -#ifdef CONFIG_ARCH_ADDRENV - /* Initialize the MMU for those that use it (only for the Z180). This - * needs to be done before any tasks are created. - */ - - z80_mmu_initialize(); -#endif - - /* Initialize the serial device driver */ - -#ifdef USE_SERIALDRIVER - z80_serial_initialize(); -#endif - - /* Initialize the network */ - - z80_netinitialize(); - - board_autoled_on(LED_IRQSENABLED); -} diff --git a/arch/z80/src/common/z80_internal.h b/arch/z80/src/common/z80_internal.h deleted file mode 100644 index 80171435ef..0000000000 --- a/arch/z80/src/common/z80_internal.h +++ /dev/null @@ -1,153 +0,0 @@ -/**************************************************************************** - * arch/z80/src/common/z80_internal.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z80_SRC_COMMON_Z80_INTERNAL_H -#define __ARCH_Z80_SRC_COMMON_Z80_INTERNAL_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include - -#include -#include "chip.h" -#include "switch.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Determine which (if any) console driver to use. If a console is enabled - * and no other console device is specified, then a serial console is - * assumed. - */ - -#if !defined(CONFIG_DEV_CONSOLE) -# undef USE_SERIALDRIVER -#else -# if defined(CONFIG_CONSOLE_SYSLOG) -# undef USE_SERIALDRIVER -# else -# define USE_SERIALDRIVER 1 -# endif -#endif - -/* If some other device is used as the console, then the serial driver may - * still be needed. Let's assume that if the upper half serial driver is - * built, then the lower half will also be needed. There is no need for - * the early serial initialization in this case. - */ - -#if !defined(USE_SERIALDRIVER) && defined(CONFIG_STANDARD_SERIAL) -# define USE_SERIALDRIVER 1 -#endif - -/* The Z80 stack does not need to be aligned. Here is is aligned at word - * (4 byte) boundary. - */ - -#define STACK_ALIGNMENT 4 - -/* Stack alignment macros */ - -#define STACK_ALIGN_MASK (STACK_ALIGNMENT - 1) -#define STACK_ALIGN_DOWN(a) ((a) & ~STACK_ALIGN_MASK) -#define STACK_ALIGN_UP(a) (((a) + STACK_ALIGN_MASK) & ~STACK_ALIGN_MASK) - -/* Register access macros *************************************************** - * - * The register access mechanism provided in ez8.h differs from the useful in - * other NuttX architectures. The following NuttX common macros will at least - * make the access compatible at the source level (however, strict type check - * is lost). - */ - -#define getreg8(a) (a) -#define putreg8(v,a) ((a) = (v)) -#define getreg16(a) (a) -#define putreg16(v,a) ((a) = (v)) -#define getreg32(a) (a) -#define putreg32(v,a) ((a) = (v)) - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Defined in xyz_doirq.c */ - -FAR chipreg_t *z80_doirq(uint8_t irq, FAR chipreg_t *regs); - -/* Define in zyz_sigdeliver */ - -void z80_sigdeliver(void); - -#ifdef CONFIG_ARCH_ADDRENV -/* Defined in CPU-specific logic (only for Z180) */ - -int z80_mmu_initialize(void); -#endif - -/* Defined in xyz_serial.c */ - -#ifdef USE_SERIALDRIVER -void z80_serial_initialize(void); -#else -# define z80_serial_initialize() -#endif - -/* Architecture specific hook into the timer interrupt handler */ - -#ifdef CONFIG_ARCH_TIMERHOOK -void z80_timerhook(void); -#endif - -/* Defined in board/up_network.c */ - -#if defined(CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT) -int z80_netinitialize(void); -void z80_netuninitialize(void); -# ifdef CONFIG_ARCH_MCFILTER -int z80_multicastfilter(FAR struct net_driver_s *dev, FAR uint8_t *mac, - bool enable); -# else -# define z80_multicastfilter(dev, mac, enable) -# endif -#else -# define z80_netinitialize() -# define z80_netuninitialize() -# define z80_multicastfilter(dev, mac, enable) -#endif - -#ifdef __cplusplus -} -#endif -#endif - -#endif /* __ARCH_Z80_SRC_COMMON_Z80_INTERNAL_H */ diff --git a/arch/z80/src/common/z80_interruptcontext.c b/arch/z80/src/common/z80_interruptcontext.c deleted file mode 100644 index 82c824db89..0000000000 --- a/arch/z80/src/common/z80_interruptcontext.c +++ /dev/null @@ -1,59 +0,0 @@ -/**************************************************************************** - * arch/z80/src/common/z80_interruptcontext.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include -#include - -#include "chip/switch.h" -#include "z80_internal.h" - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_interrupt_context - * - * Description: Return true is we are currently executing in - * the interrupt handler context. - ****************************************************************************/ - -bool up_interrupt_context(void) -{ - return IN_INTERRUPT(); -} diff --git a/arch/z80/src/common/z80_nputs.c b/arch/z80/src/common/z80_nputs.c deleted file mode 100644 index 7cac0f28dd..0000000000 --- a/arch/z80/src/common/z80_nputs.c +++ /dev/null @@ -1,60 +0,0 @@ -/**************************************************************************** - * arch/z80/src/common/z80_nputs.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_nputs - * - * Description: - * This is a low-level helper function used to support debug. - * - ****************************************************************************/ - -void up_nputs(const char *str, size_t len) -{ - while (len-- > 0 && *str) - { - up_putc(*str++); - } -} diff --git a/arch/z80/src/common/z80_releasestack.c b/arch/z80/src/common/z80_releasestack.c deleted file mode 100644 index c0a64a6c00..0000000000 --- a/arch/z80/src/common/z80_releasestack.c +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** - * arch/z80/src/common/z80_releasestack.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include - -#include -#include - -#include "z80_internal.h" - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_release_stack - * - * Description: - * A task has been stopped. Free all stack related resources retained in - * the defunct TCB. - * - * Input Parameters: - * - dtcb: The TCB containing information about the stack to be released - * - ttype: The thread type. This may be one of following (defined in - * include/nuttx/sched.h): - * - * TCB_FLAG_TTYPE_TASK Normal user task - * TCB_FLAG_TTYPE_PTHREAD User pthread - * TCB_FLAG_TTYPE_KERNEL Kernel thread - * - * This thread type is normally available in the flags field of the TCB, - * however, there are certain error recovery contexts where the TCB may - * not be fully initialized when up_release_stack is called. - * - * If CONFIG_BUILD_KERNEL is defined, then this thread type may affect - * how the stack is freed. For example, kernel thread stacks may have - * been allocated from protected kernel memory. Stacks for user tasks - * and threads must have come from memory that is accessible to user - * code. - * - * Returned Value: - * None - * - ****************************************************************************/ - -void up_release_stack(FAR struct tcb_s *dtcb, uint8_t ttype) -{ - /* Is there a stack allocated? */ - - if (dtcb->stack_alloc_ptr && (dtcb->flags & TCB_FLAG_FREE_STACK)) - { -#ifdef CONFIG_MM_KERNEL_HEAP - /* Use the kernel allocator if this is a kernel thread */ - - if (ttype == TCB_FLAG_TTYPE_KERNEL) - { - kmm_free(dtcb->stack_alloc_ptr); - } - else -#endif - { - /* Use the user-space allocator if this is a task or pthread */ - - kumm_free(dtcb->stack_alloc_ptr); - } - } - - /* Mark the stack freed */ - - dtcb->flags &= ~TCB_FLAG_FREE_STACK; - dtcb->stack_alloc_ptr = NULL; - dtcb->stack_base_ptr = NULL; - dtcb->adj_stack_size = 0; -} diff --git a/arch/z80/src/common/z80_stackframe.c b/arch/z80/src/common/z80_stackframe.c deleted file mode 100644 index 381a46403c..0000000000 --- a/arch/z80/src/common/z80_stackframe.c +++ /dev/null @@ -1,99 +0,0 @@ -/**************************************************************************** - * arch/z80/src/common/z80_stackframe.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include -#include - -#include - -#include "z80_internal.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_stack_frame - * - * Description: - * Allocate a stack frame in the TCB's stack to hold thread-specific data. - * This function may be called anytime after up_create_stack() or - * up_use_stack() have been called but before the task has been started. - * - * Thread data may be kept in the stack (instead of in the TCB) if it is - * accessed by the user code directly. This includes such things as - * argv[]. The stack memory is guaranteed to be in the same protection - * domain as the thread. - * - * The following TCB fields will be re-initialized: - * - * - adj_stack_size: Stack size after removal of the stack frame from - * the stack - * - stack_base_ptr: Adjusted stack base pointer after the TLS Data and - * Arguments has been removed from the stack allocation. - * - * Input Parameters: - * - tcb: The TCB of new task - * - frame_size: The size of the stack frame to allocate. - * - * Returned Value: - * - A pointer to bottom of the allocated stack frame. NULL will be - * returned on any failures. The alignment of the returned value is - * the same as the alignment of the stack itself. - * - ****************************************************************************/ - -FAR void *up_stack_frame(FAR struct tcb_s *tcb, size_t frame_size) -{ - FAR void *ret; - - /* Align the frame_size */ - - frame_size = STACK_ALIGN_UP(frame_size); - - /* Is there already a stack allocated? Is it big enough? */ - - if (!tcb->stack_alloc_ptr || tcb->adj_stack_size <= frame_size) - { - return NULL; - } - - ret = tcb->stack_base_ptr; - memset(ret, 0, frame_size); - - /* Save the adjusted stack values in the struct tcb_s */ - - tcb->stack_base_ptr = (FAR uint8_t *)tcb->stack_base_ptr + frame_size; - tcb->adj_stack_size -= frame_size; - - /* And return a pointer to the allocated memory */ - - return ret; -} diff --git a/arch/z80/src/common/z80_usestack.c b/arch/z80/src/common/z80_usestack.c deleted file mode 100644 index 6e10f44157..0000000000 --- a/arch/z80/src/common/z80_usestack.c +++ /dev/null @@ -1,110 +0,0 @@ -/**************************************************************************** - * arch/z80/src/common/z80_usestack.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "z80_internal.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_use_stack - * - * Description: - * Setup up stack-related information in the TCB using pre-allocated stack - * memory. This function is called only from nxtask_init() when a task or - * kernel thread is started (never for pthreads). - * - * The following TCB fields must be initialized: - * - * - adj_stack_size: Stack size after adjustment for hardware, - * processor, etc. This value is retained only for debug - * purposes. - * - stack_alloc_ptr: Pointer to allocated stack - * - stack_base_ptr: Adjusted stack base pointer after the TLS Data and - * Arguments has been removed from the stack allocation. - * - * Input Parameters: - * - tcb: The TCB of new task - * - stack_size: The allocated stack size. - * - * NOTE: Unlike up_stack_create() and up_stack_release, this function - * does not require the task type (ttype) parameter. The TCB flags will - * always be set to provide the task type to up_use_stack() if it needs - * that information. - * - ****************************************************************************/ - -int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size) -{ - uintptr_t top_of_stack; - size_t size_of_stack; - -#ifdef CONFIG_TLS_ALIGNED - /* Make certain that the user provided stack is properly aligned */ - - DEBUGASSERT(((uintptr_t)stack & TLS_STACK_MASK) == 0); -#endif - - /* Is there already a stack allocated? */ - - if (tcb->stack_alloc_ptr) - { - /* Yes.. Release the old stack allocation */ - - up_release_stack(tcb, tcb->flags & TCB_FLAG_TTYPE_MASK); - } - - /* Save the new stack allocation */ - - tcb->stack_alloc_ptr = stack; - tcb->stack_base_ptr = (void *)STACK_ALIGN_UP((uintptr_t)stack); - - top_of_stack = STACK_ALIGN_DOWN((uintptr_t)stack + stack_size); - size_of_stack = top_of_stack - (uintptr_t)tcb->stack_base_ptr; - tcb->adj_stack_size = size_of_stack; - - /* If stack debug is enabled, then fill the stack with a recognizable value - * that we can use later to test for high water marks. - */ - -#ifdef CONFIG_STACK_COLORATION - memset(tcb->stack_alloc_ptr, 0xaa, stack_size); -#endif - - return OK; -} diff --git a/arch/z80/src/ez80/.gitignore b/arch/z80/src/ez80/.gitignore deleted file mode 100644 index 7227d197ac..0000000000 --- a/arch/z80/src/ez80/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -!*.asm - diff --git a/arch/z80/src/ez80/Kconfig b/arch/z80/src/ez80/Kconfig deleted file mode 100644 index b67ad62f42..0000000000 --- a/arch/z80/src/ez80/Kconfig +++ /dev/null @@ -1,270 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_CHIP_EZ80 - -# Chip capabilities - -config ARCH_EZ80_HAVE_PLL - bool - default n - -config ARCH_EZ80_HAVE_ETHERNET - bool - default n - -config ARCH_EZ80_HAVE_UART2 - bool - default n - -config ARCH_EZ80_HAVE_TIMER_INTREGS - bool - default n - -# Chip selection - -choice - prompt "eZ80 Chip Selection" - default ARCH_CHIP_EZ80F91 - -config ARCH_CHIP_EZ80F91 - bool "EZ80F91" - select ARCH_EZ80_HAVE_PLL - select ARCH_EZ80_HAVE_ETHERNET - select ARCH_EZ80_HAVE_UART2 - select ARCH_EZ80_HAVE_TIMER_INTREGS - ---help--- - ZiLOG EZ80F91 (ez80 Acclaim) - -config ARCH_CHIP_EZ80F92 - bool "EZ80F92" - ---help--- - ZiLOG EZ80F92 (ez80 Acclaim) - -config ARCH_CHIP_EZ80F93 - bool "EZ80F93" - ---help--- - ZiLOG EZ80F93 (ez80 Acclaim) - -endchoice - -choice - prompt "Toolchain Selection" - default EZ80_TOOLCHAIN_ZDSII - -config EZ80_TOOLCHAIN_ZDSII - bool "ZDS-II for Windows" - depends on TOOLCHAIN_WINDOWS - -config EZ80_TOOLCHAIN_CLANG - bool "Clang for Linux, macOS, or Cygwin" - depends on EXPERIMENTAL - -endchoice - -choice - prompt "ZDS-II Toolchain version" - default EZ80_ZDSII_V533 - depends on EZ80_TOOLCHAIN_ZDSII - -config EZ80_ZDSII_V511 - bool "ZDS-II 5.1.1" - -config EZ80_ZDSII_V521 - bool "ZDS-II 5.2.1" - -config EZ80_ZDSII_V530 - bool "ZDS-II 5.3.0" - -config EZ80_ZDSII_V533 - bool "ZDS-II 5.3.3" - -endchoice # ZDS-II Toolchain version - -# Build type selection - -config EZ80_BOOTLOADER - bool - default n - depends on BOOT_RUNFROMFLASH - ---help--- - Binary image is a bootloader that may require special properties - such as re-direction of interrupts (eZ80F92) - -config EZ80_PROGRAM - bool - default n - depends on BOOT_RUNFROMEXTSRAM - ---help--- - Binary image is a RAM-resident program loaded by a bootloader and - may require special properties such as re-direction of interrupts - (eZ80F92) - -# Peripheral selection - -config EZ80_UART - bool - default n - -menu "ez80 Peripheral Support" - -config EZ80_UART0 - bool "UART0" - select EZ80_UART - select UART0_SERIALDRIVER - default n - -config EZ80_UART1 - bool "UART1" - select EZ80_UART - select UART1_SERIALDRIVER - default n - -config EZ80_UART2 - bool "UART2" - select EZ80_UART - select UART2_SERIALDRIVER - default n - depends on ARCH_EZ80_HAVE_UART2 - -config EZ80_I2C - bool "I2C" - default n - -config EZ80_SPI - bool "SPI" - default n - -config EZ80_RTC - bool "RTC" - default n - select RTC - select RTC_DATETIME - -config EZ80_EMAC - bool "Ethernet MAC" - default n - select ARCH_HAVE_PHY - select ARCH_HAVE_NETDEV_STATISTICS - depends on ARCH_EZ80_HAVE_ETHERNET - ---help--- - Enables support for ez80 EMAC driver. - -endmenu # ez80 Peripheral Support - -# UART Configuration - -choice - prompt "UART Rx FIFO depth" - default EZ80_UART_RXFIFO_1 if ARCH_CHIP_EZ80F92 || ARCH_CHIP_EZ80F93 - default EZ80_UART_RXFIFO_4 if ARCH_CHIP_EZ80F91 - depends on EZ80_UART - -config EZ80_UART_RXFIFO_1 - bool "1" - -config EZ80_UART_RXFIFO_4 - bool "4" - -config EZ80_UART_RXFIFO_8 - bool "8" - -config EZ80_UART_RXFIFO_14 - bool "14" - -endchoice - -# RTC/Crystal Configuration - -config EZ80_RTC_32KHZ - bool "32KHz crystal present" - default y - depends on EZ80_RTC - ---help--- - If there is no 32Hz crystal, the RTC will fall back to use the line - frequency. - -config EZ80_RTC_LINEFREQ50 - bool "50Hz line frequency" - default n - depends on EZ80_RTC && !EZ80_RTC_32KHZ - ---help--- - If there is no 32Hz crystal, the RTC will fall back to use the line - frequency, either 50 or 60Hz. - -# EMAC Configuration - -if EZ80_EMAC - -config EZ80_FIAD - hex "PHY Address" - range 0x00 0x1f - default 0x1f - ---help--- - Provides the MII address of the PHY device - -# Belongs in net/Kconfig as PHY_AM79C874 -# ETH0_PHY_AM79C874 - Define for Am79c874 PHY - -config EZ80_PHYCONFIG - int "PHY Configuration" - default 0 - ---help--- - 0:Autonegotiate, 1:100FD, 2:100HD, 3:10FD, 4:10HD - -config EZ80_PKTBUFSIZE - int "Packet Buffer Size" - default 64 - ---help--- - The size of one packet buffer. EZ80_PKTBUFSIZE + (EZ80_NTXPKTBUFS+EZ80_NRXPKTBUFS) - must add up to exactly 8192 bytes. - -config EZ80_NTXPKTBUFS - int "Number of Tx Packets" - default 64 - ---help--- - The number of Tx packets. EZ80_PKTBUFSIZE + (EZ80_NTXPKTBUFS+EZ80_NRXPKTBUFS) - must add up to exactly 8192 bytes. - -config EZ80_NRXPKTBUFS - int "Number of Rx Packets" - default 64 - ---help--- - The number of Rx packets. EZ80_PKTBUFSIZE + (EZ80_NTXPKTBUFS+EZ80_NRXPKTBUFS) - must add up to exactly 8192 bytes. - -config EZ80_MDCDIV - int "SCLK Divider" - default 0 - ---help--- - The value to use for the divider to derive the MII MDC clock from SCLK. Options - are 1->4; 2->6; 3->8; 4->10; 5->14; 6->20; and 7->28 - -config EZ80_TXPOLLTIMERMS - int "Tx Poll Milliseconds" - default 10 - ---help--- - Specifies how often the EMAC controller should poll for a Tx packet (milliseconds) - -config ARCH_MCFILTER - bool "Multicast Filtering" - default n - ---help--- - Enables multicast MAC address filtering (not fully implemented) - -endif # EZ80_EMAC - -# System integration - -config ARCH_TIMERHOOK - bool "Timer Hook" - default n - ---help--- - Select this option to enabled a direct call-out from the ez80 timer interrupt - handler. If this is enabled, the ez80 timer interrupt interrupt will call a - user provided function called up_timerhook(). At present, this timer hook is - only used for driving the segment LED on board certain ez80 boards. - -endif # ARCH_CHIP_EZ80 diff --git a/arch/z80/src/ez80/Toolchain.defs b/arch/z80/src/ez80/Toolchain.defs deleted file mode 100644 index 3e7fd32285..0000000000 --- a/arch/z80/src/ez80/Toolchain.defs +++ /dev/null @@ -1,227 +0,0 @@ -############################################################################ -# arch/z80/src/ez80/Toolchain.defs -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -# CPU Identification - -ifeq ($(CONFIG_ARCH_CHIP_EZ80F91),y) - ARCHCPU = eZ80F91 - ARCHCPUDEF = _EZ80F91 - ARCHFAMILY = _EZ80ACCLAIM -else ifeq ($(CONFIG_ARCH_CHIP_EZ80F92),y) - ARCHCPU = eZ80F92 - ARCHCPUDEF = _EZ80F92 - ARCHFAMILY = _EZ80ACCLAIM -endif - -ifeq ($(CONFIG_EZ80_TOOLCHAIN_CLANG),y) - -# Optimization level - -ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - ARCHASMOPTIMIZATION = - ARCHOPTIMIZATION = $(CONFIG_DEBUG_SYMBOLS_LEVEL) -else - ARCHASMOPTIMIZATION = - ARCHOPTIMIZATION = -endif - -ifeq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += -O0 -fno-strict-aliasing -else - ARCHOPTIMIZATION += -Oz -endif - -ARCHSTDINCLUDES = - -ARCHCPUFLAGS = -Dinterrupt="__attribute__((__interrupt__))" -ffreestanding -ARCHCPUFLAGS += -Wa,-march=ez80 -ARCHLIST = -ARCHWARNINGS = -Wall -Wextra -Wno-incompatible-library-redeclaration -ARCHWARNINGS += -Wno-main-return-type -Wno-unused-parameter -ARCHWARNINGS += -Wno-invalid-noreturn -Wimplicit-int-conversion -ARCHDEFINES = -D$(ARCHCPUDEF) -D"$(ARCHFAMILY)" -ARCHINCLUDES = $(ARCHSTDINCLUDES) - -ARCHASMCPUFLAGS = -Wa,-march=ez80 -xassembler-with-cpp -ARCHASMINCLUDES = -include chip/clang-compat.asm -ARCHASMLIST = -ARCHASMWARNINGS = -W - -# Optimization of unused sections - -ifeq ($(CONFIG_FRAME_POINTER),y) - ARCHOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls -else - ARCHOPTIMIZATION += -fomit-frame-pointer -endif - -LDFLAGS += -nostdlib - -ifeq ($(CONFIG_DEBUG_OPT_UNUSED_SECTIONS),y) - LDFLAGS += --gc-sections - ARCHOPTIMIZATION += -ffunction-sections -fdata-sections -endif - -# Debug --whole-archive - -ifeq ($(CONFIG_DEBUG_LINK_WHOLE_ARCHIVE),y) - LDFLAGS += --whole-archive -endif - -# Debug link map - -ifeq ($(CONFIG_DEBUG_LINK_MAP),y) - LDFLAGS += --cref -Map=$(call CONVERT_PATH,$(TOPDIR)$(DELIM)nuttx.map) -endif - -# Tool names/paths. - -CROSSDEV = ez80-none-elf- -CC = $(CROSSDEV)clang -CPP = $(CC) -E -P -x c -STRIP = $(CROSSDEV)strip --strip-unneeded -LD = $(CROSSDEV)ld -AS = $(CROSSDEV)as -AR = $(CROSSDEV)ar -r -UNAR = $(CROSSDEV)ar -x -OBJCOPY= $(CROSSDEV)objcopy - -# File extensions - -ASMEXT = .asm -OBJEXT = .o -LIBEXT = .a -EXEEXT = .bin - -else - -# These are the default directories where the ZDS-II toolchain is installed. -# NOTE that short 8.3 path names are used in order to avoid spaces. On my -# machine I have: -# -# Versions 5.1.1 and 5.2.1 -# C:\PROGRA~1\ = C:\Program Files\ -# C:\PROGRA~2\ = C:\Program Files (x86)\ -# -# Your PC may be configured differently. -# -# Version 5.3.0 and 5.3.3, the default install location is C:\ZiLOG - -ifeq ($(CONFIG_EZ80_ZDSII_V511),y) -INSTALLROOT = C:/PROGRA~2/ZiLOG -ZDSVERSION := 5.1.1 -else ifeq ($(CONFIG_EZ80_ZDSII_V521),y) -INSTALLROOT = C:/PROGRA~2/ZiLOG -ZDSVERSION := 5.2.1 -else ifeq ($(CONFIG_EZ80_ZDSII_V530),y) -INSTALLROOT = C:/ZiLOG -ZDSVERSION := 5.3.0 -else ifeq ($(CONFIG_EZ80_ZDSII_V533),y) -INSTALLROOT = C:/ZiLOG -ZDSVERSION := 5.3.3 -endif - -ZDSINSTALLDIR := $(INSTALLROOT)/ZDSII_eZ80Acclaim!_$(ZDSVERSION) -ifeq ($(CONFIG_WINDOWS_NATIVE),y) - INSTALLDIR = $(shell echo $(ZDSINSTALLDIR)| sed -e "s/\//\\/g") - ZDSBINDIR := $(INSTALLDIR)\bin - ZDSSTDINCDIR := $(INSTALLDIR)\include\std - ZDSZILOGINCDIR := $(INSTALLDIR)\include\zilog - ZDSSTDLIBDIR := $(INSTALLDIR)\lib\std - ZDSZILOGLIBDIR := $(INSTALLDIR)\lib\zilog -else - INSTALLDIR = $(shell cygpath -u "$(ZDSINSTALLDIR)") - ZDSBINDIR := $(INSTALLDIR)/bin - ZDSSTDINCDIR := $(INSTALLDIR)/include/std - ZDSZILOGINCDIR := $(INSTALLDIR)/include/zilog - ZDSSTDLIBDIR := $(INSTALLDIR)/lib/std - ZDSZILOGLIBDIR := $(INSTALLDIR)/lib/zilog - - # These are the same directories but with the directory separator - # character swapped as needed by the ZDS-II compiler - - WTOPDIR := $(shell cygpath -w "$(TOPDIR)") - WZDSSTDINCDIR := $(shell cygpath -w "$(ZDSSTDINCDIR)") - WZDSZILOGINCDIR := $(shell cygpath -w "$(ZDSZILOGINCDIR)") - WZDSSTDLIBDIR := $(shell cygpath -w "$(ZDSSTDLIBDIR)") - WZDSZILOGLIBDIR := $(shell cygpath -w "$(ZDSZILOGLIBDIR)") - - # Escaped versions - - ETOPDIR := $(shell echo $(WTOPDIR) | sed -e "s/ /%20/g") - EZDSSTDINCDIR := $(shell echo "$(WZDSSTDINCDIR)" | sed -e "s/ /%20/g") - EZDSZILOGINCDIR := $(shell echo "$(WZDSZILOGINCDIR)" | sed -e "s/ /%20/g") -endif - -# Optimization level - -ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - ARCHASMOPTIMIZATION = -debug - ARCHOPTIMIZATION = -debug -else - ARCHASMOPTIMIZATION = -NOdebug - ARCHOPTIMIZATION = -NOdebug -endif - -ifeq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += -NOpromote -reduceopt -NOsdiopt -else - ARCHOPTIMIZATION += -promote -NOreduceopt -sdiopt -optsize -endif - -ARCHCPUFLAGS = -chartype:S -promote -cpu:$(ARCHCPU) -NOgenprintf -NOmodsect \ - -asmsw:" $(ARCHASMCPUFLAGS) $(EARCHASMINCLUDES) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)" -ARCHLIST = -keeplst -NOlist -NOlistinc -keepasm -ARCHWARNINGS = -warn -ARCHDEFINES = -define:$(ARCHCPUDEF) -define:$(ARCHFAMILY) -ARCHINCLUDES = $(ARCHSTDINCLUDES) - -# Tool names/paths. - -CROSSDEV = -CC = $(ZDSBINDIR)$(DELIM)ez80cc.exe -CPP = gcc -E -P -x c -LD = $(ZDSBINDIR)$(DELIM)ez80link.exe -AS = $(ZDSBINDIR)$(DELIM)ez80asm.exe -AR = $(ZDSBINDIR)$(DELIM)ez80lib.exe - -# File extensions - -ASMEXT = .asm -OBJEXT = .obj -LIBEXT = .lib -EXEEXT = .lod - -endif - -# Loadable module definitions - -CMODULEFLAGS = $(CFLAGS) -fvisibility=hidden -LDMODULEFLAGS = -r -T $(call CONVERT_PATH,$(TOPDIR)/libs/libc/elf/gnu-elf.ld) - -# ELF module definitions - -CELFFLAGS = $(CFLAGS) -fvisibility=hidden -CXXELFFLAGS = $(CXXFLAGS) -fvisibility=hidden - -LDELFFLAGS = -r -e __start -LDELFFLAGS += -T $(call CONVERT_PATH,$(TOPDIR)$(DELIM)libs$(DELIM)libc$(DELIM)elf$(DELIM)gnu-elf.ld) diff --git a/arch/z80/src/ez80/chip.h b/arch/z80/src/ez80/chip.h deleted file mode 100644 index e9125be6c7..0000000000 --- a/arch/z80/src/ez80/chip.h +++ /dev/null @@ -1,84 +0,0 @@ -/**************************************************************************** - * arch/z80/src/ez80/chip.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z80_SRC_EZ80_CHIP_H -#define __ARCH_Z80_SRC_EZ80_CHIP_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -# include -#endif - -/* Include chip-specific register definitions */ - -#if defined(CONFIG_ARCH_CHIP_EZ80F91) -# include "ez80f91.h" -#elif defined(CONFIG_ARCH_CHIP_EZ80F92) -# include "ez80f92.h" -#elif defined(CONFIG_ARCH_CHIP_EZ80F93) -# include "ez80f93.h" -#else -# error "Register definitions not provided for this chip" -#endif - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Bits in the Z80 FLAGS register *******************************************/ - -#define EZ80_C_FLAG 0x01 /* Bit 0: Carry flag */ -#define EZ80_N_FLAG 0x02 /* Bit 1: Add/Subtract flag */ -#define EZ80_PV_FLAG 0x04 /* Bit 2: Parity/Overflow flag */ -#define EZ80_H_FLAG 0x10 /* Bit 4: Half carry flag */ -#define EZ80_Z_FLAG 0x40 /* Bit 5: Zero flag */ -#define EZ80_S_FLAG 0x80 /* Bit 7: Sign flag */ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -EXTERN uint32_t ez80_systemclock; - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#undef EXTERN -#ifdef __cplusplus -} -#endif -#endif - -#endif /* __ARCH_Z80_SRC_EZ80_CHIP_H */ diff --git a/arch/z80/src/ez80/clang-compat.asm b/arch/z80/src/ez80/clang-compat.asm deleted file mode 100644 index e9e37cd9b9..0000000000 --- a/arch/z80/src/ez80/clang-compat.asm +++ /dev/null @@ -1,83 +0,0 @@ -;************************************************************************** -; arch/z80/src/ez80/clang-compat.asm -; -; SPDX-License-Identifier: Apache-2.0 -; -; Licensed to the Apache Software Foundation (ASF) under one or more -; contributor license agreements. See the NOTICE file distributed with -; this work for additional information regarding copyright ownership. The -; ASF licenses this file to you under the Apache License, Version 2.0 (the -; "License"); you may not use this file except in compliance with the -; License. You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -; License for the specific language governing permissions and limitations -; under the License. -; -;************************************************************************** - -; ZDS-II macros end with 'endmac' and the name of the macro. A preprocessor -; macro substitutes this with the GNU assembler's endm and comments out the -; macro name. -#define endmac endm ; - -; The ZDS-II assembler directive DEFINE constructs a segment. This macro -; doesn't provide a complete implementation of the DEFINE directive, but -; instead supports the use of DEFINE required for the arch build. This -; use includes a .RESET section that may be in ROM or RAM, a .STARTUP -; section that is always in ROM, and an IVECTS section that's initialized -; data for the eZ80F92 (in ROM or RAM) and uninitialized data for the -; eZ80F91. - .macro define name space align=0 - .ifc \name,.STARTUP - .section .startup,"ax",@progbits - .else - .ifc \name,.RESET - .ifc \space,ROM - .section .reset,"ax",@progbits - .else - .section .reset,"axw",@progbits - .endif - .else - .ifc \name,.IVECTS -# ifdef CONFIG_ARCH_CHIP_EZ80F91 - .section .ivects,"wx",@nobits -# else - .section .ivects,"awx",@nobits -# endif - .else - error "Unsupported define for \name" - .endif - .endif - .endif - .if \align > 0 - .balign \align - .endif - .endm - -; The segment macro ensures the SEGMENT directive matches the define macro, -; and includes the CODE segment which should be translated to be the .text -; section. - .macro segment name - .ifc \name,CODE - .section .text - .else - .ifc \name,.STARTUP - .section .startup - .else - .ifc \name,.RESET - .section .reset - .else - .ifc \name,.IVECTS - .section .ivects - .else - error "Unsupported segment \name" - .endif ; .ifc name,.IVECTS - .endif ; .ifc name,.RESET - .endif ; .ifc name,.STARTUP - .endif ; .ifc name,CODE - .endm diff --git a/arch/z80/src/ez80/clang_handlers.inc b/arch/z80/src/ez80/clang_handlers.inc deleted file mode 100644 index 47d8532cbb..0000000000 --- a/arch/z80/src/ez80/clang_handlers.inc +++ /dev/null @@ -1,30 +0,0 @@ -;************************************************************************** -; arch/z80/src/ez80/clang_handlers.inc -; -; SPDX-License-Identifier: Apache-2.0 -; -; Licensed to the Apache Software Foundation (ASF) under one or more -; contributor license agreements. See the NOTICE file distributed with -; this work for additional information regarding copyright ownership. The -; ASF licenses this file to you under the Apache License, Version 2.0 (the -; "License"); you may not use this file except in compliance with the -; License. You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -; License for the specific language governing permissions and limitations -; under the License. -; -;************************************************************************** - -irqhandler: .macro vectno - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, \vectno ; A = vector number - jp _ez80_irq_common ; Remaining RST handling is common - .endm diff --git a/arch/z80/src/ez80/ez80F91.inc b/arch/z80/src/ez80/ez80F91.inc deleted file mode 100644 index 1799cfe988..0000000000 --- a/arch/z80/src/ez80/ez80F91.inc +++ /dev/null @@ -1,484 +0,0 @@ -;*********************************************************************************** -; arch/z80/src/ez80/ez80f91.h -; -; SPDX-License-Identifier: Apache-2.0 -; -; Licensed to the Apache Software Foundation (ASF) under one or more -; contributor license agreements. See the NOTICE file distributed with -; this work for additional information regarding copyright ownership. The -; ASF licenses this file to you under the Apache License, Version 2.0 (the -; "License"); you may not use this file except in compliance with the -; License. You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -; License for the specific language governing permissions and limitations -; under the License. * -;*********************************************************************************** - -;*********************************************************************************** -; Included Files -;*********************************************************************************** - -; Product ID Registers ************************************************************ - -ZDI_ID_L EQU 000h -ZDI_ID_H EQU 001h -ZDI_ID_REV EQU 002h - -; Interrupt Registers ************************************************************* - -INT_P0 EQU 010h -INT_P1 EQU 011h -INT_P2 EQU 012h -INT_P3 EQU 013h -INT_P4 EQU 014h -INT_P5 EQU 015h - -; EMACC Registers ***************************************************************** - -EMAC_TEST EQU 020h ; EMAC test register * -EMAC_CFG1 EQU 021h ; EMAC configuration 1 register * -EMAC_CFG2 EQU 022h ; EMAC configuration 2 register * -EMAC_CFG3 EQU 023h ; EMAC configuration 3 register * -EMAC_CFG4 EQU 024h ; EMAC configuration 4 register * -EMAC_STAD_0 EQU 025h ; EMAC station address register 0 * -EMAC_STAD_1 EQU 026h ; EMAC station address register 1 * -EMAC_STAD_2 EQU 027h ; EMAC station address register 2 * -EMAC_STAD_3 EQU 028h ; EMAC station address register 3 * -EMAC_STAD_4 EQU 029h ; EMAC station address register 4 * -EMAC_STAD_5 EQU 02ah ; EMAC station address register 5 * -EMAC_TPTV_L EQU 02bh ; Transit pause timer value (low) * -EMAC_TPTV_H EQU 02ch ; Transit pause timer value (high) * -EMAC_IPGT EQU 02dh ; EMAC Interpacket gap register * -EMAC_IPGR1 EQU 02eh ; Non-back-to-back IPG register 1 * -EMAC_IPGR2 EQU 02fh ; Non-back-to-back IPG register 2 * -EMAC_MAXF_L EQU 030h ; EMAC maximum frame length register (low) * -EMAC_MAXF_H EQU 031h ; EMAC maximum frame length register (high) * -EMAC_AFR EQU 032h ; EMAC address filter register * -EMAC_HTBL_0 EQU 033h ; EMAC hash table register 0 * -EMAC_HTBL_1 EQU 034h ; EMAC hash table register 1 * -EMAC_HTBL_2 EQU 035h ; EMAC hash table register 2 * -EMAC_HTBL_3 EQU 036h ; EMAC hash table register 3 * -EMAC_HTBL_4 EQU 037h ; EMAC hash table register 4 * -EMAC_HTBL_5 EQU 038h ; EMAC hash table register 5 * -EMAC_HTBL_6 EQU 039h ; EMAC hash table register 6 * -EMAC_HTBL_7 EQU 03ah ; EMAC hash table register 7 * -EMAC_MIIMGT EQU 03bh ; EMACS MII management register * -EMAC_CTLD_L EQU 03ch ; PHY configuration data register (low) * -EMAC_CTLD_H EQU 03dh ; PHY configuration data register (high) * -EMAC_RGAD EQU 03eh ; PHY address register * -EMAC_FIAD EQU 03fh ; PHY unit select register * -EMAC_PTMR EQU 040h ; EMAC transmit polling timer register * -EMAC_RST EQU 041h ; EMAC reset control register * -EMAC_TLBP_L EQU 042h ; EMAC transmit lower boundary pointer (low) * -EMAC_TLBP_H EQU 043h ; EMAC transmit lower boundary pointer (high) * -EMAC_BP_L EQU 044h ; EMAC boundary pointer register (low) * -EMAC_BP_H EQU 045h ; EMAC boundary pointer register (high) * -EMAC_BP_U EQU 046h ; EMAC boundary pointer register (upper byte) * -EMAC_RHBP_L EQU 047h ; EMAC receive high boundary pointer register (low) * -EMAC_RHBP_H EQU 048h ; EMAC receive high boundary pointer register (high) * -EMAC_RRP_L EQU 049h ; EMAC receive read pointer (low) * -EMAC_RRP_H EQU 04ah ; EMAC receive read pointer (high) * -EMAC_BUFSZ EQU 04bh ; EMAC buffer size register * -EMAC_IEN EQU 04ch ; EMAC interrupt enable register * -EMAC_ISTAT EQU 04dh ; EMAC interrupt status register * -EMAC_PRSD_L EQU 04eh ; PHY read status data register (low) * -EMAC_PRSD_H EQU 04fh ; PHY read status data register (high) * -EMAC_MIISTAT EQU 050h ; EMAC MII status register * -EMAC_RWP_L EQU 051h ; EMAC receive write pointer (low) * -EMAC_RWP_H EQU 052h ; EMAC receive write pointer (high) * -EMAC_TRP_L EQU 053h ; EMAC transmit read pointer (low) * -EMAC_TRP_H EQU 054h ; EMAC transmit read pointer (high) * -EMAC_BLKSLFT_L EQU 055h ; EMAC receive blocks left register (low) * -EMAC_BLKSLFT_H EQU 056h ; EMAC receive blocks left register (high) * -EMAC_FDATA_L EQU 057h ; EMAC FIFO data register (low) * -EMAC_FDATA_H EQU 058h ; EMAC FIFO data register (high) * -EMAC_FFLAGS EQU 059h ; EMAC FIFO flags register * - -; PLL Registers ******************************************************************* - -PLL_DIV_L EQU 05ch -PLL_DIV_H EQU 05dh -PLL_CTL0 EQU 05eh -PLL_CTL1 EQU 05fh - -; Timer Registers ***************************************************************** - -TMR0_CTL EQU 060h ; RW: Timer 0 control register * -TMR0_IER EQU 061h ; RW: Timer 0 interrupt enable register * -TMR0_IIR EQU 062h ; R : Timer 0 interrupt ID register * -TMR0_DRL EQU 063h ; R : Timer 0 data register (low) * -TMR0_DRH EQU 064h ; R : Timer 0 data register (high) * -TMR0_RRL EQU 063h ; W: Timer 0 reload register (low) * -TMR0_RRH EQU 064h ; W: Timer 0 reload register (high) * - -TMR1_CTL EQU 065h ; RW: Timer 1 control register * -TMR1_IER EQU 066h ; RW: Timer 1 interrupt enable register * -TMR1_IIR EQU 067h ; R : Timer 1 interrupt ID register * -TMR1_DRL EQU 068h ; R : Timer 1 data register (low) * -TMR1_DRH EQU 069h ; R : Timer 1 data register (high) * -TMR1_RRL EQU 068h ; W: Timer 1 reload register (low) * -TMR1_RRH EQU 069h ; W: Timer 1 reload register (high) * -TMR1_CAPCTL EQU 06ah ; RW: Timer 1 input capture control register * -TMR1_CAPAL EQU 06bh ; R : Timer 1 capture input value A (low) * -TMR1_CAPAH EQU 06ch ; R : Timer 1 capture input value A (high) * -TMR1_CAPBL EQU 06dh ; R : Timer 1 capture input value B (low) * -TMR1_CAPBH EQU 06eh - -TMR2_CTL EQU 06fh ; RW: Timer 2 control register * -TMR2_IER EQU 070h ; RW: Timer 2 interrupt enable register * -TMR2_IIR EQU 071h ; R : Timer 2 interrupt ID register * -TMR2_DRL EQU 072h ; R : Timer 2 data register (low) * -TMR2_DRH EQU 073h ; R : Timer 2 data register (high) * -TMR2_RRL EQU 072h ; W: Timer 2 reload register (low) * -TMR2_RRH EQU 073h ; W: Timer 2 reload register (high) * - -TMR3_CTL EQU 074h ; RW: Timer 3 control register * -TMR3_IER EQU 075h ; RW: Timer 3 interrupt enable register * -TMR3_IIR EQU 076h ; R : Timer 3 interrupt ID register * -TMR3_DRL EQU 077h ; R : Timer 3 data register (low) * -TMR3_DRH EQU 078h ; R : Timer 3 data register (high) * -TMR3_RRL EQU 077h ; W: Timer 3 reload register (low) * -TMR3_RRH EQU 078h ; W: Timer 3 reload register (high) * -TMR3_CAPCTL EQU 07bh ; RW: Timer 3 input capture control register * -TMR3_CAPAL EQU 07ch ; R : Timer 3 capture input value A (low) * -TMR3_CAPAH EQU 07dh ; R : Timer 3 capture input value A (high) * -TMR3_CAPBL EQU 07eh ; R : Timer 3 capture input value B (low) * -TMR3_CAPBH EQU 07fh ; R : Timer 3 capture input value B (high) * -TMR3_OCCTL1 EQU 080h ; RW: Timer 3 output compare control register1 * -TMR3_OCCTL2 EQU 081h ; RW: Timer 3 output compare control register2 * -TMR3_OC0L EQU 082h ; RW: Timer 3 output compare value 0 (low) * -TMR3_OC0H EQU 083h ; RW: Timer 3 output compare value 0 (high) * -TMR3_OC1L EQU 084h ; RW: Timer 3 output compare value 1 (low) * -TMR3_OC1H EQU 085h ; RW: Timer 3 output compare value 1 (high) * -TMR3_OC2L EQU 086h ; RW: Timer 3 output compare value 2 (low) * -TMR3_OC2H EQU 087h ; RW: Timer 3 output compare value 2 (high) * -TMR3_OC3L EQU 088h ; RW: Timer 3 output compare value 3 (low) * -TMR3_OC3H EQU 089h ; RW: Timer 3 output compare value 3 (high) * - -; TMR0/1/2/3 CTL Register Bit Definitions ****************************************** - -TMRCTL_BRKSTOP EQU 080h ; Bit 7: Stop timer for debug operation * -TMRCTL_CLKSEL EQU 060h ; Bits 6-5: Timer source * -TMRCLKSEL_SYSCLK EQU 000h ; 00: System clock divided by prescaler * -TMRCLKSEL_RTC EQU 020h ; 01: Real time clock input * -TMRCLKSEL_ECF EQU 040h ; 10: Event count input, falling edge * -TMRCLKSEL_ECR EQU 060h ; 11: Event count input, rising edge * -TMRCTL_CLKDIV EQU 018h ; Bits 3-4: System clock divider * -TMRCLKDIV_4 EQU 000h ; 00: 4 * -TMRCLKDIV_16 EQU 008h ; 01: 16 * -TMRCLKDIV_64 EQU 010h ; 10: 64 * -TMRCLKDIV_256 EQU 018h ; 11: 256 * -TMRCTL_TIMCONT EQU 004h ; Bit 2: Continuous mode * -TMRCTL_RLD EQU 002h ; Bit 1: Force reload * -TMRCTL_TIMEN EQU 001h ; Bit 0: Programmable reload timer enabled * - -; TMR0/1/2/3 IER Register Bit Definitions ****************************************** - - ; Bit 7: Reserved * -TMRIER_OC3EN EQU 040h ; Bit 6: TMR3 OC3 enabled * -TMRIER_OC2EN EQU 020h ; Bit 5: TMR3 OC2 enabled * -TMRIER_OC1EN EQU 010h ; Bit 4: TMR3 OC1 enabled * -TMRIER_OC0EN EQU 008h ; Bit 3: TMR3 OC0 enabled * -TMRIER_ICBEN EQU 004h ; Bit 2: TMR1/3 capture pin enabled * -TMRIER_ICAEN EQU 002h ; Bit 1: TMR1/3 capture pin enabled * -TMRIER_EOCEN EQU 001h ; Bit 0: End of count interrupt enabled * - -; TMR0/1/2/3 IER Register Bit Definitions ****************************************** - - ; Bit 7: Reserved * -TMRIIR_OC3 EQU 040h ; Bit 6: TMR3 OC3 * -TMRIIR_OC2 EQU 020h ; Bit 5: TMR3 OC2 * -TMRIIR_OC1 EQU 010h ; Bit 4: TMR3 OC1 * -TMRIIR_OC0 EQU 008h ; Bit 3: TMR3 OC0 * -TMRIIR_ICB EQU 004h ; Bit 2: TMR1/3 capture pin * -TMRIIR_ICA EQU 002h ; Bit 1: TMR1/3 capture pin * -TMRIIR_EOC EQU 001h ; Bit 0: End of count interrupt * - -; PWM Registers ******************************************************************** - -PWM_CTL1 EQU 079h -PWM_CTL2 EQU 07ah -PWM_CTL3 EQU 07bh -PWM0R_L EQU 07ch -PWM0R_H EQU 07dh -PWM1R_L EQU 07eh -PWM1R_H EQU 07fh -PWM2R_L EQU 080h -PWM2R_H EQU 081h -PWM3R_L EQU 082h -PWM3R_H EQU 083h -PWM0F_L EQU 084h -PWM0F_H EQU 085h -PWM1F_L EQU 086h -PWM1F_H EQU 087h -PWM2F_L EQU 088h -PWM2F_H EQU 089h -PWM3F_L EQU 08ah -PWM3F_H EQU 08bh - -; WDT Registers ******************************************************************** - -WDT_CTL EQU 093h -WDT_RR EQU 094h - -; GPIO Registers ******************************************************************* - -PA_DR EQU 096h -PA_DDR EQU 097h -PA_ALT0 EQU 0a6h -PA_ALT1 EQU 098h -PA_ALT2 EQU 099h -PB_DR EQU 09ah -PB_DDR EQU 09bh -PB_ALT0 EQU 0a7h -PB_ALT1 EQU 09ch -PB_ALT2 EQU 09dh -PC_DR EQU 09eh -PC_DDR EQU 09fh -PC_ALT0 EQU 0ceh -PC_ALT1 EQU 0a0h -PC_ALT2 EQU 0a1h -PD_DR EQU 0a2h -PD_DDR EQU 0a3h -PD_ALT0 EQU 0cfh -PD_ALT1 EQU 0a4h -PD_ALT2 EQU 0a5h - -; CS Registers ********************************************************************* - -CS0_LBR EQU 0a8h -CS0_UBR EQU 0a9h -CS0_CTL EQU 0aah -CS1_LBR EQU 0abh -CS1_UBR EQU 0ach -CS1_CTL EQU 0adh -CS2_LBR EQU 0aeh -CS2_UBR EQU 0afh -CS2_CTL EQU 0b0h -CS3_LBR EQU 0b1h -CS3_UBR EQU 0b2h -CS3_CTL EQU 0b3h - -; RAMCTL reggisters **************************************************************** - -RAM_CTL EQU 0b4h -RAM_CTL0 EQU 0b4h -RAM_ADDR_U EQU 0b5h -MBIST_GPR EQU 0b6h -MBIST_EMR EQU 0b7h - -; RAMCTL bit definitions *********************************************************** - -RAMCTL_ERAMEN EQU (1 << 6) ; Bit 7: 1=On chip EMAC SRAM is enabled * -RAMCTL_GPRAMEN EQU (1 << 7) ; Bit 7: 1=On chip GP SRAM is enabled * - -; SPI Registers ******************************************************************** - -SPI_BRG_L EQU 0b8h -SPI_BRG_H EQU 0b9h -SPI_CTL EQU 0bah -SPI_SR EQU 0bbh -SPI_RBR EQU 0bch -SPI_TSR EQU 0bch - -; UART Register Offsets ************************************************************ - - ; DLAB=0: * -UART_THR EQU 000h ; W: UART Transmit holding register * -UART_RBR EQU 000h ; R : UART Receive buffer register * -UART_IER EQU 001h ; RW: UART Interrupt enable register * - ; DLAB=1: * -UART_BRG EQU 000h ; RW: UART Baud rate generator register * -UART_BRGL EQU 000h ; RW: UART Baud rate generator register (low) * -UART_BRGH EQU 001h ; RW: UART Baud rate generator register (high) * - ; DLAB=N/A: * -UART_IIR EQU 002h ; R : UART Interrupt identification register * -UART_FCTL EQU 002h ; W: UART FIFO control register * -UART_LCTL EQU 003h ; RW: UART Line control register * -UART_MCTL EQU 004h ; RW: UART Modem control register * -UART_LSR EQU 005h ; R : UART Line status register * -UART_MSR EQU 006h ; R : UART Modem status register * -UART_SPR EQU 007h ; RW: UART Scratchpad register * - -; UART0/1 Base Register Addresses ************************************************** - -UART0_BASE EQU 0c0h -UART1_BASE EQU 0d0h - -; UART0/1 Register Addresses ******************************************************* - -UART0_THR EQU UART0_BASE + UART_THR -UART0_RBR EQU UART0_BASE + UART_RBR -UART0_IER EQU UART0_BASE + UART_IER -UART0_BRG EQU UART0_BASE + UART_BRG -UART0_BRGL EQU UART0_BASE + UART_BRGL -UART0_BRGH EQU UART0_BASE + UART_BRGH -UART0_IIR EQU UART0_BASE + UART_IIR -UART0_FCTL EQU UART0_BASE + UART_FCTL -UART0_LCTL EQU UART0_BASE + UART_LCTL -UART0_MCTL EQU UART0_BASE + UART_MCTL -UART0_LSR EQU UART0_BASE + UART_LSR -UART0_MSR EQU UART0_BASE + UART_MSR -UART0_SPR EQU UART0_BASE + UART_SPR - -UART1_THR EQU UART1_BASE + UART_THR -UART1_RBR EQU UART1_BASE + UART_RBR -UART1_IER EQU UART1_BASE + UART_IER -UART1_BRG EQU UART1_BASE + UART_BRG -UART1_BRGL EQU UART1_BASE + UART_BRGL -UART1_BRGH EQU UART1_BASE + UART_BRGH -UART1_IIR EQU UART1_BASE + UART_IIR -UART1_FCTL EQU UART1_BASE + UART_FCTL -UART1_LCTL EQU UART1_BASE + UART_LCTL -UART1_MCTL EQU UART1_BASE + UART_MCTL -UART1_LSR EQU UART1_BASE + UART_LSR -UART1_MSR EQU UART1_BASE + UART_MSR -UART1_SPR EQU UART1_BASE + UART_SPR - -; UART0/1 IER register bits ******************************************************** - -UARTEIR_INTMASK EQU 01fh ; Bits 5-7: Reserved * -UARTEIR_TCIE EQU 010h ; Bit 4: Transmission complete interrupt * -UARTEIR_MIIE EQU 008h ; Bit 3: Modem status input interrupt * -UARTEIR_LSIE EQU 004h ; Bit 2: Line status interrupt * -UARTEIR_TIE EQU 002h ; Bit 1: Transmit interrupt * -UARTEIR_RIE EQU 001h ; Bit 0: Receive interrupt * - -; UART0/1 IIR register bits ******************************************************** - -UARTIIR_FSTS EQU 080h ; Bit 7: FIFO enable * - ; Bits 4-6: Reserved * -UARTIIR_INSTS EQU 00eh ; Bits 1-3: Interrupt status code * -UARTINSTS_CTO EQU 00ch ; 110: Character timeout * -UARTINSTS_TC EQU 00ah ; 101: Transmission complete * -UARTINSTS_RLS EQU 006h ; 011: Receiver line status * -UARTINSTS_RDR EQU 004h ; 010: Receive data ready or trigger level * -UARTINSTS_TBE EQU 002h ; 001: Transmission buffer empty * -UARTINSTS_MS EQU 000h ; 000: Modem status * -UARTIIR_INTBIT EQU 001h ; Bit 0: Active interrupt source * -UARTIIR_CAUSEMASK EQU 00fh - -; UART0/1 FCTL register bits ******************************************************* - -UARTFCTL_TRIG EQU 0c0h ; Bits 6-7: UART receive FIFO trigger level * -UARTTRIG_1 EQU 000h ; 00: Receive FIFO trigger level=1 * -UARTTRIG_4 EQU 040h ; 01: Receive FIFO trigger level=4 * -UARTTRIG_8 EQU 080h ; 10: Receive FIFO trigger level=8 * -UARTTRIG_14 EQU 0c0h ; 11: Receive FIFO trigger level=14 * - ; Bit 3-5: Reserved * -UARTFCTL_CLRTXF EQU 004h ; Bit 2: Transmit enable * -UARTFCTL_CLRRXF EQU 002h ; Bit 1: Receive enable * -UARTFCTL_FIFOEN EQU 001h ; Bit 0: Enable receive/transmit FIFOs * - -; UART0/1 LCTL register bits ******************************************************* - -UARTLCTL_DLAB EQU 080h ; Bit 7: Enable access to baud rate generator * -UARTLCTL_SB EQU 040h ; Bit 6: Send break * -UARTLCTL_FPE EQU 020h ; Bit 5: Force parity error * -UARTLCTL_EPS EQU 010h ; Bit 4: Even parity select * -UARTLCTL_PEN EQU 008h ; Bit 3: Parity enable * -UARTLCTL_2STOP EQU 004h ; Bit 2: 2 stop bits * -UARTLCTL_CHAR EQU 003h ; Bits 0-2: Number of data bits * -UARTCHAR_5BITS EQU 000h ; 00: 5 data bits * -UARTCHAR_6BITS EQU 001h ; 01: 6 data bits * -UARTCHAR_7BITS EQU 002h ; 10: 7 data bits * -UARTCHAR_8BITS EQU 003h ; 11: 8 data bits * - -UARTLCTL_MASK EQU 03fh - -; UART0/1 MCTL register bits ******************************************************* - - ; Bit 7: Reserved * -UARTMCTL_POLARITY EQU 040h ; Bit 6: Invert polarity of RxD and TxD * -UARTMCTL_MDM EQU 020h ; Bit 5: Multi-drop mode enable * -UARTMCTL_LOOP EQU 010h ; Bit 4: Loopback mode enable * -UARTMCTL_OUT2 EQU 008h ; Bit 3: (loopback mode only) * -UARTMCTL_OUT1 EQU 004h ; Bit 2: (loopback mode only) * -UARTMCTL_RTS EQU 002h ; Bit 1: Request to send * -UARTMCTL_DTR EQU 001h ; Bit 0: Data termnal read * - -; UART0/1 LSR register bits ******************************************************** - -UARTLSR_ERR EQU 080h ; Bit 7: Error detected in FIFO * -UARTLSR_TEMT EQU 040h ; Bit 6: Transmit FIFO empty and idle * -UARTLSR_THRE EQU 020h ; Bit 5: Transmit FIFO empty * -UARTLSR_BI EQU 010h ; Bit 4: Break on input * -UARTLSR_FE EQU 008h ; Bit 3: Framing error * -UARTLSR_PE EQU 004h ; Bit 2: Parity error * -UARTLSR_OE EQU 002h ; Bit 1: Overrun error * -UARTLSR_DR EQU 001h ; Bit 0: Data ready * - -; UART0/1 MSR register bits ******************************************************** - -UARTMSR_DCD EQU 080h ; Bit 7: Data carrier detect * -UARTMSR_RI EQU 040h ; Bit 6: Ring indicator * -UARTMSR_DSR EQU 020h ; Bit 5: Data set ready * -UARTMSR_CTS EQU 010h ; Bit 4: Clear to send * -UARTMSR_DDCD EQU 008h ; Bit 3: Delta on DCD input * -UARTMSR_TERI EQU 004h ; Bit 2: Trailing edge change on RI * -UARTMSR_DDSR EQU 002h ; Bit 1: Delta on DSR input * -UARTMSR_DCTS EQU 001h ; Bit 0: Delta on CTS input * - -; IR Registers ******************************************************************** - -IR_CTL EQU 0bfh - -; I2C Registers ******************************************************************* - -I2C_SAR EQU 0c8h -I2C_XSAR EQU 0c9h -I2C_DR EQU 0cah -I2C_CTL EQU 0cbh -I2C_SR EQU 0cch -I2C_CCR EQU 0cdh -I2C_SRR EQU 0ceh - -; CLK Registers ******************************************************************* - -CLK_PPD1 EQU 0dbh -CLK_PPD2 EQU 0dch - -; RTC Registers ******************************************************************* - -RTC_SEC EQU 0e0h -RTC_MIN EQU 0e1h -RTC_HRS EQU 0e2h -RTC_DOW EQU 0e3h -RTC_DOM EQU 0e4h -RTC_MON EQU 0e5h -RTC_YR EQU 0e6h -RTC_CEN EQU 0e7h -RTC_ASEC EQU 0e8h -RTC_AMIN EQU 0e9h -RTC_AHRS EQU 0eah -RTC_ADOW EQU 0ebh -RTC_ACTRL EQU 0ech -RTC_CTRL EQU 0edh - -; CSBMC Registers ***************************************************************** - -CS0_BMC EQU 0f0h -CS1_BMC EQU 0f1h -CS2_BMC EQU 0f2h -CS3_BMC EQU 0f3h - -; FLASH Registers ***************************************************************** - -FLASH_KEY EQU 0f5h -FLASH_DATA EQU 0f6h -FLASH_ADDR_U EQU 0f7h -FLASH_CTRL EQU 0f8h -FLASH_FDIV EQU 0f9h -FLASH_PROT EQU 0fah -FLASH_INTC EQU 0fbh -FLASH_IRQ EQU FLASH_INTC ; compat. with ZDS-II -FLASH_PAGE EQU 0fch -FLASH_ROW EQU 0fdh -FLASH_COL EQU 0feh -FLASH_PGCTL EQU 0ffh - diff --git a/arch/z80/src/ez80/ez80_clock.c b/arch/z80/src/ez80/ez80_clock.c deleted file mode 100644 index 41b3d300a4..0000000000 --- a/arch/z80/src/ez80/ez80_clock.c +++ /dev/null @@ -1,40 +0,0 @@ -/**************************************************************************** - * arch/z80/src/ez80/ez80_clock.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include - -#include "arch/board/board.h" - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -uint32_t ez80_systemclock = EZ80_SYS_CLK_FREQ; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ diff --git a/arch/z80/src/ez80/ez80_copystate.c b/arch/z80/src/ez80/ez80_copystate.c deleted file mode 100644 index 640ed9c9e1..0000000000 --- a/arch/z80/src/ez80/ez80_copystate.c +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** - * arch/z80/src/ez80/ez80_copystate.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include "chip/switch.h" -#include "z80_internal.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: ez80_copystate - ****************************************************************************/ - -/* Maybe a little faster than most memcpy's */ - -void ez80_copystate(chipreg_t *dest, const chipreg_t *src) -{ - int i; - for (i = 0; i < XCPTCONTEXT_REGS; i++) - { - *dest++ = *src++; - } -} diff --git a/arch/z80/src/ez80/ez80_emac.c b/arch/z80/src/ez80/ez80_emac.c deleted file mode 100644 index 898af6f287..0000000000 --- a/arch/z80/src/ez80/ez80_emac.c +++ /dev/null @@ -1,2581 +0,0 @@ -/**************************************************************************** - * arch/z80/src/ez80/ez80_emac.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * References: - * eZ80F91 MCU Product Specification, PS019214-0808, Zilig, Inc., 2008. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#if defined(CONFIG_NET) && defined(CONFIG_EZ80_EMAC) - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include - -#ifdef CONFIG_NET_PKT -# include -#endif - -#include - -#include "chip.h" -#include "z80_internal.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -/* If processing is not done at the interrupt level, then work queue support - * is required. - */ - -#if !defined(CONFIG_SCHED_WORKQUEUE) -# error Work queue support is required in this configuration (CONFIG_SCHED_WORKQUEUE) -#endif - -/* The low priority work queue is preferred. If it is not enabled, LPWORK - * will be the same as HPWORK. - * - * NOTE: However, the network should NEVER run on the high priority work - * queue! That queue is intended only to service short back end interrupt - * processing that never suspends. Suspending the high priority work queue - * may bring the system to its knees! - */ - -#define ETHWORK LPWORK - -/* The eZ80F92 has 16Kb of SRAM. The base address of the SRAM is setup by - * the eZ80 start-up logic by setting the RAM_ADDR_U register to the upper - * 8 bits of the 24-bit address. The EMAC RAM is at an offset of 0x00c000 - * into that region. - */ - -extern uint8_t _RAM_ADDR_U_INIT_PARAM[]; -#define ETH_RAMADDR (((uintptr_t)_RAM_ADDR_U_INIT_PARAM << 16) + 0x00c000) - -#if CONFIG_NET_ETH_PKTSIZE > 1518 -# error "MAXF size too big for this device" -#endif - -/* The memory region shared between this driver and the EMAC hardware - * is subdivided into a Transmit buffer and the Receive buffer. - * The Transmit and Receive buffers are subdivided into packet buffers - * of 32, 64, 128, or 256 bytes in size. - */ - -#ifndef CONFIG_EZ80_PKTBUFSIZE -# define CONFIG_EZ80_PKTBUFSIZE 64 -#endif - -#ifndef CONFIG_EZ80_NTXPKTBUFS -# define CONFIG_EZ80_NTXPKTBUFS 64 -#endif - -#ifndef CONFIG_EZ80_NRXPKTBUFS -# define CONFIG_EZ80_NRXPKTBUFS 64 -#endif - -#define EMAC_TXBUFSIZE (CONFIG_EZ80_PKTBUFSIZE * CONFIG_EZ80_NTXPKTBUFS) -#if EMAC_TXBUFSIZE > 8192 -# error "Too many TX buffers" -#endif - -#define EMAC_RXBUFSIZE (CONFIG_EZ80_PKTBUFSIZE * CONFIG_EZ80_NRXPKTBUFS) -#if EMAC_RXBUFSIZE > 8192 -# error "Too many TX buffers" -#endif - -#define EMAC_TOTAL_BUFSIZE (EMAC_TXBUFSIZE + EMAC_RXBUFSIZE) -#if EMAC_TOTAL_BUFSIZE > 8192 -# error "Too many TX+RX buffers" -#elif EMAC_TOTAL_BUFSIZE < 8192 -# error "Unused buffers!" -#endif - -#if CONFIG_EZ80_PKTBUFSIZE == 256 -# define EMAC_BUFSZ EMAC_BUFSZ_256b -# define EMAC_PKTBUF_SHIFT 8 -#elif CONFIG_EZ80_PKTBUFSIZE == 128 -# define EMAC_BUFSZ EMAC_BUFSZ_128b -# define EMAC_PKTBUF_SHIFT 7 -#elif CONFIG_EZ80_PKTBUFSIZE == 64 -# define EMAC_BUFSZ EMAC_BUFSZ_64b -# define EMAC_PKTBUF_SHIFT 6 -#elif CONFIG_EZ80_PKTBUFSIZE == 32 -# define EMAC_BUFSZ EMAC_BUFSZ_32b -# define EMAC_PKTBUF_SHIFT 5 -#else -# error "Unsupported CONFIG_EZ80_PKTBUFSIZE value" -#endif - -#define EMAC_PKTBUF_MASK (CONFIG_EZ80_PKTBUFSIZE - 1) -#define EMAC_PKTBUF_ALIGN(a) (((a) + EMAC_PKTBUF_MASK - 1) & ~EMAC_PKTBUF_MASK) - -/* Am79c874 PHY configuration */ - -#define EZ80_EMAC_AUTONEG 0 -#define EZ80_EMAC_100BFD 1 -#define EZ80_EMAC_100BHD 2 -#define EZ80_EMAC_10BFD 3 -#define EZ80_EMAC_10BHD 4 - -#ifndef CONFIG_EZ80_PHYCONFIG -# define CONFIG_EZ80_PHYCONFIG EZ80_EMAC_10BFD -#endif - -/* Select the fastest MDC clock that does not exceed 25MHz. The MDC - * clock derives from the SCLK divided by 4, 6, 8, 10, 14, 20, or 28. - */ - -#ifndef CONFIG_EZ80_MDCDIV -# ifdef CONFIG_ETH0_PHY_AM79C874 -# define CONFIG_EZ80_MDCDIV EMAC_MDC_DIV20 -# else -# define CONFIG_EZ80_MDCDIV EMAC_MDC_DIV4 -# endif -#endif - -/* Select the Tx poll timer. If not specified, a 10MS timer is set */ - -#ifndef CONFIG_EZ80_TXPOLLTIMERMS -# define CONFIG_EZ80_TXPOLLTIMERMS 10 -#endif - -/* Misc. timing values and settings */ - -#define EMAC_MXPOLLLOOPS 1000 -#define EMAC_CRCPOLY2 0xedb88320; - -/* Default register settings */ - -#define EMAC_TPTV 0x1000 /* TPTV: Default 0x1000 slot time (1slot:512bit) */ -#define EMAC_IPGT 0x12 /* IPGT: Back-to-back IPG default value */ -#define EMAC_IPGR1 0x0c /* IPGR1: Non-back-to-back IPG default value */ -#define EMAC_IPGR2 0x12 /* IPGR2: Non-back-to-back IPG default value */ -#define EMAC_MAXF 0x0600 /* Maximum packet length value (reset value) */ -#define EMAC_LCOL 0x37 /* CFG2: Late collision window default value */ -#define EMAC_RETRY 0x0f /* CFG3: Maximum number of retry default value */ - -/* Poll timer setting. The transmit poll timer is set in increments of - * SYSCLCK / 256. NOTE: The system clock frequency is defined in the - * board.h file. - */ - -#define EMAC_PTMR (CONFIG_EZ80_TXPOLLTIMERMS * (ez80_systemclock / 1000) >> 8) - - /* EMAC system interrupts : - * - * EMAC_ISTAT_TXFSMERR - Bit 7: 1=Transmit state machine error interrupt - * A Transmit State Machine Error should never occur. However, if this - * bit is set, the entire transmitter module must be reset. - * EMAC_ISTAT_MGTDONE - Bit 6: 1=MII Mgmt done interrupt - * This bit is set when communicating to the PHY over the MII during - * a Read or Write operation. - * EMAC_ISTAT_RXOVR - Bit 2: 1=Receive overrun interrupt - * If this bit is set, all incoming packets are ignored until - * this bit is cleared by software. - */ - -#define EMAC_ISTAT_SYSEVENTS \ - (EMAC_ISTAT_TXFSMERR | EMAC_ISTAT_MGTDONE | EMAC_ISTAT_RXOVR) - - /* EMAC Tx interrupts: - * - * EMAC_ISTAT_TXDONE - Bit 0: 1=Transmit done interrupt - * Denotes when packet transmission is complete. - * EMAC_ISTAT_TXCF - Bit 1: 1=Transmit control frame interrupt - * Denotes when control frame transmission is complete. - */ - -#define EMAC_ISTAT_TXEVENTS (EMAC_ISTAT_TXDONE | EMAC_ISTAT_TXCF) - - /* EMAC Rx interrupts: - * - * EMAC_ISTAT_RXDONE - Bit 3: 1=Receive done interrupt - * Denotes when packet reception is complete. - * EMAC_ISTAT_RXPCF - Bit 4: 1=Receive pause control frame interrupt - * Denotes when pause control frame reception is complete. - * EMAC_ISTAT_RXCF - Bit 5: 1=Receive control frame interrupt - * Denotes when control frame reception is complete. - */ - -#define EMAC_ISTAT_RXEVENTS \ - (EMAC_ISTAT_RXDONE | EMAC_ISTAT_RXPCF | EMAC_ISTAT_RXCF) -#define EMAC_EIN_HANDLED \ - (EMAC_ISTAT_RXEVENTS | EMAC_ISTAT_TXEVENTS | EMAC_ISTAT_SYSEVENTS) - -/* TX timeout = 1 minute */ - -#define EMAC_TXTIMEOUT (60*CLK_TCK) - -/* This is a helper pointer for accessing the contents of the Ethernet - * header - */ - -#define BUF ((FAR struct eth_hdr_s *)&dev->d_buf[0]) - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/* EMAC statistics (debug only) */ - -#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_NET) -struct ez80mac_statistics_s -{ - uint32_t rx_int; /* Number of Rx interrupts received */ - uint32_t rx_packets; /* Number of packets received (sum of the following): */ -#ifdef CONFIG_NET_IPv4 - uint32_t rx_ip; /* Number of Rx IPv4 packets received */ -#endif -#ifdef CONFIG_NET_IPv6 - uint32_t rx_ipv6; /* Number of Rx IPv6 packets received */ -#endif - uint32_t rx_arp; /* Number of Rx ARP packets received */ - uint32_t rx_dropped; /* Number of dropped, unsupported Rx packets */ - uint32_t rx_nok; /* Number of Rx packets received without OK bit */ - uint32_t rx_errors; /* Number of Rx errors (rx_overerrors + rx_nok) */ - uint32_t rx_ovrerrors; /* Number of FIFO overrun errors */ - uint32_t tx_int; /* Number of Tx interrupts received */ - uint32_t tx_packets; /* Number of Tx descriptors queued */ - uint32_t tx_errors; /* Number of Tx errors (sum of the following) */ - uint32_t tx_abterrors; /* Number of aborted Tx descriptors */ - uint32_t tx_fsmerrors; /* Number of Tx state machine errors */ - uint32_t tx_timeouts; /* Number of Tx timeout errors */ - uint32_t sys_int; /* Number of system interrupts received */ -}; -# define EMAC_STAT(priv,name) priv->stat.name++ -#else -# define EMAC_STAT(priv,name) -#endif - -/* Private driver data. The ez80emac_driver_s encapsulates all state - * information for a single hardware interface - */ - -struct ez80emac_driver_s -{ - /* Tx buffer management - * - * txstart: The beginning of the Rx descriptor list (and also the - * beginning of Tx/Rx memory). - * txhead: Points to the oldest Tx descriptor queued for output (but for - * which output has not yet completed. Initialized to NULL; set - * by ez80emac_transmit() when Tx is started and by - * ez80emac_txinterrupt() when Tx processing completes. txhead - * == NULL is also a sure indication that there is no Tx in - * progress. - * txnext: Points to the next free Tx descriptor. Initialized to - * txstart; set when ez80emac_transmit() adds the descriptor; - * reset to txstart when the last Tx packet is sent. - */ - - FAR struct ez80emac_desc_s *txstart; - FAR struct ez80emac_desc_s *txhead; - FAR struct ez80emac_desc_s *txnext; - - /* Rx buffer management - * - * rxstart: The beginning of the Rx descriptor list (and also the end of - * Tx buffer + 1). - * rxnext: The next of Rx descriptor available for receipt of a packet. - * Initialized to rxstart; rxnext is incremented by - * rmac_rxinterrupt() as part of Rx interrupt processing. rxnext - * wraps back to rxstart when rxnext exceeds rxendp1. - * rxendp1: The end of the Rx descriptor list + 1. - */ - - FAR struct ez80emac_desc_s *rxstart; - FAR struct ez80emac_desc_s *rxnext; - FAR struct ez80emac_desc_s *rxendp1; - - bool bifup; /* true:ifup false:ifdown */ - bool blinkok; /* true:successful MII autonegotiation */ - bool bfullduplex; /* true:full duplex */ - bool b100mbs; /* true:100Mbp */ - - struct wdog_s txtimeout; /* TX timeout timer */ - - struct work_s txwork; /* For deferring Tx-related work to the work queue */ - struct work_s rxwork; /* For deferring Rx-related work to the work queue */ - struct work_s syswork; /* For deferring system work to the work queue */ - -#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_NET) - struct ez80mac_statistics_s stat; -#endif - - /* This holds the information visible to the NuttX network */ - - struct net_driver_s dev; /* Interface understood by the network */ -}; - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/* A single packet buffer is used */ - -static uint8_t g_pktbuf[MAX_NETDEV_PKTSIZE + CONFIG_NET_GUARDSIZE]; - -/* There is only a single instance of driver private data (because there is - * only one EMAC interface. - */ - -static struct ez80emac_driver_s g_emac; - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -/* MII logic */ - -static void ez80emac_waitmiibusy(void); -static void ez80emac_miiwrite(FAR struct ez80emac_driver_s *priv, - uint8_t offset, uint16_t value); -static uint16_t ez80emac_miiread(FAR struct ez80emac_driver_s *priv, - uint32_t offset); -static bool ez80emac_miipoll(FAR struct ez80emac_driver_s *priv, - uint32_t offset, uint16_t bits, bool bclear); -static int ez80emac_miiconfigure(FAR struct ez80emac_driver_s *priv); - -/* Multi-cast filtering */ - -#ifdef CONFIG_EZ80_MCFILTER -static void ez80emac_machash(FAR uint8_t *mac, FAR int *ndx, FAR int *bitno); -#endif - -/* TX/RX logic */ - -static int ez80emac_transmit(FAR struct ez80emac_driver_s *priv); -static int ez80emac_txpoll(FAR struct net_driver_s *dev); - -static inline FAR struct ez80emac_desc_s *ez80emac_rwp(void); -static inline FAR struct ez80emac_desc_s *ez80emac_rrp(void); -static int ez80emac_receive(FAR struct ez80emac_driver_s *priv); - -/* Interrupt handling */ - -static void ez80emac_txinterrupt_work(FAR void *arg); -static int ez80emac_txinterrupt(int irq, FAR void *context, - FAR void *arg); - -static void ez80emac_rxinterrupt_work(FAR void *arg); -static int ez80emac_rxinterrupt(int irq, FAR void *context, - FAR void *arg); - -static void ez80emac_sysinterrupt_work(FAR void *arg); -static int ez80emac_sysinterrupt(int irq, FAR void *context, - FAR void *arg); - -/* Watchdog timer expirations */ - -static void ez80emac_txtimeout_work(FAR void *arg); -static void ez80emac_txtimeout_expiry(wdparm_t arg); - -/* NuttX callback functions */ - -static int ez80emac_ifup(FAR struct net_driver_s *dev); -static int ez80emac_ifdown(FAR struct net_driver_s *dev); - -static void ez80emac_txavail_work(FAR void *arg); -static int ez80emac_txavail(FAR struct net_driver_s *dev); - -#ifdef CONFIG_NET_MCASTGROUP -static int ez80emac_addmac(FAR struct net_driver_s *dev, - FAR const uint8_t *mac); -static int ez80emac_rmmac(FAR struct net_driver_s *dev, - FAR const uint8_t *mac); -#endif - -/* Initialization */ - -static int ez80_emacinitialize(void); - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Function: ez80emac_waitmiibusy - * - * Description: - * Wait for the MII to become available. - * - * Input Parameters: - * priv - Reference to the driver state structure - * - * Returned Value: - * None - * - ****************************************************************************/ - -static void ez80emac_waitmiibusy(void) -{ - /* Wait for any preceding MII management operation to complete */ - - while ((inp(EZ80_EMAC_MIISTAT) & EMAC_MIISTAT_BUSY) != 0); -} - -/**************************************************************************** - * Function: ez80emac_miiwrite - * - * Description: - * Write a signel MII register - * - * Input Parameters: - * priv - Reference to the driver state structure - * offset - Register offset in PMD - * value - Value to write - * - * Returned Value: - * None - * - ****************************************************************************/ - -static void ez80emac_miiwrite(FAR struct ez80emac_driver_s *priv, - uint8_t offset, uint16_t value) -{ - uint8_t regval; - - /* Wait for any preceding MII management operation to complete */ - - ez80emac_waitmiibusy(); - - /* Set up PHY addressing */ - - outp(EZ80_EMAC_FIAD, CONFIG_EZ80_FIAD & EMAC_FIAD_MASK); - outp(EZ80_EMAC_RGAD, offset & EMAC_RGAD_MASK); - - /* Write the control data */ - - outp(EZ80_EMAC_CTLD_H, value >> 8); - outp(EZ80_EMAC_CTLD_L, value & 0xff); - - /* Send control data to PHY */ - - regval = inp(EZ80_EMAC_MIIMGT); - regval |= EMAC_MIIMGMT_LCTLD; - outp(EZ80_EMAC_MIIMGT, regval); -} - -/**************************************************************************** - * Function: ez80emac_miiread - * - * Description: - * Read a single MII register - * - * Input Parameters: - * priv - Reference to the driver state structure - * offset - Register offset in PMD - * - * Returned Value: - * Value read from the register - * - ****************************************************************************/ - -static uint16_t ez80emac_miiread(FAR struct ez80emac_driver_s *priv, - uint32_t offset) -{ - uint8_t regval; - - /* Wait for any preceding MII management operation to complete */ - - ez80emac_waitmiibusy(); - - /* Set up PHY addressing */ - - outp(EZ80_EMAC_FIAD, CONFIG_EZ80_FIAD & EMAC_FIAD_MASK); - outp(EZ80_EMAC_RGAD, offset & EMAC_RGAD_MASK); - - /* Read status from PHY */ - - regval = inp(EZ80_EMAC_MIIMGT); - regval |= EMAC_MIIMGMT_RSTAT; - outp(EZ80_EMAC_MIIMGT, regval); - - /* Wait for MII management operation to complete */ - - ez80emac_waitmiibusy(); - return ((uint16_t)inp(EZ80_EMAC_PRSD_H) << 8 | inp(EZ80_EMAC_PRSD_L)); -} - -/**************************************************************************** - * Function: ez80emac_miipoll - * - * Description: - * Read an MII register until the bit has the specified polarity (or until - * the maximum number of retries occurs - * - * Input Parameters: - * priv - Reference to the driver state structure - * offset - Register offset in PMD - * bits - Selects set of bits to wait for - * bclear - true:Return true when all bits in 'bits' are 0 - * false:Return true when one or more bits in 'bits' are 1 - * - * Returned Value: - * true:Bit has requested polarity; false: EMAC_MXPOLLLOOPS exceeded - * - ****************************************************************************/ - -static bool ez80emac_miipoll(FAR struct ez80emac_driver_s *priv, - uint32_t offset, uint16_t bits, bool bclear) -{ - uint16_t value; - int i; - - for (i = 0; i < EMAC_MXPOLLLOOPS; i++) - { - value = ez80emac_miiread(priv, offset); - if (bclear) - { - if ((value & bits) == 0) - { - return true; - } - } - else - { - if ((value & bits) != 0) - { - return true; - } - } - - up_mdelay(10); - } - - return false; -} - -/**************************************************************************** - * Function: ez80emac_miiconfigure - * - * Description: - * Dump all MII registers - * - * Input Parameters: - * priv - Reference to the driver state structure - * offset - Register offset in PMD - * bits - Selects set of bits to wait for - * bclear - true:Return true when all bits in 'bits' are 0 - * false:Return true when one or more bits in 'bits' are 1 - * - * Returned Value: - * true:Bit has requested polarity; false: EMAC_MXPOLLLOOPS exceeded - * - ****************************************************************************/ - -#ifdef CONFIG_ETH0_PHY_AM79C874 -static int ez80emac_miiconfigure(FAR struct ez80emac_driver_s *priv) -{ - uint16_t phyval; - bool bauto; - int ret = OK; - int i; - - /* Verify that the detect PHY is an AMD Am87c874 as expected */ - -#ifdef CONFIG_DEBUG_FEATURES /* Parameter checking only done when DEBUG is enabled */ - phyval = ez80emac_miiread(priv, MII_PHYID1); - if (phyval != MII_PHYID1_AM79C874) - { - nerr("ERROR: Not an Am79c874 PHY: PHY1=%04x vs %04x\n", - phyval, MII_PHYID1_AM79C874); - ret = -ENODEV; - goto dumpregs; - } - - phyval = ez80emac_miiread(priv, MII_PHYID2); - if (phyval != MII_PHYID2_AM79C874) - { - nerr("ERROR: Not an Am79c874 PHY: PHY2=%04x vs %04x\n", - phyval, MII_PHYID2_AM79C874); - ret = -ENODEV; - goto dumpregs; - } -#endif - - /* Check if the PHY can do auto-negotiation */ - - phyval = ez80emac_miiread(priv, MII_MSR); - if (phyval & MII_MSR_ANEGABLE) - { - phyval = MII_MCR_ANRESTART | MII_MCR_ANENABLE; - bauto = true; - } - else - { - phyval = 0; - bauto = false; - - /* PADEN - EMAC pads all short frames by adding zeroes to the end of - * the data field. This bit is used in conjunction with ADPADN - * and VLPAD. - * CRCEN - Append CRC to every frame regardless of padding options. - */ - - outp(EZ80_EMAC_CFG1, EMAC_CFG1_PADEN | EMAC_CFG1_CRCEN); - } - -#if CONFIG_EZ80_PHYCONFIG == EZ80_EMAC_AUTONEG - /* Set the configured link capabilities */ - - ninfo("Configure autonegotiation\n"); - if (bauto) - { - ez80emac_miiwrite(priv, MII_ADVERTISE, - MII_ADVERTISE_100BASETXFULL | - MII_ADVERTISE_100BASETXHALF | - MII_ADVERTISE_10BASETXFULL | - MII_ADVERTISE_10BASETXHALF | - MII_ADVERTISE_CSMA); - } - else - { - nerr("ERROR: Am79c784 is not capable of autonegotiation\n"); - } - -#elif CONFIG_EZ80_PHYCONFIG == EZ80_EMAC_100BFD - - ninfo("100BASETX full duplex\n"); - phyval |= MII_MCR_SPEED100 | MII_MCR_FULLDPLX; - ez80emac_miiwrite(priv, MII_ADVERTISE, - MII_ADVERTISE_100BASETXFULL | - MII_ADVERTISE_100BASETXHALF | - MII_ADVERTISE_10BASETXFULL | - MII_ADVERTISE_10BASETXHALF | - MII_ADVERTISE_CSMA); - -#elif CONFIG_EZ80_PHYCONFIG == EZ80_EMAC_100BHD - - ninfo("100BASETX half duplex\n"); - phyval |= MII_MCR_SPEED100; - ez80emac_miiwrite(priv, MII_ADVERTISE, - MII_ADVERTISE_100BASETXHALF | - MII_ADVERTISE_10BASETXFULL | - MII_ADVERTISE_10BASETXHALF | - MII_ADVERTISE_CSMA); - -#elif CONFIG_EZ80_PHYCONFIG == EZ80_EMAC_10BFD - - ninfo("10BASETX full duplex\n"); - phyval |= MII_MCR_FULLDPLX; - ez80emac_miiwrite(priv, MII_ADVERTISE, - MII_ADVERTISE_10BASETXFULL | - MII_ADVERTISE_10BASETXHALF | - MII_ADVERTISE_CSMA); - -#elif CONFIG_EZ80_PHYCONFIG == EZ80_EMAC_10BHD - - ninfo("10BASETX half duplex\n"); - ez80emac_miiwrite(priv, MII_ADVERTISE, - MII_ADVERTISE_10BASETXHALF | - MII_ADVERTISE_CSMA); - -#else -# error "No recognized value of CONFIG_EZ80_PHYCONFIG" -#endif - - ez80emac_miiwrite(priv, MII_MCR, phyval); - - /* Wait for a link to be established */ - - for (i = 0; i < 50; i++) - { - phyval = ez80emac_miiread(priv, MII_MSR); - if ((phyval & (MII_MSR_ANEGCOMPLETE | MII_MSR_LINKSTATUS)) != 0) - { - break; - } - - up_mdelay(10); - } - - if ((phyval & MII_MSR_LINKSTATUS) == 0) - { - nerr("ERROR: Failed to establish link\n"); - ret = -ETIMEDOUT; - } - else - { - /* Read the Am79c874 diagnostics register for link settings */ - - phyval = ez80emac_miiread(priv, MII_AM79C874_DIAGNOSTIC); - if (phyval & AM79C874_DIAG_FULLDPLX) - { - outp(EZ80_EMAC_CFG1, EMAC_CFG1_PADEN | EMAC_CFG1_CRCEN | - EMAC_CFG1_FULLHD); - } - else - { - outp(EZ80_EMAC_CFG1, EMAC_CFG1_PADEN | EMAC_CFG1_CRCEN); - } - } - -dumpregs: - ninfo("Am79c874 MII registers (FIAD=%lx)\n", - CONFIG_EZ80_FIAD); - ninfo(" MII_MCR: %04x\n", - ez80emac_miiread(priv, MII_MCR)); - ninfo(" MII_MSR: %04x\n", - ez80emac_miiread(priv, MII_MSR)); - ninfo(" MII_PHYID1: %04x\n", - ez80emac_miiread(priv, MII_PHYID1)); - ninfo(" MII_PHYID2: %04x\n", - ez80emac_miiread(priv, MII_PHYID2)); - ninfo(" MII_ADVERTISE: %04x\n", - ez80emac_miiread(priv, MII_ADVERTISE)); - ninfo(" MII_LPA: %04x\n", - ez80emac_miiread(priv, MII_LPA)); - ninfo(" MII_EXPANSION: %04x\n", - ez80emac_miiread(priv, MII_EXPANSION)); - ninfo(" MII_DIAGNOSTICS: %04x\n", - ez80emac_miiread(priv, MII_AM79C874_DIAGNOSTIC)); - ninfo("EMAC CFG1: %02x\n", - inp(EZ80_EMAC_CFG1)); - return ret; -} -#else -static int ez80emac_miiconfigure(FAR struct ez80emac_driver_s *priv) -{ - uint16_t advertise; - uint16_t lpa; - uint16_t mcr; - uint8_t regval; - int i; - - /* Start auto-negotiation */ - - ez80emac_miiwrite(priv, MII_MCR, 0); - ez80emac_miiwrite(priv, - MII_MCR, - MII_MCR_ANENABLE | MII_MCR_ANRESTART | MII_MCR_FULLDPLX | - MII_MCR_SPEED100); - - /* Wait for auto-negotiation to complete and a link to be established */ - - for (i = 0; i < 50; i++) - { - regval = ez80emac_miiread(priv, MII_MSR); - if ((regval & (MII_MSR_ANEGCOMPLETE | MII_MSR_LINKSTATUS)) != 0) - { - break; - } - - up_mdelay(50); - } - - /* Wait link */ - - if (!ez80emac_miipoll(priv, MII_MSR, MII_MSR_LINKSTATUS, false)) - { - nwarn("WARNING: Link is down!\n"); - priv->blinkok = false; - } - else - { - priv->blinkok = true; - } - - /* Read capable media type */ - - up_udelay(500); - advertise = ez80emac_miiread(priv, MII_ADVERTISE); - lpa = ez80emac_miiread(priv, MII_LPA); - - /* Check for 100BASETX full duplex */ - - if ((advertise & MII_ADVERTISE_100BASETXFULL) && - (lpa & MII_LPA_100BASETXFULL)) - { - ninfo("100BASETX full duplex\n"); - - regval = inp(EZ80_EMAC_CFG1); - regval |= EMAC_CFG1_FULLHD; /* Enable full duplex mode */ - outp(EZ80_EMAC_CFG1, regval); - - priv->b100mbs = true; - priv->bfullduplex = true; - } - - /* Check for 100BASETX half duplex */ - - else if ((advertise & MII_ADVERTISE_100BASETXHALF) && - (lpa & MII_LPA_100BASETXHALF)) - { - ninfo("100BASETX half duplex\n"); - regval = inp(EZ80_EMAC_CFG1); - regval &= ~EMAC_CFG1_FULLHD; /* Disable full duplex mode */ - outp(EZ80_EMAC_CFG1, regval); - priv->b100mbs = true; - priv->bfullduplex = false; - } - - /* Check for 10BASETX full duplex */ - - else if ((advertise & MII_ADVERTISE_10BASETXFULL) && - (lpa & MII_LPA_10BASETXFULL)) - { - ninfo("10BASETX full duplex\n"); - - regval = inp(EZ80_EMAC_CFG1); - regval |= EMAC_CFG1_FULLHD; /* Enable full duplex mode */ - outp(EZ80_EMAC_CFG1, regval); - - priv->b100mbs = false; - priv->bfullduplex = true; - } - - /* Check for 10BASETX half duplex */ - - else if ((advertise & MII_ADVERTISE_10BASETXHALF) && - (lpa & MII_LPA_10BASETXHALF)) - { - ninfo("10BASETX half duplex\n"); - - regval = inp(EZ80_EMAC_CFG1); - regval &= ~EMAC_CFG1_FULLHD; /* Disable full duplex mode */ - outp(EZ80_EMAC_CFG1, regval); - - priv->b100mbs = false; - priv->bfullduplex = false; - } - else - { - nwarn("WARNING: No valid connection; force 10Mbps half-duplex.\n"); - - regval = inp(EZ80_EMAC_CFG1); - regval &= ~EMAC_CFG1_FULLHD; /* Disable full duplex mode */ - outp(EZ80_EMAC_CFG1, regval); - priv->b100mbs = false; - priv->bfullduplex = false; - } - - /* Set MII control */ - - mcr = ez80emac_miiread(priv, MII_MCR); - if (priv->bfullduplex) - { - mcr |= MII_MCR_FULLDPLX; - } - else - { - mcr &= ~MII_MCR_FULLDPLX; - } - - if (priv->b100mbs) - { - mcr |= MII_MCR_SPEED100; - } - else - { - mcr &= ~MII_MCR_SPEED100; - } - - mcr |= MII_MCR_ANENABLE; - ez80emac_miiwrite(priv, MII_MCR, mcr); - - ninfo("MII registers (FIAD=%x)\n", CONFIG_EZ80_FIAD); - ninfo(" MII_MCR: %04x\n", ez80emac_miiread(priv, MII_MCR)); - ninfo(" MII_MSR: %04x\n", ez80emac_miiread(priv, MII_MSR)); - ninfo(" MII_PHYID1: %04x\n", ez80emac_miiread(priv, MII_PHYID1)); - ninfo(" MII_PHYID2: %04x\n", ez80emac_miiread(priv, MII_PHYID2)); - ninfo(" MII_ADVERTISE: %04x\n", ez80emac_miiread(priv, MII_ADVERTISE)); - ninfo(" MII_LPA: %04x\n", ez80emac_miiread(priv, MII_LPA)); - ninfo(" MII_EXPANSION: %04x\n", ez80emac_miiread(priv, MII_EXPANSION)); - ninfo("EMAC CFG1: %02x\n", inp(EZ80_EMAC_CFG1)); - return OK; -} -#endif - -/**************************************************************************** - * Function: ez80emac_machash - * - * Description: - * Given a MAC address, perform the CRC32 calculation and return the - * index and bit number for the multi-cast hash table. - * - * Input Parameters: - * priv - Reference to the driver state structure - * mac - The MAC address to add - * enable - true: Enable filtering on this address; false: disable - * - * Returned Value: - * None - * - ****************************************************************************/ - -#ifdef CONFIG_EZ80_MCFILTER -static void ez80emac_machash(FAR uint8_t *mac, FAR int *ndx, FAR int *bitno) -{ - uint32_t hash; - uint32_t crc32; - int i; - int j; - - /* Calculate the CRC32 value on the MAC address */ - - crc32 = 0xffffffff; - for (i = 0; i < 6; i++) - { - crc32 ^= (uint32_t)mac[i] & 0x0f; - for (j = 0; j < 4; j++) - { - if (crc32 & 1) - { - crc32 = (crc32 >> 1) ^ EMAC_CRCPOLY2; - } - else - { - crc32 >>= 1; - } - } - - crc32 ^= (uint32_t)mac[i] >> 4; - for (j = 0; j < 4; j++) - { - if (crc32 & 1) - { - crc32 = (crc32 >> 1) ^ EMAC_CRCPOLY2; - } - else - { - crc32 >>= 1; - } - } - } - - /* The normal CRC result would be the complement of crc32, - * the following calculates the EMAC hash value - * - * This loop changes the bit ordering the for bits [23:28] of - * the CRC32 value to -> [0:5] - */ - - crc32 &= 0x000001f8; - hash = 0; - - for (j = 31; j >= 23; j--) - { - hash = (hash << 1) + (crc32 & 1); - crc32 >>= 1; - } - - *ndx = (hash >> 3) & 7; - *bitno = hash & 7; -} -#endif - -/**************************************************************************** - * Function: ez80emac_transmit - * - * Description: - * Start hardware transmission. Called either from the txdone interrupt - * handling or from watchdog based polling. - * - * Input Parameters: - * priv - Reference to the driver state structure - * - * Returned Value: - * OK on success; a negated errno on failure - * - * Assumptions: - * - ****************************************************************************/ - -static int ez80emac_transmit(FAR struct ez80emac_driver_s *priv) -{ - FAR struct ez80emac_desc_s *txdesc; - FAR struct ez80emac_desc_s *txnext; - FAR uint8_t *psrc; - FAR uint8_t *pdest; - uint24_t len; - irqstate_t flags; - - /* Careful: This function can be called from outside of the interrupt - * handler and, therefore, may be suspended when debug output is generated! - */ - - ninfo("txnext=%p {%06x, %u, %04x} trp=%02x%02x\n", - priv->txnext, priv->txnext->np, priv->txnext->pktsize, - priv->txnext->stat, inp(EZ80_EMAC_TRP_H), inp(EZ80_EMAC_TRP_L)); - - /* Increment statistics */ - - flags = enter_critical_section(); - EMAC_STAT(priv, tx_packets); - - /* The current packet to be sent is txnext; Calculate the new txnext and - * set the ownership to host so that the EMAC does not try to transmit - * the next packet. - * - * The new txnext will be the current txnext plus the size of the - * descriptor header plus the size of the data to be transferred, aligned - * up to the next packet buffer size. NOTE: that there is no check to - * see if we have overran the EMAC buffer -- i.e., if the next txnext has - * not yet been transmitted. - */ - - txdesc = priv->txnext; - - len = EMAC_PKTBUF_ALIGN(priv->dev.d_len + SIZEOF_EMACSDESC); - txnext = (FAR struct ez80emac_desc_s *)((FAR uint8_t *)txdesc + len); - - /* Handle wraparound to the beginning of the TX region */ - - if ((uint8_t *)txnext + SIZEOF_EMACSDESC >= (FAR uint8_t *)priv->rxstart) - { - txnext = (FAR struct ez80emac_desc_s *) - ((FAR uint8_t *)priv->txstart + - ((FAR uint8_t *)txnext - (uint8_t *)priv->rxstart)); - } - - priv->txnext = txnext; - txnext->np = 0; - txnext->pktsize = 0; - txnext->stat = 0; /* Bit 15: 0=Host (eZ80 CPU) owns, 1=EMAC owns. */ - - /* Copy the data to the next packet in the Tx buffer - * (handling wraparound) - */ - - psrc = priv->dev.d_buf; - pdest = (FAR uint8_t *)txdesc + SIZEOF_EMACSDESC; - len = (FAR uint8_t *)priv->rxstart - pdest; - if (len >= priv->dev.d_len) - { - /* The entire packet will fit into the EMAC SRAM without wrapping */ - - memcpy(pdest, psrc, priv->dev.d_len); - } - else - { - /* Handle wrap to the beginning of the buffer */ - - memcpy(pdest, psrc, len); - memcpy(priv->txstart, &psrc[len], (priv->dev.d_len - len)); - } - - if (!priv->txhead) - { - /* There are no pending TX actions. This descriptor is the new head */ - - priv->txhead = txdesc; - } - - /* Then, give ownership of the descriptor to the hardware. It should - * perform the transmission on its next polling cycle. - */ - - txdesc->np = (uint24_t)priv->txnext; - txdesc->pktsize = priv->dev.d_len; - txdesc->stat = EMAC_TXDESC_OWNER; - - /* Enable the TX poll timer. The poll timer may already be running. In - * that case, this will force the hardware to poll again now - */ - - outp(EZ80_EMAC_PTMR, EMAC_PTMR); - leave_critical_section(flags); - - ninfo("txdesc=%p {%06x, %u, %04x}\n", - txdesc, txdesc->np, txdesc->pktsize, txdesc->stat); - ninfo("txnext=%p {%06x, %u, %04x} trp=%02x%02x\n", - txnext, txnext->np, txnext->pktsize, txnext->stat, - inp(EZ80_EMAC_TRP_H), inp(EZ80_EMAC_TRP_L)); - - /* Setup the TX timeout watchdog (perhaps restarting the timer) */ - - wd_start(&priv->txtimeout, EMAC_TXTIMEOUT, - ez80emac_txtimeout_expiry, (wdparm_t)priv); - return OK; -} - -/**************************************************************************** - * Function: ez80emac_txpoll - * - * Description: - * The transmitter is available, check if the network has any outgoing - * packets ready to send. This is a callback from devif_poll(). - * devif_poll() may be called: - * - * 1. When the preceding TX packet send is complete, - * 2. When the preceding TX packet send timesout and the interface is reset - * 3. During normal TX polling - * - * Input Parameters: - * dev - Reference to the NuttX driver state structure - * - * Returned Value: - * OK on success; a negated errno on failure - * - * Assumptions: - * - ****************************************************************************/ - -static int ez80emac_txpoll(FAR struct net_driver_s *dev) -{ - FAR struct ez80emac_driver_s *priv = - (FAR struct ez80emac_driver_s *)dev->d_private; - - /* Send the packet. ez80emac_transmit() will return zero if the - * packet was successfully handled. - */ - - return ez80emac_transmit(priv); -} - -/**************************************************************************** - * Function: ez80emac_rwp - * - * Description: - * Get the eZ80 RWP value - * - * Input Parameters: - * None - * - * Returned Value: - * The current RWP value expressed as a pointer to a descriptor - * - ****************************************************************************/ - -static inline FAR struct ez80emac_desc_s *ez80emac_rwp(void) -{ - return (FAR struct ez80emac_desc_s *) - (ETH_RAMADDR + - ((uint24_t)inp(EZ80_EMAC_RWP_H) << 8) + (uint24_t)inp(EZ80_EMAC_RWP_L)); -} - -/**************************************************************************** - * Function: ez80emac_rrp - * - * Description: - * Get the eZ80 RRP value - * - * Input Parameters: - * None - * - * Returned Value: - * The current RRP value expressed as a pointer to a descriptor - * - ****************************************************************************/ - -static inline FAR struct ez80emac_desc_s *ez80emac_rrp(void) -{ - return (FAR struct ez80emac_desc_s *) - (ETH_RAMADDR + - ((uint24_t)inp(EZ80_EMAC_RRP_H) << 8) + (uint24_t)inp(EZ80_EMAC_RRP_L)); -} - -/**************************************************************************** - * Function: ez80emac_receive - * - * Description: - * Process received packets pending in the RX buffer - * - * Input Parameters: - * priv - Driver data instance - * - * Returned Value: - * 0: Success, but nothing received - * >0: Success, number of packets received - * <0: ERROR, negated error number - * - * Returned Value: - * Interrupts are disabled - * - ****************************************************************************/ - -static int ez80emac_receive(FAR struct ez80emac_driver_s *priv) -{ - FAR struct ez80emac_desc_s *rxdesc = priv->rxnext; - FAR struct ez80emac_desc_s *rwp; - FAR uint8_t *psrc; - FAR uint8_t *pdest; - int pktlen; - int npackets; - uint8_t pktgood; - - /* The RRP register points to where the next Receive packet is read from. - * The read-only EMAC Receive Write Pointer (RWP) register reports the - * current RxDMA Receive Write pointer. The RxDMA block uses the RRP[12:5] - * to compare to RWP[12:5] for determining how many buffers remain. The - * result is the BLKSLFT register. - */ - - rwp = ez80emac_rwp(); - ninfo("rxnext=%p {%06x, %u, %04x} rrp=%p rwp=%p blkslft=%02x%02x\n", - rxdesc, rxdesc->np, rxdesc->pktsize, rxdesc->stat, - ez80emac_rrp(), rwp, - inp(EZ80_EMAC_BLKSLFT_H), inp(EZ80_EMAC_BLKSLFT_L)); - - /* The RxDMA reads the data from the RxFIFO and stores it in the EMAC - * memory Receive buffer. When the end of the packet is detected, the - * RxDMA reads the next two bytes from the RxFIFO and writes them into - * the Rx descriptor status LSB and MSB. The packet length counter is - * stored into the descriptor table packet length field, the descriptor - * table next pointer is written into the Rx descriptor table and finally - * the Rx_DONE_STAT bit in the EMAC Interrupt Status Register register is - * set to 1. - */ - - npackets = 0; - while (rxdesc != rwp) - { - DEBUGASSERT(rxdesc == ez80emac_rrp()); - EMAC_STAT(priv, rx_packets); - - if ((rxdesc->stat & EMAC_RXDESC_OK) != 0) - { - /* We have a good packet. Check if the packet is a valid size - * for the network buffer configuration. - */ - - pktgood = 1; - - if (rxdesc->pktsize > CONFIG_NET_ETH_PKTSIZE) - { - ninfo("Truncated oversize RX pkt: %d->%d\n", - rxdesc->pktsize, CONFIG_NET_ETH_PKTSIZE); - pktlen = CONFIG_NET_ETH_PKTSIZE; - } - else - { - pktlen = rxdesc->pktsize; - } - - /* Copy the data data from the hardware to priv->dev.d_buf */ - - psrc = (FAR uint8_t *)priv->rxnext + SIZEOF_EMACSDESC; - pdest = priv->dev.d_buf; - - /* Check for wraparound */ - - if ((FAR uint8_t *)(psrc + pktlen) > (FAR uint8_t *)priv->rxendp1) - { - int nbytes = (int)((FAR uint8_t *)priv->rxendp1 - - (FAR uint8_t *)psrc); - - ninfo("RX wraps after %d bytes\n", nbytes + SIZEOF_EMACSDESC); - - memcpy(pdest, psrc, nbytes); - memcpy(&pdest[nbytes], priv->rxstart, pktlen - nbytes); - } - else - { - memcpy(pdest, psrc, pktlen); - } - - /* Set the amount of data in priv->dev.d_len */ - - priv->dev.d_len = pktlen; - } - else - { - /* The packet is bad, but the Rx descriptor reclaim still needs - * to be done. Account for the bad packet here, where rxdesc is - * still valid. - */ - - ninfo("Skipping bad RX pkt: %04x\n", rxdesc->stat); - EMAC_STAT(priv, rx_errors); - EMAC_STAT(priv, rx_nok); - pktgood = 0; - } - - /* Reclaim the Rx descriptor */ - - priv->rxnext = (FAR struct ez80emac_desc_s *)rxdesc->np; - - rxdesc->np = 0; - rxdesc->pktsize = 0; - rxdesc->stat = 0; - - /* Update pointers */ - - rxdesc = priv->rxnext; - rwp = ez80emac_rwp(); - - /* Update the RRP to match our rxnext pointer: "For the hardware flow - * control to function properly, the software must update the hardware - * RRP (EmacRrp) pointer whenever the software version is updated. - * The RxDMA uses RWP and the RRP to determine how many packets remain - * in the Rx buffer. - */ - - outp(EZ80_EMAC_RRP_L, (uint8_t)((uint24_t)rxdesc & 0xff)); - outp(EZ80_EMAC_RRP_H, (uint8_t)(((uint24_t)rxdesc >> 8) & 0xff)); - - ninfo("rxnext=%p {%06x, %u, %04x} rrp=%p rwp=%p blkslft=%02x%02x\n", - rxdesc, rxdesc->np, rxdesc->pktsize, rxdesc->stat, - ez80emac_rrp(), rwp, - inp(EZ80_EMAC_BLKSLFT_H), inp(EZ80_EMAC_BLKSLFT_L)); - - /* That's as far as we go processing bad packets */ - - if (pktgood == 0) - { - continue; - } - -#ifdef CONFIG_NET_PKT - /* When packet sockets are enabled, feed the frame into the tap */ - - pkt_input(&priv->dev); -#endif - - /* We only accept IP packets of the configured type and ARP packets */ - -#ifdef CONFIG_NET_IPv4 - if (BUF->type == HTONS(ETHTYPE_IP)) - { - ninfo("IPv4 frame\n"); - - /* Receive an IPv4 packet from the network device */ - - EMAC_STAT(priv, rx_ip); - ipv4_input(&priv->dev); - - /* If the above function invocation resulted in data that should be - * sent out on the network, the field d_len will set to a value > - * 0. - */ - - if (priv->dev.d_len > 0) - { - /* And send the packet */ - - ez80emac_transmit(priv); - } - } - else -#endif -#ifdef CONFIG_NET_IPv6 - if (BUF->type == HTONS(ETHTYPE_IP6)) - { - ninfo("IPv6 frame\n"); - - /* Give the IPv6 packet to the network layer */ - - EMAC_STAT(priv, rx_ip); - ipv6_input(&priv->dev); - - /* If the above function invocation resulted in data that should - * be sent out on the network, the field d_len will set to a - * value > 0. - */ - - if (priv->dev.d_len > 0) - { - /* And send the packet */ - - ez80emac_transmit(priv); - } - } - else -#endif -#ifdef CONFIG_NET_ARP - if (BUF->type == HTONS(ETHTYPE_ARP)) - { - ninfo("ARP packet received (%02x)\n", BUF->type); - EMAC_STAT(priv, rx_arp); - - arp_input(&priv->dev); - - /* If the above function invocation resulted in data that should be - * sent out on the network, the field d_len will set to a value > - * 0. - */ - - if (priv->dev.d_len > 0) - { - ez80emac_transmit(priv); - } - } - else -#endif - { - ninfo("Unsupported packet type dropped (%02x)\n", BUF->type); - EMAC_STAT(priv, rx_dropped); - } - - npackets++; - } - - return npackets; -} - -/**************************************************************************** - * Function: ez80emac_txinterrupt_work - * - * Description: - * Perform Tx interrupt related work from the worker thread - * - * Input Parameters: - * arg - The argument passed when work_queue() was called. - * - * Returned Value: - * OK on success - * - * Assumptions: - * The network is locked. - * - ****************************************************************************/ - -static void ez80emac_txinterrupt_work(FAR void *arg) -{ - FAR struct ez80emac_driver_s *priv = (FAR struct ez80emac_driver_s *)arg; - FAR struct ez80emac_desc_s *txhead = priv->txhead; - uint8_t istat; - - /* Process pending Ethernet Tx interrupts */ - - net_lock(); - - /* EMAC Tx interrupts: - * - * EMAC_ISTAT_TXDONE - Bit 0: 1=Transmit done interrupt - * Denotes when packet transmission is complete. - * EMAC_ISTAT_TXCF - Bit 1: 1=Transmit control frame interrupt - * Denotes when control frame transmission is complete. - */ - - /* Get and clear Tx interrupt status bits */ - - istat = inp(EZ80_EMAC_ISTAT) & EMAC_ISTAT_TXEVENTS; - outp(EZ80_EMAC_ISTAT, istat); - - EMAC_STAT(priv, tx_int); - - /* All events are packet/control frame transmit complete events */ - - ninfo("txhead=%p {%06x, %u, %04x} trp=%02x%02x istat=%02x\n", - txhead, txhead->np, txhead->pktsize, txhead->stat, - inp(EZ80_EMAC_TRP_H), inp(EZ80_EMAC_TRP_L), istat); - - /* Handle all packets in the list that are no longer owned by hardware */ - - while (txhead && (txhead->stat & EMAC_TXDESC_OWNER) == 0) - { - if ((txhead->stat & EMAC_TXDESC_ABORT) != 0) - { - nwarn("WARNING: Descriptor %p aborted {%06x, %u, %04x} " - "trp=%02x%02x\n", - txhead, txhead->np, txhead->pktsize, txhead->stat, - inp(EZ80_EMAC_TRP_H), inp(EZ80_EMAC_TRP_L)); - - EMAC_STAT(priv, tx_errors); - EMAC_STAT(priv, tx_abterrors); - } - - /* Get the address of the next Tx descriptor in the list (if any) */ - - txhead = (FAR struct ez80emac_desc_s *)txhead->np; - if (txhead) - { - ninfo("txhead=%p {%06x, %u, %04x} trp=%02x%02x\n", - txhead, txhead->np, txhead->pktsize, txhead->stat, - inp(EZ80_EMAC_TRP_H), inp(EZ80_EMAC_TRP_L)); - } - } - - /* Save the new head. If it is NULL, then we have read all the way to - * the terminating description with np==NULL. - */ - - priv->txhead = txhead; - if (!priv->txhead) - { - ninfo("No pending Tx.. Stopping XMIT function.\n"); - - /* Stop the Tx poll timer. (It will get restarted when we have - * something to send - */ - - outp(EZ80_EMAC_PTMR, 0); - - /* Reset the transmit function. That should force the TRP to be - * the same as TDLP which is then set to txstart. - */ - -#if 0 // Seems to reset RWP as well ??? - priv->txnext = priv->txstart; - - regval = inp(EZ80_EMAC_RST); - regval |= EMAC_RST_HRTFN; - outp(EZ80_EMAC_RST, regval); - regval &= ~EMAC_RST_HRTFN; - outp(EZ80_EMAC_RST, regval); -#endif - - /* Cancel any pending the TX timeout */ - - wd_cancel(&priv->txtimeout); - } - - net_unlock(); - - /* Re-enable Ethernet Tx interrupts */ - - outp(EZ80_EMAC_IEN, EMAC_EIN_HANDLED); /* Enable all interrupts */ -} - -/**************************************************************************** - * Function: ez80emac_txinterrupt - * - * Description: - * Process Tx-related interrupt events - * - * Input Parameters: - * irq - Number of the IRQ that generated the interrupt - * context - Interrupt register state save info (architecture-specific) - * - * Returned Value: - * OK on success - * - * Assumptions: - * - ****************************************************************************/ - -static int ez80emac_txinterrupt(int irq, FAR void *context, FAR void *arg) -{ - FAR struct ez80emac_driver_s *priv = &g_emac; - uint8_t istat; - - /* Disable further Ethernet Tx interrupts. Because Ethernet interrupts are - * also disabled if the TX timeout event occurs, there can be no race - * condition here. - */ - - outp(EZ80_EMAC_IEN, 0); /* Disable all interrupts */ - - /* Determine if a TX transfer just completed */ - - istat = inp(EZ80_EMAC_ISTAT); - if ((istat & EMAC_ISTAT_TXDONE) != 0) - { - /* If a TX transfer just completed, then cancel the TX timeout so - * there will be no race condition between any subsequent timeout - * expiration and the deferred interrupt processing. - */ - - wd_cancel(&priv->txtimeout); - } - - /* Schedule to perform the Tx interrupt processing on the worker thread. */ - - work_queue(ETHWORK, &priv->txwork, ez80emac_txinterrupt_work, priv, 0); - - return OK; -} - -/**************************************************************************** - * Function: ez80emac_rxinterrupt_work - * - * Description: - * Perform Rx interrupt related work from the worker thread - * - * Input Parameters: - * arg - The argument passed when work_queue() was called. - * - * Returned Value: - * OK on success - * - * Assumptions: - * The network is locked. - * - ****************************************************************************/ - -static void ez80emac_rxinterrupt_work(FAR void *arg) -{ - FAR struct ez80emac_driver_s *priv = (FAR struct ez80emac_driver_s *)arg; - uint8_t istat; - - /* Process pending Ethernet Rx interrupts */ - - net_lock(); - - /* EMAC Rx interrupts: - * - * EMAC_ISTAT_RXDONE - Bit 3: 1=Receive done interrupt - * Denotes when packet reception is complete. - * EMAC_ISTAT_RXPCF - Bit 4: 1=Receive pause control frame interrupt - * Denotes when pause control frame reception is complete. - * EMAC_ISTAT_RXCF - Bit 5: 1=Receive control frame interrupt - * Denotes when control frame reception is complete. - */ - - /* Get and clear Rx interrupt status bits */ - - istat = inp(EZ80_EMAC_ISTAT) & EMAC_ISTAT_RXEVENTS; - outp(EZ80_EMAC_ISTAT, istat); - - EMAC_STAT(priv, rx_int); - - /* Process any RX packets pending the RX buffer */ - - ez80emac_receive(priv); - net_unlock(); - - /* Re-enable Ethernet Rx interrupts */ - - outp(EZ80_EMAC_IEN, EMAC_EIN_HANDLED); /* Enable all interrupts */ -} - -/**************************************************************************** - * Function: ez80emac_rxinterrupt - * - * Description: - * Process Rx-related interrupt events - * - * Input Parameters: - * irq - Number of the IRQ that generated the interrupt - * context - Interrupt register state save info (architecture-specific) - * - * Returned Value: - * OK on success - * - * Assumptions: - * - ****************************************************************************/ - -static int ez80emac_rxinterrupt(int irq, FAR void *context, FAR void *arg) -{ - FAR struct ez80emac_driver_s *priv = &g_emac; - - /* Disable further Ethernet Rx interrupts. Because Ethernet interrupts are - * also disabled if the TX timeout event occurs, there can be no race - * condition here. - */ - - outp(EZ80_EMAC_IEN, 0); /* Disable all interrupts */ - - /* Schedule to perform the Rx interrupt processing on the worker thread. */ - - work_queue(ETHWORK, &priv->rxwork, ez80emac_rxinterrupt_work, priv, 0); - return OK; -} - -/**************************************************************************** - * Function: ez80emac_sysinterrupt_work - * - * Description: - * Perform system interrupt related work from the worker thread - * - * Input Parameters: - * arg - The argument passed when work_queue() was called. - * - * Returned Value: - * OK on success - * - * Assumptions: - * The network is locked. - * - ****************************************************************************/ - -static void ez80emac_sysinterrupt_work(FAR void *arg) -{ - FAR struct ez80emac_driver_s *priv = (FAR struct ez80emac_driver_s *)arg; - uint8_t istat; - - /* Process pending system interrupts */ - - net_lock(); - - /* EMAC system interrupts : - * - * EMAC_ISTAT_TXFSMERR - Bit 7: 1=Transmit state machine error interrupt - * A Transmit State Machine Error should never occur. However, if this - * bit is set, the entire transmitter module must be reset. - * EMAC_ISTAT_MGTDONE - Bit 6: 1=MII Mgmt done interrupt - * This bit is set when communicating to the PHY over the MII during - * a Read or Write operation. - * EMAC_ISTAT_RXOVR - Bit 2: 1=Receive overrun interrupt - * If this bit is set, all incoming packets are ignored until - * this bit is cleared by software. - */ - - EMAC_STAT(priv, sys_int); - - /* Get and clear system interrupt status bits */ - - istat = inp(EZ80_EMAC_ISTAT) & EMAC_ISTAT_SYSEVENTS; - outp(EZ80_EMAC_ISTAT, istat); - - /* Check for transmit state machine error */ - - if ((istat & EMAC_ISTAT_TXFSMERR) != 0) - { - nwarn("WARNING: Tx FSMERR txhead=%p {%06x, %u, %04x} trp=%02x%02x " - "istat=%02x\n", - priv->txhead, priv->txhead->np, priv->txhead->pktsize, - priv->txhead->stat, inp(EZ80_EMAC_TRP_H), inp(EZ80_EMAC_TRP_L), - istat); - - /* Increment statistics */ - - EMAC_STAT(priv, tx_errors); - EMAC_STAT(priv, tx_fsmerrors); - - /* Really need to reset the transmitter module here */ - } - - /* Check for Rx overrun error */ - - if ((istat & EMAC_ISTAT_RXOVR) != 0) - { - nwarn("WARNING: Rx OVR rxnext=%p {%06x, %u, %04x} " - "rrp=%02x%02x rwp=%02x%02x blkslft=%02x%02x istat=%02x\n", - priv->rxnext, priv->rxnext->np, priv->rxnext->pktsize, - priv->rxnext->stat, - inp(EZ80_EMAC_RRP_H), inp(EZ80_EMAC_RRP_L), - inp(EZ80_EMAC_RWP_H), inp(EZ80_EMAC_RWP_L), - inp(EZ80_EMAC_BLKSLFT_H), inp(EZ80_EMAC_BLKSLFT_L), - istat); - - /* Increment statistics */ - - EMAC_STAT(priv, rx_errors); - EMAC_STAT(priv, rx_ovrerrors); - } - - net_unlock(); - - /* Re-enable Ethernet system interrupts */ - - outp(EZ80_EMAC_IEN, EMAC_EIN_HANDLED); /* Enable all interrupts */ -} - -/**************************************************************************** - * Function: ez80emac_sysinterrupt - * - * Description: - * System interrupt handler - * - * Input Parameters: - * irq - Number of the IRQ that generated the interrupt - * context - Interrupt register state save info (architecture-specific) - * - * Returned Value: - * OK on success - * - * Assumptions: - * - ****************************************************************************/ - -static int ez80emac_sysinterrupt(int irq, FAR void *context, FAR void *arg) -{ - FAR struct ez80emac_driver_s *priv = &g_emac; - - /* Disable further Ethernet interrupts. Because Ethernet interrupts are - * also disabled if the TX timeout event occurs, there can be no race - * condition here. - */ - - outp(EZ80_EMAC_IEN, 0); - - /* Schedule to perform the interrupt processing on the worker thread. */ - - work_queue(ETHWORK, &priv->syswork, ez80emac_sysinterrupt_work, priv, 0); - return OK; -} - -/**************************************************************************** - * Function: ez80emac_txtimeout_work - * - * Description: - * Perform TX timeout related work from the worker thread - * - * Input Parameters: - * arg - The argument passed when work_queue() as called. - * - * Returned Value: - * OK on success - * - * Assumptions: - * The network is locked. - * - ****************************************************************************/ - -static void ez80emac_txtimeout_work(FAR void *arg) -{ - FAR struct ez80emac_driver_s *priv = (FAR struct ez80emac_driver_s *)arg; - irqstate_t flags; - - /* Process pending Ethernet interrupts */ - - net_lock(); - - /* Increment statistics and dump debug info */ - - EMAC_STAT(priv, tx_errors); - EMAC_STAT(priv, tx_timeouts); - - /* Then reset the hardware */ - - flags = enter_critical_section(); - ez80emac_ifdown(&priv->dev); - ez80emac_ifup(&priv->dev); - leave_critical_section(flags); - - /* Then poll the network for new XMIT data */ - - devif_poll(&priv->dev, ez80emac_txpoll); - net_unlock(); -} - -/**************************************************************************** - * Function: ez80emac_txtimeout_expiry - * - * Description: - * Our TX watchdog timed out. Called from the timer interrupt handler. - * The last TX never completed. Reset the hardware and start again. - * - * Input Parameters: - * arg - The argument - * - * Returned Value: - * None - * - * Assumptions: - * Global interrupts are disabled by the watchdog logic. - * - ****************************************************************************/ - -static void ez80emac_txtimeout_expiry(wdparm_t arg) -{ - FAR struct ez80emac_driver_s *priv = (FAR struct ez80emac_driver_s *)arg; - - /* Disable further Ethernet Tx interrupts. This will prevent some race - * conditions with interrupt work. There is still a potential race - * condition with interrupt work that is already queued and in progress. - */ - - outp(EZ80_EMAC_IEN, 0); - - /* Schedule to perform the TX timeout processing on the worker thread. */ - - work_queue(ETHWORK, &priv->txwork, ez80emac_txtimeout_work, priv, 0); -} - -/**************************************************************************** - * Function: ez80emac_ifup - * - * Description: - * NuttX Callback: Bring up the Ethernet interface when an IP address is - * provided - * - * Input Parameters: - * dev - Reference to the NuttX driver state structure - * - * Returned Value: - * None - * - * Assumptions: - * - ****************************************************************************/ - -static int ez80emac_ifup(FAR struct net_driver_s *dev) -{ - FAR struct ez80emac_driver_s *priv = - (FAR struct ez80emac_driver_s *)dev->d_private; - uint8_t regval; - int ret; - - ninfo("Bringing up: MAC %02x:%02x:%02x:%02x:%02x:%02x\n", - dev->d_mac.ether.ether_addr_octet[0], - dev->d_mac.ether.ether_addr_octet[1], - dev->d_mac.ether.ether_addr_octet[2], - dev->d_mac.ether.ether_addr_octet[3], - dev->d_mac.ether.ether_addr_octet[4], - dev->d_mac.ether.ether_addr_octet[5]); - ninfo(" IP %u.%u.%u.%u\n", - ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr), - ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr)); - - /* Bring up the interface -- Must be down right now */ - - DEBUGASSERT((inp(EZ80_EMAC_CFG4) & EMAC_CFG4_RXEN) == 0); - - /* Reset hardware */ - - ret = ez80_emacinitialize(); - if (ret == 0) - { - /* EMAC_AFR_BC - Accept broadcast messages - * EMAC_AFR_MC - Accept any multicast message - * EMAC_AFR_QMC - Accept only qualified multicast messages - */ - -#ifdef CONFIG_EZ80_MCFILTER - outp(EZ80_EMAC_AFR, EMAC_AFR_BC | EMAC_AFR_QMC | EMAC_AFR_MC); -#else - outp(EZ80_EMAC_AFR, EMAC_AFR_BC | EMAC_AFR_MC); -#endif - - /* Set the MAC address */ - - outp(EZ80_EMAC_STAD_0, priv->dev.d_mac.ether.ether_addr_octet[0]); - outp(EZ80_EMAC_STAD_1, priv->dev.d_mac.ether.ether_addr_octet[1]); - outp(EZ80_EMAC_STAD_2, priv->dev.d_mac.ether.ether_addr_octet[2]); - outp(EZ80_EMAC_STAD_3, priv->dev.d_mac.ether.ether_addr_octet[3]); - outp(EZ80_EMAC_STAD_4, priv->dev.d_mac.ether.ether_addr_octet[4]); - outp(EZ80_EMAC_STAD_5, priv->dev.d_mac.ether.ether_addr_octet[5]); - - /* Enable/disable promiscuous mode */ - - regval = inp(EZ80_EMAC_AFR); -#if defined(CONFIG_EZ80_EMACPROMISC) - regval |= EMAC_AFR_PROM; -#else - regval &= ~EMAC_AFR_PROM; -#endif - outp(EZ80_EMAC_AFR, regval); - - /* Enable Rx */ - - regval = inp(EZ80_EMAC_CFG4); - regval |= EMAC_CFG4_RXEN; - outp(EZ80_EMAC_CFG4, regval); - - /* Turn on interrupts */ - - outp(EZ80_EMAC_ISTAT, 0xff); /* Clear all pending interrupts */ - outp(EZ80_EMAC_IEN, EMAC_EIN_HANDLED); /* Enable all interrupts */ - - /* Enable the Ethernet interrupts */ - - priv->bifup = true; - outp(EZ80_EMAC_IEN, EMAC_EIN_HANDLED); /* Enable all interrupts */ - ret = OK; - } - - return ret; -} - -/**************************************************************************** - * Function: ez80emac_ifdown - * - * Description: - * NuttX Callback: Stop the interface. - * - * Input Parameters: - * dev - Reference to the NuttX driver state structure - * - * Returned Value: - * None - * - * Assumptions: - * - ****************************************************************************/ - -static int ez80emac_ifdown(FAR struct net_driver_s *dev) -{ - FAR struct ez80emac_driver_s *priv = - (FAR struct ez80emac_driver_s *)dev->d_private; - irqstate_t flags; - uint8_t regval; - - /* Disable the Ethernet interrupt */ - - flags = enter_critical_section(); - outp(EZ80_EMAC_IEN, 0); /* Disable all interrupts */ - - /* Cancel the TX poll timer and TX timeout timers */ - - wd_cancel(&priv->txtimeout); - - /* Disable Rx */ - - regval = inp(EZ80_EMAC_CFG4); - regval &= ~EMAC_CFG4_RXEN; - outp(EZ80_EMAC_CFG4, regval); - - /* Disable the Tx poll timer */ - - outp(EZ80_EMAC_PTMR, 0); - - priv->bifup = false; - leave_critical_section(flags); - return OK; -} - -/**************************************************************************** - * Function: ez80emac_txavail_work - * - * Description: - * Perform an out-of-cycle poll on the worker thread. - * - * Input Parameters: - * arg - Reference to the NuttX driver state structure (cast to void*) - * - * Returned Value: - * None - * - * Assumptions: - * Called on the higher priority worker thread. - * - ****************************************************************************/ - -static void ez80emac_txavail_work(FAR void *arg) -{ - FAR struct ez80emac_driver_s *priv = (FAR struct ez80emac_driver_s *)arg; - - /* Ignore the notification if the interface is not yet up */ - - net_lock(); - if (priv->bifup) - { - /* Check if there is room in the hardware to hold another packet. */ - - /* If so, then poll the network for new XMIT data */ - - devif_poll(&priv->dev, ez80emac_txpoll); - } - - net_unlock(); -} - -/**************************************************************************** - * Function: ez80emac_txavail - * - * Description: - * Driver callback invoked when new TX data is available. This is a - * stimulus perform an out-of-cycle poll and, thereby, reduce the TX - * latency. - * - * Input Parameters: - * dev - Reference to the NuttX driver state structure - * - * Returned Value: - * None - * - * Assumptions: - * Called in normal user mode - * - ****************************************************************************/ - -static int ez80emac_txavail(FAR struct net_driver_s *dev) -{ - FAR struct ez80emac_driver_s *priv = - (FAR struct ez80emac_driver_s *)dev->d_private; - - /* Is our single work structure available? It may not be if there are - * pending interrupt actions and we will have to ignore the Tx - * availability action. - */ - - if (work_available(&priv->syswork)) - { - /* Schedule to serialize the poll on the worker thread. */ - - work_queue(ETHWORK, &priv->syswork, ez80emac_txavail_work, priv, 0); - } - - return OK; -} - -/**************************************************************************** - * Function: ez80emac_addmac - * - * Description: - * NuttX Callback: Add the specified MAC address to the hardware multicast - * address filtering - * - * Input Parameters: - * dev - Reference to the NuttX driver state structure - * mac - The MAC address to be added - * - * Returned Value: - * None - * - * Assumptions: - * - ****************************************************************************/ - -#ifdef CONFIG_NET_MCASTGROUP -static int ez80emac_addmac(FAR struct net_driver_s *dev, - FAR const uint8_t *mac) -{ - FAR struct ez80emac_driver_s *priv = - (FAR struct ez80emac_driver_s *)dev->d_private; - - /* Add the MAC address to the hardware multicast routing table */ - - /* MISSING LOGIC!!! */ - - return OK; -} -#endif - -/**************************************************************************** - * Function: ez80emac_rmmac - * - * Description: - * NuttX Callback: Remove the specified MAC address from the hardware - * multicast address filtering - * - * Input Parameters: - * dev - Reference to the NuttX driver state structure - * mac - The MAC address to be removed - * - * Returned Value: - * None - * - * Assumptions: - * - ****************************************************************************/ - -#ifdef CONFIG_NET_MCASTGROUP -static int ez80emac_rmmac(FAR struct net_driver_s *dev, - FAR const uint8_t *mac) -{ - FAR struct ez80emac_driver_s *priv = - (FAR struct ez80emac_driver_s *)dev->d_private; - - /* Add the MAC address to the hardware multicast routing table */ - - /* MISSING LOGIC!!! */ - - return OK; -} -#endif - -/**************************************************************************** - * Function: ez80emac_initialize - * - * Description: - * Initialize the Ethernet driver - * - * Input Parameters: - * None - * - * Returned Value: - * OK on success; Negated errno on failure. - * - ****************************************************************************/ - -static int ez80_emacinitialize(void) -{ - FAR struct ez80emac_driver_s *priv = &g_emac; - uint24_t addr; - uint8_t regval; - int ret; - - /* Reset the EMAC hardware */ - - outp(EZ80_EMAC_IEN, 0); /* Disable all interrupts */ - outp(EZ80_EMAC_RST, 0); /* Reset everything */ - outp(EZ80_EMAC_RST, 0xff); - outp(EZ80_EMAC_RST, 0); - - /* The ez80 has a fixed 8kb of EMAC SRAM memory (+ 8kb of - * general purpose SRAM) located in the high address space. - * Configure the GP and EMAC SRAM. - * - * EZ80_RAM_CTL and EZ80_RAM_ADDR_U where configured by ez80 start-up - * logic. We need only enable EMAC RAM here. - */ - - outp(EZ80_RAM_CTL, (RAMCTL_ERAMEN | RAMCTL_GPRAMEN)); - outp(EZ80_EMAC_BP_U, (ETH_RAMADDR >> 16)); - - /* The EMAC memory is broken into two parts: the Tx buffer and the Rx - * buffer. - * - * The TX buffer lies at the beginning of the EMAC memory. - * The Transmit Lower Boundary Pointer Register, TLBP, holds the - * least significant 12-bits of the starting address of the Tx buffer. - * The Transmit Write Pointer, TRP, will be set to the TLBP. - */ - - addr = ETH_RAMADDR; - outp(EZ80_EMAC_TLBP_L, (uint8_t)(addr & 0xff)); - outp(EZ80_EMAC_TLBP_H, (uint8_t)((addr >> 8) & 0xff)); - - priv->txstart = (FAR struct ez80emac_desc_s *)(addr); - priv->txnext = priv->txstart; - priv->txhead = NULL; - - priv->txnext->np = 0; - priv->txnext->pktsize = 0; - priv->txnext->stat = 0; - - ninfo("txnext=%p {%06x, %u, %04x} tlbp=%02x%02x trp=%02x%02x\n", - priv->txnext, priv->txnext->np, priv->txnext->pktsize, - priv->txnext->stat, inp(EZ80_EMAC_TLBP_H), inp(EZ80_EMAC_TLBP_L), - inp(EZ80_EMAC_TRP_H), inp(EZ80_EMAC_TRP_L)); - - /* The Boundary Pointer Register, EMAC_BP, points to the start of the Rx - * buffer (end of Tx buffer + 1). Only bits EMAC_BP[12:5] of are - * write-able. - */ - - addr += EMAC_TXBUFSIZE; - outp(EZ80_EMAC_BP_L, (uint8_t)(addr & 0xff)); - outp(EZ80_EMAC_BP_H, (uint8_t)((addr >> 8) & 0xff)); - - priv->rxstart = (FAR struct ez80emac_desc_s *)(addr); - priv->rxnext = priv->rxstart; - - priv->rxnext->np = 0; - priv->rxnext->pktsize = 0; - priv->rxnext->stat = 0; - - ninfo("rxnext=%p {%06x, %u, %04x} bp=%02x%02x\n", - priv->rxnext, priv->rxnext->np, priv->rxnext->pktsize, - priv->rxnext->stat, inp(EZ80_EMAC_BP_H), inp(EZ80_EMAC_BP_L)); - - /* The EMAC Receive Read Pointer (RRP) register(s) should be initialized - * to the start of the Receive buffer. The RRP register points to where the - * next Receive packet is read from. The EMAC_BP[12:5] is loaded into this - * register whenever the EMAC_RST [(HRRFN) is set to 1. The RxDMA block - * uses the RRP[12:5] to compare to RWP[12:5] for determining how many - * buffers remain. The result equates to the BLKSLFT register. - * - * The read-only EMAC Receive Write Pointer (RWP) registers report the - * current RxDMA Receive Write pointer. This pointer gets initialized to - * EMAC_BP whenever EMAC_RST bits SRST or HRRTN are set. Because the size - * of the packet is limited to a minimum of 32 bytes, the last five bits - * are always zero. - */ - - outp(EZ80_EMAC_RRP_L, (uint8_t)(addr & 0xff)); - outp(EZ80_EMAC_RRP_H, (uint8_t)((addr >> 8) & 0xff)); - - ninfo("rrp=%02x%02x rwp=%02x%02x\n", - inp(EZ80_EMAC_RRP_H), inp(EZ80_EMAC_RRP_L), - inp(EZ80_EMAC_RWP_H), inp(EZ80_EMAC_RWP_L)); - - /* The Receive High Boundary Pointer Register, EMAC_RHBP, points to the end - * of the Rx buffer + 1. Only bits EMAC_RHBP[12:5] are write-able. - */ - - addr += EMAC_RXBUFSIZE; - outp(EZ80_EMAC_RHBP_L, (uint8_t)(addr & 0xff)); - outp(EZ80_EMAC_RHBP_H, (uint8_t)((addr >> 8) & 0xff)); - priv->rxendp1 = (FAR struct ez80emac_desc_s *)addr; - - ninfo("rxendp1=%p rhbp=%02x%02x\n", - priv->rxendp1, - inp(EZ80_EMAC_RHBP_H), inp(EZ80_EMAC_RHBP_L)); - - /* The Tx and Receive buffers are divided into packet buffers of either - * 256, 128, 64, or 32 bytes selected by BufSize register bits 7 and 6. - */ - - outp(EZ80_EMAC_BUFSZ, EMAC_BUFSZ); - ninfo("bufsz=%02x blksleft=%02x%02x\n", - inp(EZ80_EMAC_BUFSZ), inp(EZ80_EMAC_BLKSLFT_H), - inp(EZ80_EMAC_BLKSLFT_L)); - - /* Software reset */ - - outp(EZ80_EMAC_ISTAT, 0xff); /* Clear any pending interrupts */ - regval = inp(EZ80_EMAC_RST); - regval |= EMAC_RST_SRST; - outp(EZ80_EMAC_RST, regval); - regval &= ~EMAC_RST_SRST; - outp(EZ80_EMAC_RST, regval); - - ninfo("After soft reset: rwp=%02x%02x trp=%02x%02x\n", - inp(EZ80_EMAC_RWP_H), inp(EZ80_EMAC_RWP_L), - inp(EZ80_EMAC_TRP_H), inp(EZ80_EMAC_TRP_L)); - - /* Select the fastest MDC clock divider. The MDC clock derives - * from the SCLK divided by 4, 6, 8, 10, 14, 20, or 28. - * - * This needs to be done before trying to use the MII. - */ - - outp(EZ80_EMAC_MIIMGT, CONFIG_EZ80_MDCDIV); - - /* PHY reset */ - - up_udelay(500); - ez80emac_miiwrite(priv, MII_MCR, MII_MCR_RESET); - if (!ez80emac_miipoll(priv, MII_MCR, MII_MCR_RESET, true)) - { - nerr("ERROR: PHY reset error.\n"); - } - - /* Initialize MAC */ - - /* Set only the default late collision bytes in CFG2 */ - - outp(EZ80_EMAC_CFG2, EMAC_LCOL); - - /* Set only the retry count in CFG3 */ - - outp(EZ80_EMAC_CFG3, EMAC_RETRY); - - /* EMAC_CFG4_TXFC - Pause control frames are allowed to be transmitted - * EMAC_CFG4_RXFC - Act on received pause control frames - */ - - outp(EZ80_EMAC_CFG4, EMAC_CFG4_TXFC | EMAC_CFG4_RXFC); - - /* EMAC_CFG1_CRCEN + EMAC_CFG1_PADEN + EMAC_CFG1_VLPAD + EMAC_CFG1_ADPADN = - * if VLAN not detected, pad to 60, add CRC - * if VLAN detected, pad to 64, add CRC - */ - - outp(EZ80_EMAC_CFG1, EMAC_CFG1_CRCEN | EMAC_CFG1_PADEN | EMAC_CFG1_ADPADN | - EMAC_CFG1_VLPAD); - - outp(EZ80_EMAC_IPGT, EMAC_IPGT); - outp(EZ80_EMAC_IPGR1, EMAC_IPGR1); - outp(EZ80_EMAC_IPGR2, EMAC_IPGR2); - - outp(EZ80_EMAC_MAXF_L, EMAC_MAXF & 0xff); - outp(EZ80_EMAC_MAXF_H, EMAC_MAXF >> 8); - - /* Clear the new hash table */ - - outp(EZ80_EMAC_HTBL_0, 0); - outp(EZ80_EMAC_HTBL_1, 0); - outp(EZ80_EMAC_HTBL_2, 0); - outp(EZ80_EMAC_HTBL_3, 0); - outp(EZ80_EMAC_HTBL_4, 0); - outp(EZ80_EMAC_HTBL_5, 0); - outp(EZ80_EMAC_HTBL_6, 0); - outp(EZ80_EMAC_HTBL_7, 0); - - /* PHY reset */ - - ez80emac_miiwrite(priv, MII_MCR, MII_MCR_RESET); - if (!ez80emac_miipoll(priv, MII_MCR, MII_MCR_RESET, true)) - { - nerr("ERROR: PHY reset error.\n"); - ret = -EIO; - goto errout; - } - - /* Configure the PHY */ - - ret = ez80emac_miiconfigure(priv); - - /* Initialize DMA / FIFO */ - - outp(EZ80_EMAC_TPTV_L, EMAC_TPTV & 0xff); - outp(EZ80_EMAC_TPTV_H, EMAC_TPTV >> 8); - return OK; - -errout: - return ret; -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Function: ez80emac_initialize - * - * Description: - * Initialize the Ethernet driver - * - * Input Parameters: - * None - * - * Returned Value: - * OK on success; Negated errno on failure. - * - ****************************************************************************/ - -int z80_netinitialize(void) -{ - FAR struct ez80emac_driver_s *priv = &g_emac; - int ret; - - /* Disable all interrupts */ - - outp(EZ80_EMAC_IEN, 0); - - /* Attach IRQs */ - - ret = irq_attach(EZ80_EMACSYS_IRQ, ez80emac_sysinterrupt, NULL); - if (ret < 0) - { - nerr("ERROR: Unable to attach IRQ %d\n", EZ80_EMACSYS_IRQ); - ret = -EAGAIN; - goto errout; - } - - ret = irq_attach(EZ80_EMACRX_IRQ, ez80emac_rxinterrupt, NULL); - if (ret < 0) - { - nerr("ERROR: Unable to attach IRQ %d\n", EZ80_EMACRX_IRQ); - ret = -EAGAIN; - goto errout; - } - - ret = irq_attach(EZ80_EMACTX_IRQ, ez80emac_txinterrupt, NULL); - if (ret < 0) - { - nerr("ERROR: Unable to attach IRQ %d\n", EZ80_EMACTX_IRQ); - ret = -EAGAIN; - goto errout; - } - - /* Initialize the driver structure */ - - memset(&g_emac, 0, sizeof(struct ez80emac_driver_s)); - priv->dev.d_buf = g_pktbuf; /* Single packet buffer */ - priv->dev.d_ifup = ez80emac_ifup; /* I/F down callback */ - priv->dev.d_ifdown = ez80emac_ifdown; /* I/F up (new IP address) callback */ - priv->dev.d_txavail = ez80emac_txavail; /* New TX data callback */ -#ifdef CONFIG_NET_MCASTGROUP - priv->dev.d_addmac = ez80emac_addmac; /* Add multicast MAC address */ - priv->dev.d_rmmac = ez80emac_rmmac; /* Remove multicast MAC address */ -#endif - priv->dev.d_private = &g_emac; /* Used to recover private state from dev */ - - /* Read the MAC address from the hardware into - * priv->dev.d_mac.ether.ether_addr_octet - */ - - /* Register the device with the OS so that socket IOCTLs can be performed */ - - netdev_register(&priv->dev, NET_LL_ETHERNET); - return OK; - -errout: - z80_netuninitialize(); - return ret; -} - -/**************************************************************************** - * Function: z80_multicastfilter - * - * Description: - * Add one MAC address to the multi-cast hash table - * - * Input Parameters: - * dev - Reference to the network driver state structure - * mac - The MAC address to add - * enable - true: Enable filtering on this address; false: disable - * - * Returned Value: - * OK on success; Negated errno on failure. - * - ****************************************************************************/ - -#ifdef CONFIG_ARCH_MCFILTER -int z80_multicastfilter(FAR struct net_driver_s *dev, FAR uint8_t *mac, - bool enable) -{ - FAR struct ez80emac_driver_s *priv = - (FAR struct ez80emac_driver_s *)dev->priv; - uint8_t regval; - int ndx; - int bit; - int i; - - /* The EMAC Hash Table Registers represent an 8x8 hash table matrix. - * This table is used as an option to select between different multi-cast - * addresses. If a multicast address is received, the first 6 bits of the - * CRC decoded and to a table that points to a single bit in the hash - * table matrix. if the selected bit is '1', then multicast packet is - * accepted. If the bit is '0', the multicast packet is rejected. - */ - - /* Apply the hash algorithm to the hash table index and bit number - * corresponding to this MAC - */ - - ez80emac_machash(mclist->dmi_addr, &ndx, &bit); - - /* And set/clear that bit in that array element */ - - regval = inp(EZ80_EMAC_HTBL_0 + ndx); - if (enable) - { - regval |= (1 << bit); - } - else - { - regval &= ~(1 << bit); - } - - outp(EZ80_EMAC_HTBL_0 + ndx, regval); - return OK; -} -#endif - -/**************************************************************************** - * Function: z80_netuninitialize - * - * Description: - * Un-initialize the Ethernet driver - * - * Input Parameters: - * None - * - * Returned Value: - * None - * - * Assumptions: - * - ****************************************************************************/ - -void z80_netuninitialize(void) -{ - FAR struct ez80emac_driver_s *priv = &g_emac; - - ez80emac_ifdown(&priv->dev); -#if 0 - netdev_unregister(priv->dev); /* No such interface yet */ -#endif - - priv->txnext = priv->txstart; - priv->txhead = NULL; - - irq_detach(EZ80_EMACRX_IRQ); - irq_detach(EZ80_EMACTX_IRQ); - irq_detach(EZ80_EMACSYS_IRQ); -} - -#endif /* CONFIG_NET && CONFIG_EZ80_EMAC */ diff --git a/arch/z80/src/ez80/ez80_getsp.asm b/arch/z80/src/ez80/ez80_getsp.asm deleted file mode 100644 index de493589b7..0000000000 --- a/arch/z80/src/ez80/ez80_getsp.asm +++ /dev/null @@ -1,49 +0,0 @@ -;************************************************************************** -; arch/z80/src/ez80/ez80_getsp.asm -; -; SPDX-License-Identifier: Apache-2.0 -; -; Licensed to the Apache Software Foundation (ASF) under one or more -; contributor license agreements. See the NOTICE file distributed with -; this work for additional information regarding copyright ownership. The -; ASF licenses this file to you under the Apache License, Version 2.0 (the -; "License"); you may not use this file except in compliance with the -; License. You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -; License for the specific language governing permissions and limitations -; under the License. -; -;************************************************************************** - -;************************************************************************** -; Global Symbols Exported -;************************************************************************** - - xdef _up_getsp - -;************************************************************************** -; Code -;************************************************************************** - - segment CODE - .assume ADL=1 - -;************************************************************************** -;* Name: _up_getsp -;* -;* Description: -;* Return the current value of the stack pointer -;* -;************************************************************************** - -_up_getsp: - ld hl, 0 ; Initialize HL to zero - add hl, sp ; Add the stack pointer to HL - ret ; Return stack pointer in HL - - end diff --git a/arch/z80/src/ez80/ez80_i2c.c b/arch/z80/src/ez80/ez80_i2c.c deleted file mode 100644 index f32250116f..0000000000 --- a/arch/z80/src/ez80/ez80_i2c.c +++ /dev/null @@ -1,936 +0,0 @@ -/**************************************************************************** - * arch/z80/src/ez80/ez80_i2c.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "ez80f91.h" -#include "ez80_i2c.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#define EZ80_NOSTOP (1 << 0) /* Bit 0: No STOP on this transfer */ -#define EZ80_NOSTART (1 << 1) /* Bit 1: No address or START on this transfers */ - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -struct ez80_i2cdev_s -{ - FAR const struct i2c_ops_s *ops; /* I2C vtable */ - uint32_t frequency; /* Currently selected I2C frequency */ - uint16_t addr; /* 7- or 10-bit address */ - uint8_t addr10 : 1; /* 1=Address is 10-bit */ -}; - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -/* Misc. Helpers */ - -static void ez80_i2c_setccr(uint16_t ccr); -static uint16_t ez80_i2c_getccr(uint32_t frequency); -static uint8_t ez80_i2c_waitiflg(void); -static void ez80_i2c_clriflg(void); -static void ez80_i2c_start(void); -static void ez80_i2c_stop(void); -static int ez80_i2c_sendaddr(struct ez80_i2cdev_s *priv, - uint8_t readbit); -static int ez80_i2c_read_transfer(FAR struct ez80_i2cdev_s *priv, - FAR uint8_t *buffer, int buflen, uint8_t flags); -static int ez80_i2c_write_transfer(FAR struct ez80_i2cdev_s *priv, - FAR const uint8_t *buffer, int buflen, uint8_t flags); -static void ez80_i2c_setfrequency(FAR struct ez80_i2cdev_s *priv, - uint32_t frequency); - -/* I2C methods */ - -static int ez80_i2c_transfer(FAR struct i2c_master_s *dev, - FAR struct i2c_msg_s *msgs, int count); - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -static bool g_initialized; /* true:I2C has been initialized */ -static mutex_t g_i2clock = NXMUTEX_INITIALIZER; /* Serialize I2C transfers */ - -static const struct i2c_ops_s g_ops = -{ - ez80_i2c_transfer -}; - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: ez80_i2c_setccr - * - * Description: - * Set the current BRG value for this transaction - * - * Input Parameters: - * ccr - BRG to set - * - * Returned Value: - * None - * - ****************************************************************************/ - -static void ez80_i2c_setccr(uint16_t ccr) -{ - outp(EZ80_I2C_CCR, ccr); -} - -/**************************************************************************** - * Name: ez80_i2c_getccr - * - * Description: - * Calculate the BRG value - * - * Input Parameters: - * fscl - The I2C frequency requested - * - * Returned Value: - * Returns the actual frequency selected - * - ****************************************************************************/ - -static uint16_t ez80_i2c_getccr(uint32_t fscl) -{ - uint32_t fsamp; - uint32_t ftmp; - uint8_t n; - uint8_t m; - - /* The sampling frequency is given by: - * - * fsamp = sysclock / 2**N - * - * And the I2C clock is determined by: - * - * fscl = sysclock / 10 / (M + 1) / 2**N - * = fsamp / 10 / (M + 1) - * - * The fsmp must be >= 10 * fscl. The best solution is the smallest value - * of N so that the sampling rate is the highest subject to: - * - * The minimum value of the fsamp is given by: - */ - - fsamp = 10 * fscl; - - /* Now, serarch for the smallest value of N that results in the actual - * fsamp >= the ideal fsamp. Fortunately, we only have to check at most - * eight values. - */ - - if (fsamp >= EZ80_SYS_CLK_FREQ) - { - ftmp = EZ80_SYS_CLK_FREQ / 10; - n = 0; - } - else if (fsamp >= (EZ80_SYS_CLK_FREQ >> 1)) - { - ftmp = (EZ80_SYS_CLK_FREQ >> 1) / 10; - n = 1; - } - else if (fsamp >= (EZ80_SYS_CLK_FREQ >> 2)) - { - ftmp = (EZ80_SYS_CLK_FREQ >> 2) / 10; - n = 2; - } - else if (fsamp >= (EZ80_SYS_CLK_FREQ >> 3)) - { - ftmp = (EZ80_SYS_CLK_FREQ >> 3) / 10; - n = 3; - } - else if (fsamp >= (EZ80_SYS_CLK_FREQ >> 4)) - { - ftmp = (EZ80_SYS_CLK_FREQ >> 4) / 10; - n = 4; - } - else if (fsamp >= (EZ80_SYS_CLK_FREQ >> 5)) - { - ftmp = (EZ80_SYS_CLK_FREQ >> 5) / 10; - n = 5; - } - else if (fsamp >= (EZ80_SYS_CLK_FREQ >> 6)) - { - ftmp = (EZ80_SYS_CLK_FREQ >> 6) / 10; - n = 6; - } - else if (fsamp >= (EZ80_SYS_CLK_FREQ >> 7)) - { - ftmp = (EZ80_SYS_CLK_FREQ >> 7) / 10; - n = 7; - } - else - { - ftmp = (EZ80_SYS_CLK_FREQ >> 7) / 10; - fscl = ftmp; - n = 7; - } - - /* Finally, get M: - * - * M = (fsamp / 10) / fscl - 1 = ftmp / fscl - 1 - */ - - m = ftmp / fscl; - if (m > 0) - { - if (--m > 15) - { - m = 15; - } - } - - /* Return the value for CCR */ - - return (n << I2C_CCR_NSHIFT) | (m << I2C_CCR_MSHIFT); -} - -/**************************************************************************** - * Name: ez80_i2c_waitiflg - * - * Description: - * In polled mode, we have to spin until the IFLG bit in the I2C_CTL - * register goes to 1, signaling that the last send or receive is - * complete. This could be used to generate an interrupt for a non- - * polled driver. - * - * Input Parameters: - * priv - Device-specific state data - * readbit - 0 or I2C_READBIT - * - * Returned Value: - * The contents of the I2C_SR register at the time that IFLG became 1. - * - ****************************************************************************/ - -static uint8_t ez80_i2c_waitiflg(void) -{ - while ((inp(EZ80_I2C_CTL) & I2C_CTL_IFLG) != 0); - return inp(EZ80_I2C_SR); -} - -/**************************************************************************** - * Name: ez80_i2c_clriflg - * - * Description: - * Clear the IFLAG bit in the I2C_CTL register, acknowledging the event. - * If interrupts are enabled, this would clear the interrupt status. - * - * Input Parameters: - * None - * - * Returned Value: - * None - * - ****************************************************************************/ - -static void ez80_i2c_clriflg(void) -{ - uint8_t regval = inp(EZ80_I2C_CTL); - regval &= ~I2C_CTL_IFLG; - outp(EZ80_I2C_CTL, regval); -} - -/**************************************************************************** - * Name: ez80_i2c_start - * - * Description: - * Send the START bit. IFLAG must be zero; it will go to 1 when it is - * time to send the address. - * - * Input Parameters: - * None - * - * Returned Value: - * None - * - ****************************************************************************/ - -static void ez80_i2c_start(void) -{ - uint8_t regval = inp(EZ80_I2C_CTL); - regval |= I2C_CTL_STA; - outp(EZ80_I2C_CTL, regval); -} - -/**************************************************************************** - * Name: ez80_i2c_stop - * - * Description: - * Send the STOP bit. This terminates the I2C transfer and reverts back - * to IDLE mode. - * - * Input Parameters: - * None - * - * Returned Value: - * None - * - ****************************************************************************/ - -static void ez80_i2c_stop(void) -{ - uint8_t regval = inp(EZ80_I2C_CTL); - regval |= I2C_CTL_STP; - outp(EZ80_I2C_CTL, regval); -} - -/**************************************************************************** - * Name: ez80_i2c_sendaddr - * - * Description: - * Send the 8- or 11-bit address for either a read or a write transaction. - * - * Input Parameters: - * priv - Device-specific state data - * readbit - 0 or I2C_READBIT - * - * Returned Value: - * 0: Success, IFLG is set and DATA can be sent or received. - - * Or <0: Negated error value. IFLG is cleared. - * - * -EIO: Irrecoverable (or unexpected) error occurred - * -EAGAIN: And - * - ****************************************************************************/ - -static int ez80_i2c_sendaddr(struct ez80_i2cdev_s *priv, uint8_t readbit) -{ - uint8_t sr; - - /* Wait for the IFLG bit to transition to 1. At this point, we should - * have status == 8 meaning that the start bit was sent successfully. - */ - - sr = ez80_i2c_waitiflg(); -#ifdef CONFIG_DEBUG_FEATURES - if (sr != I2C_SR_MSTART) - { - /* This error should never occur */ - - i2cerr("ERROR: Bad START status: %02x\n", sr); - ez80_i2c_clriflg(); - return -EIO; - } -#endif - - /* Now send the address */ - - if (!priv->addr10) - { - /* Load the I2C_DR with the 8-bit I2C slave address and clear the - * IFLG. Clearing the IFLAG will cause the address to be transferred. - */ - - outp(EZ80_I2C_DR, (uint8_t)I2C_ADDR8(priv->addr) | readbit); - ez80_i2c_clriflg(); - - /* And wait for the address transfer to complete */ - - sr = ez80_i2c_waitiflg(); - if (sr != I2C_SR_MADDRWRACK && sr != I2C_SR_MADDRWR) - { - i2cerr("ERROR: Bad ADDR8 status: %02x\n", sr); - goto failure; - } - } - else - { - /* Load the I2C_DR with upper part of the 10->16-bit I2C slave address - * and clear the IFLG. Clearing the IFLAG will cause the address to - * be transferred. - */ - - outp(EZ80_I2C_DR, (uint8_t)I2C_ADDR10H(priv->addr) | readbit); - ez80_i2c_clriflg(); - - /* And wait for the address transfer to complete */ - - sr = ez80_i2c_waitiflg(); - if (sr != I2C_SR_MADDRWRACK && sr != I2C_SR_MADDRWR) - { - i2cerr("ERROR: Bad ADDR10H status: %02x\n", sr); - goto failure; - } - - /* Now send the lower 8 bits of the 10-bit address */ - - outp(EZ80_I2C_DR, (uint8_t)I2C_ADDR10L(priv->addr)); - ez80_i2c_clriflg(); - - /* And wait for the address transfer to complete */ - - sr = ez80_i2c_waitiflg(); - if (sr != I2C_SR_MADDR2WRACK && sr != I2C_SR_MADDR2WR) - { - i2cerr("ERROR: Bad ADDR10L status: %02x\n", sr); - goto failure; - } - } - - return OK; - - /* We don't attempt any fancy status-based error recovery */ - -failure: -#ifdef CONFIG_DEBUG_FEATURES - switch (sr) - { - case I2C_SR_ARBLOST1: /* Arbitration lost in address or data byte */ - case I2C_SR_ARBLOST2: /* Arbitration lost in address as master, slave - * address and Write bit received, ACK - * transmitted */ - case I2C_SR_ARBLOST3: /* Arbitration lost in address as master, General - * Call address received, ACK transmitted */ - case I2C_SR_ARBLOST4: /* Arbitration lost in address as master, slave - * address and Read bit received, ACK transmitted */ - i2cerr("ERROR: Arbitration lost: %02x\n", sr); - ez80_i2c_clriflg(); - return -EAGAIN; - - default: - i2cerr("ERROR: Unexpected status: %02x\n", sr); - ez80_i2c_clriflg(); - return -EIO; - } -#else - ez80_i2c_clriflg(); - return -EAGAIN; -#endif -} - -/**************************************************************************** - * Name: ez80_i2c_read_transfer - * - * Description: - * Receive a block of data from I2C using the previously selected I2C - * frequency and slave address. Each read operational will be an 'atomic' - * operation in the sense that any other I2C actions will be serialized - * and pend until this read completes. Required. - * - * Input Parameters: - * dev - Device-specific state data - * buffer - A pointer to a buffer of data to receive the data from the - * device - * buflen - The requested number of bytes to be read - * flags - Determines is a START and/or STOP indication is needed. - * - * Returned Value: - * 0: success, <0: A negated errno - * - ****************************************************************************/ - -static int ez80_i2c_read_transfer(FAR struct ez80_i2cdev_s *priv, - FAR uint8_t *buffer, int buflen, - uint8_t flags) -{ - FAR uint8_t *ptr; - uint8_t regval; - int retry; - int count; - int ret; - - /* Retry as necessary to receive the whole message */ - - for (retry = 0; retry < 100; retry++) - { - if ((flags & EZ80_NOSTART) == 0) - { - /* Enter MASTER TRANSMIT mode by setting the STA bit in the - * I2C_CTL register to 1. The I2C then tests the I2C bus and - * transmits a START condition when the bus is free. - */ - - ez80_i2c_start(); - - /* When a START condition is transmitted, the IFLG bit is 1. - * Then we may send the I2C slave address. - */ - - ret = ez80_i2c_sendaddr(priv, 0); - if (ret < 0) - { - if (ret == -EAGAIN) - { - continue; - } - else - { - return ret; - } - } - } - - /* Now loop to receive each data byte */ - - ptr = buffer; - for (count = buflen; count; count--) - { - /* Is this the last byte? If so, we must NACK it */ - - regval = inp(EZ80_I2C_CTL); - if (count <= 1) - { - /* If the AAK bit is cleared to 0 during a transfer, the I2C - * transmits a NACK bit after the next byte is received. - */ - - regval &= ~I2C_CTL_AAK; - } - else - { - /* If the AAK bit in the I2C_CTL register is set to 1 then an - * ACK bit is transmitted and the IFLG bit is set after each - * byte is received. - */ - - regval |= I2C_CTL_AAK; - } - - outp(EZ80_I2C_CTL, regval); - - /* Wait for IFLG to be set meaning that incoming data is - * available in the I2C_DR registers. - */ - - regval = ez80_i2c_waitiflg(); - - /* Data byte received in MASTER mode, ACK transmitted */ - - if (regval == I2C_SR_MDATARDACK) - { - /* Since we just ACKed the incoming byte, it must NOT be the - * last - */ - - DEBUGASSERT(count > 1); - - /* Receive the data and clear the IFLGS */ - - *ptr++ = inp(EZ80_I2C_DR); - ez80_i2c_clriflg(); - } - - /* Data byte received in MASTER mode, NACK transmitted */ - - else if (regval == I2C_SR_MDATARDNAK) - { - /* Since we just NACKed the incoming byte, it must be the - * last - */ - - DEBUGASSERT(count <= 1); - - if ((flags & EZ80_NOSTOP) == 0) - { - /* When all bytes are received and the NACK has been sent, - * then the microcontroller must write 1 to the STP bit in - * the I2C_CTL register. The I2C then transmits a STOP - * condition, clears the STP bit and returns to an idle - * state. - */ - - ez80_i2c_stop(); - } - - ez80_i2c_clriflg(); - return OK; - } - - /* Arbitration lost in address or data byte */ - - else if (regval == I2C_SR_ARBLOST1) - { - /* Clear the IFLG and break out of the inner loop. - * this will cause the whole transfer to start over - */ - - i2cerr("ERROR: Arbitration lost: %02x\n", regval); - ez80_i2c_clriflg(); - break; - } - - /* Unexpected status response */ - - else - { - i2cerr("ERROR: Unexpected status: %02x\n", regval); - ez80_i2c_clriflg(); - return -EIO; - } - } - } - - return -ETIMEDOUT; -} - -/**************************************************************************** - * Name: ez80_i2c_write_transfer - * - * Description: - * Send a block of data on I2C using the previously selected I2C - * frequency and slave address. Each write operational will be an 'atomic' - * operation in the sense that any other I2C actions will be serialized - * and pend until this write completes. Required. - * - * Input Parameters: - * dev - Device-specific state data - * buffer - A pointer to the read-only buffer of data to be written to - * device - * buflen - The number of bytes to send from the buffer - * flags - Determines is a START and/or STOP indication is needed. - * - * Returned Value: - * 0: success, <0: A negated errno - * - ****************************************************************************/ - -static int ez80_i2c_write_transfer(FAR struct ez80_i2cdev_s *priv, - FAR const uint8_t *buffer, int buflen, - uint8_t flags) -{ - FAR const uint8_t *ptr; - uint8_t sr; - int retry; - int count; - int ret; - - /* Retry as necessary to send this whole message */ - - for (retry = 0; retry < 100; retry++) - { - if ((flags & EZ80_NOSTART) == 0) - { - /* Enter MASTER TRANSMIT mode by setting the STA bit in the - * I2C_CTL register to 1. The I2C then tests the I2C bus and - * transmits a START condition when the bus is free. - */ - - ez80_i2c_start(); - - /* When a START condition is transmitted, the IFLG bit is 1. Then - * we may send the I2C slave address. - */ - - ret = ez80_i2c_sendaddr(priv, 0); - if (ret < 0) - { - if (ret == -EAGAIN) - { - continue; - } - else - { - return ret; - } - } - } - - /* Then send all of the bytes in the buffer */ - - ptr = buffer; - for (count = buflen; count; count--) - { - /* Load the I2C_DR with next data byte and clear the IFLG. - * Clearing the IFLAG will cause the data to be transferred. - */ - - outp(EZ80_I2C_DR, *ptr++); - ez80_i2c_clriflg(); - - /* And wait for the data transfer to complete */ - - sr = ez80_i2c_waitiflg(); - if (sr != I2C_SR_MDATAWRACK && sr != I2C_SR_MDATAWR) - { - i2cerr("ERROR: Bad DATA status: %02x\n", sr); - ez80_i2c_clriflg(); - if (sr == I2C_SR_ARBLOST1) - { - /* Arbitration lost, break out of the inner loop and - * try sending the message again - */ - - break; - } - - /* Otherwise, it is fatal (shouldn't happen) */ - - return -EIO; - } - - /* Data byte was sent successfully. Was that the last byte? */ - - else if (count <= 1) - { - if ((flags & EZ80_NOSTOP) == 0) - { - /* When all bytes are transmitted, the microcontroller - * must write a 1 to the STP bit in the I2C_CTL register. - * The I2C then transmits a STOP condition, clears the - * STP bit and returns to an idle state. - */ - - ez80_i2c_stop(); - } - - return OK; - } - } - } - - /* If we get here, we timed out without successfully sending the message */ - - return -ETIMEDOUT; -} - -/**************************************************************************** - * Name: ez80_i2c_setfrequency - * - * Description: - * Set the I2C frequency. This frequency will be retained in the struct - * i2c_master_s instance and will be used with all transfers. Required. - * - * Input Parameters: - * dev - Device-specific state data - * frequency - The I2C frequency requested - * - * Returned Value: - * None - * - ****************************************************************************/ - -static void ez80_i2c_setfrequency(FAR struct ez80_i2cdev_s *priv, - uint32_t frequency) -{ - uint16_t ccr; - - if (priv->frequency != frequency) - { - /* Calculate and save the BRG and set the CCR */ - - ccr = ez80_i2c_getccr(frequency); - ez80_i2c_setccr(ccr); - - /* Save the new I2C frequency */ - - priv->frequency = frequency; - } -} - -/**************************************************************************** - * Name: ez80_i2c_transfer - * - * Description: - * Perform a sequence of I2C transfers, each transfer is started with a - * START and the final transfer is completed with a STOP. Each sequence - * will be an 'atomic' operation in the sense that any other I2C actions - * will be serialized and pend until this read completes. Optional. - * - * Input Parameters: - * dev - Device-specific state data - * msgs - A pointer to a set of message descriptors - * msgcount - The number of transfers to perform - * - * Returned Value: - * The number of transfers completed - * - ****************************************************************************/ - -static int ez80_i2c_transfer(FAR struct i2c_master_s *dev, - FAR struct i2c_msg_s *msgs, int count) -{ - FAR struct ez80_i2cdev_s *priv = (FAR struct ez80_i2cdev_s *)dev; - FAR struct i2c_msg_s *msg; - bool nostop; - uint8_t flags; - int ret; - int i; - - /* Perform each segment of the transfer, message at a time */ - - flags = 0; - - /* Get exclusive access to the I2C bus */ - - ret = nxmutex_lock(&g_i2clock); - if (ret < 0) - { - return ret; - } - - /* The process each message segment */ - - for (i = 0; i < count; i++) - { - msg = &msgs[i]; - - /* Set the I2C frequency and address */ - - ez80_i2c_setfrequency(priv, msg->frequency); - - priv->addr = msg->addr; - priv->addr10 = ((msg->flags & I2C_M_TEN) != 0); - - /* Is this the last message in the sequence? */ - - nostop = false; - if (i < (count - 1)) - { - FAR struct i2c_msg_s *next; - - /* No... Check if the next message should have a repeated start or - * not. The conditions for NO repeated start are: - * - * - I2C_M_NOSTART bit set - * - Same direction (I2C_M_READ) - * - Same address (and I2C_M_TEN) - */ - - next = &msgs[i + 1]; - if ((msg->flags & I2C_M_NOSTART) != 0 && - (msg->flags & (I2C_M_READ | I2C_M_TEN)) == - (next->flags & (I2C_M_READ | I2C_M_TEN)) && - msg->addr == next->addr) - { - nostop = true; - } - } - - /* Perform the read or write operation */ - - flags |= (nostop) ? EZ80_NOSTOP : 0; - if ((msg->flags & I2C_M_READ) != 0) - { - ret = ez80_i2c_read_transfer(priv, msg->buffer, msg->length, - flags); - } - else - { - ret = ez80_i2c_write_transfer(priv, msg->buffer, msg->length, - flags); - } - - /* Check for I2C transfer errors */ - - if (ret < 0) - { - break; - } - - /* If there was no STOP bit on this segment, then there should be no - * START on the next segment. - */ - - flags = (nostop) ? EZ80_NOSTART : 0; - } - - nxmutex_unlock(&g_i2clock); - return ret; -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: ez80_i2cbus_initialize - * - * Description: - * Initialize the selected I2C port. And return a unique instance of struct - * struct i2c_master_s. This function may be called to obtain multiple - * instances of the interface, each of which may be set up with a - * different frequency and slave address. - * - * Input Parameters: - * Port number (for hardware that has multiple I2C interfaces) - * - * Returned Value: - * Valid I2C device structure reference on success; a NULL on failure - * - ****************************************************************************/ - -FAR struct i2c_master_s *ez80_i2cbus_initialize(int port) -{ - FAR struct ez80_i2cdev_s *i2c; - uint16_t ccr; - uint8_t regval; - - if (!g_initialized) - { - /* Set up some initial BRG value */ - - ccr = ez80_i2c_getccr(100 * 1000); - ez80_i2c_setccr(ccr); - - /* No GPIO setup is required -- I2C pints, - * SCL/SDA are not multiplexed - */ - - /* Enable I2C -- but not interrupts */ - - regval = inp(EZ80_I2C_CTL); - regval |= I2C_CTL_ENAB; - outp(EZ80_I2C_CTL, regval); - } - - /* Now, allocate an I2C instance for this caller */ - - i2c = (FAR struct ez80_i2cdev_s *) - kmm_zalloc(sizeof(FAR struct ez80_i2cdev_s)); - if (i2c != NULL) - { - /* Initialize the allocated instance */ - - i2c->ops = &g_ops; - } - - return (FAR struct i2c_master_s *)i2c; -} diff --git a/arch/z80/src/ez80/ez80_i2c.h b/arch/z80/src/ez80/ez80_i2c.h deleted file mode 100644 index 4a57dfab07..0000000000 --- a/arch/z80/src/ez80/ez80_i2c.h +++ /dev/null @@ -1,208 +0,0 @@ -/**************************************************************************** - * arch/z80/src/ez80/ez80_i2c.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z80_SRC_EZ80_EZ80_I2C_H -#define __ARCH_Z80_SRC_EZ80_EZ80_I2C_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* I2C Registers ***********************************************************/ - -/* Provided in ez80f91.h */ - -/* I2C Register Bit Definitions ********************************************/ - -/* Slave Address Register (SAR) Bit Definitions */ - -#define I2C_SAR_GCE (1 << 0) /* Bit 0: 1=I2C enabled to recognize the - * General Call Address */ -#define I2C_SAR_SLA_SHIFT 1 /* Bits 1-7: 7-bit address or upper 2 bits in - * 10-bit mode */ -#define I2C_SAR_SLA_MASK (0x7f << 1) - -/* Extended Slave Address Register (XSAR) Bit Definitions */ - -/* Bits 0-7: Least significant 8-bits of 10-bit slave address */ - -/* Data Byte Register (DR) Bit Definitions */ - -/* Bits 0-7: I2C byte data */ - -/* Control (CTL) Register Bit Definitions */ - - /* Bits 0-1: Reserved */ -#define I2C_CTL_AAK (1 << 2) /* Bit 2: 1=Acknowledge */ -#define I2C_CTL_IFLG (1 << 3) /* Bit 3: 1=I2C interrupt flag is set */ -#define I2C_CTL_STP (1 << 4) /* Bit 4: 1=Master mode stop-transmit STOP - * condition on the bus */ -#define I2C_CTL_STA (1 << 5) /* Bit 5: 1=Master mode start-transmit - * START condition on the bus */ -#define I2C_CTL_ENAB (1 << 6) /* Bit 6: 1=I2C bus (SCL/SDA) is enabled */ -#define I2C_CTL_IEN (1 << 7) /* Bit 7: 1=I2C interrupt is enabled */ - -/* Status Register (SR) Bit Definitions */ - -#define I2C_SR_SHIFT 3 /* Bits 3-7: 5-bit status code */ -#define I2C_SR_MASK (0x1c << I2C_SR_SHIFT) - -#define I2C_SR_BUSERR 0x00 /* Bus error */ -#define I2C_SR_MSTART 0x08 /* START condition transmitted */ -#define I2C_SR_MREPSTART 0x10 /* Repeated START condition transmitted */ -#define I2C_SR_MADDRWRACK 0x18 /* Address and Write bit transmitted, ACK - * received */ -#define I2C_SR_MADDRWR 0x20 /* Address and Write bit transmitted, ACK - * not received */ -#define I2C_SR_MDATAWRACK 0x28 /* Data byte transmitted in MASTER mode, - * ACK received */ -#define I2C_SR_MDATAWR 0x30 /* Data byte transmitted in MASTER mode, - * ACK not received */ -#define I2C_SR_ARBLOST1 0x38 /* Arbitration lost in address or data byte */ -#define I2C_SR_MADDRRDACK 0x40 /* Address and Read bit transmitted, ACK - * received */ -#define I2C_SR_MADDRRD 0x48 /* Address and Read bit transmitted, ACK no - * received */ -#define I2C_SR_MDATARDACK 0x50 /* Data byte received in MASTER mode, ACK - * transmitted */ -#define I2C_SR_MDATARDNAK 0x58 /* Data byte received in MASTER mode, NACK - * transmitted */ -#define I2C_SR_SADDRWRACK 0x60 /* Slave address and Write bit received, ACK - * transmitted */ -#define I2C_SR_ARBLOST2 0x68 /* Arbitration lost in address as master, - * slave address and Write bit received, ACK - * transmitted */ -#define I2C_SR_SGCARDACK 0x70 /* General Call address received, ACK - * transmitted */ -#define I2C_SR_ARBLOST3 0x78 /* Arbitration lost in address as master, - * General Call address received, ACK - * transmitted */ -#define I2C_SR_SDATARDACK 0x80 /* Data byte received after slave address - * received, ACK transmitted */ -#define I2C_SR_SDATARDNAK 0x88 /* Data byte received after slave address - * received, NACK transmitted */ -#define I2C_SR_SDATAGCAACK 0x90 /* Data byte received after General Call - * received, ACK transmitted */ -#define I2C_SR_SDATAGCANAK 0x98 /* Data byte received after General Call - * received, NACK transmitted */ -#define I2C_SR_SSTOP 0xa0 /* STOP or repeated START condition received - * in SLAVE mode */ -#define I2C_SR_SSADDRRDACK 0xa8 /* Slave address and Read bit received, ACK - * transmitted */ -#define I2C_SR_ARBLOST4 0xb0 /* Arbitration lost in address as master, - * slave address and Read bit received, ACK - * transmitted */ -#define I2C_SR_SDATAWRACK 0xb8 /* Data byte transmitted in SLAVE mode, ACK - * received */ -#define I2C_SR_SDATAWR 0xc0 /* Data byte transmitted in SLAVE mode, ACK - * not received */ -#define I2C_SR_SLDATAWR 0xc8 /* Last byte transmitted in SLAVE mode, ACK - * received */ -#define I2C_SR_MADDR2WRACK 0xd0 /* Second Address byte and Write bit - * transmitted, ACK received */ -#define I2C_SR_MADDR2WR 0xd8 /* Second Address byte and Write bit - * transmitted, ACK not received */ -#define I2C_SR_NONE 0xf8 /* No relevant status information, IFLG = 0 */ - -/* Clock Control Register (CCR) Bit Definitions */ - -#define I2C_CCR_NSHIFT 0 /* Bits 0-2: I2C clock divider exponent */ -#define I2C_CCR_NMASK (0x07 << I2C_CCR_NSHIFT) -#define I2C_CCR_MSHIFT 3 /* Bits 3-6: I2C clock divider scalar value */ -#define I2C_CCR_MMASK (0x0f << I2C_CCR_MSHIFT) - -/* Software Reset Register (SRR) Bit Definitions */ - -/* Writing any value to this register performs a software reset - * of the I2C module - */ - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif /* __cplusplus */ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Name: ez80_i2cbus_initialize - * - * Description: - * Initialize the selected I2C port. And return a unique instance of struct - * struct i2c_master_s. This function may be called to obtain multiple - * instances of the interface, each of which may be set up with a - * different frequency and slave address. - * - * Input Parameters: - * Port number (for hardware that has multiple I2C interfaces) - * - * Returned Value: - * Valid I2C device structure reference on success; a NULL on failure - * - ****************************************************************************/ - -FAR struct i2c_master_s *ez80_i2cbus_initialize(int port); - -/**************************************************************************** - * Name: ez80_i2cbus_uninitialize - * - * Description: - * De-initialize the selected I2C port, and power down the device. - * - * Input Parameters: - * Device structure as returned by the ez80_i2cbus_initialize() - * - * Returned Value: - * OK on success, ERROR when internal reference count mismatch or dev - * points to invalid hardware device. - * - ****************************************************************************/ - -int ez80_i2cbus_uninitialize(FAR struct i2c_master_s *dev); - -#undef EXTERN -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* __ASSEMBLY__ */ - -#endif /* __ARCH_Z80_SRC_EZ80_EZ80_I2C_H */ diff --git a/arch/z80/src/ez80/ez80_initialstate.c b/arch/z80/src/ez80/ez80_initialstate.c deleted file mode 100644 index 9e3904c8d3..0000000000 --- a/arch/z80/src/ez80/ez80_initialstate.c +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************************** - * arch/z80/src/ez80/ez80_initialstate.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include - -#include "chip.h" -#include "z80_internal.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_initial_state - * - * Description: - * A new thread is being started and a new TCB - * has been created. This function is called to initialize - * the processor specific portions of the new TCB. - * - * This function must setup the initial architecture registers - * and/or stack so that execution will begin at tcb->start - * on the next context switch. - * - ****************************************************************************/ - -void up_initial_state(FAR struct tcb_s *tcb) -{ - FAR struct xcptcontext *xcp = &tcb->xcp; - - /* Initialize the initial exception register context structure */ - - memset(xcp, 0, sizeof(struct xcptcontext)); - -#ifndef CONFIG_SUPPRESS_INTERRUPTS - /* Parity/Overflow flag will enable interrupts */ - - ((FAR uint8_t *)xcp->regs)[XCPT_IF_OFFSET] = EZ80_PV_FLAG; -#endif - - xcp->regs[XCPT_SP] = (chipreg_t)tcb->stack_base_ptr + - tcb->adj_stack_size; - xcp->regs[XCPT_PC] = (chipreg_t)tcb->start; -} diff --git a/arch/z80/src/ez80/ez80_io.asm b/arch/z80/src/ez80/ez80_io.asm deleted file mode 100644 index 75acb02da1..0000000000 --- a/arch/z80/src/ez80/ez80_io.asm +++ /dev/null @@ -1,141 +0,0 @@ -;************************************************************************** -; arch/z80/src/ze80/ez80_io.c -; -; SPDX-License-Identifier: Apache-2.0 -; -; Licensed to the Apache Software Foundation (ASF) under one or more -; contributor license agreements. See the NOTICE file distributed with -; this work for additional information regarding copyright ownership. The -; ASF licenses this file to you under the Apache License, Version 2.0 (the -; "License"); you may not use this file except in compliance with the -; License. You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -; License for the specific language governing permissions and limitations -; under the License. -; -;************************************************************************** - -;************************************************************************** -; Global Symbols Imported -;************************************************************************** - -;************************************************************************** -; Global Symbols Expported -;************************************************************************** - - xdef _outp - xdef _inp - -;************************************************************************** -; Global Symbols Expported -;************************************************************************** - -CONFIG_EZ80_Z80MODE equ 0 - -;************************************************************************** -; Code -;************************************************************************** - - segment CODE - .assume ADL=1 - -;************************************************************************** -; Name: void outp(uint16_t p, uint8_t c) -; -; Description: -; Output byte c on port p -; -;************************************************************************** - -_outp: - ; Create a stack frame - - push ix - ld ix, 0 - add ix, sp - - ; Get the arguments from the stack - - .if CONFIG_EZ80_Z80MODE - ; Stack looks like: - ; - ; 7-8 Unused - ; 6 Value - ; 4-5 Port - ; 2-3 Return address - ; SP: 0-1 Caller's fame pointer - - ld bc, (ix + 4) ; Port - ld a, (ix + 6) ; Value - - .else - ; Stack looks like: - ; - ; 10-11 Unused - ; 9 Value - ; 8 Unused - ; 6-7 Port - ; 3-5 Return address - ; SP: 0-2 Caller's frame pointer - - ld bc, (ix + 6) ; Port (upper 8 bits not used) - ld a, (ix + 9) ; Value - - .endif - - ; Output the specified by to the specified 8-bit I/O address - - out (bc), a - pop ix - ret - -;************************************************************************** -; Name: uint8_t inp(uint16_t p) -; -; Description: -; Input byte from port p -; -;************************************************************************** - -_inp: - ; Create a stack frame - - push ix - ld ix, 0 - add ix, sp - - ; Get the arguments from the stack - - .if CONFIG_EZ80_Z80MODE - ; Stack looks like: - ; - ; 4-5 Port - ; 2-3 Return address - ; SP: 0-1 Caller's fame pointer - - ld bc, (ix + 4) ; Port - - .else - ; Stack looks like: - ; - ; 8 Unused - ; 6-7 Port - ; 3-5 Return address - ; SP: 0-2 Caller's frame pointer - - ld bc, (ix + 6) ; Port (upper 8 bits not used) - - .endif - - ; Return port value in A - - in a, (bc) - pop ix - ret - - end diff --git a/arch/z80/src/ez80/ez80_irq.c b/arch/z80/src/ez80/ez80_irq.c deleted file mode 100644 index 83828fdb21..0000000000 --- a/arch/z80/src/ez80/ez80_irq.c +++ /dev/null @@ -1,87 +0,0 @@ -/**************************************************************************** - * arch/z80/src/ez80/ez80_irq.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include - -#include "chip/switch.h" -#include "z80_internal.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_irqinitialize - ****************************************************************************/ - -void up_irqinitialize(void) -{ - /* And finally, enable interrupts */ - -#ifndef CONFIG_SUPPRESS_INTERRUPTS - asm("ei"); -#endif -} - -/**************************************************************************** - * Name: up_disable_irq - * - * Description: - * On many architectures, there are three levels of interrupt enabling: (1) - * at the global level, (2) at the level of the interrupt controller, - * and (3) at the device level. In order to receive interrupts, they - * must be enabled at all three levels. - * - * This function implements disabling of the device specified by 'irq' - * at the interrupt controller level if supported by the architecture - * (up_irq_save() supports the global level, the device level is hardware - * specific). - * - ****************************************************************************/ - -void up_disable_irq(int irq) -{ - /* There are no ez80 interrupt controller settings to disable IRQs */ -} - -/**************************************************************************** - * Name: up_enable_irq - * - * Description: - * This function implements enabling of the device specified by 'irq' - * at the interrupt controller level if supported by the architecture - * (up_irq_save() supports the global level, the device level is hardware - * specific). - * - ****************************************************************************/ - -void up_enable_irq(int irq) -{ - /* There are no ez80 interrupt controller settings to enable IRQs */ -} diff --git a/arch/z80/src/ez80/ez80_irqcommon.asm b/arch/z80/src/ez80/ez80_irqcommon.asm deleted file mode 100644 index 18f1e72740..0000000000 --- a/arch/z80/src/ez80/ez80_irqcommon.asm +++ /dev/null @@ -1,133 +0,0 @@ -;************************************************************************** -; arch/z80/src/ez80/ez80_irqcommon.asm -; -; SPDX-License-Identifier: Apache-2.0 -; -; Licensed to the Apache Software Foundation (ASF) under one or more -; contributor license agreements. See the NOTICE file distributed with -; this work for additional information regarding copyright ownership. The -; ASF licenses this file to you under the Apache License, Version 2.0 (the -; "License"); you may not use this file except in compliance with the -; License. You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -; License for the specific language governing permissions and limitations -; under the License. -; -;************************************************************************** - -;************************************************************************** -; Constants -;************************************************************************** - -; Bits in the Z80 FLAGS register ****************************************** - -EZ80_C_FLAG EQU 01h ; Bit 0: Carry flag -EZ80_N_FLAG EQU 02h ; Bit 1: Add/Subtract flag -EZ80_PV_FLAG EQU 04h ; Bit 2: Parity/Overflow flag -EZ80_H_FLAG EQU 10h ; Bit 4: Half carry flag -EZ80_Z_FLAG EQU 40h ; Bit 5: Zero flag -EZ80_S_FLAG EQU 80h ; Bit 7: Sign flag - -;************************************************************************** -; Global Symbols Imported -;************************************************************************** - - xref _z80_doirq - -;************************************************************************** -; Global Symbols Exported -;************************************************************************** - - xdef _ez80_irq_common - -;************************************************************************** -; Common Interrupt handler -;************************************************************************** - - define .STARTUP, space = ROM - segment .STARTUP - .assume ADL=1 - -_ez80_irq_common: - - ; Create a register frame. SP points to top of frame + 4, pushes - ; decrement the stack pointer. Already have - ; - ; Offset 8: Return PC is already on the stack - ; Offset 7: AF (retaining flags) - ; - ; IRQ number is in A - - push hl ; Offset 6: HL - ld hl, 3*3 ; HL is the value of the stack pointer before - add hl, sp ; the interrupt occurred (3 for PC, AF, HL) - push hl ; Offset 5: Stack pointer - push iy ; Offset 4: IY - push ix ; Offset 3: IX - push de ; Offset 2: DE - push bc ; Offset 1: BC - - ; At this point, we know that interrupts were enabled (or we wouldn't be here) - ; so we can save a fake indication that will cause interrupts to restored when - ; this context is restored - - ld bc, EZ80_PV_FLAG ; Parity bit. 1=parity odd, IEF2=1 - push bc ; Offset 0: I with interrupt state in parity - di ; (not necessary) - - ; Call the interrupt decode logic. SP points to the beginning of the reg structure - - ld hl, 0 ; Argument #2 is the beginning of the reg structure - add hl, sp ; - push hl ; Place argument #2 at the top of stack - ld bc, 0 ; BC = reset number - ld c, a ; Save the reset number in C - push bc ; Argument #1 is the Reset number - call _z80_doirq ; Decode the IRQ - - ; On return, HL points to the beginning of the reg structure to restore - ; Note that (1) the arguments pushed on the stack are not popped, and (2) the - ; original stack pointer is lost. In the normal case (no context switch), - ; HL will contain the value of the SP before the arguments were pushed. - - ld sp, hl ; Use the new stack pointer - - ; Restore registers. HL points to the beginning of the reg structure to restore - - ex af, af' ; Select alternate AF - pop af ; Offset 0: AF' = I with interrupt state in parity - ex af, af' ; Restore original AF - pop bc ; Offset 1: BC - pop de ; Offset 2: DE - pop ix ; Offset 3: IX - pop iy ; Offset 4: IY - exx ; Use alternate BC/DE/HL - pop hl ; Offset 5: HL' = Stack pointer after return - exx ; Restore original BC/DE/HL - pop hl ; Offset 6: HL - pop af ; Offset 7: AF - - ; Restore the stack pointer - - exx ; Use alternate BC/DE/HL - pop de ; Offset 8: Return address - ld sp, hl ; Set SP = saved stack pointer value before return - push de ; Set up for reti - exx ; Restore original BC/DE/HL - - ; Restore interrupt state - - ex af, af' ; Recover interrupt state - jp po, nointenable ; Odd parity, IFF2=0, means disabled - ex af, af' ; Restore AF (before enabling interrupts) - ei ; yes - reti -nointenable: - ex af, af' ; Restore AF - reti - end diff --git a/arch/z80/src/ez80/ez80_irqsave.asm b/arch/z80/src/ez80/ez80_irqsave.asm deleted file mode 100644 index 02b28dfbe5..0000000000 --- a/arch/z80/src/ez80/ez80_irqsave.asm +++ /dev/null @@ -1,91 +0,0 @@ -;************************************************************************** -; arch/z80/src/ez80/ez80_irqsave.asm -; -; SPDX-License-Identifier: Apache-2.0 -; -; Licensed to the Apache Software Foundation (ASF) under one or more -; contributor license agreements. See the NOTICE file distributed with -; this work for additional information regarding copyright ownership. The -; ASF licenses this file to you under the Apache License, Version 2.0 (the -; "License"); you may not use this file except in compliance with the -; License. You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -; License for the specific language governing permissions and limitations -; under the License. -; -;************************************************************************** - -;************************************************************************** -; Global Symbols Imported -;************************************************************************** - -;************************************************************************** -; Global Symbols Exported -;************************************************************************** - - xdef _up_irq_save - xdef _up_irq_restore - xdef _up_irq_enable - -;************************************************************************** -; Code -;************************************************************************** - - segment CODE - .assume ADL=1 - -;************************************************************************** -;* Name: irqstate_t up_irq_save(void) -;* -;* Description: -;* Disable all interrupts; return previous interrupt state -;* -;************************************************************************** - -_up_irq_save: - ld a, i ; AF = interrupt state - di ; Interrupts are disabled (does not affect F) - push af ; Transfer to HL via the stack - pop hl ; - ret ; And return - -;************************************************************************** -;* Name: void up_irq_restore(irqstate_t flags) -;* -;* Description: -;* Restore previous interrupt state -;* -;************************************************************************** - -_up_irq_restore: - di ; Assume disabled - pop hl ; HL = return address - pop af ; AF Parity bit holds interrupt state - jp po, _disabled ; Skip over re-enable if Parity odd - ei ; Re-enable interrupts -_disabled: - push af ; Restore stack - push hl ; - ret ; and return - -;************************************************************************** -;* Name: irqstate_t up_irq_enable(void) -;* -;* Description: -;* Enable all interrupts; return previous interrupt state -;* -;************************************************************************** - -_up_irq_enable: - ld a, i ; AF = interrupt state - ei ; Interrupts are enabled (does not affect F) - push af ; Transfer to HL via the stack - pop hl ; - ret ; And return - - end diff --git a/arch/z80/src/ez80/ez80_progentry.asm b/arch/z80/src/ez80/ez80_progentry.asm deleted file mode 100644 index d823448d5c..0000000000 --- a/arch/z80/src/ez80/ez80_progentry.asm +++ /dev/null @@ -1,46 +0,0 @@ -;************************************************************************** -; arch/z80/src/ez80/ez80_progentry.asm -; -; SPDX-License-Identifier: Apache-2.0 -; -; Licensed to the Apache Software Foundation (ASF) under one or more -; contributor license agreements. See the NOTICE file distributed with -; this work for additional information regarding copyright ownership. The -; ASF licenses this file to you under the Apache License, Version 2.0 (the -; "License"); you may not use this file except in compliance with the -; License. You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -; License for the specific language governing permissions and limitations -; under the License. -; -;************************************************************************** - -;************************************************************************** -; Global Symbols Imported -;************************************************************************** - - xref _ez80_startup - -;************************************************************************** -; Global Symbols Exported -;************************************************************************** - - xdef _ez80_reset - -;************************************************************************** -; Reset entry points -;************************************************************************** - - define .RESET, space = RAM - segment .RESET - -_ez80_reset: - di ; Disable interrupts - rsmix ; Set MADL control bit to 0 - jp.lil _ez80_startup ; Perform normal startup - end diff --git a/arch/z80/src/ez80/ez80_registerdump.c b/arch/z80/src/ez80/ez80_registerdump.c deleted file mode 100644 index 05425cbcf9..0000000000 --- a/arch/z80/src/ez80/ez80_registerdump.c +++ /dev/null @@ -1,68 +0,0 @@ -/**************************************************************************** - * arch/z80/src/ez80/ez80_registerdump.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include -#include - -#include "chip/switch.h" -#include "z80_internal.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_dump_register - ****************************************************************************/ - -void up_dump_register(FAR void *dumpregs) -{ - FAR volatile chipreg_t *regs = dumpregs ? dumpregs : up_current_regs(); - -#ifdef CONFIG_EZ80_Z80MODE - _alert("AF: %04x I: %04x\n", - regs[XCPT_AF], regs[XCPT_I]); - _alert("BC: %04x DE: %04x HL: %04x\n", - regs[XCPT_BC], regs[XCPT_DE], regs[XCPT_HL]); - _alert("IX: %04x IY: %04x\n", - regs[XCPT_IX], regs[XCPT_IY]); - _alert("SP: %04x PC: %04x\n" - regs[XCPT_SP], regs[XCPT_PC]); -#else - _alert("AF: %06x I: %06x\n", - regs[XCPT_AF], regs[XCPT_I]); - _alert("BC: %06x DE: %06x HL: %06x\n", - regs[XCPT_BC], regs[XCPT_DE], regs[XCPT_HL]); - _alert("IX: %06x IY: %06x\n", - regs[XCPT_IX], regs[XCPT_IY]); - _alert("SP: %06x PC: %06x\n", - regs[XCPT_SP], regs[XCPT_PC]); -#endif -} diff --git a/arch/z80/src/ez80/ez80_reset.asm b/arch/z80/src/ez80/ez80_reset.asm deleted file mode 100644 index 5f6fa0a4a1..0000000000 --- a/arch/z80/src/ez80/ez80_reset.asm +++ /dev/null @@ -1,77 +0,0 @@ -;************************************************************************** -; arch/z80/src/ez80/ez80_reset.asm -; -; SPDX-License-Identifier: Apache-2.0 -; -; Licensed to the Apache Software Foundation (ASF) under one or more -; contributor license agreements. See the NOTICE file distributed with -; this work for additional information regarding copyright ownership. The -; ASF licenses this file to you under the Apache License, Version 2.0 (the -; "License"); you may not use this file except in compliance with the -; License. You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -; License for the specific language governing permissions and limitations -; under the License. -; -;************************************************************************** - -;************************************************************************** -; Global Symbols Imported -;************************************************************************** - - xref _ez80_startup - -;************************************************************************** -; Global Symbols Exported -;************************************************************************** - - xdef _ez80_reset - -;************************************************************************** -; Macros -;************************************************************************** - -; Define one reset handler -; 1. Disable interrupts -; 2. Clear mixed memory mode (MADL) flag -; 3. jump to initialization procedure with jp.lil to set ADL - -rstvector: macro - di - rsmix - jp.lil _ez80_startup - endmac rstvector - -;************************************************************************** -; Reset entry points -;************************************************************************** - - define .RESET, space = ROM - segment .RESET - -_ez80_reset: -_rst0: - rstvector -_rst8: - rstvector -_rst10: - rstvector -_rst18: - rstvector -_rst20: - rstvector -_rst28: - rstvector -_rst30: - rstvector -_rst38: - rstvector - ds 026h -_nmi: - retn - end diff --git a/arch/z80/src/ez80/ez80_restorecontext.asm b/arch/z80/src/ez80/ez80_restorecontext.asm deleted file mode 100644 index 8f091f303c..0000000000 --- a/arch/z80/src/ez80/ez80_restorecontext.asm +++ /dev/null @@ -1,96 +0,0 @@ -;************************************************************************** -; arch/z80/src/ez80/ez80_restorcontext.asm -; -; SPDX-License-Identifier: Apache-2.0 -; -; Licensed to the Apache Software Foundation (ASF) under one or more -; contributor license agreements. See the NOTICE file distributed with -; this work for additional information regarding copyright ownership. The -; ASF licenses this file to you under the Apache License, Version 2.0 (the -; "License"); you may not use this file except in compliance with the -; License. You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -; License for the specific language governing permissions and limitations -; under the License. -; -;************************************************************************** - -;************************************************************************** -; Global Symbols Imported -;************************************************************************** - -;************************************************************************** -; Global Symbols Expported -;************************************************************************** - - xdef _ez80_restorecontext - -;************************************************************************** -; Code -;************************************************************************** - - segment CODE - .assume ADL=1 - -;************************************************************************** -; ez80_restorecontext -;************************************************************************** - -_ez80_restorecontext: - ; On entry, stack contains return address (not used), then address - ; of the register save structure - - ; Discard the return address, we won't be returning - - pop hl - - ; Get the address of the beginning of the state save area. Each - ; pop will increment to the next element of the structure - - pop hl ; BC = Address of save structure - ld sp, hl ; SP points to top of storage area - - ; Disable interrupts while we muck with the alternative registers. The - ; Correct interrupt state will be restore below - - di - - ; Restore registers. HL points to the beginning of the reg structure to restore - - ex af, af' ; Select alternate AF - pop af ; Offset 0: AF' = I with interrupt state in parity - ex af, af' ; Restore original AF - pop bc ; Offset 1: BC - pop de ; Offset 2: DE - pop ix ; Offset 3: IX - pop iy ; Offset 4: IY - exx ; Use alternate BC/DE/HL - pop hl ; Offset 5: HL' = Stack pointer after return - exx ; Restore original BC/DE/HL - pop hl ; Offset 6: HL - pop af ; Offset 7: AF - - ; Restore the stack pointer - - exx ; Use alternate BC/DE/HL - pop de ; DE' = return address - ld sp, hl ; Set SP = saved stack pointer value before return - push de ; Save return address for ret instruction - exx ; Restore original BC/DE/HL - - ; Restore interrupt state - - ex af, af' ; Recover interrupt state - jp po, noinrestore ; Odd parity, IFF2=0, means disabled - ex af, af' ; Restore AF (before enabling interrupts) - ei ; yes.. Enable interrupts - ret ; and return -noinrestore: - ex af, af' ; Restore AF - ret ; Return with interrupts disabled - end diff --git a/arch/z80/src/ez80/ez80_rtc.c b/arch/z80/src/ez80/ez80_rtc.c deleted file mode 100644 index 86beb799d1..0000000000 --- a/arch/z80/src/ez80/ez80_rtc.c +++ /dev/null @@ -1,721 +0,0 @@ -/**************************************************************************** - * arch/z80/src/ez80/ez80_rtc.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include - -#include "chip.h" -#include "ez80_rtc.h" - -#include - -#ifdef CONFIG_EZ80_RTC - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -#ifndef CONFIG_RTC_DATETIME -# error "CONFIG_RTC_DATETIME must be set to use this driver" -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/* Raw time from the RTC. All are binary. */ - -struct rtc_timeregs_s -{ - uint8_t sec; /* Seconds Range 0-59 */ - uint8_t min; /* Minutes Range 0-59 */ - uint8_t hrs; /* Hours Range 0-23 */ - uint8_t dow; /* Day of week Range 1-7 */ - uint8_t dom; /* Day of month Range 1-31 */ - uint8_t mon; /* Month Range 1-12 */ - uint8_t yr; /* Year Range 0-99 */ - uint8_t cen; /* Century Range 0-99 */ -}; - -/* Alarm time from the RTC. All are BCD encoded. */ - -struct rtc_almregs_s -{ - uint8_t sec; /* Seconds */ - uint8_t min; /* Minutes */ - uint8_t hrs; /* Hours */ - uint8_t dow; /* Day of week */ -}; - -#ifdef CONFIG_RTC_ALARM -struct alm_cbinfo_s -{ - volatile alm_callback_t ac_cb; /* Client callback function */ - volatile FAR void *ac_arg; /* Argument to pass with the callback function */ -}; -#endif - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -#ifdef CONFIG_RTC_ALARM -/* Callback to use when an EXTI is activated */ - -static struct alm_cbinfo_s g_alarmcb; -#endif - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/* g_rtc_enabled is set true after the RTC has successfully initialized */ - -volatile bool g_rtc_enabled = false; - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -/* Debug */ - -#ifdef CONFIG_DEBUG_RTC_INFO -static void rtc_dumpregs(FAR const char *msg); -static void rtc_dumptime(FAR const struct tm *tp, FAR const char *msg); -#endif - -/* Register access */ - -static void rtc_unlock(void); -static void rtc_lock(void); - -static void get_raw_time(FAR struct rtc_timeregs_s *rtcregs); -static void set_raw_time(FAR const struct rtc_timeregs_s *rtcregs); - -#ifdef CONFIG_RTC_ALARM -static void get_raw_alarm(FAR struct rtc_almregs_s *almregs); -static void set_raw_alarm(FAR const struct rtc_almregs_s *almregs); -static int ez80_alarm_interrupt(int irq, FAR void *context, FAR void *arg); -#endif - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: rtc_dumpregs - ****************************************************************************/ - -#ifdef CONFIG_DEBUG_RTC_INFO -static void rtc_dumpregs(FAR const char *msg) -{ - int rtc_state; - - rtcinfo("%s:\n", msg); - rtcinfo(" SEC: %02x\n", inp(EZ80_RTC_SEC)); - rtcinfo(" MIN: %02x\n", inp(EZ80_RTC_MIN)); - rtcinfo(" HRS: %02x\n", inp(EZ80_RTC_HRS)); - rtcinfo(" DOW: %02x\n", inp(EZ80_RTC_DOW)); - rtcinfo(" DOM: %02x\n", inp(EZ80_RTC_DOM)); - rtcinfo(" MON: %02x\n", inp(EZ80_RTC_MON)); - rtcinfo(" YR: %02x\n", inp(EZ80_RTC_YR)); - rtcinfo(" CEN: %02x\n", inp(EZ80_RTC_CEN)); - rtcinfo(" ASEC: %02x\n", inp(EZ80_RTC_ASEC)); - rtcinfo(" AMIN: %02x\n", inp(EZ80_RTC_AMIN)); - rtcinfo(" AHRS: %02x\n", inp(EZ80_RTC_AHRS)); - rtcinfo(" ADOW: %02x\n", inp(EZ80_RTC_ADOW)); - rtcinfo(" ACTRL: %02x\n", inp(EZ80_RTC_ACTRL)); - rtcinfo(" CTRL: %02x\n", inp(EZ80_RTC_CTRL)); -} -#else -# define rtc_dumpregs(msg) -#endif - -/**************************************************************************** - * Name: rtc_dumptime - ****************************************************************************/ - -#ifdef CONFIG_DEBUG_RTC_INFO -static void rtc_dumptime(FAR const struct tm *tp, FAR const char *msg) -{ - rtcinfo("%s:\n", msg); - rtcinfo(" tm_sec: %08x\n", tp->tm_sec); - rtcinfo(" tm_min: %08x\n", tp->tm_min); - rtcinfo(" tm_hour: %08x\n", tp->tm_hour); - rtcinfo(" tm_wday: %08x\n", tp->tm_wday); - rtcinfo(" tm_mday: %08x\n", tp->tm_mday); - rtcinfo(" tm_mon: %08x\n", tp->tm_mon); - rtcinfo(" tm_year: %08x\n", tp->tm_year); -} -#else -# define rtc_dumptime(tp, msg) -#endif - -/**************************************************************************** - * Name: rtc_unlock - * - * Description: - * Disable RTC write protection - * - * Input Parameters: - * None - * - * Returned Value: - * None - * - ****************************************************************************/ - -static void rtc_unlock(void) -{ - uint8_t regval; - - regval = inp(EZ80_RTC_CTRL); - regval |= EZ80_RTC_UNLOCK; - outp(EZ80_RTC_CTRL, regval); -} - -/**************************************************************************** - * Name: rtc_lock - * - * Description: - * Enable RTC write protection - * - * Input Parameters: - * None - * - * Returned Value: - * None - * - ****************************************************************************/ - -static void rtc_lock(void) -{ - uint8_t regval; - - regval = inp(EZ80_RTC_CTRL); - regval &= ~EZ80_RTC_UNLOCK; - outp(EZ80_RTC_CTRL, regval); -} - -/**************************************************************************** - * Name: get_raw_time - * - * Description: - * Read all of the RTC time registers - * - * Input Parameters: - * rtcregs - Location to return the raw RTC time registers - * - * Returned Value: - * None - * - ****************************************************************************/ - -static void get_raw_time(FAR struct rtc_timeregs_s *rtcregs) -{ - rtcregs->sec = inp(EZ80_RTC_SEC); - rtcregs->min = inp(EZ80_RTC_MIN); - rtcregs->hrs = inp(EZ80_RTC_HRS); - rtcregs->dow = inp(EZ80_RTC_DOW); - rtcregs->dom = inp(EZ80_RTC_DOM); - rtcregs->mon = inp(EZ80_RTC_MON); - rtcregs->yr = inp(EZ80_RTC_YR); - rtcregs->cen = inp(EZ80_RTC_CEN); -} - -/**************************************************************************** - * Name: set_raw_time - * - * Description: - * Write all of the RTC time registers - * - * Input Parameters: - * almregs - New RTC register values - * - * Returned Value: - * None - * - ****************************************************************************/ - -static void set_raw_time(FAR const struct rtc_timeregs_s *rtcregs) -{ - rtc_unlock(); - outp(EZ80_RTC_SEC, rtcregs->sec); - outp(EZ80_RTC_MIN, rtcregs->min); - outp(EZ80_RTC_HRS, rtcregs->hrs); - outp(EZ80_RTC_DOW, rtcregs->dow); - outp(EZ80_RTC_DOM, rtcregs->dom); - outp(EZ80_RTC_MON, rtcregs->mon); - outp(EZ80_RTC_YR, rtcregs->yr); - outp(EZ80_RTC_CEN, rtcregs->cen); - rtc_lock(); -} - -/**************************************************************************** - * Name: get_raw_alarm - * - * Description: - * Read all of the RTC alarm registers - * - * Input Parameters: - * almregs - Location to return the raw RTC alarm registers - * - * Returned Value: - * None - * - ****************************************************************************/ - -#ifdef CONFIG_RTC_ALARM -static void get_raw_alarm(FAR struct rtc_almregs_s *almregs) -{ - almregs->sec = inp(EZ80_RTC_ASEC); - almregs->min = inp(EZ80_RTC_AMIN); - almregs->hrs = inp(EZ80_RTC_AHRS); - almregs->dow = inp(EZ80_RTC_ADOW); -} -#endif - -/**************************************************************************** - * Name: set_raw_alarm - * - * Description: - * Write all of the RTC alarm registers - * - * Input Parameters: - * almregs - New RTC register values - * - * Returned Value: - * None - * - ****************************************************************************/ - -#ifdef CONFIG_RTC_ALARM -static void set_raw_alarm(FAR const struct rtc_almregs_s *almregs) -{ - rtc_unlock(); - outp(EZ80_RTC_ASEC, almregs->sec); - outp(EZ80_RTC_AMIN, almregs->min); - outp(EZ80_RTC_AHRS, almregs->hrs); - outp(EZ80_RTC_ADOW, almregs->dow); - rtc_lock(); -} -#endif - -/**************************************************************************** - * Name: ez80_alarm_interrupt - * - * Description: - * RTC ALARM interrupt service routine through the EXTI line - * - * Input Parameters: - * irq - The IRQ number that generated the interrupt - * context - Architecture specific register save information. - * - * Returned Value: - * Zero (OK) on success; A negated errno value on failure. - * - ****************************************************************************/ - -#ifdef CONFIG_RTC_ALARM -static int ez80_alarm_interrupt(int irq, FAR void *context, FAR void *arg) -{ - uint8_t regval; - - /* Verify that the alarm interrupt is pending */ - - regval = inp(EZ80_RTC_CTRL); - if ((regval & EZ80_RTC_ALARM) != 0) - { - alm_callback_t cb; - FAR void *cb_arg; - - /* Disable the alarm and disable the alarm interrupt */ - - rtc_unlock(); - outp(EZ80_RTC_ACTRL, 0); - - regval = inp(EZ80_RTC_CTRL); - regval &= ~EZ80_RTC_INTEN; - outp(EZ80_RTC_CTRL, regval); - rtc_lock(); - - up_disable_irq(EZ80_RTC_IRQ); - - /* Perform the alarm callback */ - - cb = g_alarmcb.ac_cb; - cb_arg = g_alarmcb.ac_arg; - - g_alarmcb.ac_cb = NULL; - g_alarmcb.ac_arg = NULL; - - cb(cb_arg); - } - - return OK; -} -#endif - -/**************************************************************************** - * Name: up_rtc_initialize - * - * Description: - * Initialize the hardware RTC per the selected configuration. This - * function is called once during the OS initialization sequence - * - * Input Parameters: - * None - * - * Returned Value: - * Zero (OK) on success; a negated errno on failure - * - ****************************************************************************/ - -int up_rtc_initialize(void) -{ - uint8_t regval; - - /* Some boards do not have the external 32khz oscillator installed, - * for those boards we must fallback to the crummy line frequency - * clock source. - */ - - regval = 0; - -#ifndef CONFIG_EZ80_RTC_32KHZ -#ifdef EZ80_RTC_LINEFREQ50 - /* Use the internal 50/60 Hz clock as the input to the RTC block */ - - regval |= (EZ80_RTC_FREQSEL | EZ80_RTC_CLKSEL); -#else - regval |= EZ80_RTC_CLKSEL; -#endif -#endif - - outp(EZ80_RTC_CTRL, regval); - -#ifdef CONFIG_RTC_ALARM - irq_attach(EZ80_RTC_IRQ, ez80_alarm_interrupt, NULL); -#endif - - rtc_dumpregs("After Initialization"); - g_rtc_enabled = true; - return OK; -} - -/**************************************************************************** - * Name: up_rtc_getdatetime - * - * Description: - * Get the current date and time from the date/time RTC. This is used to - * replace the system timer. It is only used by the RTOS during - * initialization to set up the system time when CONFIG_RTC and - * CONFIG_RTC_DATETIME are selected (and CONFIG_RTC_HIRES is not). - * - * Input Parameters: - * tp - The location to return the high resolution time value. - * - * Returned Value: - * Zero (OK) on success; a negated errno on failure - * - ****************************************************************************/ - -int up_rtc_getdatetime(FAR struct tm *tp) -{ - struct rtc_timeregs_s timeregs; - struct rtc_timeregs_s tmpregs; - - rtc_dumpregs("Reading Time"); - - /* Sample the data time registers. There is a race condition here... , - * for example, we sample the time just before midnight on December 31, - * the date could be wrong because the day rolled over while were - * sampling. Thus loop for checking wrap here is needed. - */ - - do - { - get_raw_time(&tmpregs); - get_raw_time(&timeregs); - } - while (tmpregs.min != timeregs.min || - tmpregs.hrs != timeregs.hrs || - tmpregs.dom != timeregs.dom || - tmpregs.mon != timeregs.mon || - tmpregs.yr != timeregs.yr || - tmpregs.cen != timeregs.cen); - - /* Convert the RTC time to fields in struct tm format. Most of the EZ80 - * ranges of values correspond between struct tm and the time registers. - * Exceptions: Month and year. - */ - - tp->tm_sec = timeregs.sec; - tp->tm_min = timeregs.min; - tp->tm_hour = timeregs.hrs; - tp->tm_mday = timeregs.dom; - tp->tm_mon = timeregs.mon - 1; /* Range is 0-11 */ - - /* Years since 1900 */ - - tp->tm_year = (uint16_t)timeregs.cen * 100 + (uint16_t)timeregs.yr - 1900; - - rtc_dumptime((FAR const struct tm *)tp, "Returning"); - return OK; -} - -/**************************************************************************** - * Name: ez80_rtc_setdatetime - * - * Description: - * Set the RTC to the provided time. RTC implementations which provide - * up_rtc_getdatetime() (CONFIG_RTC_DATETIME is selected) should provide - * this function. - * - * Input Parameters: - * tp - the time to use - * - * Returned Value: - * Zero (OK) on success; a negated errno on failure - * - ****************************************************************************/ - -int ez80_rtc_setdatetime(FAR const struct tm *tp) -{ - struct rtc_timeregs_s timeregs; - uint16_t year; - uint16_t cen; - - rtc_dumptime(tp, "Requested time"); - - timeregs.sec = tp->tm_sec; - timeregs.min = tp->tm_min; - timeregs.hrs = tp->tm_hour; - timeregs.dom = tp->tm_mday; - timeregs.mon = tp->tm_mon + 1; /* Range is 1-12 */ - - /* Years AD */ - - year = tp->tm_year + 1900; - cen = year / 100; - - timeregs.cen = cen; - timeregs.yr = year - 100 * cen; - - set_raw_time(&timeregs); - - rtc_dumpregs("New time setting"); - return OK; -} - -/**************************************************************************** - * Name: up_rtc_settime - * - * Description: - * Set the RTC to the provided time. All RTC implementations must be able - * to set their time based on a standard timespec. - * - * Input Parameters: - * tp - the time to use - * - * Returned Value: - * Zero (OK) on success; a negated errno on failure - * - ****************************************************************************/ - -int up_rtc_settime(FAR const struct timespec *tp) -{ - FAR struct tm newtime; - - /* Break out the time values (not that the time is set only to units of - * seconds) - */ - - gmtime_r(&tp->tv_sec, &newtime); - return ez80_rtc_setdatetime(&newtime); -} - -/**************************************************************************** - * Name: ez80_rtc_setalarm - * - * Description: - * Set an alarm to an absolute time using associated hardware. - * - * Input Parameters: - * alminfo - Information about the alarm configuration. - * - * Returned Value: - * Zero (OK) on success; a negated errno on failure - * - ****************************************************************************/ - -#ifdef CONFIG_RTC_ALARM -int ez80_rtc_setalarm(FAR struct alm_setalarm_s *alminfo) -{ - struct rtc_almregs_s almregs; - uint8_t regval; - int ret = -EINVAL; - - DEBUGASSERT(alminfo != NULL); - - rtc_dumptime(&alminfo->as_time, "New alarm time"); - - /* Save the callback info */ - - g_alarmcb.ac_cb = alminfo->as_cb; - g_alarmcb.ac_arg = alminfo->as_arg; - - /* Set the alarm time */ - - almregs.sec = alminfo->as_time.tm_sec; - almregs.min = alminfo->as_time.tm_min; - almregs.hrs = alminfo->as_time.tm_hour; - almregs.dow = alminfo->as_time.tm_wday; - - set_raw_alarm(&almregs); - - /* Enable the alarm */ - - rtc_unlock(); - outp(EZ80_RTC_ACTRL, EZ80_RTC_AALL); - - regval = inp(EZ80_RTC_CTRL); - regval |= ~EZ80_RTC_INTEN; - outp(EZ80_RTC_CTRL, regval); - rtc_lock(); - - rtc_dumpregs("Set Alarm"); - - /* Enable the alarm interrupt at the interrupt controller */ - - up_enable_irq(EZ80_RTC_IRQ); - return OK; -} -#endif - -/**************************************************************************** - * Name: ez80_rtc_cancelalarm - * - * Description: - * Cancel an alarm. - * - * Input Parameters: - * None - * - * Returned Value: - * Zero (OK) on success; a negated errno on failure - * - ****************************************************************************/ - -#ifdef CONFIG_RTC_ALARM -int ez80_rtc_cancelalarm(void) -{ - uint8_t regval; - - /* Cancel the global callback function */ - - g_alarmcb.ac_cb = NULL; - g_alarmcb.ac_arg = NULL; - - /* Disable RTC alarm and and the alarm interrupt */ - - rtc_unlock(); - outp(EZ80_RTC_ACTRL, 0); - - regval = inp(EZ80_RTC_CTRL); - regval &= ~EZ80_RTC_INTEN; - outp(EZ80_RTC_CTRL, regval); - rtc_lock(); - - up_disable_irq(EZ80_RTC_IRQ); - return OK; -} -#endif - -/**************************************************************************** - * Name: ez80_rtc_rdalarm - * - * Description: - * Return the current alarm setting. - * - * Input Parameters: - * almtime - Location to return the current alarm time. - * - * Returned Value: - * Zero (OK) on success; a negated errno on failure - * - ****************************************************************************/ - -#ifdef CONFIG_RTC_ALARM -int ez80_rtc_rdalarm(FAR struct tm *almtime) -{ - struct rtc_almregs_s almregs; - int ret = -EINVAL; - - rtc_dumpregs("Reading Alarm"); - - /* Get the current time for the month and year */ - - ret = up_rtc_getdatetime(almtime); - if (ret < 0) - { - return ret; - } - - /* Sample the alarm time registers. There is no race condition in this - * case. - */ - - get_raw_alarm(&almregs); - - /* Overwrite to get the full alarm time */ - - almtime->tm_sec = almregs.sec; - almtime->tm_min = almregs.min; - almtime->tm_hour = almregs.hrs; - almtime->tm_wday = almregs.dow; - - rtc_dumptime((FAR const struct tm *)almtime, "Returning"); - return OK; -} -#endif - -#endif /* CONFIG_EZ80_RTC */ diff --git a/arch/z80/src/ez80/ez80_rtc.h b/arch/z80/src/ez80/ez80_rtc.h deleted file mode 100644 index 6ccbb80566..0000000000 --- a/arch/z80/src/ez80/ez80_rtc.h +++ /dev/null @@ -1,196 +0,0 @@ -/**************************************************************************** - * arch/z80/src/ez80/ez80_rtc.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z80_SRC_EZ80_EZ80_RTC_H -#define __ARCH_Z80_SRC_EZ80_EZ80_RTC_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include "chip.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* RTC registers ************************************************************/ - -/* Provided in z80F91.h */ - -/* RTC register bit definitions *********************************************/ - -/* ACTRL register */ - -#define EZ80_RTC_ASECEN (1 << 0) /* Bit 0: Enable seconds alarm */ -#define EZ80_RTC_AMINEN (1 << 1) /* Bit 1: Enable minutes alarm */ -#define EZ80_RTC_AHRSEN (1 << 2) /* Bit 4: Enable hours alarm */ -#define EZ80_RTC_ADOWEN (1 << 3) /* Bit 3: Enable day-of-week alarm */ -#define EZ80_RTC_AALL 0x0f /* All times */ - -/* CTRL register */ - -#define EZ80_RTC_UNLOCK (1 << 0) /* Bit 0: RTC registers unlocked */ -#define EZ80_RTC_SLPWAKE (1 << 1) /* Bit 1: Alarm sleep recovery */ -#define EZ80_RTC_FREQSEL (1 << 3) /* Bit 3: Power line is 50Hz */ -#define EZ80_RTC_CLKSEL (1 << 4) /* Bit 4: Clock source is power line */ -#define EZ80_RTC_BCDEN (1 << 5) /* Bit 5: BCD encoded time */ -#define EZ80_RTC_INTEN (1 << 6) /* Bit 6: Alarm interrupt enabled */ -#define EZ80_RTC_ALARM (1 << 7) /* Bit 7: Alarm interrupt active */ - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -#ifndef __ASSEMBLY__ - -typedef CODE void (*alm_callback_t)(FAR void *arg); - -/* Structure used to pass parameters to set an alarm */ - -struct alm_setalarm_s -{ - struct tm as_time; /* Alarm expiration time */ - alm_callback_t as_cb; /* Callback (if non-NULL) */ - FAR void *as_arg; /* Argument for callback */ -}; - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -#undef EXTERN -#if defined(__cplusplus) -# define EXTERN extern "C" -extern "C" -{ -#else -# define EXTERN extern -#endif - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Name: ez80_rtc_setdatetime - * - * Description: - * Set the RTC to the provided time. RTC implementations which provide - * up_rtc_getdatetime() (CONFIG_RTC_DATETIME is selected) should provide - * this function. - * - * Input Parameters: - * tp - the time to use - * - * Returned Value: - * Zero (OK) on success; a negated errno on failure - * - ****************************************************************************/ - -struct tm; -int ez80_rtc_setdatetime(FAR const struct tm *tp); - -/**************************************************************************** - * Name: ez80_rtc_lowerhalf - * - * Description: - * Instantiate the RTC lower half driver for the EZ80. General usage: - * - * #include - * #include "ez80_rtc.h" - * - * struct rtc_lowerhalf_s *lower; - * lower = ez80_rtc_lowerhalf(); - * rtc_initialize(0, lower); - * - * Input Parameters: - * None - * - * Returned Value: - * On success, a non-NULL RTC lower interface is returned. NULL is - * returned on any failure. - * - ****************************************************************************/ - -#ifdef CONFIG_RTC_DRIVER -struct rtc_lowerhalf_s; -FAR struct rtc_lowerhalf_s *ez80_rtc_lowerhalf(void); -#endif - -#ifdef CONFIG_RTC_ALARM - -/**************************************************************************** - * Name: ez80_rtc_setalarm - * - * Description: - * Set an alarm to an absolute time using associated hardware. - * - * Input Parameters: - * alminfo - Information about the alarm configuration. - * - * Returned Value: - * Zero (OK) on success; a negated errno on failure - * - ****************************************************************************/ - -int ez80_rtc_setalarm(FAR struct alm_setalarm_s *alminfo); - -/**************************************************************************** - * Name: ez80_rtc_rdalarm - * - * Description: - * Return the current alarm setting. - * - * Input Parameters: - * almtime - Location to return the current alarm time. - * - * Returned Value: - * Zero (OK) on success; a negated errno on failure - * - ****************************************************************************/ - -int ez80_rtc_rdalarm(FAR struct tm *almtime); - -/**************************************************************************** - * Name: ez80_rtc_cancelalarm - * - * Description: - * Cancel an alarm. - * - * Input Parameters: - * None - * - * Returned Value: - * Zero (OK) on success; a negated errno on failure - * - ****************************************************************************/ - -int ez80_rtc_cancelalarm(void); - -#endif /* CONFIG_RTC_ALARM */ -#endif /* __ASSEMBLY__ */ -#endif /* __ARCH_Z80_SRC_EZ80_RTC_H */ diff --git a/arch/z80/src/ez80/ez80_rtc_lowerhalf.c b/arch/z80/src/ez80/ez80_rtc_lowerhalf.c deleted file mode 100644 index 4061e3648e..0000000000 --- a/arch/z80/src/ez80/ez80_rtc_lowerhalf.c +++ /dev/null @@ -1,570 +0,0 @@ -/**************************************************************************** - * arch/z80/src/ez80/ez80_rtc_lowerhalf.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "chip.h" -#include "ez80_rtc.h" - -#ifdef CONFIG_RTC_DRIVER - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -#ifdef CONFIG_RTC_ALARM -struct ez80_cbinfo_s -{ - volatile rtc_alarm_callback_t cb; /* Callback when the alarm expires */ - volatile FAR void *priv; /* Private argument to accompany callback */ -}; -#endif - -/* This is the private type for the RTC state. It must be cast compatible - * with struct rtc_lowerhalf_s. - */ - -struct ez80_lowerhalf_s -{ - /* This is the contained reference to the read-only, lower-half - * operations vtable (which may lie in FLASH or ROM) - */ - - FAR const struct rtc_ops_s *ops; - - /* Data following is private to this driver and not visible outside of - * this file. - */ - - mutex_t devlock; /* Threads can only exclusively access the RTC */ - -#ifdef CONFIG_RTC_ALARM - /* Alarm callback information */ - - struct ez80_cbinfo_s cbinfo; -#endif -}; - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -/* Prototypes for static methods in struct rtc_ops_s */ - -static int ez80_rdtime(FAR struct rtc_lowerhalf_s *lower, - FAR struct rtc_time *rtctime); -static int ez80_settime(FAR struct rtc_lowerhalf_s *lower, - FAR const struct rtc_time *rtctime); -static bool ez80_havesettime(FAR struct rtc_lowerhalf_s *lower); - -#ifdef CONFIG_RTC_ALARM -static int ez80_setalarm(FAR struct rtc_lowerhalf_s *lower, - FAR const struct lower_setalarm_s *alarminfo); -static int ez80_setrelative(FAR struct rtc_lowerhalf_s *lower, - FAR const struct lower_setrelative_s *alarminfo); -static int ez80_cancelalarm(FAR struct rtc_lowerhalf_s *lower, int alarmid); -static int ez80_rdalarm(FAR struct rtc_lowerhalf_s *lower, - FAR struct lower_rdalarm_s *alarminfo); -#endif - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/* eZ80 RTC driver operations */ - -static const struct rtc_ops_s g_rtc_ops = -{ - ez80_rdtime, /* rdtime */ - ez80_settime, /* settime */ - ez80_havesettime /* havesettime */ -#ifdef CONFIG_RTC_ALARM - , ez80_setalarm, /* setalarm */ - ez80_setrelative, /* setrelative */ - ez80_cancelalarm, /* cancelalarm */ - ez80_rdalarm /* rdalarm */ -#endif -}; - -/* eZ80 RTC device state */ - -static struct ez80_lowerhalf_s g_rtc_lowerhalf = -{ - &g_rtc_ops, /* ops */ - NXMUTEX_INITIALIZER, -}; - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: ez80_alarm_callback - * - * Description: - * This is the function that is called from the RTC driver when the alarm - * goes off. It just invokes the upper half drivers callback. - * - * Input Parameters: - * None - * - * Returned Value: - * None - * - ****************************************************************************/ - -#ifdef CONFIG_RTC_ALARM -static void ez80_alarm_callback(FAR void *arg) -{ - FAR struct ez80_lowerhalf_s *lower; - FAR struct ez80_cbinfo_s *cbinfo; - rtc_alarm_callback_t cb; - FAR void *priv; - - lower = (struct ez80_lowerhalf_s *)arg; - cbinfo = &lower->cbinfo; - - /* Sample and clear the callback information to minimize the window in - * time in which race conditions can occur. - */ - - cb = (rtc_alarm_callback_t)cbinfo->cb; - priv = (FAR void *)cbinfo->priv; - DEBUGASSERT(priv != NULL); - - cbinfo->cb = NULL; - cbinfo->priv = NULL; - - /* Perform the callback */ - - if (cb != NULL) - { - cb(priv, 0); - } -} -#endif - -/**************************************************************************** - * Name: ez80_rdtime - * - * Description: - * Implements the rdtime() method of the RTC driver interface - * - * Input Parameters: - * lower - A reference to RTC lower half driver state structure - * rcttime - The location in which to return the current RTC time. - * - * Returned Value: - * Zero (OK) is returned on success; a negated errno value is returned - * on any failure. - * - ****************************************************************************/ - -static int ez80_rdtime(FAR struct rtc_lowerhalf_s *lower, - FAR struct rtc_time *rtctime) -{ -#if defined(CONFIG_RTC_DATETIME) - /* This operation depends on the fact that struct rtc_time is cast - * compatible with struct tm. - */ - - return up_rtc_getdatetime((FAR struct tm *)rtctime); - -#elif defined(CONFIG_RTC_HIRES) - FAR struct timespec ts; - int ret; - - /* Get the higher resolution time */ - - ret = up_rtc_gettime(&ts); - if (ret < 0) - { - goto errout; - } - - /* Convert the one second epoch time to a struct tm. This operation - * depends on the fact that struct rtc_time and struct tm are cast - * compatible. - */ - - if (!gmtime_r(&ts.tv_sec, (FAR struct tm *)rtctime)) - { - ret = -get_errno(); - goto errout; - } - - return OK; - -errout: - DEBUGASSERT(ret < 0); - return ret; - -#else - time_t timer; - - /* The resolution of time is only 1 second */ - - timer = up_rtc_time(); - - /* Convert the one second epoch time to a struct tm */ - - if (!gmtime_r(&timer, (FAR struct tm *)rtctime)) - { - int errcode = get_errno(); - DEBUGASSERT(errcode > 0); - return -errcode; - } - - return OK; -#endif -} - -/**************************************************************************** - * Name: ez80_settime - * - * Description: - * Implements the settime() method of the RTC driver interface - * - * Input Parameters: - * lower - A reference to RTC lower half driver state structure - * rcttime - The new time to set - * - * Returned Value: - * Zero (OK) is returned on success; a negated errno value is returned - * on any failure. - * - ****************************************************************************/ - -static int ez80_settime(FAR struct rtc_lowerhalf_s *lower, - FAR const struct rtc_time *rtctime) -{ -#ifdef CONFIG_RTC_DATETIME - /* This operation depends on the fact that struct rtc_time is cast - * compatible with struct tm. - */ - - return ez80_rtc_setdatetime((FAR const struct tm *)rtctime); - -#else - struct timespec ts; - - /* Convert the struct rtc_time to a time_t. Here we assume that struct - * rtc_time is cast compatible with struct tm. - */ - - ts.tv_sec = timegm((FAR struct tm *)rtctime); - ts.tv_nsec = 0; - - /* Now set the time (to one second accuracy) */ - - return up_rtc_settime(&ts); -#endif -} - -/**************************************************************************** - * Name: ez80_havesettime - * - * Description: - * Implements the havesettime() method of the RTC driver interface - * - * Input Parameters: - * lower - A reference to RTC lower half driver state structure - * - * Returned Value: - * Returns true if RTC date-time have been previously set. - * - ****************************************************************************/ - -static bool ez80_havesettime(FAR struct rtc_lowerhalf_s *lower) -{ - return true; -} - -/**************************************************************************** - * Name: ez80_setalarm - * - * Description: - * Set a new alarm. This function implements the setalarm() method of the - * RTC driver interface - * - * Input Parameters: - * lower - A reference to RTC lower half driver state structure - * alarminfo - Provided information needed to set the alarm - * - * Returned Value: - * Zero (OK) is returned on success; a negated errno value is returned - * on any failure. - * - ****************************************************************************/ - -#ifdef CONFIG_RTC_ALARM -static int ez80_setalarm(FAR struct rtc_lowerhalf_s *lower, - FAR const struct lower_setalarm_s *alarminfo) -{ - FAR struct ez80_lowerhalf_s *priv; - FAR struct ez80_cbinfo_s *cbinfo; - struct alm_setalarm_s lowerinfo; - int ret; - - /* ID0-> Alarm A; ID1 -> Alarm B */ - - DEBUGASSERT(lower != NULL && alarminfo != NULL); - DEBUGASSERT(alarminfo->id == 0); - - priv = (FAR struct ez80_lowerhalf_s *)lower; - - ret = nxmutex_lock(&priv->devlock); - if (ret < 0) - { - return ret; - } - - /* Remember the callback information */ - - cbinfo = &priv->cbinfo; - cbinfo->cb = alarminfo->cb; - cbinfo->priv = alarminfo->priv; - - /* Set the alarm */ - - lowerinfo.as_cb = ez80_alarm_callback; - lowerinfo.as_arg = priv; - memcpy(&lowerinfo.as_time, &alarminfo->time, sizeof(struct tm)); - - /* And set the alarm */ - - ret = ez80_rtc_setalarm(&lowerinfo); - if (ret < 0) - { - cbinfo->cb = NULL; - cbinfo->priv = NULL; - } - - nxmutex_unlock(&priv->devlock); - return ret; -} -#endif - -/**************************************************************************** - * Name: ez80_setrelative - * - * Description: - * Set a new alarm relative to the current time. This function implements - * the setrelative() method of the RTC driver interface - * - * Input Parameters: - * lower - A reference to RTC lower half driver state structure - * alarminfo - Provided information needed to set the alarm - * - * Returned Value: - * Zero (OK) is returned on success; a negated errno value is returned - * on any failure. - * - ****************************************************************************/ - -#ifdef CONFIG_RTC_ALARM -static int ez80_setrelative(FAR struct rtc_lowerhalf_s *lower, - FAR const struct lower_setrelative_s *alarminfo) -{ - struct lower_setalarm_s setalarm; - struct tm time; - time_t seconds; - int ret = -EINVAL; - irqstate_t flags; - - DEBUGASSERT(lower != NULL && alarminfo != NULL && alarminfo->id == 0); - - /* Disable pre-emption while we do this so that we don't have to worry - * about being suspended and working on an old time. - */ - - flags = enter_critical_section(); - - /* Get the current time in broken out format */ - - ret = up_rtc_getdatetime(&time); - if (ret >= 0) - { - /* Convert to seconds since the epoch */ - - seconds = timegm(&time); - - /* Add the seconds offset. Add one to the number of seconds - * because we are unsure of the phase of the timer. - */ - - seconds += (alarminfo->reltime + 1); - - /* And convert the time back to broken out format */ - - gmtime_r(&seconds, (FAR struct tm *)&setalarm.time); - - /* The set the alarm using this absolute time */ - - setalarm.cb = alarminfo->cb; - setalarm.priv = alarminfo->priv; - - ret = ez80_setalarm(lower, &setalarm); - } - - leave_critical_section(flags); - return ret; -} -#endif - -/**************************************************************************** - * Name: ez80_cancelalarm - * - * Description: - * Cancel the current alarm. This function implements the cancelalarm() - * method of the RTC driver interface - * - * Input Parameters: - * lower - A reference to RTC lower half driver state structure - * alarmid - Must be zero - * - * Returned Value: - * Zero (OK) is returned on success; a negated errno value is returned - * on any failure. - * - ****************************************************************************/ - -#ifdef CONFIG_RTC_ALARM -static int ez80_cancelalarm(FAR struct rtc_lowerhalf_s *lower, int alarmid) -{ - FAR struct ez80_lowerhalf_s *priv; - FAR struct ez80_cbinfo_s *cbinfo; - int ret; - - DEBUGASSERT(lower != NULL && alarmid == 0); - - priv = (FAR struct ez80_lowerhalf_s *)lower; - - ret = nxmutex_lock(&priv->devlock); - if (ret < 0) - { - return ret; - } - - /* Nullify callback information to reduce window for race conditions */ - - cbinfo = &priv->cbinfo; - cbinfo->cb = NULL; - cbinfo->priv = NULL; - - /* Then cancel the alarm */ - - ret = ez80_rtc_cancelalarm(); - nxmutex_unlock(&priv->devlock); - - return ret; -} -#endif - -/**************************************************************************** - * Name: ez80_rdalarm - * - * Description: - * Query the RTC alarm. - * - * Input Parameters: - * lower - A reference to RTC lower half driver state structure - * alarminfo - Provided information needed to query the alarm - * - * Returned Value: - * Zero (OK) is returned on success; a negated errno value is returned - * on any failure. - * - ****************************************************************************/ - -#ifdef CONFIG_RTC_ALARM -static int ez80_rdalarm(FAR struct rtc_lowerhalf_s *lower, - FAR struct lower_rdalarm_s *alarminfo) -{ - int ret = -EINVAL; - irqstate_t flags; - - DEBUGASSERT(lower != NULL && alarminfo != NULL && - alarminfo->time != NULL && alarminfo->id == 0); - - /* Disable pre-emption while we do this so that we don't have to worry - * about being suspended and working on an old time. - */ - - flags = enter_critical_section(); - ret = ez80_rtc_rdalarm((FAR struct tm *)alarminfo->time); - leave_critical_section(flags); - - return ret; -} -#endif - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: ez80_rtc_lowerhalf - * - * Description: - * Instantiate the RTC lower half driver for the eZ80. General usage: - * - * #include - * #include "ez80_rtc.h> - * - * struct rtc_lowerhalf_s *lower; - * lower = ez80_rtc_lowerhalf(); - * rtc_initialize(0, lower); - * - * Input Parameters: - * None - * - * Returned Value: - * On success, a non-NULL RTC lower interface is returned. NULL is - * returned on any failure. - * - ****************************************************************************/ - -FAR struct rtc_lowerhalf_s *ez80_rtc_lowerhalf(void) -{ - return (FAR struct rtc_lowerhalf_s *)&g_rtc_lowerhalf; -} - -#endif /* CONFIG_RTC_DRIVER */ diff --git a/arch/z80/src/ez80/ez80_saveusercontext.asm b/arch/z80/src/ez80/ez80_saveusercontext.asm deleted file mode 100644 index 44501911b1..0000000000 --- a/arch/z80/src/ez80/ez80_saveusercontext.asm +++ /dev/null @@ -1,158 +0,0 @@ -;************************************************************************* -; arch/z80/src/ez80/ez80_saveusercontext.asm -; -; SPDX-License-Identifier: Apache-2.0 -; -; Licensed to the Apache Software Foundation (ASF) under one or more -; contributor license agreements. See the NOTICE file distributed with -; this work for additional information regarding copyright ownership. The -; ASF licenses this file to you under the Apache License, Version 2.0 (the -; "License"); you may not use this file except in compliance with the -; License. You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -; License for the specific language governing permissions and limitations -; under the License. -; -;************************************************************************* - -;************************************************************************** -; Global Symbols Imported -;************************************************************************** - -;************************************************************************** -; Global Symbols Expported -;************************************************************************** - - xdef _up_saveusercontext - -;************************************************************************* -; Constants -;************************************************************************* - -CONFIG_EZ80_Z80MODE equ 0 - - .if CONFIG_EZ80_Z80MODE - ; Register save area layout - -XCPT_I equ 2*0 ; Offset 0: Saved I w/interrupt state in parity -XCPT_BC equ 2*1 ; Offset 1: Saved BC register -XCPT_DE equ 2*2 ; Offset 2: Saved DE register -XCPT_IX equ 2*3 ; Offset 3: Saved IX register -XCPT_IY equ 2*4 ; Offset 4: Saved IY register -XCPT_SP equ 2*5 ; Offset 5: Offset to SP at time of interrupt -XCPT_HL equ 2*6 ; Offset 6: Saved HL register -XCPT_AF equ 2*7 ; Offset 7: Saved AF register -XCPT_PC equ 2*8 ; Offset 8: Offset to PC at time of interrupt - - ; Stack frame - -FRAME_IY equ 2*0 ; Location of IY on the stack -FRAME_IX equ 2*1 ; Location of IX on the stack -FRAME_RET equ 2*2 ; Location of return address on the stack -FRAME_REGS equ 2*3 ; Location of reg save area on stack - -SP_OFFSET equ 2*3 - .else - ; Register save area layout - -XCPT_I equ 3*0 ; Offset 0: Saved I w/interrupt state in parity -XCPT_BC equ 3*1 ; Offset 1: Saved BC register -XCPT_DE equ 3*2 ; Offset 2: Saved DE register -XCPT_IX equ 3*3 ; Offset 3: Saved IX register -XCPT_IY equ 3*4 ; Offset 4: Saved IY register -XCPT_SP equ 3*5 ; Offset 5: Offset to SP at time of interrupt -XCPT_HL equ 3*6 ; Offset 6: Saved HL register -XCPT_AF equ 3*7 ; Offset 7: Saved AF register -XCPT_PC equ 3*8 ; Offset 8: Offset to PC at time of interrupt .endif - - ; Stack frame - -FRAME_IY equ 3*0 ; Location of IY on the stack -FRAME_IX equ 3*1 ; Location of IX on the stack -FRAME_RET equ 3*2 ; Location of return address on the stack -FRAME_REGS equ 3*3 ; Location of reg save area on stack - -SP_OFFSET equ 3*3 - .endif - -;************************************************************************** -; Code -;************************************************************************** - - segment CODE - .assume ADL=1 - -;************************************************************************* -; Name: up_saveusercontext -;************************************************************************* - -_up_saveusercontext: - ; Set up a stack frame - - push ix ; Save IX and IY - push iy - ld ix, 0 - add ix, sp ; IX = stack frame - - ; Fetch the address of the save area - - ld de, (ix + FRAME_REGS) ; DE = save area address - ld iy, 0 - add iy, de ; IY = save area address - - ; Then save the registers - - ; Save the current interrupt state at offset 0 - - ld a, i ; Get interrupt state in parity bit - push af - pop hl - ld (iy + XCPT_I), hl ; Index 0: I w/interrupt state in parity/overflow - - ; Save BC at offset 1 - - ld (iy + XCPT_BC), bc ; Index 1: BC - - ; DE is not preserved (Index 2) - - ; Save IX at offset 3 - - ld hl, (ix + FRAME_IX) ; HL = Saved value of IX - ld (iy + XCPT_IX), hl ; Index 3: IX - - ; Save IY at index 4 - - ld hl, (ix + FRAME_IY) ; HL = Saved value of IY - ld (iy + XCPT_IY), hl ; Index 4: IY - - ; Save that stack pointer as it would be upon return in offset 5 - - ld hl, SP_OFFSET ; Value of stack pointer on return - add hl, sp - ld (iy + XCPT_SP), hl ; Index 5 SP - - ; HL is saved as the value 1 at offset 6 - - ld hl, 1 - ld (iy + XCPT_HL), hl ; Index 2: HL on return (=1) - - ; AF is not preserved (offset 7) - - ; Save the return address at index 8 - - ld hl, (ix + FRAME_RET) ; HL = Saved return address - ld (iy + XCPT_PC), hl ; Index 8: PC - - ; Return the value 0 - - ld hl, 0 - - pop iy - pop ix - ret - end diff --git a/arch/z80/src/ez80/ez80_schedulesigaction.c b/arch/z80/src/ez80/ez80_schedulesigaction.c deleted file mode 100644 index 2b5cf925aa..0000000000 --- a/arch/z80/src/ez80/ez80_schedulesigaction.c +++ /dev/null @@ -1,159 +0,0 @@ -/**************************************************************************** - * arch/z80/src/ez80/ez80_schedulesigaction.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include - -#include -#include - -#include "chip/switch.h" -#include "sched/sched.h" -#include "z80_internal.h" - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: ez80_sigsetup - ****************************************************************************/ - -static void ez80_sigsetup(FAR struct tcb_s *tcb, FAR chipreg_t *regs) -{ - /* Save the return address and interrupt state. These will be restored by - * the signal trampoline after the signals have been delivered. - */ - - tcb->xcp.saved_pc = regs[XCPT_PC]; - tcb->xcp.saved_i = regs[XCPT_I]; - - /* Then set up to vector to the trampoline with interrupts disabled */ - - regs[XCPT_PC] = (chipreg_t)z80_sigdeliver; - regs[XCPT_I] = 0; -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_schedule_sigaction - * - * Description: - * This function is called by the OS when one or more - * signal handling actions have been queued for execution. - * The architecture specific code must configure things so - * that the 'sigdeliver' callback is executed on the thread - * specified by 'tcb' as soon as possible. - * - * This function may be called from interrupt handling logic. - * - * This operation should not cause the task to be unblocked - * nor should it cause any immediate execution of sigdeliver. - * Typically, a few cases need to be considered: - * - * (1) This function may be called from an interrupt handler - * During interrupt processing, all xcptcontext structures - * should be valid for all tasks. That structure should - * be modified to invoke sigdeliver() either on return - * from (this) interrupt or on some subsequent context - * switch to the recipient task. - * (2) If not in an interrupt handler and the tcb is NOT - * the currently executing task, then again just modify - * the saved xcptcontext structure for the recipient - * task so it will invoke sigdeliver when that task is - * later resumed. - * (3) If not in an interrupt handler and the tcb IS the - * currently executing task -- just call the signal - * handler now. - * - * Assumptions: - * Called from critical section - * - ****************************************************************************/ - -void up_schedule_sigaction(FAR struct tcb_s *tcb) -{ - sinfo("tcb=%p, rtcb=%p current_regs=%p\n", tcb, - this_task(), up_current_regs()); - - /* First, handle some special cases when the signal is being delivered - * to the currently executing task. - */ - - if (tcb == this_task()) - { - /* CASE 1: We are not in an interrupt handler and a task is - * signalling itself for some reason. - */ - - if (!IN_INTERRUPT()) - { - /* In this case just deliver the signal now. */ - - (tcb->sigdeliver)(tcb); - tcb->sigdeliver = NULL; - } - - /* CASE 2: We are in an interrupt handler AND the interrupted task - * is the same as the one that must receive the signal, then we - * will have to modify the return state as well as the state in - * the TCB. - */ - - else - { - /* Set up to vector to the trampoline with interrupts - * disabled. - */ - - ez80_sigsetup(tcb, (chipreg_t *)IRQ_STATE()); - - /* And make sure that the saved context in the TCB - * is the same as the interrupt return context. - */ - - SAVE_IRQCONTEXT(tcb); - } - } - - /* Otherwise, we are (1) signaling a task is not running from an - * interrupt handler or (2) we are not in an interrupt handler and the - * running task is signaling some non-running task. - */ - - else - { - /* Set up to vector to the trampoline with interrupts disabled. */ - - ez80_sigsetup(tcb, tcb->xcp.regs); - } -} diff --git a/arch/z80/src/ez80/ez80_serial.c b/arch/z80/src/ez80/ez80_serial.c deleted file mode 100644 index fe6876d84a..0000000000 --- a/arch/z80/src/ez80/ez80_serial.c +++ /dev/null @@ -1,805 +0,0 @@ -/**************************************************************************** - * arch/z80/src/ez80/ez80_serial.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "chip.h" -#include "z80_internal.h" - -#ifdef USE_SERIALDRIVER - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -struct ez80_dev_s -{ - uint16_t uartbase; /* Base address of UART registers */ - unsigned int baud; /* Configured baud */ - uint8_t irq; /* IRQ associated with this UART */ - uint8_t parity; /* 0=none, 1=odd, 2=even */ - uint8_t bits; /* Number of bits (7 or 8) */ - bool stopbits2; /* true: Configure with 2 (vs 1) */ -}; - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -static int ez80_setup(struct uart_dev_s *dev); -static void ez80_shutdown(struct uart_dev_s *dev); -static int ez80_attach(struct uart_dev_s *dev); -static void ez80_detach(struct uart_dev_s *dev); -static int ez80_interrupt(int irq, void *context, void *arg); -static int ez80_ioctl(struct file *filep, int cmd, unsigned long arg); -static int ez80_receive(struct uart_dev_s *dev, unsigned int *status); -static void ez80_rxint(struct uart_dev_s *dev, bool enable); -static bool ez80_rxavailable(struct uart_dev_s *dev); -static void ez80_send(struct uart_dev_s *dev, int ch); -static void ez80_txint(struct uart_dev_s *dev, bool enable); -static bool ez80_txready(struct uart_dev_s *dev); -static bool ez80_txempty(struct uart_dev_s *dev); - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -static const struct uart_ops_s g_uart_ops = -{ - ez80_setup, /* setup */ - ez80_shutdown, /* shutdown */ - ez80_attach, /* attach */ - ez80_detach, /* detach */ - ez80_ioctl, /* ioctl */ - ez80_receive, /* receive */ - ez80_rxint, /* rxint */ - ez80_rxavailable, /* rxavailable */ -#ifdef CONFIG_SERIAL_IFLOWCONTROL - NULL, /* rxflowcontrol */ -#endif - ez80_send, /* send */ - ez80_txint, /* txint */ - ez80_txready, /* txready */ - ez80_txempty /* txempty */ -}; - -/* I/O buffers */ - -#ifdef CONFIG_EZ80_UART0 -static char g_uart0rxbuffer[CONFIG_UART0_RXBUFSIZE]; -static char g_uart0txbuffer[CONFIG_UART0_TXBUFSIZE]; -#endif -#ifdef CONFIG_EZ80_UART1 -static char g_uart1rxbuffer[CONFIG_UART1_RXBUFSIZE]; -static char g_uart1txbuffer[CONFIG_UART1_TXBUFSIZE]; -#endif - -/* This describes the state of the UART0 port. */ - -#ifdef CONFIG_EZ80_UART0 -static struct ez80_dev_s g_uart0priv = -{ - EZ80_UART0_BASE, /* uartbase */ - CONFIG_UART0_BAUD, /* baud */ - EZ80_UART0_IRQ, /* irq */ - CONFIG_UART0_PARITY, /* parity */ - CONFIG_UART0_BITS, /* bits */ - CONFIG_UART0_2STOP /* stopbits2 */ -}; - -static uart_dev_t g_uart0port = -{ - 0, /* open_count */ -#ifdef CONFIG_UART0_SERIAL_CONSOLE - true, /* isconsole */ -#else - false, /* isconsole */ -#endif - { 0 }, /* closesem */ - { 0 }, /* xmitsem */ - { 0 }, /* recvsem */ - { 0 }, /* pollsem */ - { - { 0 }, /* xmit.sem */ - 0, /* xmit.head */ - 0, /* xmit.tail */ - CONFIG_UART0_TXBUFSIZE, /* xmit.size */ - g_uart0txbuffer, /* xmit.buffer */ - }, - { - { 0 }, /* recv.sem */ - 0, /* recv.head */ - 0, /* recv.tail */ - CONFIG_UART0_RXBUFSIZE, /* recv.size */ - g_uart0rxbuffer, /* recv.buffer */ - }, - &g_uart_ops, /* ops */ - &g_uart0priv, /* priv */ - { }, /* pollfds: all zero */ -}; -#endif - -/* This describes the state of the UART1 port. */ - -#ifdef CONFIG_EZ80_UART1 -static struct ez80_dev_s g_uart1priv = -{ - EZ80_UART1_BASE, /* uartbase */ - CONFIG_UART1_BAUD, /* baud */ - EZ80_UART1_IRQ, /* irq */ - CONFIG_UART1_PARITY, /* parity */ - CONFIG_UART1_BITS, /* bits */ - CONFIG_UART1_2STOP /* stopbits2 */ -}; - -static uart_dev_t g_uart1port = -{ - 0, /* open_count */ - false, /* xmitwaiting */ - false, /* recvwaiting */ -#ifdef CONFIG_UART1_SERIAL_CONSOLE - true, /* isconsole */ -#else - false, /* isconsole */ -#endif - { 0 }, /* closesem */ - { 0 }, /* xmitsem */ - { 0 }, /* recvsem */ - { 0 }, /* pollsem */ - { - { 0 }, /* xmit.sem */ - 0, /* xmit.head */ - 0, /* xmit.tail */ - CONFIG_UART1_TXBUFSIZE, /* xmit.size */ - g_uart1txbuffer, /* xmit.buffer */ - }, - { - { 0 }, /* recv.sem */ - 0, /* recv.head */ - 0, /* recv.tail */ - CONFIG_UART1_RXBUFSIZE, /* recv.size */ - g_uart1rxbuffer, /* recv.buffer */ - }, - &g_uart_ops, /* ops */ - &g_uart1priv, /* priv */ - { }, /* pollfds */ -}; -#endif - -/* Now, which one with be tty0/console and which tty1? */ - -#if defined(CONFIG_UART0_SERIAL_CONSOLE) && defined(CONFIG_EZ80_UART0) -# define CONSOLE_DEV g_uart0port -# define TTYS0_DEV g_uart0port -# if defined(CONFIG_EZ80_UART1) -# define TTYS1_DEV g_uart1port -# endif -#elif defined(CONFIG_UART1_SERIAL_CONSOLE) && defined(CONFIG_EZ80_UART1) -# define CONSOLE_DEV g_uart1port -# define TTYS0_DEV g_uart1port -# if defined(CONFIG_EZ80_UART0) -# define TTYS1_DEV g_uart0port -# endif -#elif defined(CONFIG_EZ80_UART0) -# define TTYS0_DEV g_uart0port -# if defined(CONFIG_EZ80_UART1) -# define TTYS1_DEV g_uart1port -# endif -#elif defined(CONFIG_EZ80_UART0) -# define TTYS0_DEV g_uart1port -#endif - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: ez80_serialin - ****************************************************************************/ - -static uint8_t ez80_serialin(FAR struct ez80_dev_s *priv, uint8_t offset) -{ - return inp(priv->uartbase + offset); -} - -/**************************************************************************** - * Name: ez80_serialout - ****************************************************************************/ - -static void ez80_serialout(FAR struct ez80_dev_s *priv, uint8_t offset, - uint8_t value) -{ - outp(priv->uartbase + offset, value); -} - -/**************************************************************************** - * Name: ez80_disableuartint - ****************************************************************************/ - -static void ez80_disableuartint(FAR struct ez80_dev_s *priv) -{ - uint8_t ier = ez80_serialin(priv, EZ80_UART_IER); - ier &= ~EZ80_UARTEIR_INTMASK; - ez80_serialout(priv, EZ80_UART_IER, ier); -} - -/**************************************************************************** - * Name: ez80_restoreuartint - ****************************************************************************/ - -static void ez80_restoreuartint(FAR struct ez80_dev_s *priv, uint8_t bits) -{ - uint8_t ier = ez80_serialin(priv, EZ80_UART_IER); - ier |= bits & (EZ80_UARTEIR_TIE | EZ80_UARTEIR_RIE); - ez80_serialout(priv, EZ80_UART_IER, ier); -} - -/**************************************************************************** - * Name: ez80_waittxready - ****************************************************************************/ - -static void ez80_waittxready(FAR struct ez80_dev_s *priv) -{ - int tmp; - - for (tmp = 1000 ; tmp > 0 ; tmp--) - { - if ((ez80_serialin(priv, EZ80_UART_LSR) & EZ80_UARTLSR_THRE) != 0) - { - break; - } - } -} - -/**************************************************************************** - * Name: ez80_setbaud - ****************************************************************************/ - -static void ez80_setbaud(FAR struct ez80_dev_s *priv, uint24_t baud) -{ - uint32_t brg_divisor; - uint8_t lctl; - - /* The resulting BAUD and depends on the system clock frequency and the - * BRG divisor as follows: - * - * BAUD = SYSTEM_CLOCK_FREQUENCY / (16 * BRG_Divisor) - * - * Or - * - * BRG_Divisor = SYSTEM_CLOCK_FREQUENCY / 16 / BAUD - */ - - brg_divisor = (ez80_systemclock + (baud << 3)) / (baud << 4); - - /* Set the DLAB bit to enable access to the BRG registers */ - - lctl = ez80_serialin(priv, EZ80_UART_LCTL); - lctl |= EZ80_UARTLCTL_DLAB; - ez80_serialout(priv, EZ80_UART_LCTL, lctl); - - ez80_serialout(priv, EZ80_UART_BRGL, (uint8_t)(brg_divisor & 0xff)); - ez80_serialout(priv, EZ80_UART_BRGH, (uint8_t)(brg_divisor >> 8)); - - lctl &= ~EZ80_UARTLCTL_DLAB; - ez80_serialout(priv, EZ80_UART_LCTL, lctl); -} - -/**************************************************************************** - * Name: ez80_setup - * - * Description: - * Configure the UART baud, bits, parity, fifos, etc. This method is called - * the first time that the serial port is opened. - * - ****************************************************************************/ - -static int ez80_setup(FAR struct uart_dev_s *dev) -{ -#ifndef CONFIG_SUPPRESS_UART_CONFIG - FAR struct ez80_dev_s *priv = dev->priv; - uint8_t reg; - uint8_t cval; - - if (priv->bits == 7) - { - cval = EZ80_UARTCHAR_7BITS; - } - else - { - cval = EZ80_UARTCHAR_8BITS; - } - - if (priv->stopbits2) - { - cval |= EZ80_UARTLCTL_2STOP; - } - - if (priv->parity == 1) /* Odd parity */ - { - cval |= (EZ80_UARTLCTL_PEN); - } - else if (priv->parity == 2) /* Even parity */ - { - cval |= (EZ80_UARTLCTL_PEN | EZ80_UARTLCTL_EPS); - } - - /* Set the baud rate */ - - ez80_disableuartint(priv); - ez80_setbaud(priv, priv->baud); - ez80_serialout(priv, EZ80_UART_MCTL, 0); - - /* Set the character properties */ - - reg = (ez80_serialin(priv, EZ80_UART_LCTL) & ~EZ80_UARTLCTL_MASK) | cval; - ez80_serialout(priv, EZ80_UART_LCTL, reg); - - /* Enable and flush the receive FIFO */ - - reg = EZ80_UARTFCTL_FIFOEN; - ez80_serialout(priv, EZ80_UART_FCTL, reg); - reg |= (EZ80_UARTFCTL_CLRTXF | EZ80_UARTFCTL_CLRRXF); - ez80_serialout(priv, EZ80_UART_FCTL, reg); - - /* Set the Rx FIFO trigger level. Small values assure the quickest - * response to get data from the Rx FIFO. This minimizes the - * likelihood of Rx overruns with a penalty of more time spent - * handling Rx interrupts. - */ - -#if defined(CONFIG_EZ80_UART_RXFIFO_1) - reg |= EZ80_UARTTRIG_1; -#elif defined(CONFIG_EZ80_UART_RXFIFO_4) - reg |= EZ80_UARTTRIG_4; -#elif defined(CONFIG_EZ80_UART_RXFIFO_8) - reg |= EZ80_UARTTRIG_8; -#elif defined(CONFIG_EZ80_UART_RXFIFO_14) - reg |= EZ80_UARTTRIG_14; -#else -# error No Rx FIFO trigger level -#endif - - ez80_serialout(priv, EZ80_UART_FCTL, reg); -#endif - - return OK; -} - -/**************************************************************************** - * Name: ez80_shutdown - * - * Description: - * Disable the UART. This method is called when the serial port is closed - * - ****************************************************************************/ - -static void ez80_shutdown(FAR struct uart_dev_s *dev) -{ - FAR struct ez80_dev_s *priv = (FAR struct ez80_dev_s *)dev->priv; - ez80_disableuartint(priv); -} - -/**************************************************************************** - * Name: ez80_attach - * - * Description: - * Configure the UART to operation in interrupt driven mode. This method - * is called when the serial port is opened. Normally, this is just after - * the the setup() method is called, however, the serial console may - * operate in a non-interrupt driven mode during the boot phase. - * - * RX and TX interrupts are not enabled when by the attach method (unless - * the hardware supports multiple levels of interrupt enabling). The RX - * and TX interrupts are not enabled until the txint() and rxint() methods - * are called. - * - ****************************************************************************/ - -static int ez80_attach(FAR struct uart_dev_s *dev) -{ - FAR struct ez80_dev_s *priv = (FAR struct ez80_dev_s *)dev->priv; - - /* Attach the IRQ */ - - return irq_attach(priv->irq, ez80_interrupt, dev); -} - -/**************************************************************************** - * Name: ez80_detach - * - * Description: - * Detach UART interrupts. This method is called when the serial port is - * closed normally just before the shutdown method is called. The - * exception is the serial console which is never shutdown. - * - ****************************************************************************/ - -static void ez80_detach(FAR struct uart_dev_s *dev) -{ - FAR struct ez80_dev_s *priv = (FAR struct ez80_dev_s *)dev->priv; - ez80_disableuartint(priv); - irq_detach(priv->irq); -} - -/**************************************************************************** - * Name: ez80_interrupt - * - * Description: - * This is the UART interrupt handler. It will be invoked when an - * interrupt is received on the 'irq'. It should call uart_xmitchars or - * uart_recvchars to perform the appropriate data transfers. The - * interrupt handling logic must be able to map the 'arg' to the - * appropriate uart_dev_s structure in order to call these functions. - * - ****************************************************************************/ - -static int ez80_interrupt(int irq, FAR void *context, FAR void *arg) -{ - FAR struct uart_dev_s *dev = (FAR struct uart_dev_s *)arg; - struct ez80_dev_s *priv; - volatile uint32_t cause; - - DEBUGASSERT(dev != NULL && dev->priv != NULL); - priv = (struct ez80_dev_s *)dev->priv; - - cause = ez80_serialin(priv, EZ80_UART_IIR) & EZ80_UARTIIR_CAUSEMASK; - - /* Check for character timeout (CTO) or Receiver Data Ready (RDR) */ - - if (cause == EZ80_UARTINSTS_CTO || cause == EZ80_UARTINSTS_RDR) - { - /* Receive characters from the RX fifo */ - - uart_recvchars(dev); - } - - /* Check for transmission buffer empty */ - - else if (cause == EZ80_UARTINSTS_TBE) - { - uart_xmitchars(dev); - } - - return OK; -} - -/**************************************************************************** - * Name: ez80_ioctl - * - * Description: - * All ioctl calls will be routed through this method - * - ****************************************************************************/ - -static int ez80_ioctl(FAR struct file *filep, int cmd, unsigned long arg) -{ - return -ENOTTY; -} - -/**************************************************************************** - * Name: ez80_receive - * - * Description: - * Called (usually) from the interrupt level to receive one character from - * the UART. Error bits associated with the receipt are provided in the - * the return 'status'. - * - ****************************************************************************/ - -static int ez80_receive(FAR struct uart_dev_s *dev, FAR unsigned int *status) -{ - FAR struct ez80_dev_s *priv = (FAR struct ez80_dev_s *)dev->priv; - uint8_t rbr = ez80_serialin(priv, EZ80_UART_RBR); - uint8_t lsr = ez80_serialin(priv, EZ80_UART_LSR); - - *status = (unsigned int)lsr; - return rbr; -} - -/**************************************************************************** - * Name: ez80_rxint - * - * Description: - * Call to enable or disable RX interrupts - * - ****************************************************************************/ - -static void ez80_rxint(FAR struct uart_dev_s *dev, bool enable) -{ - FAR struct ez80_dev_s *priv = (FAR struct ez80_dev_s *)dev->priv; - uint8_t ier = ez80_serialin(priv, EZ80_UART_IER); - - if (enable) - { -#ifndef CONFIG_SUPPRESS_SERIAL_INTS - ier |= EZ80_UARTEIR_RIE; - ez80_serialout(priv, EZ80_UART_IER, ier); -#endif - } - else - { - ier &= ~EZ80_UARTEIR_RIE; - ez80_serialout(priv, EZ80_UART_IER, ier); - } -} - -/**************************************************************************** - * Name: ez80_rxavailable - * - * Description: - * Return true if the receive fifo is not empty - * - ****************************************************************************/ - -static bool ez80_rxavailable(FAR struct uart_dev_s *dev) -{ - FAR struct ez80_dev_s *priv = (FAR struct ez80_dev_s *)dev->priv; - return (ez80_serialin(priv, EZ80_UART_LSR) & EZ80_UARTLSR_DR) != 0; -} - -/**************************************************************************** - * Name: ez80_send - * - * Description: - * This method will send one byte on the UART - * - ****************************************************************************/ - -static void ez80_send(FAR struct uart_dev_s *dev, int ch) -{ - FAR struct ez80_dev_s *priv = (FAR struct ez80_dev_s *)dev->priv; - ez80_serialout(priv, EZ80_UART_THR, (uint8_t)ch); -} - -/**************************************************************************** - * Name: ez80_txint - * - * Description: - * Call to enable or disable TX interrupts - * - ****************************************************************************/ - -static void ez80_txint(FAR struct uart_dev_s *dev, bool enable) -{ - FAR struct ez80_dev_s *priv = (FAR struct ez80_dev_s *)dev->priv; - uint8_t ier = ez80_serialin(priv, EZ80_UART_IER); - - if (enable) - { -#ifndef CONFIG_SUPPRESS_SERIAL_INTS - ier |= EZ80_UARTEIR_TIE; - ez80_serialout(priv, EZ80_UART_IER, ier); -#endif - } - else - { - ier &= ~EZ80_UARTEIR_TIE; - ez80_serialout(priv, EZ80_UART_IER, ier); - } -} - -/**************************************************************************** - * Name: ez80_txready - * - * Description: - * Return true if the transmit fifo is not full - * - ****************************************************************************/ - -static bool ez80_txready(FAR struct uart_dev_s *dev) -{ - FAR struct ez80_dev_s *priv = (FAR struct ez80_dev_s *)dev->priv; - return (ez80_serialin(priv, EZ80_UART_LSR) & EZ80_UARTLSR_THRE) != 0; -} - -/**************************************************************************** - * Name: ez80_txempty - * - * Description: - * Return true if the transmit fifo is empty - * - ****************************************************************************/ - -static bool ez80_txempty(FAR struct uart_dev_s *dev) -{ - FAR struct ez80_dev_s *priv = (FAR struct ez80_dev_s *)dev->priv; - return (ez80_serialin(priv, EZ80_UART_LSR) & EZ80_UARTLSR_TEMT) != 0; -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: z80_serial_initialize - * - * Description: - * Register serial console and serial ports. - * - ****************************************************************************/ - -void z80_serial_initialize(void) -{ - uint8_t regval; - - /* Make sure that all UART interrupts are disabled */ - - ez80_disableuartint(TTYS0_DEV.priv); -#ifdef TTYS1_DEV - ez80_disableuartint(TTYS1_DEV.priv); -#endif - - /* Configure pins for usage of UARTs */ - -#ifdef CONFIG_EZ80_UART0 - /* Set Port D, pins 0 and 1 for their alternate function (Mode 7) - * to enable UART0 - */ - - regval = inp(EZ80_PD_DDR); - regval |= 3; - outp(EZ80_PD_DDR, regval); - - regval = inp(EZ80_PD_ALT1); - regval &= ~3; - outp(EZ80_PD_ALT1, regval); - - regval = inp(EZ80_PD_ALT2); - regval |= 3; - outp(EZ80_PD_ALT2, regval); -#endif - -#ifdef CONFIG_EZ80_UART1 - /* Set Port C, pins 0 and 1 for their alternate function (Mode 7) - * to enable UART1 - */ - - regval = inp(EZ80_PC_DDR); - regval |= 3; - outp(EZ80_PC_DDR, regval); - - regval = inp(EZ80_PC_ALT1); - regval &= ~3; - outp(EZ80_PC_ALT1, regval); - - regval = inp(EZ80_PC_ALT2); - regval |= 3; - outp(EZ80_PC_ALT2, regval); -#endif - - /* If there is a console, then configure the console now */ - -#ifdef CONSOLE_DEV - CONSOLE_DEV.isconsole = true; - ez80_setup(&CONSOLE_DEV); -#endif - - /* Register console and tty devices */ - -#ifdef CONSOLE_DEV - uart_register("/dev/console", &CONSOLE_DEV); -#endif - uart_register("/dev/ttyS0", &TTYS0_DEV); -#ifdef TTYS1_DEV - uart_register("/dev/ttyS1", &TTYS1_DEV); -#endif -} - -/**************************************************************************** - * Name: up_putc - * - * Description: - * Provide priority, low-level access to support OS debug - * writes - * - ****************************************************************************/ - -void up_putc(int ch) -{ -#ifdef CONSOLE_DEV - FAR struct ez80_dev_s *priv = (FAR struct ez80_dev_s *)CONSOLE_DEV.priv; - uint8_t ier = ez80_serialin(priv, EZ80_UART_IER); - - ez80_disableuartint(priv); - - /* Output the character */ - - ez80_waittxready(priv); - ez80_serialout(priv, EZ80_UART_THR, (uint8_t)ch); - - /* Wait for the character to be sent before re-enabling interrupts */ - - ez80_waittxready(priv); - ez80_restoreuartint(priv, ier); -#endif -} - -#else /* USE_SERIALDRIVER */ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#ifdef CONFIG_UART1_SERIAL_CONSOLE -# define ez80_inp(offs) inp((EZ80_UART1_BASE+(offs))) -# define ez80_outp(offs,val) outp((EZ80_UART1_BASE+(offs)), (val)) -#else -# define ez80_inp(offs) inp((EZ80_UART0_BASE+(offs))) -# define ez80_outp(offs,val) outp((EZ80_UART0_BASE+(offs)), (val)) -#endif - -#define ez80_txready() ((ez80_inp(EZ80_UART_LSR) & EZ80_UARTLSR_THRE) != 0) -#define ez80_send(ch) ez80_outp(EZ80_UART_THR, ch) - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: ez80_putc - ****************************************************************************/ - -static void ez80_putc(int ch) -{ - int tmp; - for (tmp = 1000 ; tmp > 0 && !ez80_txready(); tmp--); - ez80_send(ch); -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_putc - ****************************************************************************/ - -void up_putc(int ch) -{ - /* Output character */ - - ez80_putc(ch); -} - -#endif /* USE_SERIALDRIVER */ diff --git a/arch/z80/src/ez80/ez80_sigdeliver.c b/arch/z80/src/ez80/ez80_sigdeliver.c deleted file mode 100644 index ce22d2249f..0000000000 --- a/arch/z80/src/ez80/ez80_sigdeliver.c +++ /dev/null @@ -1,123 +0,0 @@ -/**************************************************************************** - * arch/z80/src/ez80/ez80_sigdeliver.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include - -#include -#include -#include - -#include -#include - -#include "chip/switch.h" -#include "sched/sched.h" -#include "z80_internal.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: z80_sigdeliver - * - * Description: - * This is the a signal handling trampoline. When a signal action was - * posted. The task context was mucked with and forced to branch to this - * location with interrupts disabled. - * - ****************************************************************************/ - -void z80_sigdeliver(void) -{ - FAR struct tcb_s *rtcb = this_task(); - chipreg_t regs[XCPTCONTEXT_REGS]; - - board_autoled_on(LED_SIGNAL); - - sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head); - DEBUGASSERT(rtcb->sigdeliver != NULL); - - /* Save the return state on the stack. */ - - ez80_copystate(regs, rtcb->xcp.regs); - -#ifndef CONFIG_SUPPRESS_INTERRUPTS - /* Then make sure that interrupts are enabled. Signal handlers must always - * run with interrupts enabled. - */ - - up_irq_enable(); -#endif - - /* Deliver the signals */ - - (rtcb->sigdeliver)(rtcb); - - /* Output any debug messages BEFORE restoring errno (because they may - * alter errno), then disable interrupts again and restore the original - * errno that is needed by the user logic (it is probably EINTR). - */ - - sinfo("Resuming\n"); - up_irq_save(); - - /* Modify the saved return state with the actual saved values in the - * TCB. This depends on the fact that nested signal handling is - * not supported. Therefore, these values will persist throughout the - * signal handling action. - * - * Keeping this data in the TCB resolves a security problem in protected - * and kernel mode: The regs[] array is visible on the user stack and - * could be modified by a hostile program. - */ - - regs[XCPT_PC] = rtcb->xcp.saved_pc; - regs[XCPT_I] = rtcb->xcp.saved_i; - rtcb->sigdeliver = NULL; /* Allows next handler to be scheduled */ - - /* Modify the saved return state with the actual saved values in the - * TCB. This depends on the fact that nested signal handling is - * not supported. Therefore, these values will persist throughout the - * signal handling action. - * - * Keeping this data in the TCB resolves a security problem in protected - * and kernel mode: The regs[] array is visible on the user stack and - * could be modified by a hostile program. - */ - - /* Then restore the correct state for this thread of - * execution. - */ - - board_autoled_off(LED_SIGNAL); - ez80_restorecontext(regs); -} diff --git a/arch/z80/src/ez80/ez80_spi.c b/arch/z80/src/ez80/ez80_spi.c deleted file mode 100644 index 0ba7455855..0000000000 --- a/arch/z80/src/ez80/ez80_spi.c +++ /dev/null @@ -1,655 +0,0 @@ -/**************************************************************************** - * arch/z80/src/ez80/ez80_spi.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "z80_internal.h" -#include "chip.h" -#include "ez80_spi.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#if defined(CONFIG_ARCH_CHIP_EZ80F91) || defined(CONFIG_ARCH_CHIP_EZ80F92) - -/* PB2/#SS is controlled by board specific logic and is not used by this - * driver. This permits supporting multiple, different devices with - * different chip selects on the bus. - */ - -# define GPIOB_SPI_SS (1 << 2) /* PB2: /SS (not used by driver) */ -# define GPIOB_SPI_SCK (1 << 3) /* PB3: SCK */ -# define GPIOB_SPI_MISO (1 << 6) /* PB6: MISO */ -# define GPIOB_SPI_MOSI (1 << 7) /* PB7: MOSI */ - -# define GPIOB_SPI_PINSET (GPIOB_SPI_SCK | GPIOB_SPI_MISO | GPIOB_SPI_MOSI) -#else -# error "Check GPIO initialization for this chip" -#endif - -#define SPIF_RETRIES 1000 - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -static int spi_lock(FAR struct spi_dev_s *dev, bool lock); -static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, - uint32_t frequency); -static void spi_setmode(FAR struct spi_dev_s *dev, enum spi_mode_e mode); -static uint32_t spi_send(FAR struct spi_dev_s *dev, uint32_t wd); -#ifdef CONFIG_SPI_EXCHANGE -static void spi_exchange(FAR struct spi_dev_s *dev, - FAR const void *txbuffer, FAR void *rxbuffer, - size_t nwords); -#else -static void spi_sndblock(FAR struct spi_dev_s *dev, - FAR const uint8_t *buffer, size_t buflen); -static void spi_recvblock(FAR struct spi_dev_s *dev, FAR uint8_t *buffer, - size_t buflen); -#endif - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -static const struct spi_ops_s g_spiops = -{ - spi_lock, /* lock() */ - ez80_spiselect, /* select(): Provided externally by board logic */ - spi_setfrequency, /* setfrequency() */ -#ifdef CONFIG_SPI_DELAY_CONTROL - NULL, /* setdelay() */ -#endif - spi_setmode, - NULL, /* setbits() */ -#ifdef CONFIG_SPI_HWFEATURES - NULL, /* hwfeatures() */ -#endif - ez80_spistatus, /* status(): Provided externally by board logic */ -#ifdef CONFIG_SPI_CMDDATA - ez80_spicmddata, /* cmddata(): Provided externally by board logic */ -#endif - spi_send, /* send() */ -#ifdef CONFIG_SPI_EXCHANGE - spi_exchange, /* exchange() */ -#else - spi_sndblock, /* sndblock() */ - spi_recvblock, /* recvblock() */ -#endif -#ifdef CONFIG_SPI_TRIGGER - NULL, /* trigger() */ -#endif - NULL /* registercallback() */ -}; - -/* This supports is only a single SPI bus/port. If you port this to an - * architecture with multiple SPI buses/ports, then (1) you must create - * a structure, say ez80_spidev_s, containing both struct spi_dev_s and - * the mutual exclusion semaphored, and (2) the following must become an - * array with one 'struct spi_dev_s' instance per bus. - */ - -static struct spi_dev_s g_spidev = -{ - &g_spiops -}; - -static mutex_t g_lock = NXMUTEX_INITIALIZER; - -/* These are used to perform reconfigurations only when necessary. */ - -static uint32_t g_spi_frequency; -static uint32_t g_spi_actual; -static enum spi_mode_e g_spi_mode = SPIDEV_MODE3; - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: spi_lock - * - * Description: - * On SPI buses where there are multiple devices, it will be necessary to - * lock SPI to have exclusive access to the buses for a sequence of - * transfers. The bus should be locked before the chip is selected. After - * locking the SPI bus, the caller should then also call the setfrequency, - * setbits, and setmode methods to make sure that the SPI is properly - * configured for the device. If the SPI bus is being shared, then it - * may have been left in an incompatible state. - * - * Input Parameters: - * dev - Device-specific state data - * lock - true: Lock spi bus, false: unlock SPI bus - * - * Returned Value: - * None - * - ****************************************************************************/ - -static int spi_lock(FAR struct spi_dev_s *dev, bool lock) -{ - int ret; - - if (lock) - { - ret = nxmutex_lock(&g_lock); - } - else - { - ret = nxmutex_unlock(&g_lock); - } - - return ret; -} - -/**************************************************************************** - * Name: spi_setfrequency - * - * Description: - * Set the SPI frequency. - * - * Input Parameters: - * dev - Device-specific state data - * frequency - The SPI frequency requested - * - * Returned Value: - * Returns the actual frequency selected - * - ****************************************************************************/ - -static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, - uint32_t frequency) -{ - if (frequency != g_spi_frequency) - { - uint32_t brg; - - spiinfo("frequency: %lu\n", (unsigned long)frequency); - - /* We want select divisor to provide the highest frequency (SPIR) that - * does NOT exceed the requested frequency.: - * - * SPIR <= System Clock Frequency / (2 * BRG) - * - * So - * - * BRG >= System Clock Frequency / (2 * SPIR) - */ - - brg = ((EZ80_SYS_CLK_FREQ + 1) / 2 + frequency - 1) / frequency; - - /* "When configured as a Master, the 16-bit divisor value must be - * between 0003h and FFFFh, inclusive. When configured as a Slave, the - * 16-bit divisor value must be between 0004h and FFFFh, inclusive." - */ - - if (brg < 3) - { - brg = 3; - } - else if (brg > 0xffff) - { - brg = 0xffff; - } - - outp(EZ80_SPI_BRG_L, brg & 0xff); - outp(EZ80_SPI_BRG_H, (brg >> 8) & 0xff); - - g_spi_frequency = frequency; - g_spi_actual = ((EZ80_SYS_CLK_FREQ + 1) / 2 + brg - 1) / brg; - - finfo("BRG=%lu Actual=%lu\n", - (unsigned long)brg, (unsigned long)g_spi_actual); - } - - return g_spi_actual; -} - -/**************************************************************************** - * Name: spi_setmode - * - * Description: - * Set the SPI mode. Optional. See enum spi_mode_e for mode definitions - * - * Input Parameters: - * dev - Device-specific state data - * mode - The SPI mode requested - * - * Returned Value: - * none - * - ****************************************************************************/ - -static void spi_setmode(FAR struct spi_dev_s *dev, enum spi_mode_e mode) -{ - if (mode != g_spi_mode) - { - uint8_t modebits; - uint8_t regval; - - spiinfo("mode: %d\n", (int)mode); - - /* Select the CTL register bits based on the selected mode */ - - switch (mode) - { - case SPIDEV_MODE0: /* CPOL=0 CPHA=0 */ - modebits = 0; - break; - - case SPIDEV_MODE1: /* CPOL=0 CPHA=1 */ - modebits = SPI_CTL_CPHA; - break; - - case SPIDEV_MODE2: /* CPOL=1 CPHA=0 */ - modebits = SPI_CTL_CPOL; - break; - - case SPIDEV_MODE3: /* CPOL=1 CPHA=1 */ - modebits = (SPI_CTL_CPOL | SPI_CTL_CPHA); - break; - - default: - return; - } - - /* Then set those bits in the CTL register */ - - regval = inp(EZ80_SPI_CTL); - regval &= ~(SPI_CTL_CPOL | SPI_CTL_CPHA); - regval |= modebits; - outp(EZ80_SPI_CTL, regval); - - g_spi_mode = mode; - } -} - -/**************************************************************************** - * Name: spi_waitspif - * - * Description: - * Wait for the SPIF bit to be set in the status register signifying the - * the data transfer was finished. - * - * Input Parameters: - * None - * - * Returned Value: - * OK if the transferred completed without error. Otherwise, a negated - * errno value is returned indicating the nature of the error. - * - ****************************************************************************/ - -static int spi_waitspif(void) -{ - uint8_t status; - int retries; - - /* Wait for the device to be ready to accept another byte (or for an error - * to be reported or for a timeout to occur). - */ - - for (retries = 0; retries < SPIF_RETRIES; retries++) - { - status = inp(EZ80_SPI_SR); - if ((status & (SPI_SR_WCOL | SPI_SR_MODF)) != 0) - { - return -EIO; - } - else if ((status & SPI_SR_SPIF) != 0) - { - return OK; - } - } - - spierr("ERROR: SPI timed out\n"); - return -ETIMEDOUT; -} - -/**************************************************************************** - * Name: spi_transfer - * - * Description: - * Send one byte on SPI, return the response - * - * Input Parameters: - * chout - The byte to send - * chin - The location to save the returned byte (may be NULL) - * - * Returned Value: - * response - * - ****************************************************************************/ - -static int spi_transfer(uint8_t chout, FAR uint8_t *chin) -{ - uint8_t response; - int ret; - - /* Send the byte */ - - outp(EZ80_SPI_TSR, chout); - - /* Wait for the device to be ready to accept another byte */ - - ret = spi_waitspif(); - if (ret < 0) - { - spierr("ERROR: spi_waitspif returned %d\n", ret); - return ret; - } - - response = inp(EZ80_SPI_RBR); - if (chin != NULL) - { - *chin = response; - } - - return OK; -} - -/**************************************************************************** - * Name: spi_send - * - * Description: - * Exchange one word on SPI - * - * Input Parameters: - * dev - Device-specific state data - * wd - The word to send. the size of the data is determined by the - * number of bits selected for the SPI interface. - * - * Returned Value: - * response - * - ****************************************************************************/ - -static uint32_t spi_send(FAR struct spi_dev_s *dev, uint32_t wd) -{ - uint8_t response; - int ret; - - ret = spi_transfer((uint8_t)wd, &response); - if (ret < 0) - { - spierr("ERROR: spi_transfer returned %d\n", ret); - return (uint32_t)0xff; - } - - spiinfo("cmd: %04" PRIx32 " resp: %02x\n", wd, response); - return (uint32_t)response; -} - -/**************************************************************************** - * Name: spi_exchange - * - * Description: - * Exchange a block of data from SPI. Required. - * - * Input Parameters: - * dev - Device-specific state data - * txbuffer - A pointer to the buffer of data to be sent - * rxbuffer - A pointer to the buffer in which to receive data - * nwords - the length of data that to be exchanged in units of words. - * The wordsize is determined by the number of bits-per-word - * selected for the SPI interface. If nbits <= 8, the data is - * packed into uint8_t's; if nbits >8, the data is packed into - * uint16_t's - * - * Returned Value: - * None - * - ****************************************************************************/ - -#ifdef CONFIG_SPI_EXCHANGE -static void spi_exchange(FAR struct spi_dev_s *dev, - FAR const void *txbuffer, FAR void *rxbuffer, - size_t nwords) -{ - FAR const uint8_t *inptr = (FAR const uint8_t *)txbuffer; - FAR uint8_t *outptr = (FAR uint8_t *)rxbuffer; - - spiinfo("txbuffer: %p rxbuffer: %p nwords: %lu\n", - txbuffer, rxbuffer, (unsigned long)nwords); - - /* Loop while there are bytes remaining to be sent */ - - while (nwords-- > 0) - { - uint8_t outword; - int ret; - - /* Send 0xff if there is no outgoing TX stream */ - - outword = (inptr == NULL) ? 0xff : *inptr++; - - /* Send the outgoing word and obtain the response */ - - ret = spi_transfer(outword, outptr); - if (ret < 0) - { - spierr("ERROR: spi_transfer returned %d\n", ret); - break; - } - - /* Conditionally increment the output buffer pointer. */ - - if (outptr != NULL) - { - outptr++; - } - } -} -#endif - -/**************************************************************************** - * Name: spi_sndblock - * - * Description: - * Send a block of data on SPI - * - * Input Parameters: - * dev - Device-specific state data - * buffer - A pointer to the buffer of data to be sent - * buflen - the length of data to send from the buffer in number of words. - * The wordsize is determined by the number of bits-per-word - * selected for the SPI interface. If nbits <= 8, the data is - * packed into uint8_t's; if nbits >8, the data is packed into - * uint16_t's - * - * Returned Value: - * None - * - ****************************************************************************/ - -#ifndef CONFIG_SPI_EXCHANGE -static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer, - size_t buflen) -{ - FAR const uint8_t *ptr = (FAR const uint8_t *)buffer; - int ret; - - spiinfo("buffer: %p buflen: %lu\n", buffer, (unsigned long)nwords); - - /* Loop while there are bytes remaining to be sent */ - - while (buflen-- > 0) - { - ret = spi_transfer(*ptr++, NULL); - if (ret < 0) - { - spierr("ERROR: spi_transfer returned %d\n", ret); - break; - } - } -} -#endif - -/**************************************************************************** - * Name: spi_recvblock - * - * Description: - * Revice a block of data from SPI - * - * Input Parameters: - * dev - Device-specific state data - * buffer - A pointer to the buffer in which to receive data - * buflen - The length of data that can be received in the buffer in - * number of words. The wordsize is determined by the number of - * bits-per-word selected for the SPI interface. If nbits <= 8, - * the data is packed into uint8_t's; if nbits >8, the data is - * packed into uint16_t's - * - * Returned Value: - * None - * - ****************************************************************************/ - -#ifndef CONFIG_SPI_EXCHANGE -static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, - size_t buflen) -{ - FAR uint8_t *ptr = (FAR uint8_t *)buffer; - - spiinfo("buffer: %p buflen: %lu\n", buffer, (unsigned long)nwords); - - /* Loop while there are bytes remaining to be sent */ - - while (buflen-- > 0) - { - ret = spi_transfer(0xff, ptr++); - if (ret < 0) - { - spierr("ERROR: spi_transfer returned %d\n", ret); - break; - } - } -} -#endif - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: ez80_spibus_initialize - * - * Description: - * Initialize common parts the selected SPI port. Initialization of - * chip select GPIOs must have been performed by board specific logic - * prior to calling this function. Specifically: GPIOs should have - * been configured for output, and all chip selects disabled. - * - * One GPIO, SS (PB2 on the eZ8F091) is reserved as a chip select. - * However, if multiple devices on on the bus, then multiple chip - * selects will be required. Therefore, all GPIO chip management is - * deferred to board-specific logic. - * - * Input Parameters: - * Port number (for hardware that has multiple SPI interfaces) - * - * Returned Value: - * Valid SPI device structure reference on success; a NULL on failure - * - ****************************************************************************/ - -FAR struct spi_dev_s *ez80_spibus_initialize(int port) -{ - uint8_t regval; - -#ifdef CONFIG_DEBUG_FEATURES - /* Only the SPI1 interface is supported */ - - if (port != 1) - { - return NULL; - } -#endif - - /* Disable SPI */ - - outp(EZ80_SPI_CTL, 0); - - /* Configure GPIOs. For the eZ80F91, the pin mapping for the four SPI pins - * is: - * - * GPIO ALT MASTER SLAVE COMMENT - * ---- ----- ------- ------- --------------------------------- - * PB2 SS INPUT INPUT Managed by board specific logic - * PB3 SCLK OUTPUT INPUT - * PB6 MISO INPUT OUTPUT - * PB7 MOSI OUTPUT INPUT - * - * Select the alternate function for PB2-3,6-7: - */ - -#if defined(CONFIG_ARCH_CHIP_EZ80F91) || defined(CONFIG_ARCH_CHIP_EZ80F92) - regval = inp(EZ80_PB_DDR); - regval |= GPIOB_SPI_PINSET; - outp(EZ80_PB_DDR, regval); - - regval = inp(EZ80_PB_ALT1); - regval &= ~GPIOB_SPI_PINSET; - outp(EZ80_PB_ALT1, regval); - - regval = inp(EZ80_PB_ALT2); - regval |= GPIOB_SPI_PINSET; - outp(EZ80_PB_ALT2, regval); -#else -# error "Check GPIO initialization for this chip" -#endif - - /* Set the initial clock frequency for identification mode < 400kHz - * and Mode 0. - */ - - spi_setfrequency(NULL, 400000); - spi_setmode(NULL, SPIDEV_MODE0); - - /* Enable the SPI. - * NOTE 1: Interrupts are not used in this driver version. - * NOTE 2: Initial mode is mode=0 - */ - - outp(EZ80_SPI_CTL, SPI_CTL_SPIEN | SPI_CTL_MASTEREN); - - return &g_spidev; -} diff --git a/arch/z80/src/ez80/ez80_spi.h b/arch/z80/src/ez80/ez80_spi.h deleted file mode 100644 index ffd9cf4d4c..0000000000 --- a/arch/z80/src/ez80/ez80_spi.h +++ /dev/null @@ -1,153 +0,0 @@ -/**************************************************************************** - * arch/z80/src/ez80/ez80_spi.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z80_SRC_EZ80_EZ80_SPI_H -#define __ARCH_Z80_SRC_EZ80_EZ80_SPI_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include -#include -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* SPIC Registers **********************************************************/ - -/* Provided in ez80f9x.h */ - -/* SPIC Register Bit Definitions *******************************************/ - -/* Baud Rate Generator (BRG) H/L Register Definitions - * - * No bit definitions -- These two 8-bit registers set the - * 16-bit BRG divider value. - */ - -/* SPI Control (CTL) Register Definitions */ - -#define SPI_CTL_IRQEN (1 << 7) /* Bit 7: 1=SPI system interrupt is enabled */ - /* Bit 6: Reserved */ -#define SPI_CTL_SPIEN (1 << 5) /* Bit 5: 1=SPI is enabled */ -#define SPI_CTL_MASTEREN (1 << 4) /* Bit 4: 1=SPI operates as a master */ -#define SPI_CTL_CPOL (1 << 3) /* Bit 3: 1=Master SCK pin idles in a high (1) state */ -#define SPI_CTL_CPHA (1 << 2) /* Bit 2: 1=SS remains Low to transfer any number of data bytes */ - /* Bits 0-1: Reserved */ - -/* SR Register Definitions */ - -#define SPI_SR_SPIF (1 << 7) /* Bit 7: 1=SPI data transfer is finished */ -#define SPI_SR_WCOL (1 << 6) /* Bit 6: 1=SPI write collision is detected*/ - /* Bit 5: Reserved */ -#define SPI_SR_MODF (1 << 4) /* Bit 4: 1=Mode fault (multimaster conflict) is detected */ - /* Bits 0-3: Reserved */ - -/* RBR/TSR Register Definitions */ - -/* No definitions: 8-bit SPI receive/transmit data */ - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif /* __cplusplus */ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Name: ez80_spibus_initialize - * - * Description: - * Initialize common parts the selected SPI port. Initialization of - * chip select GPIOs must have been performed by board specific logic - * prior to calling this function. Specifically: GPIOs should have - * been configured for output, and all chip selects disabled. - * - * One GPIO, SS (PB2 on the eZ8F091) is reserved as a chip select. - * However, if multiple devices on on the bus, then multiple chip selects - * will be required. Therefore, all GPIO chip management is deferred - * to board-specific logic. - * - * Input Parameters: - * Port number (for hardware that has multiple SPI interfaces) - * - * Returned Value: - * Valid SPI device structure reference on success; a NULL on failure - * - ****************************************************************************/ - -FAR struct spi_dev_s *ez80_spibus_initialize(int port); - -/**************************************************************************** - * The external functions, ez80_spiselect, ez80_spistatus and ez80_spicmddata - * must be provided by board-specific logic. These are implementations - * of the select, status and cmddata methods of the SPI interface defined - * by struct spi_ops_s (see include/nuttx/spi/spi.h). All other methods - * (including ez80_spibus_initialize()) are provided by common logic. - * To use this common SPI logic on your board: - * - * 1. Provide ez80_spiselect() and ez80_spistatus() functions in your - * board-specific logic. This function will perform chip selection and - * status operations using GPIOs in the way your board is configured. - * 2. If CONFIG_SPI_CMDDATA is defined in your NuttX configuration, - * provide the ez80_spiscmddata() function in your board-specific logic. - * This function will perform cmd/data selection operations using GPIOs - * in the way your board is configured. - * 3. Add a call to ez80_spibus_initialize() in your low level - * initialization logic - * 4. The handle returned by ez80_spibus_initialize() may then be used - * to bind the SPI driver to higher level logic - * (e.g., calling mmcsd_spislotinitialize(), for example, - * will bind the SPI driver to the SPI MMC/SD driver). - * - ****************************************************************************/ - -void ez80_spiselect(FAR struct spi_dev_s *dev, uint32_t devid, - bool selected); -uint8_t ez80_spistatus(FAR struct spi_dev_s *dev, uint32_t devid); -int ez80_spicmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd); - -#undef EXTERN -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* __ASSEMBLY__ */ - -#endif /* __ARCH_Z80_SRC_EZ80_EZ80_SPI_H */ diff --git a/arch/z80/src/ez80/ez80_startup.asm b/arch/z80/src/ez80/ez80_startup.asm deleted file mode 100644 index 382dbebbb6..0000000000 --- a/arch/z80/src/ez80/ez80_startup.asm +++ /dev/null @@ -1,166 +0,0 @@ -;************************************************************************** -; arch/z80/src/ez80/ez80_startup.asm -; -; SPDX-License-Identifier: Apache-2.0 -; -; Licensed to the Apache Software Foundation (ASF) under one or more -; contributor license agreements. See the NOTICE file distributed with -; this work for additional information regarding copyright ownership. The -; ASF licenses this file to you under the Apache License, Version 2.0 (the -; "License"); you may not use this file except in compliance with the -; License. You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -; License for the specific language governing permissions and limitations -; under the License. -; -;************************************************************************** - -;************************************************************************** -; Constants -;************************************************************************** - -EZ80_RAM_CTL EQU 0b4h -EZ80_RAM_ADDR_U EQU 0b5h - -EZ80_FLASH_ADDR_U EQU 0f7h -EZ80_FLASH_CTRL EQU 0f8h - -;************************************************************************** -; Imported Symbols -;************************************************************************** - - xref _ez80_init - xref _ez80_initvectors - xref _ez80_initsysclk - xref _ez80_board_initialize - xref __low_bss ; Low address of bss segment - xref __len_bss ; Length of bss segment - - xref __low_data ; Address of initialized data section - xref __low_romdata ; Addr of initialized data section in ROM - xref __len_data ; Length of initialized data section - - xref __copy_code_to_ram - xref __len_code - xref __low_code - xref __low_romcode - - xref __RAM_ADDR_U_INIT_PARAM - xref __RAM_CTL_INIT_PARAM - xref __FLASH_ADDR_U_INIT_PARAM - xref __FLASH_CTL_INIT_PARAM - - xref _nx_start - xdef _ez80_startup - xdef _ez80_halt - -;************************************************************************** -; Code -;************************************************************************** - - segment CODE - .assume ADL=1 - -;************************************************************************** -; System reset start logic -;************************************************************************** - -_ez80_startup: - ; Enable internal memory using settings from the linkcmd file - - ld a, __FLASH_ADDR_U_INIT_PARAM - out0 (EZ80_FLASH_ADDR_U), a - ld a, __FLASH_CTL_INIT_PARAM - out0 (EZ80_FLASH_CTRL), a - - ld a, __RAM_ADDR_U_INIT_PARAM - out0 (EZ80_RAM_ADDR_U), a - ld a, __RAM_CTL_INIT_PARAM - out0 (EZ80_RAM_CTL), a - - ; Position the IDLE task stack point at an offset of 1Kb in on-chip SRAM - ; On-chip SRAM resides at an offset of 000e000h from the RAM base address. - ; REVISIT: CONFIG_IDLETHREAD_STACKSIZE is not used! - - ; The GNU assembler (2.36.1) cannot produce this relocation, although the - ; Z80 ELF format supports it. The instruction is instead hand assembled. - ;ld sp, __RAM_ADDR_U_INIT_PARAM << 16 + 000e400h - db 031h, 000h, 0e4h, __RAM_ADDR_U_INIT_PARAM - - ; Perform chip-specific initialization - - call _ez80_init - - ; initialize the interrupt vector table - - call _ez80_initvectors - - ; Initialize the system clock - - call _ez80_initsysclk - - ; Perform C initializations - ; Clear the uninitialized data section - - ld bc, __len_bss ; Check for non-zero length - ld a, __len_bss >> 16 - or a, c - or a, b - jr z, _ez80_bssdone ; BSS is zero-length ... - xor a, a - ld (__low_bss), a - sbc hl, hl ; hl = 0 - dec bc ; 1st byte's taken care of - sbc hl, bc - jr z, _ez80_bssdone ; Just 1 byte ... - ld hl, __low_bss ; reset hl - ld de, __low_bss + 1 ; [de] = bss + 1 - ldir -_ez80_bssdone: - - ; Copy the initialized data section - - ld bc, __len_data ; [bc] = data length - ld a, __len_data >> 16 ; Check for non-zero length - or a, c - or a, b - jr z, _ez80_datadone ; __len_data is zero-length ... - ld hl, __low_romdata ; [hl] = data_copy - ld de, __low_data ; [de] = data - ldir ; Copy the data section -_ez80_datadone: - - ; Copy CODE (which may be in FLASH) to RAM if the - ; copy_code_to_ram symbol is set in the link control file - - ld a, __copy_code_to_ram - or a, a - jr z, _ez80_codedone - ld bc, __len_code ; [bc] = code length - ld a, __len_code >> 16 ; Check for non-zero length - or a, c - or a, b - jr z, _ez80_codedone ; __len_code is zero-length - ld hl, __low_romcode ; [hl] = code_copy - ld de, __low_code ; [de] = code - ldir ; Copy the code section -_ez80_codedone: - - ; Perform board-specific initialization - - call _ez80_board_initialize - - ; Then start NuttX - - call _nx_start ; jump to the OS entry point - - ; NuttX will never return, but just in case... - -_ez80_halt: - halt ; We should never get here - jp _ez80_halt diff --git a/arch/z80/src/ez80/ez80_timerisr.c b/arch/z80/src/ez80/ez80_timerisr.c deleted file mode 100644 index 57a9bf74ca..0000000000 --- a/arch/z80/src/ez80/ez80_timerisr.c +++ /dev/null @@ -1,232 +0,0 @@ -/**************************************************************************** - * arch/z80/src/ez80/ez80_timerisr.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include - -#include -#include -#include - -#include "chip.h" -#include "clock/clock.h" -#include "z80_internal.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Select a clock divider. Choices are 4, 16, 64, or 256 */ - -#define CLOCK_DIVIDER 16 - -/* Given that: - * - * reload_value = (timer_period * system_clock_frequency) / clock_divider - * = system_clock_frequency / DENOMINATOR - * - * Where: - * - * DENOMINATOR = clock_divider / timer_period - * - * The system timer period is given by CONFIG_USEC_PER_TICK which is usually - * 10,000 corresponding to 100Hz. - * - * - * DENOMINATOR = clock_divider / CONFIG_USEC_PER_TICK / USEC_PER_SEC - * = (USEC_PER_SEC * clock_divider) / CONFIG_USEC_PER_TICK - * - * So for the usual value of CONFIG_USEC_PER_TICK (10,000) and a divider of - * 16, the DENOMINATOR would be 1,600 - */ - -#define DENOMINATOR ((USEC_PER_SEC * CLOCK_DIVIDER) / CONFIG_USEC_PER_TICK) - -/* Pick clock divider register setting */ - -#if CLOCK_DIVIDER == 4 -# define EZ80_TMRCLKDIV EZ80_TMRCLKDIV_4 -#elif CLOCK_DIVIDER == 16 -# define EZ80_TMRCLKDIV EZ80_TMRCLKDIV_16 -#elif CLOCK_DIVIDER == 64 -# define EZ80_TMRCLKDIV EZ80_TMRCLKDIV_64 -#elif CLOCK_DIVIDER == 256 -# define EZ80_TMRCLKDIV EZ80_TMRCLKDIV_256 -#else -# error Invalid clock divider -#endif - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Function: ez80_timerisr - * - * Description: - * The timer ISR will perform a variety of services for various portions - * of the system. - * - ****************************************************************************/ - -static int ez80_timerisr(int irq, chipreg_t *regs, void *arg) -{ - /* Read the appropriate timer0 register to clear the interrupt */ - -#ifdef CONFIG_ARCH_CHIP_EZ80F91 - inp(EZ80_TMR0_IIR); -#else - /* _EZ80190, _EZ80L92, _EZ80F92, _EZ80F93: PRT_IRQ, is set to 1 when the - * timer reloads the start value in CONTINUOUS mode. The PRT_IRQ is - * cleared to 0 and the interrupt service request signal is inactivated - * when the CPU reads from the timer control register, TMRx_CTL. - */ - - inp(EZ80_TMR0_CTL); -#endif - - /* Process timer interrupt */ - - nxsched_process_timer(); - -#ifdef CONFIG_ARCH_TIMERHOOK - /* Architecture specific hook into the timer interrupt handler */ - - z80_timerhook(); -#endif - - return 0; -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Function: up_timer_initialize - * - * Description: - * This function is called during start-up to initialize the timer - * interrupt. - * - ****************************************************************************/ - -void up_timer_initialize(void) -{ - uint16_t reload; - - /* Disable the timer */ - - outp(EZ80_TMR0_CTL, 0x00); - - /* Attach system timer interrupts */ - - irq_attach(EZ80_IRQ_SYSTIMER, (xcpt_t)ez80_timerisr, NULL); - - /* Set up the timer reload value */ - - /* Write to the timer reload register to set the reload value. - * - * In continuous mode: - * - * timer_period = reload_value x clock_divider / system_clock_frequency - * - * or - * - * reload_value = (timer_period * system_clock_frequency) / clock_divider - * = system_clock_frequency / DENOMINATOR - * - * Where: - * - * DENOMINATOR = clock_divider / timer_period - * - * eZ80F91: - * For timer_period=10mS, and clock_divider=16, that would yield a - * DENOMINATOR of 1600. For a system timer of 50,000,000, that would - * result in a reload value of 31,250. - * - * eZ80F92: - * For timer_period=10mS, and clock_divider=4, that would yield a - * DENOMINATOR of 1600. For a system timer of 20,000,000, that would - * result in a reload value of 50,000. - * - * NOTE: The system clock frequency value is defined in the board.h file - */ - - reload = (uint16_t)(ez80_systemclock / DENOMINATOR); - outp(EZ80_TMR0_RRH, (uint8_t)(reload >> 8)); - outp(EZ80_TMR0_RRL, (uint8_t)(reload)); - -#if defined(CONFIG_ARCH_CHIP_EZ80F91) - /* Clear any pending timer interrupts by reading the IIR register */ - - inp(EZ80_TMR0_IIR); - -#elif defined(CONFIG_ARCH_CHIP_EZ80L92) || defined(CONFIG_ARCH_CHIP_EZ80F92) || \ - defined(CONFIG_ARCH_CHIP_EZ80F93) - /* Clear any pending timer interrupts by reading the CTL register */ - - inp(EZ80_TMR0_CTL); - -#endif - - /* Configure and enable the timer */ - -#if defined(_EZ80190) - - outp(EZ80_TMR0_CTL, 0x5f); - -#elif defined(CONFIG_ARCH_CHIP_EZ80F91) - /* EZ80_TMRCTL_TIMEN: Bit 0: The programmable reload timer is enabled - * EZ80_TMRCTL_RLD: Bit 1: Force reload - * EZ80_TMRCTL_TIMCONT: Bit 2: The timer operates in CONTINUOUS mode. - * EZ80_TMRCLKDIV: Bits 2-3: Timer input clock divider - */ - - outp(EZ80_TMR0_CTL, (EZ80_TMRCTL_TIMEN | EZ80_TMRCTL_RLD | - EZ80_TMRCTL_TIMCONT | EZ80_TMRCLKDIV)); - - /* Enable timer end-of-count interrupts */ - - outp(EZ80_TMR0_IER, EZ80_TMRIER_EOCEN); - -#elif defined(CONFIG_ARCH_CHIP_EZ80L92) || defined(CONFIG_ARCH_CHIP_EZ80F92) || \ - defined(CONFIG_ARCH_CHIP_EZ80F93) - /* EZ80_TMRCTL_TIMEN: Bit 0: Programmable reload timer enabled. - * EZ80_TMRCTL_RSTEN: Bit 1: Reload and start function enabled. - * EZ80_TMRCLKDIV: Bits 2-3: Timer input clock divider - * EZ80_TMRCTL_TIMCONT: Bit 4: Continuous mode - * EZ80_TMRCTL_EN: Bit 6: Enable timer interrupt requests - */ - - outp(EZ80_TMR0_CTL, (EZ80_TMRCTL_TIMEN | EZ80_TMRCTL_RSTEN | - EZ80_TMRCLKDIV | EZ80_TMRCTL_TIMCONT | - EZ80_TMRCTL_EN)); - -#endif -} diff --git a/arch/z80/src/ez80/ez80f91.h b/arch/z80/src/ez80/ez80f91.h deleted file mode 100644 index 448c80b85a..0000000000 --- a/arch/z80/src/ez80/ez80f91.h +++ /dev/null @@ -1,495 +0,0 @@ -/**************************************************************************** - * arch/z80/src/ez80/ez80f91.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z80_SRC_EZ80_EZ80F91_H -#define __ARCH_Z80_SRC_EZ80_EZ80F91_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include "ez80f91_emac.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Memory map ***************************************************************/ - -#define EZ80_ONCHIPFLASH 0x000000 /* CS0: 256Kb of on-chip flash */ -#define EZ80_OFFCHIPCS0 0x400000 /* CS0: Off chip use (usually flash) */ -#define EZ80_OFFCHIPCS2 0x800000 /* CS2: Off chip use (e.g. memory mapped I/O) */ -#define EZ80_OFFCHIPCS1 0xc00000 /* CS1: Off chip use (usually SRAM) */ -#define EZ80_EMACSRAM 0xffc000 /* On-chip EMAC SRAM (8Kb) on reset*/ -#define EZ80_ONCHIPSRAM 0xffe000 /* On-chip SRAM (8Kb) on reset */ - -#define EZ80_FLASH_SIZE 0x040000 /* 256Kb on-chip flash */ -#define EZ80_SRAM_SIZE 0x002000 /* 8Kb on-chip sram */ - -/* Product ID Registers ****************************************************/ - -#define EZ80_ZDI_ID_L 0x00 -#define EZ80_ZDI_ID_H 0x01 -#define EZ80_ZDI_ID_REV 0x02 - -/* Interrupt Registers *****************************************************/ - -#define EZ80_INT_P0 0x10 -#define EZ80_INT_P1 0x11 -#define EZ80_INT_P2 0x12 -#define EZ80_INT_P3 0x13 -#define EZ80_INT_P4 0x14 -#define EZ80_INT_P5 0x15 - -/* EMACC Registers *********************************************************/ - -#define EZ80_EMAC_TEST 0x20 /* EMAC test register */ -#define EZ80_EMAC_CFG1 0x21 /* EMAC configuration 1 register */ -#define EZ80_EMAC_CFG2 0x22 /* EMAC configuration 2 register */ -#define EZ80_EMAC_CFG3 0x23 /* EMAC configuration 3 register */ -#define EZ80_EMAC_CFG4 0x24 /* EMAC configuration 4 register */ -#define EZ80_EMAC_STAD_0 0x25 /* EMAC station address register 0 */ -#define EZ80_EMAC_STAD_1 0x26 /* EMAC station address register 1 */ -#define EZ80_EMAC_STAD_2 0x27 /* EMAC station address register 2 */ -#define EZ80_EMAC_STAD_3 0x28 /* EMAC station address register 3 */ -#define EZ80_EMAC_STAD_4 0x29 /* EMAC station address register 4 */ -#define EZ80_EMAC_STAD_5 0x2a /* EMAC station address register 5 */ -#define EZ80_EMAC_TPTV_L 0x2b /* Transit pause timer value (low) */ -#define EZ80_EMAC_TPTV_H 0x2c /* Transit pause timer value (high) */ -#define EZ80_EMAC_IPGT 0x2d /* EMAC Interpacket gap register */ -#define EZ80_EMAC_IPGR1 0x2e /* Non-back-to-back IPG register 1 */ -#define EZ80_EMAC_IPGR2 0x2f /* Non-back-to-back IPG register 2 */ -#define EZ80_EMAC_MAXF_L 0x30 /* EMAC maximum frame length register (low) */ -#define EZ80_EMAC_MAXF_H 0x31 /* EMAC maximum frame length register (high) */ -#define EZ80_EMAC_AFR 0x32 /* EMAC address filter register */ -#define EZ80_EMAC_HTBL_0 0x33 /* EMAC hash table register 0 */ -#define EZ80_EMAC_HTBL_1 0x34 /* EMAC hash table register 1 */ -#define EZ80_EMAC_HTBL_2 0x35 /* EMAC hash table register 2 */ -#define EZ80_EMAC_HTBL_3 0x36 /* EMAC hash table register 3 */ -#define EZ80_EMAC_HTBL_4 0x37 /* EMAC hash table register 4 */ -#define EZ80_EMAC_HTBL_5 0x38 /* EMAC hash table register 5 */ -#define EZ80_EMAC_HTBL_6 0x39 /* EMAC hash table register 6 */ -#define EZ80_EMAC_HTBL_7 0x3a /* EMAC hash table register 7 */ -#define EZ80_EMAC_MIIMGT 0x3b /* EMACS MII management register */ -#define EZ80_EMAC_CTLD_L 0x3c /* PHY configuration data register (low) */ -#define EZ80_EMAC_CTLD_H 0x3d /* PHY configuration data register (high) */ -#define EZ80_EMAC_RGAD 0x3e /* PHY address register */ -#define EZ80_EMAC_FIAD 0x3f /* PHY unit select register */ -#define EZ80_EMAC_PTMR 0x40 /* EMAC transmit polling timer register */ -#define EZ80_EMAC_RST 0x41 /* EMAC reset control register */ -#define EZ80_EMAC_TLBP_L 0x42 /* EMAC transmit lower boundary pointer (low) */ -#define EZ80_EMAC_TLBP_H 0x43 /* EMAC transmit lower boundary pointer (high) */ -#define EZ80_EMAC_BP_L 0x44 /* EMAC boundary pointer register (low) */ -#define EZ80_EMAC_BP_H 0x45 /* EMAC boundary pointer register (high) */ -#define EZ80_EMAC_BP_U 0x46 /* EMAC boundary pointer register (upper byte) */ -#define EZ80_EMAC_RHBP_L 0x47 /* EMAC receive high boundary pointer register (low) */ -#define EZ80_EMAC_RHBP_H 0x48 /* EMAC receive high boundary pointer register (high) */ -#define EZ80_EMAC_RRP_L 0x49 /* EMAC receive read pointer (low) */ -#define EZ80_EMAC_RRP_H 0x4a /* EMAC receive read pointer (high) */ -#define EZ80_EMAC_BUFSZ 0x4b /* EMAC buffer size register */ -#define EZ80_EMAC_IEN 0x4c /* EMAC interrupt enable register */ -#define EZ80_EMAC_ISTAT 0x4d /* EMAC interrupt status register */ -#define EZ80_EMAC_PRSD_L 0x4e /* PHY read status data register (low) */ -#define EZ80_EMAC_PRSD_H 0x4f /* PHY read status data register (high) */ -#define EZ80_EMAC_MIISTAT 0x50 /* EMAC MII status register */ -#define EZ80_EMAC_RWP_L 0x51 /* EMAC receive write pointer (low) */ -#define EZ80_EMAC_RWP_H 0x52 /* EMAC receive write pointer (high) */ -#define EZ80_EMAC_TRP_L 0x53 /* EMAC transmit read pointer (low) */ -#define EZ80_EMAC_TRP_H 0x54 /* EMAC transmit read pointer (high) */ -#define EZ80_EMAC_BLKSLFT_L 0x55 /* EMAC receive blocks left register (low) */ -#define EZ80_EMAC_BLKSLFT_H 0x56 /* EMAC receive blocks left register (high) */ -#define EZ80_EMAC_FDATA_L 0x57 /* EMAC FIFO data register (low) */ -#define EZ80_EMAC_FDATA_H 0x58 /* EMAC FIFO data register (high) */ -#define EZ80_EMAC_FFLAGS 0x59 /* EMAC FIFO flags register */ - -/* PLL Registers ***********************************************************/ - -#define EZ80_PLL_DIV_L 0x5c -#define EZ80_PLL_DIV_H 0x5d -#define EZ80_PLL_CTL0 0x5e -#define EZ80_PLL_CTL1 0x5f - -/* Timer Registers *********************************************************/ - -#define EZ80_TMR0_CTL 0x60 /* RW: Timer 0 control register */ -#define EZ80_TMR0_IER 0x61 /* RW: Timer 0 interrupt enable register */ -#define EZ80_TMR0_IIR 0x62 /* R : Timer 0 interrupt ID register */ -#define EZ80_TMR0_DRL 0x63 /* R : Timer 0 data register (low) */ -#define EZ80_TMR0_DRH 0x64 /* R : Timer 0 data register (high) */ -#define EZ80_TMR0_RRL 0x63 /* W: Timer 0 reload register (low) */ -#define EZ80_TMR0_RRH 0x64 /* W: Timer 0 reload register (high) */ - -#define EZ80_TMR1_CTL 0x65 /* RW: Timer 1 control register */ -#define EZ80_TMR1_IER 0x66 /* RW: Timer 1 interrupt enable register */ -#define EZ80_TMR1_IIR 0x67 /* R : Timer 1 interrupt ID register */ -#define EZ80_TMR1_DRL 0x68 /* R : Timer 1 data register (low) */ -#define EZ80_TMR1_DRH 0x69 /* R : Timer 1 data register (high) */ -#define EZ80_TMR1_RRL 0x68 /* W: Timer 1 reload register (low) */ -#define EZ80_TMR1_RRH 0x69 /* W: Timer 1 reload register (high) */ -#define EZ80_TMR1_CAPCTL 0x6a /* RW: Timer 1 input capture control register */ -#define EZ80_TMR1_CAPAL 0x6b /* R : Timer 1 capture input value A (low) */ -#define EZ80_TMR1_CAPAH 0x6c /* R : Timer 1 capture input value A (high) */ -#define EZ80_TMR1_CAPBL 0x6d /* R : Timer 1 capture input value B (low) */ -#define EZ80_TMR1_CAPBH 0x6e - -#define EZ80_TMR2_CTL 0x6f /* RW: Timer 2 control register */ -#define EZ80_TMR2_IER 0x70 /* RW: Timer 2 interrupt enable register */ -#define EZ80_TMR2_IIR 0x71 /* R : Timer 2 interrupt ID register */ -#define EZ80_TMR2_DRL 0x72 /* R : Timer 2 data register (low) */ -#define EZ80_TMR2_DRH 0x73 /* R : Timer 2 data register (high) */ -#define EZ80_TMR2_RRL 0x72 /* W: Timer 2 reload register (low) */ -#define EZ80_TMR2_RRH 0x73 /* W: Timer 2 reload register (high) */ - -#define EZ80_TMR3_CTL 0x74 /* RW: Timer 3 control register */ -#define EZ80_TMR3_IER 0x75 /* RW: Timer 3 interrupt enable register */ -#define EZ80_TMR3_IIR 0x76 /* R : Timer 3 interrupt ID register */ -#define EZ80_TMR3_DRL 0x77 /* R : Timer 3 data register (low) */ -#define EZ80_TMR3_DRH 0x78 /* R : Timer 3 data register (high) */ -#define EZ80_TMR3_RRL 0x77 /* W: Timer 3 reload register (low) */ -#define EZ80_TMR3_RRH 0x78 /* W: Timer 3 reload register (high) */ -#define EZ80_TMR3_CAPCTL 0x7b /* RW: Timer 3 input capture control register */ -#define EZ80_TMR3_CAPAL 0x7c /* R : Timer 3 capture input value A (low) */ -#define EZ80_TMR3_CAPAH 0x7d /* R : Timer 3 capture input value A (high) */ -#define EZ80_TMR3_CAPBL 0x7e /* R : Timer 3 capture input value B (low) */ -#define EZ80_TMR3_CAPBH 0x7f /* R : Timer 3 capture input value B (high) */ -#define EZ80_TMR3_OCCTL1 0x80 /* RW: Timer 3 output compare control register1 */ -#define EZ80_TMR3_OCCTL2 0x81 /* RW: Timer 3 output compare control register2 */ -#define EZ80_TMR3_OC0L 0x82 /* RW: Timer 3 output compare value 0 (low) */ -#define EZ80_TMR3_OC0H 0x83 /* RW: Timer 3 output compare value 0 (high) */ -#define EZ80_TMR3_OC1L 0x84 /* RW: Timer 3 output compare value 1 (low) */ -#define EZ80_TMR3_OC1H 0x85 /* RW: Timer 3 output compare value 1 (high) */ -#define EZ80_TMR3_OC2L 0x86 /* RW: Timer 3 output compare value 2 (low) */ -#define EZ80_TMR3_OC2H 0x87 /* RW: Timer 3 output compare value 2 (high) */ -#define EZ80_TMR3_OC3L 0x88 /* RW: Timer 3 output compare value 3 (low) */ -#define EZ80_TMR3_OC3H 0x89 /* RW: Timer 3 output compare value 3 (high) */ - -/* TMR0/1/2/3 CTL Register Bit Definitions **********************************/ - -#define EZ80_TMRCTL_BRKSTOP 0x80 /* Bit 7: Stop timer for debug operation */ -#define EZ80_TMRCTL_CLKSEL 0x60 /* Bits 6-5: Timer source */ -# define EZ80_TMRCLKSEL_SYSCLK 0x00 /* 00: System clock divided by prescaler */ -# define EZ80_TMRCLKSEL_RTC 0x20 /* 01: Real time clock input */ -# define EZ80_TMRCLKSEL_ECF 0x40 /* 10: Event count input, falling edge */ -# define EZ80_TMRCLKSEL_ECR 0x60 /* 11: Event count input, rising edge */ -#define EZ80_TMRCTL_CLKDIV 0x18 /* Bits 3-4: System clock divider */ -# define EZ80_TMRCLKDIV_4 0x00 /* 00: 4 */ -# define EZ80_TMRCLKDIV_16 0x08 /* 01: 16 */ -# define EZ80_TMRCLKDIV_64 0x10 /* 10: 64 */ -# define EZ80_TMRCLKDIV_256 0x18 /* 11: 256 */ -#define EZ80_TMRCTL_TIMCONT 0x04 /* Bit 2: Continuous mode */ -#define EZ80_TMRCTL_RLD 0x02 /* Bit 1: Force reload */ -#define EZ80_TMRCTL_TIMEN 0x01 /* Bit 0: Programmable reload timer enabled */ - -/* TMR0/1/2/3 IER Register Bit Definitions **********************************/ - - /* Bit 7: Reserved */ -#define EZ80_TMRIER_OC3EN 0x40 /* Bit 6: TMR3 OC3 enabled */ -#define EZ80_TMRIER_OC2EN 0x20 /* Bit 5: TMR3 OC2 enabled */ -#define EZ80_TMRIER_OC1EN 0x10 /* Bit 4: TMR3 OC1 enabled */ -#define EZ80_TMRIER_OC0EN 0x08 /* Bit 3: TMR3 OC0 enabled */ -#define EZ80_TMRIER_ICBEN 0x04 /* Bit 2: TMR1/3 capture pin enabled */ -#define EZ80_TMRIER_ICAEN 0x02 /* Bit 1: TMR1/3 capture pin enabled */ -#define EZ80_TMRIER_EOCEN 0x01 /* Bit 0: End of count interrupt enabled */ - -/* TMR0/1/2/3 IER Register Bit Definitions **********************************/ - - /* Bit 7: Reserved */ -#define EZ80_TMRIIR_OC3 0x40 /* Bit 6: TMR3 OC3 */ -#define EZ80_TMRIIR_OC2 0x20 /* Bit 5: TMR3 OC2 */ -#define EZ80_TMRIIR_OC1 0x10 /* Bit 4: TMR3 OC1 */ -#define EZ80_TMRIIR_OC0 0x08 /* Bit 3: TMR3 OC0 */ -#define EZ80_TMRIIR_ICB 0x04 /* Bit 2: TMR1/3 capture pin */ -#define EZ80_TMRIIR_ICA 0x02 /* Bit 1: TMR1/3 capture pin */ -#define EZ80_TMRIIR_EOC 0x01 /* Bit 0: End of count interrupt */ - -/* PWM Registers ************************************************************/ - -#define EZ80_PWM_CTL1 0x79 -#define EZ80_PWM_CTL2 0x7a -#define EZ80_PWM_CTL3 0x7b -#define EZ80_PWM0R_L 0x7c -#define EZ80_PWM0R_H 0x7d -#define EZ80_PWM1R_L 0x7e -#define EZ80_PWM1R_H 0x7f -#define EZ80_PWM2R_L 0x80 -#define EZ80_PWM2R_H 0x81 -#define EZ80_PWM3R_L 0x82 -#define EZ80_PWM3R_H 0x83 -#define EZ80_PWM0F_L 0x84 -#define EZ80_PWM0F_H 0x85 -#define EZ80_PWM1F_L 0x86 -#define EZ80_PWM1F_H 0x87 -#define EZ80_PWM2F_L 0x88 -#define EZ80_PWM2F_H 0x89 -#define EZ80_PWM3F_L 0x8a -#define EZ80_PWM3F_H 0x8b - -/* WDT Registers ************************************************************/ - -#define EZ80_WDT_CTL 0x93 -#define EZ80_WDT_RR 0x94 - -/* GPIO Registers ***********************************************************/ - -#define EZ80_PA_DR 0x96 -#define EZ80_PA_DDR 0x97 -#define EZ80_PA_ALT0 0xa6 -#define EZ80_PA_ALT1 0x98 -#define EZ80_PA_ALT2 0x99 -#define EZ80_PB_DR 0x9a -#define EZ80_PB_DDR 0x9b -#define EZ80_PB_ALT0 0xa7 -#define EZ80_PB_ALT1 0x9c -#define EZ80_PB_ALT2 0x9d -#define EZ80_PC_DR 0x9e -#define EZ80_PC_DDR 0x9f -#define EZ80_PC_ALT0 0xce -#define EZ80_PC_ALT1 0xa0 -#define EZ80_PC_ALT2 0xa1 -#define EZ80_PD_DR 0xa2 -#define EZ80_PD_DDR 0xa3 -#define EZ80_PD_ALT0 0xcf -#define EZ80_PD_ALT1 0xa4 -#define EZ80_PD_ALT2 0xa5 - -/* CS Registers *************************************************************/ - -#define EZ80_CS0_LBR 0xa8 -#define EZ80_CS0_UBR 0xa9 -#define EZ80_CS0_CTL 0xaa -#define EZ80_CS1_LBR 0xab -#define EZ80_CS1_UBR 0xac -#define EZ80_CS1_CTL 0xad -#define EZ80_CS2_LBR 0xae -#define EZ80_CS2_UBR 0xaf -#define EZ80_CS2_CTL 0xb0 -#define EZ80_CS3_LBR 0xb1 -#define EZ80_CS3_UBR 0xb2 -#define EZ80_CS3_CTL 0xb3 - -/* RAMCTL reggisters ********************************************************/ - -#define EZ80_RAM_CTL 0xb4 -#define EZ80_RAM_CTL0 0xb4 -#define EZ80_RAM_ADDR_U 0xb5 -#define EZ80_MBIST_GPR 0xb6 -#define EZ80_MBIST_EMR 0xb7 - -/* RAMCTL bit definitions ***************************************************/ - -#define RAMCTL_ERAMEN (1 << 6) /* Bit 7: 1=On chip EMAC SRAM is enabled */ -#define RAMCTL_GPRAMEN (1 << 7) /* Bit 7: 1=On chip GP SRAM is enabled */ - -/* SPI Registers ************************************************************/ - -#define EZ80_SPI_BRG_L 0xb8 -#define EZ80_SPI_BRG_H 0xb9 -#define EZ80_SPI_CTL 0xba -#define EZ80_SPI_SR 0xbb -#define EZ80_SPI_RBR 0xbc -#define EZ80_SPI_TSR 0xbc - -/* UART Register Offsets ****************************************************/ - - /* DLAB=0: */ -#define EZ80_UART_THR 0x00 /* W: UART Transmit holding register */ -#define EZ80_UART_RBR 0x00 /* R : UART Receive buffer register */ -#define EZ80_UART_IER 0x01 /* RW: UART Interrupt enable register */ - /* DLAB=1: */ -#define EZ80_UART_BRG 0x00 /* RW: UART Baud rate generator register */ -#define EZ80_UART_BRGL 0x00 /* RW: UART Baud rate generator register (low) */ -#define EZ80_UART_BRGH 0x01 /* RW: UART Baud rate generator register (high) */ - /* DLAB=N/A: */ -#define EZ80_UART_IIR 0x02 /* R : UART Interrupt identification register */ -#define EZ80_UART_FCTL 0x02 /* W: UART FIFO control register */ -#define EZ80_UART_LCTL 0x03 /* RW: UART Line control register */ -#define EZ80_UART_MCTL 0x04 /* RW: UART Modem control register */ -#define EZ80_UART_LSR 0x05 /* R : UART Line status register */ -#define EZ80_UART_MSR 0x06 /* R : UART Modem status register */ -#define EZ80_UART_SPR 0x07 /* RW: UART Scratchpad register */ - -/* UART0/1 Base Register Addresses ******************************************/ - -#define EZ80_UART0_BASE 0xc0 -#define EZ80_UART1_BASE 0xd0 - -/* UART0/1 IER register bits ************************************************/ - -#define EZ80_UARTEIR_INTMASK 0x1f /* Bits 5-7: Reserved */ -#define EZ80_UARTEIR_TCIE 0x10 /* Bit 4: Transmission complete interrupt */ -#define EZ80_UARTEIR_MIIE 0x08 /* Bit 3: Modem status input interrupt */ -#define EZ80_UARTEIR_LSIE 0x04 /* Bit 2: Line status interrupt */ -#define EZ80_UARTEIR_TIE 0x02 /* Bit 1: Transmit interrupt */ -#define EZ80_UARTEIR_RIE 0x01 /* Bit 0: Receive interrupt */ - -/* UART0/1 IIR register bits ************************************************/ - -#define EZ80_UARTIIR_FSTS 0x80 /* Bit 7: FIFO enable */ - /* Bits 4-6: Reserved */ -#define EZ80_UARTIIR_INSTS 0x0e /* Bits 1-3: Interrupt status code */ -# define EZ80_UARTINSTS_CTO 0x0c /* 110: Character timeout */ -# define EZ80_UARTINSTS_TC 0x0a /* 101: Transmission complete */ -# define EZ80_UARTINSTS_RLS 0x06 /* 011: Receiver line status */ -# define EZ80_UARTINSTS_RDR 0x04 /* 010: Receive data ready or trigger level */ -# define EZ80_UARTINSTS_TBE 0x02 /* 001: Transmission buffer empty */ -# define EZ80_UARTINSTS_MS 0x00 /* 000: Modem status */ -#define EZ80_UARTIIR_INTBIT 0x01 /* Bit 0: Active interrupt source */ -#define EZ80_UARTIIR_CAUSEMASK 0x0f - -/* UART0/1 FCTL register bits ***********************************************/ - -#define EZ80_UARTFCTL_TRIG 0xc0 /* Bits 6-7: UART receive FIFO trigger level */ -# define EZ80_UARTTRIG_1 0x00 /* 00: Receive FIFO trigger level=1 */ -# define EZ80_UARTTRIG_4 0x40 /* 01: Receive FIFO trigger level=4 */ -# define EZ80_UARTTRIG_8 0x80 /* 10: Receive FIFO trigger level=8 */ -# define EZ80_UARTTRIG_14 0xc0 /* 11: Receive FIFO trigger level=14 */ - /* Bit 3-5: Reserved */ -#define EZ80_UARTFCTL_CLRTXF 0x04 /* Bit 2: Transmit enable */ -#define EZ80_UARTFCTL_CLRRXF 0x02 /* Bit 1: Receive enable */ -#define EZ80_UARTFCTL_FIFOEN 0x01 /* Bit 0: Enable receive/transmit FIFOs */ - -/* UART0/1 LCTL register bits ***********************************************/ - -#define EZ80_UARTLCTL_DLAB 0x80 /* Bit 7: Enable access to baud rate generator */ -#define EZ80_UARTLCTL_SB 0x40 /* Bit 6: Send break */ -#define EZ80_UARTLCTL_FPE 0x20 /* Bit 5: Force parity error */ -#define EZ80_UARTLCTL_EPS 0x10 /* Bit 4: Even parity select */ -#define EZ80_UARTLCTL_PEN 0x08 /* Bit 3: Parity enable */ -#define EZ80_UARTLCTL_2STOP 0x04 /* Bit 2: 2 stop bits */ -#define EZ80_UARTLCTL_CHAR 0x03 /* Bits 0-2: Number of data bits */ -# define EZ80_UARTCHAR_5BITS 0x00 /* 00: 5 data bits */ -# define EZ80_UARTCHAR_6BITS 0x01 /* 01: 6 data bits */ -# define EZ80_UARTCHAR_7BITS 0x02 /* 10: 7 data bits */ -# define EZ80_UARTCHAR_8BITS 0x03 /* 11: 8 data bits */ - -#define EZ80_UARTLCTL_MASK 0x3f - -/* UART0/1 MCTL register bits ***********************************************/ - - /* Bit 7: Reserved */ -#define EZ80_UARTMCTL_POLARITY 0x40 /* Bit 6: Invert polarity of RxD and TxD */ -#define EZ80_UARTMCTL_MDM 0x20 /* Bit 5: Multi-drop mode enable */ -#define EZ80_UARTMCTL_LOOP 0x10 /* Bit 4: Loopback mode enable */ -#define EZ80_UARTMCTL_OUT2 0x08 /* Bit 3: (loopback mode only) */ -#define EZ80_UARTMCTL_OUT1 0x04 /* Bit 2: (loopback mode only) */ -#define EZ80_UARTMCTL_RTS 0x02 /* Bit 1: Request to send */ -#define EZ80_UARTMCTL_DTR 0x01 /* Bit 0: Data termnal read */ - -/* UART0/1 LSR register bits ************************************************/ - -#define EZ80_UARTLSR_ERR 0x80 /* Bit 7: Error detected in FIFO */ -#define EZ80_UARTLSR_TEMT 0x40 /* Bit 6: Transmit FIFO empty and idle */ -#define EZ80_UARTLSR_THRE 0x20 /* Bit 5: Transmit FIFO empty */ -#define EZ80_UARTLSR_BI 0x10 /* Bit 4: Break on input */ -#define EZ80_UARTLSR_FE 0x08 /* Bit 3: Framing error */ -#define EZ80_UARTLSR_PE 0x04 /* Bit 2: Parity error */ -#define EZ80_UARTLSR_OE 0x02 /* Bit 1: Overrun error */ -#define EZ80_UARTLSR_DR 0x01 /* Bit 0: Data ready */ - -/* UART0/1 MSR register bits ************************************************/ - -#define EZ80_UARTMSR_DCD 0x80 /* Bit 7: Data carrier detect */ -#define EZ80_UARTMSR_RI 0x40 /* Bit 6: Ring indicator */ -#define EZ80_UARTMSR_DSR 0x20 /* Bit 5: Data set ready */ -#define EZ80_UARTMSR_CTS 0x10 /* Bit 4: Clear to send */ -#define EZ80_UARTMSR_DDCD 0x08 /* Bit 3: Delta on DCD input */ -#define EZ80_UARTMSR_TERI 0x04 /* Bit 2: Trailing edge change on RI */ -#define EZ80_UARTMSR_DDSR 0x02 /* Bit 1: Delta on DSR input */ -#define EZ80_UARTMSR_DCTS 0x01 /* Bit 0: Delta on CTS input */ - -/* IR Registers ************************************************************/ - -#define EZ80_IR_CTL 0xbf - -/* I2C Registers ***********************************************************/ - -#define EZ80_I2C_SAR 0xc8 -#define EZ80_I2C_XSAR 0xc9 -#define EZ80_I2C_DR 0xca -#define EZ80_I2C_CTL 0xcb -#define EZ80_I2C_SR 0xcc -#define EZ80_I2C_CCR 0xcd -#define EZ80_I2C_SRR 0xce - -/* CLK Registers ***********************************************************/ - -#define EZ80_CLK_PPD1 0xdb -#define EZ80_CLK_PPD2 0xdc - -/* RTC Registers ***********************************************************/ - -#define EZ80_RTC_SEC 0xe0 -#define EZ80_RTC_MIN 0xe1 -#define EZ80_RTC_HRS 0xe2 -#define EZ80_RTC_DOW 0xe3 -#define EZ80_RTC_DOM 0xe4 -#define EZ80_RTC_MON 0xe5 -#define EZ80_RTC_YR 0xe6 -#define EZ80_RTC_CEN 0xe7 -#define EZ80_RTC_ASEC 0xe8 -#define EZ80_RTC_AMIN 0xe9 -#define EZ80_RTC_AHRS 0xea -#define EZ80_RTC_ADOW 0xeb -#define EZ80_RTC_ACTRL 0xec -#define EZ80_RTC_CTRL 0xed - -/* CSBMC Registers *********************************************************/ - -#define EZ80_CS0_BMC 0xf0 -#define EZ80_CS1_BMC 0xf1 -#define EZ80_CS2_BMC 0xf2 -#define EZ80_CS3_BMC 0xf3 - -/* FLASH Registers *********************************************************/ - -#define EZ80_FLASH_KEY 0xf5 -#define EZ80_FLASH_DATA 0xf6 -#define EZ80_FLASH_ADDR_U 0xf7 -#define EZ80_FLASH_CTRL 0xf8 -#define EZ80_FLASH_FDIV 0xf9 -#define EZ80_FLASH_PROT 0xfa -#define EZ80_FLASH_INTC 0xfb -#define EZ80_FLASH_PAGE 0xfc -#define EZ80_FLASH_ROW 0xfd -#define EZ80_FLASH_COL 0xfe -#define EZ80_FLASH_PGCTL 0xff - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -#undef EXTERN -#ifdef __cplusplus -} -#endif -#endif - -#endif /* __ARCH_Z80_SRC_EZ80_EZ80F91_H */ diff --git a/arch/z80/src/ez80/ez80f91_emac.h b/arch/z80/src/ez80/ez80f91_emac.h deleted file mode 100644 index 40dfe571af..0000000000 --- a/arch/z80/src/ez80/ez80f91_emac.h +++ /dev/null @@ -1,281 +0,0 @@ -/**************************************************************************** - * arch/z80/src/ez80/ez80f91_emac.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z80_SRC_EZ80_EZ80F91_EMAC_H -#define __ARCH_Z80_SRC_EZ80_EZ80F91_EMAC_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -# include -#endif - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* EMACC Registers *********************************************************/ - -/* Provided in ez80f91.h */ - -/* EMAC configuration 1/2/3 register bit settings ***************************/ - -#define EMAC_CFG1_DCRCC 0x01 /* Bit 0: 1=4 bytes of proprietary header */ -#define EMAC_CFG1_HUGEN 0x02 /* Bit 1: 1=Allow unlimited size frames to be received */ -#define EMAC_CFG1_FLCHK 0x04 /* Bit 2: 1=Frame lengths compared to length/type */ -#define EMAC_CFG1_FULLHD 0x08 /* Bit 3: 1=Enable full duplex mode */ -#define EMAC_CFG1_CRCEN 0x10 /* Bit 4: 1=Append CRC to every frame */ -#define EMAC_CFG1_VLPAD 0x20 /* Bit 5: 1=Pad all short frames to 64 bytes, append CRC */ -#define EMAC_CFG1_ADPADN 0x40 /* Bit 6: 1=Enable frame detection by check VALN protocol ID */ -#define EMAC_CFG1_PADEN 0x80 /* Bit 7: 1=Pad all short frames with zeros. */ - -#define EMAC_CFG2_LCOLMASK 0x3f /* Bits 0-5: Number bytes after start frame for collision */ -#define EMAC_CFG2_NOBO 0x40 /* Bit 6: 1=immediate transmit after collision */ -#define EMAC_CFG2_BPNB 0x80 /* Bit 7: 1=after collision retransmit without back-off */ - -#define EMAC_CFG3_RETRYMASK 0x0f /* Bits 0-3: Number retransmissions before abort */ -#define EMAC_CFG3_BITMD 0x10 /* Bit 4: 1=Enable 10Mbps ENDEC mode */ -#define EMAC_CFG3_XSDFR 0x20 /* Bit 5: 1=Defer to carrier indefinitely */ -#define EMAC_CFG3_PUREP 0x40 /* Bit 6: 1=Verify preamble */ -#define EMAC_CFG3_LONGP 0x80 /* Bit 7: 1=only allow preamble < 12 bytes */ - -#define EMAC_CFG4_RXEN 0x01 /* Bit 0: 1=Receive frames */ -#define EMAC_CFG4_TPAUSE 0x02 /* Bit 1: 1=Force pause condition */ -#define EMAC_CFG4_TXFC 0x04 /* Bit 2: 1=Transmit pause control frames */ -#define EMAC_CFG4_RXFC 0x08 /* Bit 3: 1=Act on receive pause control frames */ -#define EMAC_CFG4_PARF 0x10 /* Bit 4: 1=Receive all frames */ -#define EMAC_CFG4_THDF 0x20 /* Bit 5: 1=Assert back-pressure */ -#define EMAC_CFG4_TPCF 0x40 /* Bit 6: 1=Transmit pause control frame. */ - /* Bit 7: reserved */ - -/* EMAC AFR register bit settings *******************************************/ - -#define EMAC_AFR_BC 0x01 /* Bit 0: 1=Accept broadcast messages */ -#define EMAC_AFR_QMC 0x02 /* Bit 1: 1=Accept only qualified multicast messages */ -#define EMAC_AFR_MC 0x04 /* Bit 2: 1=Accept any multicast message */ -#define EMAC_AFR_PROM 0x08 /* Bit 3: 1=Enable promiscuous mode */ - /* Bits 4-7: Reserved */ - -/* EMAC MII management register bit settings ********************************/ - -#define EMAC_MIIMGMT_CLKMASK 0x07 /* Bits 0-2: Divisor that produces MDC from SCLK */ -# define EMAC_MDC_DIV4 0x01 /* MDC = SCLK / 4 */ -# define EMAC_MDC_DIV6 0x02 /* MDC = SCLK / 6 */ -# define EMAC_MDC_DIV8 0x03 /* MDC = SCLK / 8 */ -# define EMAC_MDC_DIV10 0x04 /* MDC = SCLK / 10 */ -# define EMAC_MDC_DIV14 0x05 /* MDC = SCLK / 14 */ -# define EMAC_MDC_DIV20 0x06 /* MDC = SCLK / 20 */ -# define EMAC_MDC_DIV28 0x07 /* MDC = SCLK / 28 */ -#define EMAC_MIIMGMT_SPRE 0x08 /* Bit 3: 1=Suppress MDO preamble */ -#define EMAC_MIIMGMT_SCAN 0x10 /* Bit 4: 1=Perform continuous read cycles */ -#define EMAC_MIIMGMT_SCINC 0x20 /* Bit 5: 1=Increment PHY address on scan cycle */ -#define EMAC_MIIMGMT_RSTAT 0x40 /* Bit 6: 1=Read status from PHY (via PRSD) */ -#define EMAC_MIIMGMT_LCTLD 0x80 /* Bit 7: 1=Send CTLD control data to PHY */ - -/* EMAC PHY unit select address register bit settings ***********************/ - -#define EMAC_RGAD_MASK 0x1f /* 5-bit value selects address within PHY */ - -/* EMAC PHY address register bit settings ***********************************/ - -#define EMAC_FIAD_MASK 0x1f /* 5-bit value selects the external PHY */ - -/* EMAC reset control register bit settings *********************************/ - -#define EMAC_RST_HRMGT 0x01 /* Bit 0: 1=Reset EMAC management function */ -#define EMAC_RST_HRRMC 0x02 /* Bit 1: 1=Reset EMAC receive control function */ -#define EMAC_RST_HRTMC 0x04 /* Bit 2: 1=Reset EMAC transmit control function */ -#define EMAC_RST_HRRFN 0x08 /* Bit 3: 1=Reset receive function */ -#define EMAC_RST_HRTFN 0x10 /* Bit 4: 1=Reset transmit function */ -#define EMAC_RST_SRST 0x20 /* Bit 5: 1=Software reset active */ - /* Bits 6-7: Reserved */ - -/* EMAC bufsize register bit settings ***************************************/ - -#define EMAC_BUFSZ_BUFSZMASK 0xc0 /* Bits 6-6: Rx/Tx buffer size */ -# define EMAC_BUFSZ_256b 0x00 /* EMAC Rx/Tx buffer size = 256 bytes */ -# define EMAC_BUFSZ_128b 0x40 /* EMAC Rx/Tx buffer size = 128 bytes */ -# define EMAC_BUFSZ_64b 0x80 /* EMAC Rx/Tx buffer size = 64 bytes */ -# define EMAC_BUFSZ_32b 0xc0 /* EMAC Rx/Tx buffer size = 32 bytes */ -#define EMAC_BUFSZ_TPCFLMASK 0x3f /* Bits 0-5: Tranmsit pause frame level */ - -/* EMAC interrupt enable register bit settings ******************************/ - -#define EMAC_EIN_TXDONE 0x01 /* Bit 0: 1=Enable transmit done interrupt */ -#define EMAC_EIN_TXCF 0x02 /* Bit 1: 1=Enable transmit control frame interrupt */ -#define EMAC_EIN_RXOVR 0x04 /* Bit 2: 1=Enable receive overrun interrupt */ -#define EMAC_EIN_RXDONE 0x08 /* Bit 3: 1=Enable receive done interrupt */ -#define EMAC_EIN_RXPCF 0x10 /* Bit 4: 1=Enable receive pause control frame interrupt */ -#define EMAC_EIN_RXCF 0x20 /* Bit 5: 1=Enable receive control frame interrupt */ -#define EMAC_EIN_MGTDONE 0x40 /* Bit 6: 1=Enable MII Mgmt done interrupt */ -#define EMAC_EIN_TXFSMERR 0x80 /* Bit 7: 1=Enable transmit state machine error interrupt */ - -/* EMAC interrupt status register bit settings ******************************/ - -#define EMAC_ISTAT_TXDONE 0x01 /* Bit 0: 1=Transmit done interrupt */ -#define EMAC_ISTAT_TXCF 0x02 /* Bit 1: 1=Transmit control frame interrupt */ -#define EMAC_ISTAT_RXOVR 0x04 /* Bit 2: 1=Receive overrun interrupt */ -#define EMAC_ISTAT_RXDONE 0x08 /* Bit 3: 1=Receive done interrupt */ -#define EMAC_ISTAT_RXPCF 0x10 /* Bit 4: 1=Receive pause control frame interrupt */ -#define EMAC_ISTAT_RXCF 0x20 /* Bit 5: 1=Receive control frame interrupt */ -#define EMAC_ISTAT_MGTDONE 0x40 /* Bit 6: 1=MII Mgmt done interrupt */ -#define EMAC_ISTAT_TXFSMERR 0x80 /* Bit 7: 1=Transmit state machine error interrupt */ - -/* EMAC MII status register bit settings ************************************/ - -#define EMAC_MIISTAT_RDADRMK 0x1f /* Bits 0-4: PHY addressed in current scan cycle */ -#define EMAC_MIISTAT_NVALID 0x20 /* Bit 5: 1=PRSD is valid */ -#define EMAC_MIISTAT_MIILF 0x40 /* Bit 6: 1=PHY link OK */ -#define EMAC_MIISTAT_BUSY 0x80 /* Bit 7: 1=MII management in progress */ - -/* EMAC FIFO flags register bit settings ************************************/ - -#define EMAC_FFLAGS_RFE 0x01 /* Bit 0: 1=Receive FIFO empty */ -#define EMAC_FFLAGS_RFAE 0x02 /* Bit 0: 1=Receive FIFO almost empty */ -#define EMAC_FFLAGS_RFAF 0x04 /* Bit 0: 1=Receive FIFO almost full */ -#define EMAC_FFLAGS_RFF 0x08 /* Bit 0: 1=Receive FIFO full */ -#define EMAC_FFLAGS_TFE 0x10 /* Bit 0: 1=Transmit FIFO empty */ -#define EMAC_FFLAGS_TFAE 0x20 /* Bit 0: 1=Transmit FIFO almost empty */ -#define EMAC_FFLAGS_TFF 0x80 /* Bit 0: 1=Transmit FIFO full */ - -/* EMAC Transmit Descriptor Status ******************************************/ - -#define EMAC_TXDESC_NCOLL 0x0001 /* Bits 0-3: Number of collisions that occurred - * while transmitting the packet. */ -#define EMAC_TXDESC_MXCOLL 0x0010 /* Bit 4: 1=maximum number of collisions. - * number > CFG3[3:0]. packet aborted */ -#define EMAC_TXDESC_LATECOLL 0x0020 /* Bit 5: 1=late collision. Collision is detected - * at a byte count > CFG2[5:0]. Collisions - * detected before the byte count reaches - * CFG2[5:0] are early - * collisions and retried. */ -#define EMAC_TXDESC_FIFOUNDR 0x0040 /* Bit 6: TxFIFO Underrun. Check the TxAbort - * bit to see if the packet is aborted or retried. */ -#define EMAC_TXDESC_XSDFR 0x0080 /* Bit 7: Packet is excessively deferred. (> 6071 nibble - * times in 100 BaseT or 24,287 bit times in 10 BaseT). */ -#define EMAC_TXDESC_PKTDEFFRD 0x0100 /* Bit 8: Packet is deferred */ -#define EMAC_TXDESC_CRCERROR 0x0200 /* Bit 9: Invalid FCS (CRC). Set CRCEN = 0 and the - * last 4 bytes of the packet are not the valid FCS. */ -#define EMAC_TXDESC_LCERROR 0x0400 /* Bit 10: Type/Length field is not a Type field and - * does not match the actual data byte length of - * the Ethernet packet. The data byte length is - * the number of bytes of data in the Ethernet - * packet between the Type/Length field and the FCS. */ -#define EMAC_TXDESC_LOOR 0x0800 /* Bit 11: Type/Length field is out of range (larger - * than 1518 bytes). */ -#define EMAC_TXDESC_HUGE 0x1000 /* Bit 12: 1=Packet size is very large(Pkt_Size > MAXF). */ -#define EMAC_TXDESC_BPA 0x2000 /* Bit 13: 1=Back pressure applied */ -#define EMAC_TXDESC_ABORT 0x4000 /* Bit 14: 1=Packet aborted (not transmitted). */ -#define EMAC_TXDESC_OWNER 0x8000 /* Bit 15: 0=Host (eZ80 CPU) owns, 1=EMAC owns. */ - -/* Receive Descriptor Status ************************************************/ - -#define EMAC_RXDESC_OVR 0x0001 /* Bit 0: 1=A Receive Overrun occurs in this - * packet. An overrun occurs when all of the - * EMAC Receive buffers are in use and the - * Receive FIFO is full. The hardware ignores - * all incoming packets until the ISTAT Register - * [RXOVR] bit is cleared by the software. - * There is no indication as to how many packets - * are ignored. */ -#define EMAC_RXDESC_DVEVENT 0x0002 /* Bit 1: 1=Receive data (RxDV) event is - * previously seen. Indicates that the last - * Receive event is not long enough to be a - * valid packet. */ -#define EMAC_RXDESC_CEVENT 0x0004 /* Bit 2: 1=Carrier event is previously seen. - * This event is defined as Rx error RxER = 1, - * receive data valid (RxDV) = 0 and receive - * data (RxD) = Eh */ -#define EMAC_RXDESC_CODEV 0x0008 /* Bit 3: 1=A code violation is detected. The - * PHY asserts Rx error (RxER). */ -#define EMAC_RXDESC_LCERROR 0x0010 /* Bit 4 1=Type/Length field is not a Type field - * and it does not match the actual data byte - * length of the Ethernet packet. The data byte - * length is the number of bytes of data in the - * Ethernet packet between the Type/Length field - * and the FCS. */ -#define EMAC_RXDESC_LOOR 0x0020 /* Bit 5: 1=Type/Length field is out of range (larger - * than 1518 bytes). */ -#define EMAC_RXDESC_UOPCODE 0x0040 /* Bit 6: 1=Unsupported Op Code is indicated in the Op - * Code field of the Ethernet packet. */ -#define EMAC_RXDESC_VLAN 0x0080 /* Bit 7: 1=The packet is a VLAN packet */ -#define EMAC_RXDESC_BCPKT 0x0100 /* Bit 8: 1=packet contains a broadcast address */ -#define EMAC_RXDESC_MCPKT 0x0200 /* Bit 9: 1=The packet contains a multicast address */ -#define EMAC_RXDESC_CR 0x0400 /* Bit 10: 1=The packet is a control frame */ -#define EMAC_RXDESC_PCF 0x0800 /* Bit 11: 1=The packet is a pause control frame */ -#define EMAC_RXDESC_LONGEVNT 0x1000 /* Bit 12: 1= A Long or Dropped Event occurs. A - * Long Event is when a packet over 50,000 bit - * times occurs. A Dropped Packet can occur if - * the minimum interpacket gap is not met, the - * preamble is not pure, and the CFG3[PUREP] - * bit is set, or if a preamble over 11 bytes - * in length is detected and the CFG3[LONGP] - * bit is set to 1. */ -#define EMAC_RXDESC_CRCERR 0x2000 /* Bit 13: 1=The CRC (FCS) is in error */ -#define EMAC_RXDESC_ALGNERR 0x4000 /* Bit 14: 1=An odd number of nibbles is received. */ -#define EMAC_RXDESC_OK 0x8000 /* Bit 15: 1=Packet received intact. */ - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -/* EMAC descriptor structure (7 bytes) */ - -#ifndef __ASSEMBLY__ -struct ez80emac_desc_s -{ - uint24_t np; /* Pointer to the start of the next packet */ - uint16_t pktsize; /* Number of bytes in the packet, including the 4 CRC - * bytes, but excluding the 7 descriptor table bytes. */ - uint16_t stat; /* Status of the packet. Differs for TX and RX packets - * (see EMAC_RX/TXDESC_* definitions) */ -}; -#endif - -#define SIZEOF_EMACSDESC 7 - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif /* __cplusplus */ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#undef EXTERN -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* __ASSEMBLY__ */ - -#endif /* __ARCH_Z80_SRC_EZ80_EZ80F91_EMAC_H */ diff --git a/arch/z80/src/ez80/ez80f91_handlers.asm b/arch/z80/src/ez80/ez80f91_handlers.asm deleted file mode 100644 index 7d8e319b94..0000000000 --- a/arch/z80/src/ez80/ez80f91_handlers.asm +++ /dev/null @@ -1,209 +0,0 @@ -;************************************************************************** -; arch/z80/src/ez80/ez80f91_handlers.asm -; -; SPDX-License-Identifier: Apache-2.0 -; -; Licensed to the Apache Software Foundation (ASF) under one or more -; contributor license agreements. See the NOTICE file distributed with -; this work for additional information regarding copyright ownership. The -; ASF licenses this file to you under the Apache License, Version 2.0 (the -; "License"); you may not use this file except in compliance with the -; License. You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -; License for the specific language governing permissions and limitations -; under the License. -; -;************************************************************************** - -;************************************************************************** -; Global Symbols Imported -;************************************************************************** - - xref _ez80_irq_common - -;************************************************************************** -; Global Symbols Exported -;************************************************************************** - - xdef _ez80_initvectors - -;************************************************************************** -; Constants -;************************************************************************** - -NVECTORS EQU 64 ; Max possible interrupt vectors -EZ80_UNUSED EQU 64 ; Denotes an unused vector - -;************************************************************************** -; Macros -;************************************************************************** - -; Define one interrupt handler - -ifdef irqhandler -else -irqhandler: macro vectno - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #vectno ; A = vector number - jp _ez80_irq_common ; Remaining RST handling is common - endmac irqhandler -endif - -;************************************************************************** -; Interrupt Vector Handlers -;************************************************************************** - - define .STARTUP, space = ROM - segment .STARTUP - .assume ADL=1 - - ; Symbol Val VecNo Addr - ;----------------- --- ----- ----- -_ez80_handlers: - irqhandler 0 ; EZ80_EMACRX_IRQ 0 0 0x040 -_handlersize equ $-_ez80_handlers - irqhandler 1 ; EZ80_EMACTX_IRQ 1 1 0x044 - irqhandler 2 ; EZ80_EMACSYS_IRQ 2 2 0x048 - irqhandler 3 ; EZ80_PLL_IRQ 3 3 0x04c - irqhandler 4 ; EZ80_FLASH_IRQ 4 4 0x050 - irqhandler 5 ; EZ80_TIMER0_IRQ 5 5 0x054 - irqhandler 6 ; EZ80_TIMER1_IRQ 6 6 0x058 - irqhandler 7 ; EZ80_TIMER2_IRQ 7 7 0x05c - irqhandler 8 ; EZ80_TIMER3_IRQ 8 8 0x060 - irqhandler EZ80_UNUSED ; 9 0x064 - irqhandler EZ80_UNUSED+1 ; 10 0x068 - irqhandler 9 ; EZ80_RTC_IRQ 9 11 0x06C - irqhandler 10 ; EZ80_UART0_IRQ 10 12 0x070 - irqhandler 11 ; EZ80_UART1_IRQ 11 13 0x074 - irqhandler 12 ; EZ80_I2C_IRQ 12 14 0x078 - irqhandler 13 ; EZ80_SPI_IRQ 13 15 0x07c - irqhandler 14 ; EZ80_PORTA0_IRQ 14 16 0x080 - irqhandler 15 ; EZ80_PORTA1_IRQ 15 17 0x084 - irqhandler 16 ; EZ80_PORTA2_IRQ 16 18 0x088 - irqhandler 17 ; EZ80_PORTA3_IRQ 17 19 0x08c - irqhandler 18 ; EZ80_PORTA4_IRQ 18 20 0x090 - irqhandler 19 ; EZ80_PORTA5_IRQ 19 21 0x094 - irqhandler 20 ; EZ80_PORTA6_IRQ 20 22 0x098 - irqhandler 21 ; EZ80_PORTA7_IRQ 21 23 0x09c - irqhandler 22 ; EZ80_PORTB0_IRQ 22 24 0x0a0 - irqhandler 23 ; EZ80_PORTB1_IRQ 23 25 0x0a4 - irqhandler 24 ; EZ80_PORTB2_IRQ 24 26 0x0a8 - irqhandler 25 ; EZ80_PORTB3_IRQ 25 27 0x0ac - irqhandler 26 ; EZ80_PORTB4_IRQ 26 28 0x0b0 - irqhandler 27 ; EZ80_PORTB5_IRQ 27 29 0x0b4 - irqhandler 28 ; EZ80_PORTB6_IRQ 28 20 0x0b8 - irqhandler 29 ; EZ80_PORTB7_IRQ 29 21 0x0bc - irqhandler 30 ; EZ80_PORTC0_IRQ 30 22 0x0c0 - irqhandler 31 ; EZ80_PORTC1_IRQ 31 23 0x0c4 - irqhandler 32 ; EZ80_PORTC2_IRQ 32 24 0x0c8 - irqhandler 33 ; EZ80_PORTC3_IRQ 33 25 0x0cc - irqhandler 34 ; EZ80_PORTC4_IRQ 34 26 0x0d0 - irqhandler 35 ; EZ80_PORTC5_IRQ 35 27 0x0d4 - irqhandler 36 ; EZ80_PORTC6_IRQ 36 28 0x0d8 - irqhandler 37 ; EZ80_PORTC7_IRQ 37 29 0x0dc - irqhandler 38 ; EZ80_PORTD0_IRQ 38 40 0x0e0 - irqhandler 39 ; EZ80_PORTD1_IRQ 39 41 0x0e4 - irqhandler 40 ; EZ80_PORTD2_IRQ 40 42 0x0e8 - irqhandler 41 ; EZ80_PORTD3_IRQ 41 43 0x0ec - irqhandler 42 ; EZ80_PORTD4_IRQ 42 44 0x0f0 - irqhandler 43 ; EZ80_PORTD5_IRQ 43 45 0x0f4 - irqhandler 44 ; EZ80_PORTD6_IRQ 44 46 0x0f8 - irqhandler 45 ; EZ80_PORTD7_IRQ 45 47 0x0fc - irqhandler EZ80_UNUSED+2 ; 48 0x100 - irqhandler EZ80_UNUSED+3 ; 49 0x104 - irqhandler EZ80_UNUSED+4 ; 50 0x108 - irqhandler EZ80_UNUSED+5 ; 51 0x10c - irqhandler EZ80_UNUSED+6 ; 52 0x110 - irqhandler EZ80_UNUSED+7 ; 53 0x114 - irqhandler EZ80_UNUSED+8 ; 54 0x118 - irqhandler EZ80_UNUSED+9 ; 55 0x11c - irqhandler EZ80_UNUSED+10 ; 56 0x120 - irqhandler EZ80_UNUSED+11 ; 57 0x124 - irqhandler EZ80_UNUSED+12 ; 58 0x128 - irqhandler EZ80_UNUSED+13 ; 59 0x12c - irqhandler EZ80_UNUSED+14 ; 60 0x130 - irqhandler EZ80_UNUSED+15 ; 61 0x134 - irqhandler EZ80_UNUSED+16 ; 62 0x138 - irqhandler EZ80_UNUSED+17 ; 63 0x13c - -;************************************************************************** -; Vector Setup Logic -;************************************************************************** - -; Still in .STARTUP section - -_ez80_initvectors: - - ; Initialize the vector table - - ld iy, _ez80_vectable - ld ix, 4 - ld bc, 4 - ld b, NVECTORS - xor a, a ; Clear carry; Set A to zero - ld de, _handlersize ; Length of one irq handler in DE - ld hl, _ez80_handlers ; Start of handlers in HL - - ; "The size of I register is modified to 16 bits in the eZ80F91 device - ; differing from the previous versions of eZ80® CPU, to allow for a 16 - ; MB range of interrupt vector table placement. - ; - ; "Additionally, the size of the IVECT register is increased from 8 bits - ; to 9 bits to provide an interrupt vector table that is expanded and - ; more easily integrated with other interrupts. - ; - ; "The vectors are 4 bytes (32 bits) apart, even though only 3 bytes - ; (24 bits) are required. A fourth byte is implemented for both - ; programmability and expansion purposes." - -L1: - ld (iy), hl ; Store IRQ handler - ld (iy+3), a ; Pad with zero to 4 bytes - add hl, de ; Point to next handler - push de - ld de, 4 - add iy, de ; Point to next entry in vector table - pop de - djnz L1 ; Loop until all vectors have been written - - ; Select interrupt mode 2 - - im 2 ; Interrupt mode 2 - - ; Write the address of the vector table into the interrupt vector base - - ; The GNU assembler (2.36.1) cannot produce this relocation, although the - ; Z80 ELF format supports it. The instruction is instead hand assembled. - ;ld hl, _ez80_vectable >> 8 - db 021h - db _ez80_vectable >> 8 - db _ez80_vectable >> 16 - db 0 - ld i, hl - ret - -;************************************************************************** -; Vector Table -;************************************************************************** - -; This segment must be aligned on a 512 byte boundary anywhere in RAM -; Each entry will be a 3-byte address in a 4-byte space - - define .IVECTS, space = RAM, align = 200h - segment .IVECTS - - ; The first 64 bytes are not used... the vectors actually start at +0x40 - -_ez80_vecreserve: - ds 64 -_ez80_vectable: - ds NVECTORS * 2 - end diff --git a/arch/z80/src/ez80/ez80f91_init.asm b/arch/z80/src/ez80/ez80f91_init.asm deleted file mode 100644 index ecb0b28d14..0000000000 --- a/arch/z80/src/ez80/ez80f91_init.asm +++ /dev/null @@ -1,235 +0,0 @@ -;************************************************************************** -; arch/z80/src/ez80/ez80f91_init.asm -; -; SPDX-License-Identifier: Apache-2.0 -; -; Licensed to the Apache Software Foundation (ASF) under one or more -; contributor license agreements. See the NOTICE file distributed with -; this work for additional information regarding copyright ownership. The -; ASF licenses this file to you under the Apache License, Version 2.0 (the -; "License"); you may not use this file except in compliance with the -; License. You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -; License for the specific language governing permissions and limitations -; under the License. -; -;************************************************************************** - -;************************************************************************** -; Included Files -;************************************************************************** - - include "ez80F91.inc" - -;************************************************************************** -; Constants -;************************************************************************** - -;PLL_DIV_L EQU 05Ch -;PLL_DIV_H EQU 05Dh -;PLL_CTL0 EQU 05Eh -;PLL_CTL1 EQU 05Fh - -OSC EQU 0 -PLL EQU 1 -RTC EQU 2 - -CLK_MUX_OSC EQU 000h -CLK_MUX_PLL EQU 001h -CLK_MUX_RTC EQU 002h - -CHRP_CTL_0 EQU 000h -CHRP_CTL_1 EQU 040h -CHRP_CTL_2 EQU 080h -CHRP_CTL_3 EQU 0C0h - -LDS_CTL_0 EQU 000h -LDS_CTL_1 EQU 004h -LDS_CTL_2 EQU 008h -LDS_CTL_3 EQU 00Ch - -LCK_STATUS EQU 020h -INT_LOCK EQU 010h -INT_UNLOCK EQU 008h -INT_LOCK_EN EQU 004h -INT_UNLOCK_EN EQU 002h -PLL_ENABLE EQU 001h - -;************************************************************************** -; Global symbols used -;************************************************************************** - -; Exported symbols - xdef _ez80_init - xdef _ez80_initsysclk - -; Imported symbols - xref __CS0_LBR_INIT_PARAM - xref __CS0_UBR_INIT_PARAM - xref __CS0_CTL_INIT_PARAM - xref __CS1_LBR_INIT_PARAM - xref __CS1_UBR_INIT_PARAM - xref __CS1_CTL_INIT_PARAM - xref __CS2_LBR_INIT_PARAM - xref __CS2_UBR_INIT_PARAM - xref __CS2_CTL_INIT_PARAM - xref __CS3_LBR_INIT_PARAM - xref __CS3_UBR_INIT_PARAM - xref __CS3_CTL_INIT_PARAM - xref __CS0_BMC_INIT_PARAM - xref __CS1_BMC_INIT_PARAM - xref __CS2_BMC_INIT_PARAM - xref __CS3_BMC_INIT_PARAM - xref __FLASH_CTL_INIT_PARAM - xref __FLASH_ADDR_U_INIT_PARAM - xref __RAM_CTL_INIT_PARAM - xref __RAM_ADDR_U_INIT_PARAM - xref _SYS_CLK_SRC - xref _SYS_CLK_FREQ - xref _OSC_FREQ - xref _OSC_FREQ_MULT - xref __PLL_CTL0_INIT_PARAM - -;************************************************************************** -; Chip-specific initialization logic -;************************************************************************** -; Minimum default initialization for eZ80F91 - - define .STARTUP, space = ROM - segment .STARTUP - .assume ADL = 1 - -_ez80_init: - ; Disable internal peripheral interrupt sources - - ld a, 0ffh - out0 (PA_DDR), a ; GPIO - out0 (PB_DDR), a - out0 (PC_DDR), a - out0 (PD_DDR), a - ld a, 000h - out0 (PA_ALT1), a - out0 (PB_ALT1), a - out0 (PC_ALT1), a - out0 (PD_ALT1), a - out0 (PA_ALT2), a - out0 (PB_ALT2), a - out0 (PC_ALT2), a - out0 (PD_ALT2), a - out0 (PLL_CTL1), a ; PLL - out0 (TMR0_IER), a ; timers - out0 (TMR1_IER), a - out0 (TMR2_IER), a - out0 (TMR3_IER), a - out0 (UART0_IER), a ; UARTs - out0 (UART1_IER), a - out0 (I2C_CTL), a ; I2C - out0 (EMAC_IEN), a ; EMAC - out0 (FLASH_IRQ), a ; Flash - ld a, 004h - out0 (SPI_CTL), a ; SPI - in0 a, (RTC_CTRL) ; RTC, - and a, 0beh - out0 (RTC_CTRL), a - - ; Configure external memory/io - - ld a, __CS0_LBR_INIT_PARAM - out0 (CS0_LBR), a - ld a, __CS0_UBR_INIT_PARAM - out0 (CS0_UBR), a - ld a, __CS0_BMC_INIT_PARAM - out0 (CS0_BMC), a - ld a, __CS0_CTL_INIT_PARAM - out0 (CS0_CTL), a - - ld a, __CS1_LBR_INIT_PARAM - out0 (CS1_LBR), a - ld a, __CS1_UBR_INIT_PARAM - out0 (CS1_UBR), a - ld a, __CS1_BMC_INIT_PARAM - out0 (CS1_BMC), a - ld a, __CS1_CTL_INIT_PARAM - out0 (CS1_CTL), a - - ld a, __CS2_LBR_INIT_PARAM - out0 (CS2_LBR), a - ld a, __CS2_UBR_INIT_PARAM - out0 (CS2_UBR), a - ld a, __CS2_BMC_INIT_PARAM - out0 (CS2_BMC), a - ld a, __CS2_CTL_INIT_PARAM - out0 (CS2_CTL), a - - ld a, __CS3_LBR_INIT_PARAM - out0 (CS3_LBR), a - ld a, __CS3_UBR_INIT_PARAM - out0 (CS3_UBR), a - ld a, __CS3_BMC_INIT_PARAM - out0 (CS3_BMC), a - ld a, __CS3_CTL_INIT_PARAM - out0 (CS3_CTL), a - - ret - -;***************************************************************************** -; eZ80F91 System Clock Initialization -;***************************************************************************** - -_ez80_initsysclk: - ; check if the PLL should be used - - ld a, (_ez80_sysclksrc) - cp a, PLL - jr nz, _ez80_initsysclkdone - - ; Load PLL divider - - ld a, (_ez80_oscfreqmult) ;CR 6202 - out0 (PLL_DIV_L), a - ld a, (_ez80_oscfreqmult+1) - out0 (PLL_DIV_H), a - - ; Set charge pump and lock criteria - - ld a, __PLL_CTL0_INIT_PARAM - and a, 0CCh ; mask off reserved and clock source bits - out0 (PLL_CTL0), a - - ; Enable PLL - - in0 a, (PLL_CTL1) - set 0, a - out0 (PLL_CTL1), a - - ; Wait for PLL to lock - -_ez80_initsysclkwait: - in0 a, (PLL_CTL1) - and a, LCK_STATUS - cp a, LCK_STATUS - jr nz, _ez80_initsysclkwait - - ; Select PLL as system clock source - - ld a, __PLL_CTL0_INIT_PARAM - set 0, a - out0 (PLL_CTL0), a - -_ez80_initsysclkdone: - ret - -;_ez80_oscfreq: -; dl _OSC_FREQ -_ez80_oscfreqmult: - dw _OSC_FREQ_MULT -;_ez80_sysclkfreq: -; dl _SYS_CLK_FREQ -_ez80_sysclksrc: - db _SYS_CLK_SRC - end diff --git a/arch/z80/src/ez80/ez80f92.h b/arch/z80/src/ez80/ez80f92.h deleted file mode 100644 index d744f0d41b..0000000000 --- a/arch/z80/src/ez80/ez80f92.h +++ /dev/null @@ -1,352 +0,0 @@ -/**************************************************************************** - * arch/z80/src/ez80/ez80f92.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z80_SRC_EZ80_EZ80F92_H -#define __ARCH_Z80_SRC_EZ80_EZ80F92_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include "nuttx/config.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Memory map ***************************************************************/ - -#define EZ80_ONCHIPFLASH 0x000000 /* CS0: 64-128Kb of on-chip flash */ -#define EZ80_OFFCHIPCS0 0x400000 /* CS0: Off chip use (usually flash) */ -#define EZ80_OFFCHIPCS2 0x800000 /* CS2: Off chip use (e.g. memory mapped I/O) */ -#define EZ80_OFFCHIPCS1 0xc00000 /* CS1: Off chip use (usually SRAM) */ -#define EZ80_ONCHIPSRAM 0xffe000 /* On-chip SRAM (4-8Kb) on reset */ - -#if defined(CONFIG_ARCH_CHIP_EZ80L92) -# define EZ80_FLASH_SIZE 0x020000 /* 128Kb on-chip flash */ -# define EZ80_SRAM_SIZE 0x002000 /* 8Kb on-chip sram */ -#elif defined(CONFIG_ARCH_CHIP_EZ80L93) -# define EZ80_FLASH_SIZE 0x010000 /* 64Kb on-chip flash */ -# define EZ80_SRAM_SIZE 0x001000 /* 4Kb on-chip sram */ -#endif - -/* Product ID Registers ****************************************************/ - -#define EZ80_ZDI_ID_L 0x00 -#define EZ80_ZDI_ID_H 0x01 -#define EZ80_ZDI_ID_REV 0x02 - -/* Timer Registers *********************************************************/ - -#define EZ80_TMR0_CTL 0x80 /* RW: Timer 0 control register */ -#define EZ80_TMR0_DRL 0x81 /* R : Timer 0 data register (low) */ -#define EZ80_TMR0_DRH 0x82 /* R : Timer 0 data register (high) */ -#define EZ80_TMR0_RRL 0x81 /* W: Timer 0 reload register (low) */ -#define EZ80_TMR0_RRH 0x82 /* W: Timer 0 reload register (high) */ - -#define EZ80_TMR1_CTL 0x83 /* RW: Timer 1 control register */ -#define EZ80_TMR1_DRL 0x84 /* R : Timer 1 data register (low) */ -#define EZ80_TMR1_DRH 0x85 /* R : Timer 1 data register (high) */ -#define EZ80_TMR1_RRL 0x84 /* W: Timer 1 reload register (low) */ -#define EZ80_TMR1_RRH 0x85 /* W: Timer 1 reload register (high) */ - -#define EZ80_TMR2_CTL 0x86 /* RW: Timer 2 control register */ -#define EZ80_TMR2_DRL 0x87 /* R : Timer 2 data register (low) */ -#define EZ80_TMR2_DRH 0x88 /* R : Timer 2 data register (high) */ -#define EZ80_TMR2_RRL 0x87 /* W: Timer 2 reload register (low) */ -#define EZ80_TMR2_RRH 0x88 /* W: Timer 2 reload register (high) */ - -#define EZ80_TMR3_CTL 0x89 /* RW: Timer 3 control register */ -#define EZ80_TMR3_DRL 0x8a /* R : Timer 3 data register (low) */ -#define EZ80_TMR3_DRH 0x8b /* R : Timer 3 data register (high) */ -#define EZ80_TMR3_RRL 0x8a /* W: Timer 3 reload register (low) */ -#define EZ80_TMR3_RRH 0x8b /* W: Timer 3 reload register (high) */ - -#define EZ80_TMR4_CTL 0x8c /* RW: Timer 4 control register */ -#define EZ80_TMR4_DRL 0x8d /* R : Timer 4 data register (low) */ -#define EZ80_TMR4_DRH 0x8e /* R : Timer 4 data register (high) */ -#define EZ80_TMR4_RRL 0x8d /* W: Timer 4 reload register (low) */ -#define EZ80_TMR4_RRH 0x8e /* W: Timer 4 reload register (high) */ - -#define EZ80_TMR5_CTL 0x8f /* RW: Timer 5 control register */ -#define EZ80_TMR5_DRL 0x90 /* R : Timer 5 data register (low) */ -#define EZ80_TMR5_DRH 0x91 /* R : Timer 5 data register (high) */ -#define EZ80_TMR5_RRL 0x90 /* W: Timer 5 reload register (low) */ -#define EZ80_TMR5_RRH 0x91 /* W: Timer 5 reload register (high) */ - -#define EZ80_TMR_ISS 0x92 /* Timer input source selection register */ - -/* TMR0/1/2/3 CTL Register Bit Definitions **********************************/ - -#define EZ80_TMRCTL_IRQ 0x80 /* Bit 7: Generate interrupt request */ -#define EZ80_TMRCTL_EN 0x40 /* Bit 6: Enable timer interrupt requests */ - /* Bit 5: Reserved */ -#define EZ80_TMRCTL_TIMCONT 0x10 /* Bit 4: Continuous mode */ -#define EZ80_TMRCTL_CLKDIV 0x18 /* Bits 2-3: Timer input clock divider */ -# define EZ80_TMRCLKDIV_4 0x00 /* 00: 4 */ -# define EZ80_TMRCLKDIV_16 0x04 /* 01: 16 */ -# define EZ80_TMRCLKDIV_64 0x08 /* 10: 64 */ -# define EZ80_TMRCLKDIV_256 0x0c /* 11: 256 */ -#define EZ80_TMRCTL_RSTEN 0x02 /* Bit 1: Reload and start function enabled */ -#define EZ80_TMRCTL_TIMEN 0x01 /* Bit 0: Programmable reload timer enabled */ - -/* WDT Registers ************************************************************/ - -#define EZ80_WDT_CTL 0x93 -#define EZ80_WDT_RR 0x94 - -/* GPIO Registers ***********************************************************/ - -#define EZ80_PB_DR 0x9a -#define EZ80_PB_DDR 0x9b -#define EZ80_PB_ALT1 0x9c -#define EZ80_PB_ALT2 0x9d -#define EZ80_PC_DR 0x9e -#define EZ80_PC_DDR 0x9f -#define EZ80_PC_ALT1 0xa0 -#define EZ80_PC_ALT2 0xa1 -#define EZ80_PD_DR 0xa2 -#define EZ80_PD_DDR 0xa3 -#define EZ80_PD_ALT1 0xa4 -#define EZ80_PD_ALT2 0xa5 - -/* CS Registers *************************************************************/ - -#define EZ80_CS0_LBR 0xa8 -#define EZ80_CS0_UBR 0xa9 -#define EZ80_CS0_CTL 0xaa -#define EZ80_CS1_LBR 0xab -#define EZ80_CS1_UBR 0xac -#define EZ80_CS1_CTL 0xad -#define EZ80_CS2_LBR 0xae -#define EZ80_CS2_UBR 0xaf -#define EZ80_CS2_CTL 0xb0 -#define EZ80_CS3_LBR 0xb1 -#define EZ80_CS3_UBR 0xb2 -#define EZ80_CS3_CTL 0xb3 - -/* RAMCTL registers *********************************************************/ - -#define EZ80_RAM_CTL 0xb4 -#define EZ80_RAM_ADDR_U 0xb5 - -/* RAMCTL bit definitions ***************************************************/ - -#define RAMCTL_ERAMEN (1 << 6) /* Bit 7: 1=On chip EMAC SRAM is enabled */ -#define RAMCTL_GPRAMEN (1 << 7) /* Bit 7: 1=On chip GP SRAM is enabled */ - -/* SPI Registers ************************************************************/ - -#define EZ80_SPI_BRG_L 0xb8 -#define EZ80_SPI_BRG_H 0xb9 -#define EZ80_SPI_CTL 0xba -#define EZ80_SPI_SR 0xbb -#define EZ80_SPI_RBR 0xbc -#define EZ80_SPI_TSR 0xbc - -/* Infrared Encoder/Decoder Block *******************************************/ - -#define EZ80_IR_CTL 0xbf /* Infrared Encoder/Decoder Control */ - -/* UART Register Offsets ****************************************************/ - - /* DLAB=0: */ -#define EZ80_UART_THR 0x00 /* W: UART Transmit holding register */ -#define EZ80_UART_RBR 0x00 /* R : UART Receive buffer register */ -#define EZ80_UART_IER 0x01 /* RW: UART Interrupt enable register */ - /* DLAB=1: */ -#define EZ80_UART_BRG 0x00 /* RW: UART Baud rate generator register */ -#define EZ80_UART_BRGL 0x00 /* RW: UART Baud rate generator register (low) */ -#define EZ80_UART_BRGH 0x01 /* RW: UART Baud rate generator register (high) */ - /* DLAB=N/A: */ -#define EZ80_UART_IIR 0x02 /* R : UART Interrupt identification register */ -#define EZ80_UART_FCTL 0x02 /* W: UART FIFO control register */ -#define EZ80_UART_LCTL 0x03 /* RW: UART Line control register */ -#define EZ80_UART_MCTL 0x04 /* RW: UART Modem control register */ -#define EZ80_UART_LSR 0x05 /* R : UART Line status register */ -#define EZ80_UART_MSR 0x06 /* R : UART Modem status register */ -#define EZ80_UART_SPR 0x07 /* RW: UART Scratchpad register */ - -/* UART0/1 Base Register Addresses ******************************************/ - -#define EZ80_UART0_BASE 0xc0 -#define EZ80_UART1_BASE 0xd0 - -/* UART0/1 IER register bits ************************************************/ - -#define EZ80_UARTEIR_INTMASK 0x1f /* Bits 5-7: Reserved */ -#define EZ80_UARTEIR_TCIE 0x10 /* Bit 4: Transmission complete interrupt */ -#define EZ80_UARTEIR_MIIE 0x08 /* Bit 3: Modem status input interrupt */ -#define EZ80_UARTEIR_LSIE 0x04 /* Bit 2: Line status interrupt */ -#define EZ80_UARTEIR_TIE 0x02 /* Bit 1: Transmit interrupt */ -#define EZ80_UARTEIR_RIE 0x01 /* Bit 0: Receive interrupt */ - -/* UART0/1 IIR register bits ************************************************/ - -#define EZ80_UARTIIR_FSTS 0xc0 /* Bits 6-7: FIFO enable */ -#define EZ80_UARTIIR_FDIS 0x00 /* 00: FIFO disabled */ -#define EZ80_UARTIIR_FRXDIS 0x80 /* 10: Rx FIFO disabled */ -#define EZ80_UARTIIR_FEN 0xc0 /* 11: FIFO enabled */ - /* Bits 4-5: Reserved */ -#define EZ80_UARTIIR_INSTS 0x0e /* Bits 1-3: Interrupt status code */ -# define EZ80_UARTINSTS_CTO 0x0c /* 110: Character timeout */ -# define EZ80_UARTINSTS_TC 0x0a /* 101: Transmission complete */ -# define EZ80_UARTINSTS_RLS 0x06 /* 011: Receiver line status */ -# define EZ80_UARTINSTS_RDR 0x04 /* 010: Receive data ready or trigger level */ -# define EZ80_UARTINSTS_TBE 0x02 /* 001: Transmission buffer empty */ -# define EZ80_UARTINSTS_MS 0x00 /* 000: Modem status */ -#define EZ80_UARTIIR_INTBIT 0x01 /* Bit 0: (NOT) Active interrupt source */ -#define EZ80_UARTIIR_CAUSEMASK 0x0f - -/* UART0/1 FCTL register bits ***********************************************/ - -#define EZ80_UARTFCTL_TRIG 0xc0 /* Bits 6-7: UART receive FIFO trigger level */ -# define EZ80_UARTTRIG_1 0x00 /* 00: Receive FIFO trigger level=1 */ -# define EZ80_UARTTRIG_4 0x40 /* 01: Receive FIFO trigger level=4 */ -# define EZ80_UARTTRIG_8 0x80 /* 10: Receive FIFO trigger level=8 */ -# define EZ80_UARTTRIG_14 0xc0 /* 11: Receive FIFO trigger level=14 */ - /* Bit 3-5: Reserved */ -#define EZ80_UARTFCTL_CLRTXF 0x04 /* Bit 2: Transmit enable */ -#define EZ80_UARTFCTL_CLRRXF 0x02 /* Bit 1: Receive enable */ -#define EZ80_UARTFCTL_FIFOEN 0x01 /* Bit 0: Enable receive/transmit FIFOs */ - -/* UART0/1 LCTL register bits ***********************************************/ - -#define EZ80_UARTLCTL_DLAB 0x80 /* Bit 7: Enable access to baud rate generator */ -#define EZ80_UARTLCTL_SB 0x40 /* Bit 6: Send break */ -#define EZ80_UARTLCTL_FPE 0x20 /* Bit 5: Force parity error */ -#define EZ80_UARTLCTL_EPS 0x10 /* Bit 4: Even parity select */ -#define EZ80_UARTLCTL_PEN 0x08 /* Bit 3: Parity enable */ -#define EZ80_UARTLCTL_2STOP 0x04 /* Bit 2: 2 stop bits */ -#define EZ80_UARTLCTL_CHAR 0x03 /* Bits 0-2: Number of data bits */ -# define EZ80_UARTCHAR_5BITS 0x00 /* 00: 5 data bits */ -# define EZ80_UARTCHAR_6BITS 0x01 /* 01: 6 data bits */ -# define EZ80_UARTCHAR_7BITS 0x02 /* 10: 7 data bits */ -# define EZ80_UARTCHAR_8BITS 0x03 /* 11: 8 data bits */ - -#define EZ80_UARTLCTL_MASK 0x3f - -/* UART0/1 MCTL register bits ***********************************************/ - - /* Bits 6-7: Reserved */ -#define EZ80_UARTMCTL_MDM 0x20 /* Bit 5: Multi-drop mode enable */ -#define EZ80_UARTMCTL_LOOP 0x10 /* Bit 4: Loopback mode enable */ -#define EZ80_UARTMCTL_OUT2 0x08 /* Bit 3: (loopback mode only) */ -#define EZ80_UARTMCTL_OUT1 0x04 /* Bit 2: (loopback mode only) */ -#define EZ80_UARTMCTL_RTS 0x02 /* Bit 1: Request to send */ -#define EZ80_UARTMCTL_DTR 0x01 /* Bit 0: Data termnal read */ - -/* UART0/1 LSR register bits ************************************************/ - -#define EZ80_UARTLSR_ERR 0x80 /* Bit 7: Error detected in FIFO */ -#define EZ80_UARTLSR_TEMT 0x40 /* Bit 6: Transmit FIFO empty and idle */ -#define EZ80_UARTLSR_THRE 0x20 /* Bit 5: Transmit FIFO empty */ -#define EZ80_UARTLSR_BI 0x10 /* Bit 4: Break on input */ -#define EZ80_UARTLSR_FE 0x08 /* Bit 3: Framing error */ -#define EZ80_UARTLSR_PE 0x04 /* Bit 2: Parity error */ -#define EZ80_UARTLSR_OE 0x02 /* Bit 1: Overrun error */ -#define EZ80_UARTLSR_DR 0x01 /* Bit 0: Data ready */ - -/* UART0/1 MSR register bits ************************************************/ - -#define EZ80_UARTMSR_DCD 0x80 /* Bit 7: Data carrier detect */ -#define EZ80_UARTMSR_RI 0x40 /* Bit 6: Ring indicator */ -#define EZ80_UARTMSR_DSR 0x20 /* Bit 5: Data set ready */ -#define EZ80_UARTMSR_CTS 0x10 /* Bit 4: Clear to send */ -#define EZ80_UARTMSR_DDCD 0x08 /* Bit 3: Delta on DCD input */ -#define EZ80_UARTMSR_TERI 0x04 /* Bit 2: Trailing edge change on RI */ -#define EZ80_UARTMSR_DDSR 0x02 /* Bit 1: Delta on DSR input */ -#define EZ80_UARTMSR_DCTS 0x01 /* Bit 0: Delta on CTS input */ - -/* I2C Registers ***********************************************************/ - -#define EZ80_I2C_SAR 0xc8 -#define EZ80_I2C_XSAR 0xc9 -#define EZ80_I2C_DR 0xca -#define EZ80_I2C_CTL 0xcb -#define EZ80_I2C_SR 0xcc -#define EZ80_I2C_CCR 0xcc -#define EZ80_I2C_SRR 0xcd - -/* CLK Registers ***********************************************************/ - -#define EZ80_CLK_PPD1 0xdb -#define EZ80_CLK_PPD2 0xdc - -/* RTC Registers ***********************************************************/ - -#define EZ80_RTC_SEC 0xe0 -#define EZ80_RTC_MIN 0xe1 -#define EZ80_RTC_HRS 0xe2 -#define EZ80_RTC_DOW 0xe3 -#define EZ80_RTC_DOM 0xe4 -#define EZ80_RTC_MON 0xe5 -#define EZ80_RTC_YR 0xe6 -#define EZ80_RTC_CEN 0xe7 -#define EZ80_RTC_ASEC 0xe8 -#define EZ80_RTC_AMIN 0xe9 -#define EZ80_RTC_AHRS 0xea -#define EZ80_RTC_ADOW 0xeb -#define EZ80_RTC_ACTRL 0xec -#define EZ80_RTC_CTRL 0xed - -/* CSBMC Registers *********************************************************/ - -#define EZ80_CS0_BMC 0xf0 -#define EZ80_CS1_BMC 0xf1 -#define EZ80_CS2_BMC 0xf2 -#define EZ80_CS3_BMC 0xf3 - -/* FLASH Registers *********************************************************/ - -#define EZ80_FLASH_KEY 0xf5 -#define EZ80_FLASH_DATA 0xf6 -#define EZ80_FLASH_ADDR_U 0xf7 -#define EZ80_FLASH_CTRL 0xf8 -#define EZ80_FLASH_FDIV 0xf9 -#define EZ80_FLASH_PROT 0xfa -#define EZ80_FLASH_INTC 0xfb -#define EZ80_FLASH_PAGE 0xfc -#define EZ80_FLASH_ROW 0xfd -#define EZ80_FLASH_COL 0xfe -#define EZ80_FLASH_PGCTL 0xff - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -#undef EXTERN -#ifdef __cplusplus -} -#endif -#endif - -#endif /* __ARCH_Z80_SRC_EZ80_EZ80F92_H */ diff --git a/arch/z80/src/ez80/ez80f92_handlers.asm b/arch/z80/src/ez80/ez80f92_handlers.asm deleted file mode 100644 index 2d2f3b4555..0000000000 --- a/arch/z80/src/ez80/ez80f92_handlers.asm +++ /dev/null @@ -1,244 +0,0 @@ -;************************************************************************** -; arch/z80/src/ez80/ez80f92_handlers.asm -; -; SPDX-License-Identifier: Apache-2.0 -; -; Licensed to the Apache Software Foundation (ASF) under one or more -; contributor license agreements. See the NOTICE file distributed with -; this work for additional information regarding copyright ownership. The -; ASF licenses this file to you under the Apache License, Version 2.0 (the -; "License"); you may not use this file except in compliance with the -; License. You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -; License for the specific language governing permissions and limitations -; under the License. -; -;************************************************************************** - -;************************************************************************** -; Constants -;************************************************************************** - -; The IRQ number to use for unused vectors - -EZ80_UNUSED EQU 40h - -;************************************************************************** -; Global Symbols Imported -;************************************************************************** - - xref _ez80_irq_common - -;************************************************************************** -; Global Symbols Exported -;************************************************************************** - - xdef _ez80_initvectors - -;************************************************************************** -; Constants -;************************************************************************** - -NVECTORS EQU 64 ; max possible interrupt vectors - -;************************************************************************** -; Macros -;************************************************************************** - -; Define one interrupt handler - -irqhandler: macro vectno - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #vectno ; A = vector number - jp _ez80_irq_common ; Remaining RST handling is common - endmac irqhandler - -;************************************************************************** -; Vector Table -;************************************************************************** - -; This segment must be aligned on a 256 byte boundary anywhere in RAM -; Each entry will be a 2-byte address in a 2-byte space - - define .IVECTS, space = RAM, align = 100h - segment .IVECTS - -; Vector table is a 2-bit address. The MSB is the I register; the LSB is -; the vector number. The vector table lies in FLASH. The addresses -; contained in the refers to an entry in the handler table that re- -; directs the interrupt to common interrupt handling logic. - -_ez80_vectable: - dw _ez80_handlers + 0*_handlersize - dw _ez80_handlers + 1*_handlersize - dw _ez80_handlers + 2*_handlersize - dw _ez80_handlers + 3*_handlersize - dw _ez80_handlers + 4*_handlersize - dw _ez80_handlers + 5*_handlersize - dw _ez80_handlers + 6*_handlersize - dw _ez80_handlers + 7*_handlersize - dw _ez80_handlers + 8*_handlersize - dw _ez80_handlers + 9*_handlersize - dw _ez80_handlers + 10*_handlersize - dw _ez80_handlers + 11*_handlersize - dw _ez80_handlers + 12*_handlersize - dw _ez80_handlers + 13*_handlersize - dw _ez80_handlers + 14*_handlersize - dw _ez80_handlers + 15*_handlersize - dw _ez80_handlers + 16*_handlersize - dw _ez80_handlers + 17*_handlersize - dw _ez80_handlers + 18*_handlersize - dw _ez80_handlers + 19*_handlersize - dw _ez80_handlers + 20*_handlersize - dw _ez80_handlers + 21*_handlersize - dw _ez80_handlers + 22*_handlersize - dw _ez80_handlers + 23*_handlersize - dw _ez80_handlers + 24*_handlersize - dw _ez80_handlers + 25*_handlersize - dw _ez80_handlers + 26*_handlersize - dw _ez80_handlers + 27*_handlersize - dw _ez80_handlers + 28*_handlersize - dw _ez80_handlers + 29*_handlersize - dw _ez80_handlers + 30*_handlersize - dw _ez80_handlers + 31*_handlersize - dw _ez80_handlers + 32*_handlersize - dw _ez80_handlers + 33*_handlersize - dw _ez80_handlers + 34*_handlersize - dw _ez80_handlers + 35*_handlersize - dw _ez80_handlers + 36*_handlersize - dw _ez80_handlers + 37*_handlersize - dw _ez80_handlers + 38*_handlersize - dw _ez80_handlers + 39*_handlersize - dw _ez80_handlers + 40*_handlersize - dw _ez80_handlers + 41*_handlersize - dw _ez80_handlers + 42*_handlersize - dw _ez80_handlers + 43*_handlersize - dw _ez80_handlers + 44*_handlersize - dw _ez80_handlers + 45*_handlersize - dw _ez80_handlers + 46*_handlersize - dw _ez80_handlers + 47*_handlersize - dw _ez80_handlers + 48*_handlersize - dw _ez80_handlers + 49*_handlersize - dw _ez80_handlers + 50*_handlersize - dw _ez80_handlers + 51*_handlersize - dw _ez80_handlers + 52*_handlersize - dw _ez80_handlers + 53*_handlersize - dw _ez80_handlers + 54*_handlersize - dw _ez80_handlers + 55*_handlersize - dw _ez80_handlers + 56*_handlersize - dw _ez80_handlers + 57*_handlersize - dw _ez80_handlers + 58*_handlersize - dw _ez80_handlers + 59*_handlersize - dw _ez80_handlers + 60*_handlersize - dw _ez80_handlers + 61*_handlersize - dw _ez80_handlers + 62*_handlersize - dw _ez80_handlers + 63*_handlersize - -;************************************************************************** -; Interrupt Vector Handlers -;************************************************************************** - -; Still in .IVECTS section - - .assume ADL=1 - - ; Symbol Val VecNo Addr - ;----------------- --- ----- ----- -_ez80_handlers: - irqhandler EZ80_UNUSED ; 0 0x000 - _handlersize EQU $-_ez80_handlers - irqhandler EZ80_UNUSED+1 ; 1 0x002 - irqhandler EZ80_UNUSED+2 ; 2 0x004 - irqhandler EZ80_UNUSED+3 ; 3 0x006 - irqhandler 0 ; EZ80_FLASH_IRQ 0 4 0x008 - irqhandler 1 ; EZ80_TIMER0_IRQ 1 5 0x00a - irqhandler 2 ; EZ80_TIMER1_IRQ 2 6 0x00c - irqhandler 3 ; EZ80_TIMER2_IRQ 3 7 0x00e - irqhandler 4 ; EZ80_TIMER3_IRQ 4 8 0x010 - irqhandler 5 ; EZ80_TIMER4_IRQ 5 9 0x012 - irqhandler 6 ; EZ80_TIMER5_IRQ 6 10 0x014 - irqhandler 7 ; EZ80_RTC_IRQ 7 11 0x016 - irqhandler 8 ; EZ80_UART0_IRQ 8 12 0x018 - irqhandler 9 ; EZ80_UART1_IRQ 9 13 0x01a - irqhandler 10 ; EZ80_I2C_IRQ 10 14 0x01c - irqhandler 11 ; EZ80_SPI_IRQ 11 15 0x01e - irqhandler EZ80_UNUSED+4 ; 16 0x020 - irqhandler EZ80_UNUSED+5 ; 17 0x022 - irqhandler EZ80_UNUSED+6 ; 18 0x024 - irqhandler EZ80_UNUSED+7 ; 19 0x026 - irqhandler EZ80_UNUSED+8 ; 16 0x028 - irqhandler EZ80_UNUSED+9 ; 17 0x02a - irqhandler EZ80_UNUSED+10 ; 18 0x02c - irqhandler EZ80_UNUSED+11 ; 19 0x02e - irqhandler 12 ; EZ80_PORTB0_IRQ 12 24 0x030 - irqhandler 13 ; EZ80_PORTB1_IRQ 13 25 0x032 - irqhandler 14 ; EZ80_PORTB2_IRQ 14 26 0x034 - irqhandler 15 ; EZ80_PORTB3_IRQ 15 27 0x036 - irqhandler 16 ; EZ80_PORTB4_IRQ 16 28 0x038 - irqhandler 17 ; EZ80_PORTB5_IRQ 17 29 0x03a - irqhandler 18 ; EZ80_PORTB6_IRQ 18 20 0x03c - irqhandler 19 ; EZ80_PORTB7_IRQ 19 21 0x03e - irqhandler 20 ; EZ80_PORTC0_IRQ 20 22 0x040 - irqhandler 21 ; EZ80_PORTC1_IRQ 21 23 0x042 - irqhandler 22 ; EZ80_PORTC2_IRQ 22 24 0x044 - irqhandler 23 ; EZ80_PORTC3_IRQ 23 25 0x046 - irqhandler 24 ; EZ80_PORTC4_IRQ 24 26 0x048 - irqhandler 25 ; EZ80_PORTC5_IRQ 25 27 0x04a - irqhandler 26 ; EZ80_PORTC6_IRQ 26 28 0x04c - irqhandler 27 ; EZ80_PORTC7_IRQ 27 29 0x04e - irqhandler 28 ; EZ80_PORTD0_IRQ 28 40 0x050 - irqhandler 29 ; EZ80_PORTD1_IRQ 29 41 0x052 - irqhandler 30 ; EZ80_PORTD2_IRQ 30 42 0x054 - irqhandler 31 ; EZ80_PORTD3_IRQ 31 43 0x056 - irqhandler 32 ; EZ80_PORTD4_IRQ 32 44 0x058 - irqhandler 33 ; EZ80_PORTD5_IRQ 33 45 0x05a - irqhandler 34 ; EZ80_PORTD6_IRQ 34 46 0x05c - irqhandler 35 ; EZ80_PORTD7_IRQ 35 47 0x05e - irqhandler EZ80_UNUSED+12 ; 48 0x060 - irqhandler EZ80_UNUSED+13 ; 49 0x062 - irqhandler EZ80_UNUSED+14 ; 50 0x064 - irqhandler EZ80_UNUSED+15 ; 51 0x066 - irqhandler EZ80_UNUSED+16 ; 52 0x068 - irqhandler EZ80_UNUSED+17 ; 53 0x06a - irqhandler EZ80_UNUSED+18 ; 54 0x06c - irqhandler EZ80_UNUSED+19 ; 55 0x06e - irqhandler EZ80_UNUSED+20 ; 56 0x070 - irqhandler EZ80_UNUSED+21 ; 57 0x072 - irqhandler EZ80_UNUSED+22 ; 58 0x074 - irqhandler EZ80_UNUSED+23 ; 59 0x076 - irqhandler EZ80_UNUSED+24 ; 60 0x078 - irqhandler EZ80_UNUSED+25 ; 61 0x07a - irqhandler EZ80_UNUSED+26 ; 62 0x07c - irqhandler EZ80_UNUSED+27 ; 63 0x07e - -;************************************************************************** -; Vector Setup Logic -;************************************************************************** - - define .STARTUP, space = ROM - segment .STARTUP - .assume ADL=1 - -_ez80_initvectors: - - ; We don't need to do much here. The interrupt vectors and handlers - ; are all in FLASH. - - ; Select interrupt mode 2 - - im 2 ; Interrupt mode 2 - - ; Write the address of the vector table into the interrupt vector base - - ld a, _ez80_vectable >> 8 & 0ffh - ld i, a - ret - end diff --git a/arch/z80/src/ez80/ez80f92_init.asm b/arch/z80/src/ez80/ez80f92_init.asm deleted file mode 100644 index c937215e4f..0000000000 --- a/arch/z80/src/ez80/ez80f92_init.asm +++ /dev/null @@ -1,153 +0,0 @@ -;************************************************************************** -; arch/z80/src/ez80/ez80f92_init.asm -; -; SPDX-License-Identifier: Apache-2.0 -; -; Licensed to the Apache Software Foundation (ASF) under one or more -; contributor license agreements. See the NOTICE file distributed with -; this work for additional information regarding copyright ownership. The -; ASF licenses this file to you under the Apache License, Version 2.0 (the -; "License"); you may not use this file except in compliance with the -; License. You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -; License for the specific language governing permissions and limitations -; under the License. -; -;************************************************************************** - -;************************************************************************** -; Included Files -;************************************************************************** - - include "ez80F92.inc" - -;************************************************************************** -; Global symbols used -;************************************************************************** - -; Exported symbols - xdef _ez80_init - xdef _ez80_initsysclk - -; Imported symbols - xref __CS0_LBR_INIT_PARAM - xref __CS0_UBR_INIT_PARAM - xref __CS0_CTL_INIT_PARAM - xref __CS1_LBR_INIT_PARAM - xref __CS1_UBR_INIT_PARAM - xref __CS1_CTL_INIT_PARAM - xref __CS2_LBR_INIT_PARAM - xref __CS2_UBR_INIT_PARAM - xref __CS2_CTL_INIT_PARAM - xref __CS3_LBR_INIT_PARAM - xref __CS3_UBR_INIT_PARAM - xref __CS3_CTL_INIT_PARAM - xref __CS0_BMC_INIT_PARAM - xref __CS1_BMC_INIT_PARAM - xref __CS2_BMC_INIT_PARAM - xref __CS3_BMC_INIT_PARAM - xref __FLASH_CTL_INIT_PARAM - xref __FLASH_ADDR_U_INIT_PARAM - xref __RAM_CTL_INIT_PARAM - xref __RAM_ADDR_U_INIT_PARAM - -;************************************************************************** -; Chip-specific initialization logic -;************************************************************************** - -; Minimum default initialization for eZ80F91 - - define .STARTUP, space = ROM - segment .STARTUP - .assume ADL = 1 - -_ez80_init: - ; Disable internal peripheral interrupt sources - - ld a, 0ffh - out0 (PB_DDR), a ; GPIO - out0 (PC_DDR), a - out0 (PD_DDR), a - - ld a, 000h - out0 (PB_ALT1), a - out0 (PC_ALT1), a - out0 (PD_ALT1), a - - out0 (PB_ALT2), a - out0 (PC_ALT2), a - out0 (PD_ALT2), a - - out0 (TMR0_CTL), a ; timers - out0 (TMR1_CTL), a - out0 (TMR2_CTL), a - out0 (TMR3_CTL), a - out0 (TMR4_CTL), a - out0 (TMR5_CTL), a - - out0 (UART0_IER), a ; UARTs - out0 (UART1_IER), a - - out0 (I2C_CTL), a ; I2C - - out0 (FLASH_IRQ), a ; Flash - - ld a, 004h - out0 (SPI_CTL), a ; SPI - - in0 a, (RTC_CTRL) ; RTC, - and a, 0beh - out0 (RTC_CTRL), a - - ; Configure external memory/io - - ld a, __CS0_LBR_INIT_PARAM - out0 (CS0_LBR), a - ld a, __CS0_UBR_INIT_PARAM - out0 (CS0_UBR), a - ld a, __CS0_BMC_INIT_PARAM - out0 (CS0_BMC), a - ld a, __CS0_CTL_INIT_PARAM - out0 (CS0_CTL), a - - ld a, __CS1_LBR_INIT_PARAM - out0 (CS1_LBR), a - ld a, __CS1_UBR_INIT_PARAM - out0 (CS1_UBR), a - ld a, __CS1_BMC_INIT_PARAM - out0 (CS1_BMC), a - ld a, __CS1_CTL_INIT_PARAM - out0 (CS1_CTL), a - - ld a, __CS2_LBR_INIT_PARAM - out0 (CS2_LBR), a - ld a, __CS2_UBR_INIT_PARAM - out0 (CS2_UBR), a - ld a, __CS2_BMC_INIT_PARAM - out0 (CS2_BMC), a - ld a, __CS2_CTL_INIT_PARAM - out0 (CS2_CTL), a - - ld a, __CS3_LBR_INIT_PARAM - out0 (CS3_LBR), a - ld a, __CS3_UBR_INIT_PARAM - out0 (CS3_UBR), a - ld a, __CS3_BMC_INIT_PARAM - out0 (CS3_BMC), a - ld a, __CS3_CTL_INIT_PARAM - out0 (CS3_CTL), a - - ret - -;***************************************************************************** -; eZ80F91 System Clock Initialization -;***************************************************************************** - -_ez80_initsysclk: - ret ; No PLL - end diff --git a/arch/z80/src/ez80/ez80f92_loader.asm b/arch/z80/src/ez80/ez80f92_loader.asm deleted file mode 100644 index f803d849ea..0000000000 --- a/arch/z80/src/ez80/ez80f92_loader.asm +++ /dev/null @@ -1,354 +0,0 @@ -;************************************************************************** -; arch/z80/src/ez80/ez80f92_loader.asm -; -; SPDX-License-Identifier: Apache-2.0 -; -; Licensed to the Apache Software Foundation (ASF) under one or more -; contributor license agreements. See the NOTICE file distributed with -; this work for additional information regarding copyright ownership. The -; ASF licenses this file to you under the Apache License, Version 2.0 (the -; "License"); you may not use this file except in compliance with the -; License. You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -; License for the specific language governing permissions and limitations -; under the License. -; -;************************************************************************** - -;************************************************************************** -; Global Symbols Imported -;************************************************************************** - - xref __vecstart - xref __vecend - xref _ez80_irq_common - -;************************************************************************** -; Global Symbols Exported -;************************************************************************** - - xdef _ez80_initvectors - -;************************************************************************** -; Constants -;************************************************************************** - -NVECTORS EQU 64 ; Max possible interrupt vectors -EZ80_UNUSED EQU 64 ; Denotes an unused vector - -; RAM Memory map -; -; __vecstart Beginning of Interrupt Redirection information. This is -; used to hand off to RAM-based handlers for interrupts -; caught by FLASH interrupt vectors. -; __vecend End of the Interrupt Redirection information. -; __loaderstart Start of RAM used exclusively by the bootloader. This -; memory region an be recovered by the RAM-based program. -; __loaderend End of the bootloader RAM. -; __progstart Start of CODE for the RAM-based program. The program can -; freely use the memory region from _progstart-_progend and -; can recover the memory for _loaderstart-_loaderend for heap -; usage. -; __progend End of RAM/End of the RAM-based program - -VECSTART EQU __vecstart ; Start of interrupt redirection area -VECSIZE EQU __vecend - __vecstart ; Size of interrupt redirection area - -;************************************************************************** -; Macros -;************************************************************************** - -; Define one interrupt handler - -irqhandler: macro vectno - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #vectno ; A = vector number - jp _ez80_irq_common ; Remaining RST handling is common - endmac irqhandler - -;************************************************************************** -; Vector Table -;************************************************************************** - -; This segment must be aligned on a 256 byte boundary anywhere in RAM -; Each entry will be a 2-byte address in a 2-byte space. The vector table -; will always reside in FLASH memory; Only the loader in FLASH provides -; the vector table. - - define .IVECTS, space = ROM, align = 100h - segment .IVECTS - -; Vector table is a 2-bit address. The MSB is the I register; the LSB is -; the vector number. The vector table lies in FLASH. The addresses -; contained in the refers to an entry in the handler table that re- -; directs the interrupt to common interrupt handling logic. - -_ez80_vectable: - dw _ez80_redirect + 0*_redirsize - dw _ez80_redirect + 1*_redirsize - dw _ez80_redirect + 2*_redirsize - dw _ez80_redirect + 3*_redirsize - dw _ez80_redirect + 4*_redirsize - dw _ez80_redirect + 5*_redirsize - dw _ez80_redirect + 6*_redirsize - dw _ez80_redirect + 7*_redirsize - dw _ez80_redirect + 8*_redirsize - dw _ez80_redirect + 9*_redirsize - dw _ez80_redirect + 10*_redirsize - dw _ez80_redirect + 11*_redirsize - dw _ez80_redirect + 12*_redirsize - dw _ez80_redirect + 13*_redirsize - dw _ez80_redirect + 14*_redirsize - dw _ez80_redirect + 15*_redirsize - dw _ez80_redirect + 16*_redirsize - dw _ez80_redirect + 17*_redirsize - dw _ez80_redirect + 18*_redirsize - dw _ez80_redirect + 19*_redirsize - dw _ez80_redirect + 20*_redirsize - dw _ez80_redirect + 21*_redirsize - dw _ez80_redirect + 22*_redirsize - dw _ez80_redirect + 23*_redirsize - dw _ez80_redirect + 24*_redirsize - dw _ez80_redirect + 25*_redirsize - dw _ez80_redirect + 26*_redirsize - dw _ez80_redirect + 27*_redirsize - dw _ez80_redirect + 28*_redirsize - dw _ez80_redirect + 29*_redirsize - dw _ez80_redirect + 30*_redirsize - dw _ez80_redirect + 31*_redirsize - dw _ez80_redirect + 32*_redirsize - dw _ez80_redirect + 33*_redirsize - dw _ez80_redirect + 34*_redirsize - dw _ez80_redirect + 35*_redirsize - dw _ez80_redirect + 36*_redirsize - dw _ez80_redirect + 37*_redirsize - dw _ez80_redirect + 38*_redirsize - dw _ez80_redirect + 39*_redirsize - dw _ez80_redirect + 40*_redirsize - dw _ez80_redirect + 41*_redirsize - dw _ez80_redirect + 42*_redirsize - dw _ez80_redirect + 43*_redirsize - dw _ez80_redirect + 44*_redirsize - dw _ez80_redirect + 45*_redirsize - dw _ez80_redirect + 46*_redirsize - dw _ez80_redirect + 47*_redirsize - dw _ez80_redirect + 48*_redirsize - dw _ez80_redirect + 49*_redirsize - dw _ez80_redirect + 50*_redirsize - dw _ez80_redirect + 51*_redirsize - dw _ez80_redirect + 52*_redirsize - dw _ez80_redirect + 53*_redirsize - dw _ez80_redirect + 54*_redirsize - dw _ez80_redirect + 55*_redirsize - dw _ez80_redirect + 56*_redirsize - dw _ez80_redirect + 57*_redirsize - dw _ez80_redirect + 58*_redirsize - dw _ez80_redirect + 59*_redirsize - dw _ez80_redirect + 60*_redirsize - dw _ez80_redirect + 61*_redirsize - dw _ez80_redirect + 62*_redirsize - dw _ez80_redirect + 63*_redirsize - -;************************************************************************** -; Interrupt Redirection Table -;************************************************************************** - -; Still in .IVECTS section - - .assume ADL=1 - -; The redirection table is an intermediate step in interrupt processing. -; When the interrupt occurs, the address in the corresponding entry in the -; vector table (_ez80_vectable) will execute. That will be an entry in -; this table. That entry will simply to the handler entry which has been -; related in RAM at VECSTART. The reason for this redirection is so that -; RAM-based programs and receive the interrupts vectored through the ROM- -; based loader code. - -_ez80_redirect: - jp VECSTART + 0*_handlersize - _redirsize EQU $-_ez80_redirect - jp VECSTART + 1*_handlersize - jp VECSTART + 2*_handlersize - jp VECSTART + 3*_handlersize - jp VECSTART + 4*_handlersize - jp VECSTART + 5*_handlersize - jp VECSTART + 6*_handlersize - jp VECSTART + 7*_handlersize - jp VECSTART + 8*_handlersize - jp VECSTART + 9*_handlersize - jp VECSTART + 10*_handlersize - jp VECSTART + 11*_handlersize - jp VECSTART + 12*_handlersize - jp VECSTART + 13*_handlersize - jp VECSTART + 14*_handlersize - jp VECSTART + 15*_handlersize - jp VECSTART + 16*_handlersize - jp VECSTART + 17*_handlersize - jp VECSTART + 18*_handlersize - jp VECSTART + 19*_handlersize - jp VECSTART + 20*_handlersize - jp VECSTART + 21*_handlersize - jp VECSTART + 22*_handlersize - jp VECSTART + 23*_handlersize - jp VECSTART + 24*_handlersize - jp VECSTART + 25*_handlersize - jp VECSTART + 26*_handlersize - jp VECSTART + 27*_handlersize - jp VECSTART + 28*_handlersize - jp VECSTART + 29*_handlersize - jp VECSTART + 30*_handlersize - jp VECSTART + 31*_handlersize - jp VECSTART + 32*_handlersize - jp VECSTART + 33*_handlersize - jp VECSTART + 34*_handlersize - jp VECSTART + 35*_handlersize - jp VECSTART + 36*_handlersize - jp VECSTART + 37*_handlersize - jp VECSTART + 38*_handlersize - jp VECSTART + 39*_handlersize - jp VECSTART + 40*_handlersize - jp VECSTART + 41*_handlersize - jp VECSTART + 42*_handlersize - jp VECSTART + 43*_handlersize - jp VECSTART + 44*_handlersize - jp VECSTART + 45*_handlersize - jp VECSTART + 46*_handlersize - jp VECSTART + 47*_handlersize - jp VECSTART + 48*_handlersize - jp VECSTART + 49*_handlersize - jp VECSTART + 50*_handlersize - jp VECSTART + 51*_handlersize - jp VECSTART + 52*_handlersize - jp VECSTART + 53*_handlersize - jp VECSTART + 54*_handlersize - jp VECSTART + 55*_handlersize - jp VECSTART + 56*_handlersize - jp VECSTART + 57*_handlersize - jp VECSTART + 58*_handlersize - jp VECSTART + 59*_handlersize - jp VECSTART + 60*_handlersize - jp VECSTART + 61*_handlersize - jp VECSTART + 62*_handlersize - jp VECSTART + 63*_handlersize - -;************************************************************************** -; Interrupt Vector Handlers -;************************************************************************** - - define .STARTUP, space = ROM - segment .STARTUP - .assume ADL=1 - -; This is a copy of the handler table that will be copied into RAM at the -; address given by VECSTART by _ez80_initvectors. FLASH based interrupt -; handling will vector here to support interrupts in the RAM-based program. - - ; Symbol Val VecNo VecOffset - ;----------------- --- ----- --------- -_ez80_handlers: - irqhandler EZ80_UNUSED ; 0 0x000 - _handlersize EQU $-_ez80_handlers - irqhandler EZ80_UNUSED+1 ; 1 0x002 - irqhandler EZ80_UNUSED+2 ; 2 0x004 - irqhandler EZ80_UNUSED+3 ; 3 0x006 - irqhandler 0 ; EZ80_FLASH_IRQ 0 4 0x008 - irqhandler 1 ; EZ80_TIMER0_IRQ 1 5 0x00a - irqhandler 2 ; EZ80_TIMER1_IRQ 2 6 0x00c - irqhandler 3 ; EZ80_TIMER2_IRQ 3 7 0x00e - irqhandler 4 ; EZ80_TIMER3_IRQ 4 8 0x010 - irqhandler 5 ; EZ80_TIMER4_IRQ 5 9 0x012 - irqhandler 6 ; EZ80_TIMER5_IRQ 6 10 0x014 - irqhandler 7 ; EZ80_RTC_IRQ 7 11 0x016 - irqhandler 8 ; EZ80_UART0_IRQ 8 12 0x018 - irqhandler 9 ; EZ80_UART1_IRQ 9 13 0x01a - irqhandler 10 ; EZ80_I2C_IRQ 10 14 0x01c - irqhandler 11 ; EZ80_SPI_IRQ 11 15 0x01e - irqhandler EZ80_UNUSED+4 ; 16 0x020 - irqhandler EZ80_UNUSED+5 ; 17 0x022 - irqhandler EZ80_UNUSED+6 ; 18 0x024 - irqhandler EZ80_UNUSED+7 ; 19 0x026 - irqhandler EZ80_UNUSED+8 ; 16 0x028 - irqhandler EZ80_UNUSED+9 ; 17 0x02a - irqhandler EZ80_UNUSED+10 ; 18 0x02c - irqhandler EZ80_UNUSED+11 ; 19 0x02e - irqhandler 12 ; EZ80_PORTB0_IRQ 12 24 0x030 - irqhandler 13 ; EZ80_PORTB1_IRQ 13 25 0x032 - irqhandler 14 ; EZ80_PORTB2_IRQ 14 26 0x034 - irqhandler 15 ; EZ80_PORTB3_IRQ 15 27 0x036 - irqhandler 16 ; EZ80_PORTB4_IRQ 16 28 0x038 - irqhandler 17 ; EZ80_PORTB5_IRQ 17 29 0x03a - irqhandler 18 ; EZ80_PORTB6_IRQ 18 20 0x03c - irqhandler 19 ; EZ80_PORTB7_IRQ 19 21 0x03e - irqhandler 20 ; EZ80_PORTC0_IRQ 20 22 0x040 - irqhandler 21 ; EZ80_PORTC1_IRQ 21 23 0x042 - irqhandler 22 ; EZ80_PORTC2_IRQ 22 24 0x044 - irqhandler 23 ; EZ80_PORTC3_IRQ 23 25 0x046 - irqhandler 24 ; EZ80_PORTC4_IRQ 24 26 0x048 - irqhandler 25 ; EZ80_PORTC5_IRQ 25 27 0x04a - irqhandler 26 ; EZ80_PORTC6_IRQ 26 28 0x04c - irqhandler 27 ; EZ80_PORTC7_IRQ 27 29 0x04e - irqhandler 28 ; EZ80_PORTD0_IRQ 28 40 0x050 - irqhandler 29 ; EZ80_PORTD1_IRQ 29 41 0x052 - irqhandler 30 ; EZ80_PORTD2_IRQ 30 42 0x054 - irqhandler 31 ; EZ80_PORTD3_IRQ 31 43 0x056 - irqhandler 32 ; EZ80_PORTD4_IRQ 32 44 0x058 - irqhandler 33 ; EZ80_PORTD5_IRQ 33 45 0x05a - irqhandler 34 ; EZ80_PORTD6_IRQ 34 46 0x05c - irqhandler 35 ; EZ80_PORTD7_IRQ 35 47 0x05e - irqhandler EZ80_UNUSED+12 ; 48 0x060 - irqhandler EZ80_UNUSED+13 ; 49 0x062 - irqhandler EZ80_UNUSED+14 ; 50 0x064 - irqhandler EZ80_UNUSED+15 ; 51 0x066 - irqhandler EZ80_UNUSED+16 ; 52 0x068 - irqhandler EZ80_UNUSED+17 ; 53 0x06a - irqhandler EZ80_UNUSED+18 ; 54 0x06c - irqhandler EZ80_UNUSED+19 ; 55 0x06e - irqhandler EZ80_UNUSED+20 ; 56 0x070 - irqhandler EZ80_UNUSED+21 ; 57 0x072 - irqhandler EZ80_UNUSED+22 ; 58 0x074 - irqhandler EZ80_UNUSED+23 ; 59 0x076 - irqhandler EZ80_UNUSED+24 ; 60 0x078 - irqhandler EZ80_UNUSED+25 ; 61 0x07a - irqhandler EZ80_UNUSED+26 ; 62 0x07c - irqhandler EZ80_UNUSED+27 ; 63 0x07e - _copysize EQU $-_ez80_handlers - -;************************************************************************** -; Vector Setup Logic -;************************************************************************** - -; Still in the .STARTUP segment. - -_ez80_initvectors: - - ; The interrupt vector and redirection tables reside in FLASH, but the - ; handlers must be copied to into the VECSTART region in RAM. This - ; is necessary to support interrupt hand-off from FLASH-based interrupt - ; vectors to RAM-based programs. - - ; Copy the initialized data section - - ld bc, _copysize ; [bc] = data length - ld hl, _ez80_handlers ; [hl] = data source - ld de, VECSTART ; [de] = data destination - ldir ; Copy the interrupt handlers - - ; Select interrupt mode 2 - - im 2 ; Interrupt mode 2 - - ; Write the address of the vector table into the interrupt vector base - - ld a, _ez80_vectable >> 8 & 0ffh - ld i, a - ret - end diff --git a/arch/z80/src/ez80/ez80f92_program.asm b/arch/z80/src/ez80/ez80f92_program.asm deleted file mode 100644 index ba1072d5bf..0000000000 --- a/arch/z80/src/ez80/ez80f92_program.asm +++ /dev/null @@ -1,185 +0,0 @@ -;************************************************************************** -; arch/z80/src/ez80/ez80f92_handlers.asm -; -; SPDX-License-Identifier: Apache-2.0 -; -; Licensed to the Apache Software Foundation (ASF) under one or more -; contributor license agreements. See the NOTICE file distributed with -; this work for additional information regarding copyright ownership. The -; ASF licenses this file to you under the Apache License, Version 2.0 (the -; "License"); you may not use this file except in compliance with the -; License. You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -; License for the specific language governing permissions and limitations -; under the License. -; -;************************************************************************** - -;************************************************************************** -; Global Symbols Imported -;************************************************************************** - - xref __vecstart - xref __vecend - xref _ez80_irq_common - -;************************************************************************** -; Global Symbols Exported -;************************************************************************** - - xdef _ez80_initvectors - -;************************************************************************** -; Constants -;************************************************************************** - -NVECTORS EQU 64 ; Max possible interrupt vectors -EZ80_UNUSED EQU 64 ; Denotes an unused vector - -; RAM Memory map -; -; __vecstart Beginning of Interrupt Redirection information. This is -; used to hand off to RAM-based handlers for interrupts -; caught by FLASH interrupt vectors. -; __vecend End of the Interrupt Redirection information. -; __loaderstart Start of RAM used exclusively by the bootloader. This -; memory region an be recovered by the RAM-based program. -; __loaderend End of the bootloader RAM. -; __progstart Start of CODE for the RAM-based program. The program can -; freely use the memory region from _progstart-_progend and -; can recover the memory for _loaderstart-_loaderend for heap -; usage. -; __progend End of RAM/End of the RAM-based program - -VECSTART EQU __vecstart ; Start of interrupt redirection area -VECSIZE EQU __vecend - __vecstart ; Size of interrupt redirection area - -;************************************************************************** -; Macros -;************************************************************************** - -; Define one interrupt handler - -irqhandler: macro vectno - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #vectno ; A = vector number - jp _ez80_irq_common ; Remaining RST handling is common - endmac irqhandler - -;************************************************************************** -; Interrupt Vector Handlers -;************************************************************************** - - define .STARTUP, space = ROM - segment .STARTUP - .assume ADL=1 - -; This is a copy of the handler table that will be copied into RAM at the -; address given by VECSTART by _ez80_initvectors. FLASH based interrupt -; handling will vector here to support interrupts in the RAM-based program. - - ; Symbol Val VecNo Addr - ;----------------- --- ----- ----- -_ez80_handlers: - irqhandler EZ80_UNUSED ; 0 0x000 - _handlersize EQU $-_ez80_handlers - irqhandler EZ80_UNUSED+1 ; 1 0x002 - irqhandler EZ80_UNUSED+2 ; 2 0x004 - irqhandler EZ80_UNUSED+3 ; 3 0x006 - irqhandler 0 ; EZ80_FLASH_IRQ 0 4 0x008 - irqhandler 1 ; EZ80_TIMER0_IRQ 1 5 0x00a - irqhandler 2 ; EZ80_TIMER1_IRQ 2 6 0x00c - irqhandler 3 ; EZ80_TIMER2_IRQ 3 7 0x00e - irqhandler 4 ; EZ80_TIMER3_IRQ 4 8 0x010 - irqhandler 5 ; EZ80_TIMER4_IRQ 5 9 0x012 - irqhandler 6 ; EZ80_TIMER5_IRQ 6 10 0x014 - irqhandler 7 ; EZ80_RTC_IRQ 7 11 0x016 - irqhandler 8 ; EZ80_UART0_IRQ 8 12 0x018 - irqhandler 9 ; EZ80_UART1_IRQ 9 13 0x01a - irqhandler 10 ; EZ80_I2C_IRQ 10 14 0x01c - irqhandler 11 ; EZ80_SPI_IRQ 11 15 0x01e - irqhandler EZ80_UNUSED+4 ; 16 0x020 - irqhandler EZ80_UNUSED+5 ; 17 0x022 - irqhandler EZ80_UNUSED+6 ; 18 0x024 - irqhandler EZ80_UNUSED+7 ; 19 0x026 - irqhandler EZ80_UNUSED+8 ; 16 0x028 - irqhandler EZ80_UNUSED+9 ; 17 0x02a - irqhandler EZ80_UNUSED+10 ; 18 0x02c - irqhandler EZ80_UNUSED+11 ; 19 0x02e - irqhandler 12 ; EZ80_PORTB0_IRQ 12 24 0x030 - irqhandler 13 ; EZ80_PORTB1_IRQ 13 25 0x032 - irqhandler 14 ; EZ80_PORTB2_IRQ 14 26 0x034 - irqhandler 15 ; EZ80_PORTB3_IRQ 15 27 0x036 - irqhandler 16 ; EZ80_PORTB4_IRQ 16 28 0x038 - irqhandler 17 ; EZ80_PORTB5_IRQ 17 29 0x03a - irqhandler 18 ; EZ80_PORTB6_IRQ 18 20 0x03c - irqhandler 19 ; EZ80_PORTB7_IRQ 19 21 0x03e - irqhandler 20 ; EZ80_PORTC0_IRQ 20 22 0x040 - irqhandler 21 ; EZ80_PORTC1_IRQ 21 23 0x042 - irqhandler 22 ; EZ80_PORTC2_IRQ 22 24 0x044 - irqhandler 23 ; EZ80_PORTC3_IRQ 23 25 0x046 - irqhandler 24 ; EZ80_PORTC4_IRQ 24 26 0x048 - irqhandler 25 ; EZ80_PORTC5_IRQ 25 27 0x04a - irqhandler 26 ; EZ80_PORTC6_IRQ 26 28 0x04c - irqhandler 27 ; EZ80_PORTC7_IRQ 27 29 0x04e - irqhandler 28 ; EZ80_PORTD0_IRQ 28 40 0x050 - irqhandler 29 ; EZ80_PORTD1_IRQ 29 41 0x052 - irqhandler 30 ; EZ80_PORTD2_IRQ 30 42 0x054 - irqhandler 31 ; EZ80_PORTD3_IRQ 31 43 0x056 - irqhandler 32 ; EZ80_PORTD4_IRQ 32 44 0x058 - irqhandler 33 ; EZ80_PORTD5_IRQ 33 45 0x05a - irqhandler 34 ; EZ80_PORTD6_IRQ 34 46 0x05c - irqhandler 35 ; EZ80_PORTD7_IRQ 35 47 0x05e - irqhandler EZ80_UNUSED+12 ; 48 0x060 - irqhandler EZ80_UNUSED+13 ; 49 0x062 - irqhandler EZ80_UNUSED+14 ; 50 0x064 - irqhandler EZ80_UNUSED+15 ; 51 0x066 - irqhandler EZ80_UNUSED+16 ; 52 0x068 - irqhandler EZ80_UNUSED+17 ; 53 0x06a - irqhandler EZ80_UNUSED+18 ; 54 0x06c - irqhandler EZ80_UNUSED+19 ; 55 0x06e - irqhandler EZ80_UNUSED+20 ; 56 0x070 - irqhandler EZ80_UNUSED+21 ; 57 0x072 - irqhandler EZ80_UNUSED+22 ; 58 0x074 - irqhandler EZ80_UNUSED+23 ; 59 0x076 - irqhandler EZ80_UNUSED+24 ; 60 0x078 - irqhandler EZ80_UNUSED+25 ; 61 0x07a - irqhandler EZ80_UNUSED+26 ; 62 0x07c - irqhandler EZ80_UNUSED+27 ; 63 0x07e - _copysize EQU $-_ez80_handlers - -;************************************************************************** -; Vector Setup Logic -;************************************************************************** - -; Still in the .STARTUP segment. - -_ez80_initvectors: - - ; The interrupt vector and redirection tables reside in FLASH, but the - ; handlers must be copied to into the VECSTART region in RAM. This - ; is necessary to support interrupt hand-off from FLASH-based interrupt - ; vectors to RAM-based programs. - - ; Copy the initialized data section - - ld bc, _copysize ; [bc] = data length - ld hl, _ez80_handlers ; [hl] = data source - ld de, VECSTART ; [de] = data destination - ldir ; Copy the interrupt handlers - - ; REVISIT: We must assume that the bootloader has configured the - ; interrupt mode correctly. The IM register should be set to 2(i.e, - ; interrupt mode 2) and the I register should be set according to the - ; location of the 1st level interrupt vectors in FLASH. - - ret - end diff --git a/arch/z80/src/ez80/switch.h b/arch/z80/src/ez80/switch.h deleted file mode 100644 index 566f36614c..0000000000 --- a/arch/z80/src/ez80/switch.h +++ /dev/null @@ -1,169 +0,0 @@ -/**************************************************************************** - * arch/z80/src/ez80/switch.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z80_SRC_EZ80_SWITCH_H -#define __ARCH_Z80_SRC_EZ80_SWITCH_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -# include -# include -#endif -#include "z80_internal.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Macros for portability *************************************************** - * - * Common logic in arch/z80/src/common is customized for the z8 context - * switching logic via the following macros. - */ - -/* Initialize the IRQ state */ - -#define INIT_IRQCONTEXT() up_set_current_regs(NULL) - -/* IN_INTERRUPT returns true if the system is currently operating in the - * interrupt context. IN_INTERRUPT is the inline equivalent - * of up_interrupt_context(). - */ - -#define IN_INTERRUPT() (up_current_regs() != NULL) - -/* The following macro is used when the system enters interrupt - * handling logic - * - * NOTE: Nested interrupts are not supported in this implementation. - * If you want to implement nested interrupts, you would have to change - * the way that g_current_regs is handled. The savestate variable - * would not work for that purpose as implemented here because only - * the outermost nested interrupt can result in a context switch - * (it can probably be deleted). - */ - -#define DECL_SAVESTATE() \ - FAR chipreg_t *savestate - -#define IRQ_ENTER(irq, regs) \ - do \ - { \ - savestate = up_current_regs(); \ - up_set_current_regs(regs); \ - } \ - while (0) - -/* The following macro is used when the system exits interrupt - * handling logic - */ - -#define IRQ_LEAVE(irq) up_set_current_regs(savestate) - -/* The following macro is used to sample the interrupt state - * (as a opaque handle) - */ - -#define IRQ_STATE() up_current_regs() - -/* Save the current IRQ context in the specified TCB */ - -#define SAVE_IRQCONTEXT(tcb) ez80_copystate((tcb)->xcp.regs, up_current_regs()) - -/* Set the current IRQ context to the state specified in the TCB */ - -#define SET_IRQCONTEXT(tcb) ez80_copystate(up_current_regs(), (tcb)->xcp.regs) - -/* Save the user context in the specified TCB. - * User context saves can be simpler because only those registers normally - * saved in a C called need be stored. - */ - -#define SAVE_USERCONTEXT(tcb) up_saveusercontext((tcb)->xcp.regs) - -/* Restore the full context -- either a simple user state save or the full, - * IRQ state save. - */ - -#define RESTORE_USERCONTEXT(tcb) ez80_restorecontext((tcb)->xcp.regs) - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -/* This holds a references to the current interrupt level register - * storage structure. It is non-NULL only during interrupt processing. - */ - -extern volatile chipreg_t *g_current_regs; -#endif - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Defined in ez80_copystate.c */ - -void ez80_copystate(FAR chipreg_t *dest, FAR const chipreg_t *src); - -/* Defined in ez80_saveusercontext.asm */ - -int up_saveusercontext(FAR chipreg_t *regs); - -/* Defined in ez80_restorecontext.asm */ - -void ez80_restorecontext(FAR chipreg_t *regs); - -/**************************************************************************** - * Inline Functions - ****************************************************************************/ - -static inline_function chipreg_t *up_current_regs(void) -{ - return (FAR chipreg_t *)g_current_regs; -} - -static inline_function void up_set_current_regs(FAR chipreg_t *regs) -{ - g_current_regs = regs; -} - -#ifdef __cplusplus -} -#endif -#endif - -#endif /* __ARCH_Z80_SRC_EZ80_SWITCH_H */ diff --git a/arch/z80/src/ez80/z80_mem.h b/arch/z80/src/ez80/z80_mem.h deleted file mode 100644 index 0ad3476c7d..0000000000 --- a/arch/z80/src/ez80/z80_mem.h +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** - * arch/z80/src/ez80/z80_mem.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z80_SRC_EZ80_Z80_MEM_H -#define __ARCH_Z80_SRC_EZ80_Z80_MEM_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* For the ZiLOG ZDS-II toolchain(s), the heap will be set using linker- - * defined values: - * - * _heapbot : set to the last used address + 1 in RAM - * _stack : set to the highest address + 1 in RAM - * - * The top of the heap is then determined by the amount of stack setaside - * in the NuttX configuration file - */ - -#ifndef CONFIG_HEAP1_BASE - extern uint8_t _heapbot[]; -# define CONFIG_HEAP1_BASE ((uint24_t)_heapbot) -#endif - -#ifndef CONFIG_HEAP1_END - extern uint8_t _stack[]; -# define CONFIG_HEAP1_END (((uint24_t)_stack) - CONFIG_IDLETHREAD_STACKSIZE) -#endif - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -#undef EXTERN -#ifdef __cplusplus -} -#endif -#endif - -#endif /* __ARCH_Z80_SRC_EZ80_Z80_MEM_H */ diff --git a/arch/z80/src/z180/.gitignore b/arch/z80/src/z180/.gitignore deleted file mode 100644 index 7227d197ac..0000000000 --- a/arch/z80/src/z180/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -!*.asm - diff --git a/arch/z80/src/z180/Kconfig b/arch/z80/src/z180/Kconfig deleted file mode 100644 index b979a148ef..0000000000 --- a/arch/z80/src/z180/Kconfig +++ /dev/null @@ -1,778 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_CHIP_Z180 - -config ARCH_CHIP_Z80180 - bool - -config ARCH_CHIP_Z80181 - bool - -config ARCH_CHIP_Z80182 - bool - -config ARCH_CHIP_Z80195 - bool - -config ARCH_CHIP_Z8L180 - bool - -config ARCH_CHIP_Z8L182 - bool - -config ARCH_CHIP_Z8S180 - bool - -choice - prompt "Z180 Chip Selection" - default ARCH_CHIP_Z8018006VSG - -config ARCH_CHIP_Z8018006VSG - bool "Z8018006VSG" - select ARCH_CHIP_Z80180 - ---help--- - Z180: 68-pin PLCC Z80180 - -config ARCH_CHIP_Z8018010VSG - bool "Z8018010VSG" - select ARCH_CHIP_Z80180 - ---help--- - Z180: 68-pin PLCC Z80180 - -config ARCH_CHIP_Z8018008VSG - bool "Z8018008VSG" - select ARCH_CHIP_Z80180 - ---help--- - Z180: 68-pin PLCC Z80180 - -config ARCH_CHIP_Z8018010FSG - bool "Z8018010FSG" - select ARCH_CHIP_Z80180 - ---help--- - Z180: 80-pin QFP (11 pins N/C) Z80180 - -config ARCH_CHIP_Z8018008VEG - bool "Z8018008VEG" - select ARCH_CHIP_Z80180 - ---help--- - Z180: 68-pin PLCC Z80180 - -config ARCH_CHIP_Z8018006VEG - bool "Z8018006VEG" - select ARCH_CHIP_Z80180 - ---help--- - Z180: 68-pin PLCC Z80180 - -config ARCH_CHIP_Z8018006PSG - bool "Z8018006PSG" - select ARCH_CHIP_Z80180 - ---help--- - Z180: 64-pin DIP 6 MHz 5V Z80180 - -config ARCH_CHIP_Z8018008FSG - bool "Z8018008FSG" - select ARCH_CHIP_Z80180 - ---help--- - Z180: 80-pin QFP (11 pins N/C) 8MHz 5V Z80180 - -config ARCH_CHIP_Z8018010PSG - bool "Z8018010PSG" - select ARCH_CHIP_Z80180 - ---help--- - Z180: 64-pin DIP 10MHz 5V Z80180 - -config ARCH_CHIP_Z8018006PEG - bool "Z8018006PEG" - select ARCH_CHIP_Z80180 - ---help--- - Z180: 64-pin DIP 6MHz 5V Z80180 - -config ARCH_CHIP_Z8018010VEG - bool "Z8018010VEG" - select ARCH_CHIP_Z80180 - ---help--- - 68-pin PLCC 10MHz 5V Z80180 - -config ARCH_CHIP_Z8018010PEG - bool "Z8018010PEG" - select ARCH_CHIP_Z80180 - ---help--- - Z180: 64-pin DIP 10MHz 5V Z80180 - -config ARCH_CHIP_Z8018008PSG - bool "Z8018008PSG" - select ARCH_CHIP_Z80180 - ---help--- - Z180: 64-pin DIP 8MHz 5V Z80180 - -config ARCH_CHIP_Z8018006FSG - bool "Z8018006FSG" - select ARCH_CHIP_Z80180 - ---help--- - Z180: 80-pin QFP (11 pins N/C) 6MHz 5V Z80180 - -config ARCH_CHIP_Z8018000XSO - bool "Z8018000XSO" - select ARCH_CHIP_Z80180 - -config ARCH_CHIP_Z8018010FEG - bool "Z8018010FEG" - select ARCH_CHIP_Z80180 - -config ARCH_CHIP_Z8018000WSO - bool "Z8018000WSO" - select ARCH_CHIP_Z80180 - -config ARCH_CHIP_Z8018008PEG - bool "Z8018008PEG" - select ARCH_CHIP_Z80180 - -config ARCH_CHIP_Z8018110FEG - bool "Z8018110FEG" - select ARCH_CHIP_Z80181 - ---help--- - Z180: 100-pin QFP Z80181 - -config ARCH_CHIP_Z8018233FSG - bool "Z8018233FSG" - select ARCH_CHIP_Z80182 - ---help--- - 100-pin QFP Z80182 - -config ARCH_CHIP_Z8018220AEG - bool "Z8018220AEG" - select ARCH_CHIP_Z80182 - ---help--- - Z180: 100-pin LQFP 20MHz 5V Z80182 - -config ARCH_CHIP_Z8018216FSG - bool "Z8018216FSG" - select ARCH_CHIP_Z80182 - ---help--- - Z180: 100-pin QFP 16MHz 5V Z80182 - -config ARCH_CHIP_Z8018216ASG - bool "Z8018216ASG" - select ARCH_CHIP_Z80182 - ---help--- - Z180: 100-pin LQFP Z80182 - -config ARCH_CHIP_Z8018233ASG - bool "Z8018233ASG" - select ARCH_CHIP_Z80182 - ---help--- - Z180: 100-pin LQFP 33MHz 5V Z80182 - -config ARCH_CHIP_Z8019520FSG - bool "Z8019520FSG" - select ARCH_CHIP_Z80195 - ---help--- - Z180: 100-pin QFP 20MHz 5V Z80195 - -config ARCH_CHIP_Z8019533FSG - bool "Z8019533FSG" - select ARCH_CHIP_Z80195 - ---help--- - Z180: 100-pin QFP 33MHz 5V Z80195 - -config ARCH_CHIP_Z8L18020VSG - bool "Z8L18020VSG" - select ARCH_CHIP_Z8L180 - ---help--- - Z180: 68-pinn PLCC Z8L180 - -config ARCH_CHIP_Z8L18020FSG - bool "Z8L18020FSG" - select ARCH_CHIP_Z8L180 - ---help--- - Z180: 80-pin GFP 20MHz 3.3V Z8L180 - -config ARCH_CHIP_Z8L18020PSG - bool "Z8L18020PSG" - select ARCH_CHIP_Z8L180 - -config ARCH_CHIP_Z8L18220ASG - bool "Z8L18220ASG" - select ARCH_CHIP_Z8L182 - ---help--- - Z180: 100-pin LQFP Z8L182 - -config ARCH_CHIP_Z8L18220FSG - bool "Z8L18220FSG" - select ARCH_CHIP_Z8L182 - ---help--- - 100-pin QFP 20MHz 3.3V Z8L182 - -config ARCH_CHIP_Z8L18220AEG - bool "Z8L18220AEG" - select ARCH_CHIP_Z8L182 - -config ARCH_CHIP_Z8S18020VSG - bool "Z8S18020VSG" - select ARCH_CHIP_Z8S180 - ---help--- - Z180: 68-pin PLCC Z8S180 - -config ARCH_CHIP_Z8S18020VSG1960 - bool "Z8S18020VSG1960" - select ARCH_CHIP_Z8S180 - ---help--- - Z180: 68-pin PLCC Z8S180 - -config ARCH_CHIP_Z8S18033VSG - bool "Z8S18033VSG" - select ARCH_CHIP_Z8S180 - ---help--- - Z180: 68-pin PLCC Z8S180 - -config ARCH_CHIP_Z8S18010FSG - bool "Z8S18010FSG" - select ARCH_CHIP_Z8S180 - ---help--- - 80-pin QFP Z8S180 - -config ARCH_CHIP_Z8S18010VEG - bool "Z8S18010VEG" - select ARCH_CHIP_Z8S180 - ---help--- - Z180: 68-pin PLCC Z8S180 - -config ARCH_CHIP_Z8S18020VEG - bool "Z8S18020VEG" - select ARCH_CHIP_Z8S180 - ---help--- - Z180: 68-pin PLCC Z8S180 - -config ARCH_CHIP_Z8S18010VSG - bool "Z8S18010VSG" - select ARCH_CHIP_Z8S180 - ---help--- - Z180: 68-pin PLCC Z8S180 - -config ARCH_CHIP_Z8S18020PSG - bool "Z8S18020PSG" - select ARCH_CHIP_Z8S180 - ---help--- - 64-pin DIP 10Mhz 5V Z8S180 - -config ARCH_CHIP_Z8S18033FSG - bool "Z8S18033FSG" - select ARCH_CHIP_Z8S180 - ---help--- - Z180: 80-pin QFP 33MHz 5V Z8S180 - -config ARCH_CHIP_Z8S18033FEG - bool "Z8S18033FEG" - select ARCH_CHIP_Z8S180 - ---help--- - Z180: 80-pin QFP 33MHz 5V Z8S180 - -config ARCH_CHIP_Z8S18020FSG - bool "Z8S18020FSG" - select ARCH_CHIP_Z8S180 - ---help--- - Z180: 80-pin QFP 20MHz 5V Z8S180 - -config ARCH_CHIP_Z8S18033VEG - bool "Z8S18033VEG" - select ARCH_CHIP_Z8S180 - ---help--- - Z180: 68-pin PLCC 33MHz 5V Z8S180 - -config ARCH_CHIP_Z8S18010PSG - bool "Z8S18010PSG" - select ARCH_CHIP_Z8S180 - ---help--- - Z180: 64-pin DIP 10MHz 5V Z8S180 - -config ARCH_CHIP_Z8S18020FEG - bool "Z8S18020FEG" - select ARCH_CHIP_Z8S180 - -config ARCH_CHIP_Z8S18010PEG - bool "Z8S18010PEG" - select ARCH_CHIP_Z8S180 - -config ARCH_CHIP_Z8S18010FEG - bool "Z8S18010FEG" - select ARCH_CHIP_Z8S180 - -endchoice - -choice - prompt "Toolchain Selection" - default Z180_TOOLCHAIN_SDCC - -config Z180_TOOLCHAIN_SDCC - bool "Win32, SDCC for Linux, macOS, or Cygwin" - -endchoice - -config Z180_MAX_TASKS - int "Max number of tasks for arch chip z180" - default 8 - ---help--- - The maximum number of simultaneously active tasks. This value must be - a power of two. - -config LINKER_HOME_AREA - hex "Physical start of _HOME area" - default 0x0000 - ---help--- - Physical address of the start of the linker HOME area. Default: 0x0000 - -config LINKER_CODE_AREA - hex "Physical start of _CODE area" - default 0x0200 - ---help--- - Physical address of the start of the linker _CODE area. Default: 0x0200 - -config LINKER_DATA_AREA - hex "Physical start of _DATA area" - default 0x8000 - ---help--- - Physical address of the start of the linker _DATA area. Default: 0x8000 - -config LINKER_ROM_AT_0000 - bool "ROM at Physical 0x0000" - default n - ---help--- - Some architectures may have ROM located at physical address zero. In this - case, a special version of the "head" file must be used. - -config Z180_BANKAREA_VIRTBASE - hex "Virtual Start of Bank Area" - default 0x8000 - ---help--- - This setting provides the virtual address of the start of the Bank Area. - NOTE that 0x0000 <= Z180_BANKAREA_BASE <= Z180_COMMONAREA_BASE is required! - Default: 0x8000 - - NuttX Memory Organization: - - Common Area 0: This area holds the common NuttX code that is - directly call-able from all application threads. Common Area - always starts at virtual address 0x0000 and extends to the - Bank Area - - Base Area: This area holds the common NuttX data (including the - share-able heap) that is accessible from all applications and - extends to Common Area 1. - - NOTE: That is execution from RAM, the common NuttX code and - data may be contiguous and lie in the same region (either - Common Area 0 or the Bank Area). The two regions above would - apply in a ROM'ed system, where Common Area 1 is ROM and the - Base Area is RAM. - - Common Area 1: This area holds the code and data that is unique - to a particular task. his area extends to the end of the virtual - address space. All tasks share the same virtual Common Area 2 - virtual address (but each has a unique mapping to different, - underlying physical addresses). - -config Z180_BANKAREA_PHYSBASE - hex "Physical Start of Bank Area" - default 0x08000 - ---help--- - This setting provides the physical address of the start of the Bank Area. - Default: 0x08000 - -config Z180_COMMON1AREA_VIRTBASE - hex "Virtual Start of Common Area 1" - default 0xc000 - ---help--- - This setting provides the virtual address of the start of the Common - Area 1. NOTE that 0x0000 <= Z180_BANKAREA_BASE <= Z180_COMMONAREA_BASE - is required! Default: 0xc000 - - NuttX Memory Organization: - - Common Area 0: This area holds the common NuttX code that is - directly call-able from all application threads. Common Area - always starts at virtual address 0x0000 and extends to the - Bank Area - - Base Area: This area holds the common NuttX data (including the - share-able heap) that is accessible from all applications and - extends to Common Area 1. - - NOTE: That is execution from RAM, the common NuttX code and - data may be contiguous and lie in the same region (either - Common Area 0 or the Bank Area). The two regions above would - apply in a ROM'ed system, where Common Area 1 is ROM and the - Base Area is RAM. - - Common Area 1: This area holds the code and data that is unique - to a particular task. his area extends to the end of the virtual - address space. All tasks share the same virtual Common Area 2 - virtual address (but each has a unique mapping to different, - underlying physical addresses). - -config Z180_PHYSHEAP_START - hex "Physical Start of Free Memory" - default 0x0c000 - ---help--- - This setting provides the physical address of the start of free physical - memory that will be used to allocate memory for tasks (Common Area 1). - Default: 0x0c000 - -config Z180_PHYSHEAP_END - hex "Physical End(+1) of Free Memory" - default 0x100000 - ---help--- - This setting provides the physical address of the end(+1) of free physical - memory that will be used to allocate memory for tasks (Common Area 1). - Default: 0x100000 - -config ARCH_HAVEHEAD - bool "Board-specific Head File" - default n - ---help--- - Use a board-specific version of the "head" file in the - boards/z80/z180//src directory - -menu "Z180 Peripheral Support" - -config Z180_UART0 - bool "UART0" - default n - ---help--- - Select to enable a serial port on UART0. On the Z8x182, bits 0-4 of - port B will not be available if ASCI channel 0 is selected. - -config Z180_UART1 - bool "UART1" - default n - ---help--- - Select to enable a serial port on UART1. On the Z8x182, bits 5-7 of - port B will not be available if ASCI channel 0 is selected. - -config Z180_SCC - bool "SCC" - default n - depends on ARCH_CHIP_Z80181 || ARCH_CHIP_Z8L181 - ---help--- - Select to enable a serial port on the SCC - -config Z180_ESCCA - bool "ESCC Channel A" - default n - depends on ARCH_CHIP_Z80182 || ARCH_CHIP_Z8L182 - ---help--- - Select to enable a serial port on ESCC Channel A. Not available - if port C is selected. - -config Z180_ESCCB - bool "ESCC Channel B" - default n - depends on (ARCH_CHIP_Z80182 || ARCH_CHIP_Z8L182) && !Z180_MIMIC - ---help--- - Select to enable a serial port on ESCC Channel B - -config Z180_PRT1 - bool "Timer 1" - default n - ---help--- - Select to enable a Programmable Reload Timer 1 (PRT1, PRT0 is used - by NuttX as the system timer) - -# config Z180_DMA0 -# bool "DMA0" -# default n -# ---help--- -# Select to enable support for DMA0 -# -# config Z180_DMA1 -# bool "DMA1" -# default n -# ---help--- -# Select to enable support for DMA1 - -config Z180_PORTA - bool "PORT A" - default n - depends on (ARCH_CHIP_Z80181 || ARCH_CHIP_Z8L181 || ARCH_CHIP_Z80182 || ARCH_CHIP_Z8L182) && !Z180_CTC - ---help--- - Select to enable a Port A (called PIA1 on the Z8x181) - -config Z180_PORTB - bool "PORT B" - default n - depends on ARCH_CHIP_Z80181 || ARCH_CHIP_Z8L181 || ARCH_CHIP_Z80182 || ARCH_CHIP_Z8L182 - ---help--- - Select to enable a Port B (called PIA2 on the Z8x181). On the Z8x182, - Bits 5-7 will not be available if ASCI channel 1 is used; Bits 0-4 will - not be available if ASCI channel 0 is used. - -config Z180_PORTC - bool "PORT C" - default n - depends on (ARCH_CHIP_Z80182 || ARCH_CHIP_Z8L182) && !Z180_ESCCA - ---help--- - Select to enable a Port C. Not available if ESCC channel A is selected. - -config Z180_CTC - bool "CTC" - default n - depends on ARCH_CHIP_Z80181 || ARCH_CHIP_Z8L181 - ---help--- - Select to enable the Counter/Timer (CTC) - -config Z180_MIMIC - bool "16550 MIMIC" - default n - depends on ARCH_CHIP_Z80182 || ARCH_CHIP_Z8L182 - ---help--- - Select to enable the 16550 MIMIC - -endmenu - -choice - prompt "Serial console" - default Z180_UART0_SERIAL_CONSOLE - depends on DEV_CONSOLE - -config Z180_UART0_SERIAL_CONSOLE - bool "UART0" - depends on Z180_UART0 - -config Z180_UART1_SERIAL_CONSOLE - bool "UART1" - depends on Z180_UART1 - -config Z180_SCC_SERIAL_CONSOLE - bool "SCC" - depends on Z180_SCC - -config Z180_ESCCA_SERIAL_CONSOLE - bool "ESCC Channel A" - depends on Z180_ESCCA - -config Z180_ESCCB_SERIAL_CONSOLE - bool "ESCC Channel B" - depends on Z180_ESCCB - -config Z810_NO_SERIAL_CONSOLE - bool "No serial console" - -endchoice - -menu "UART0 Configuration" - depends on Z180_UART0 - -config Z180_UART0_RXBUFSIZE - int "Receive Buffer Size" - default 64 - ---help--- - Characters are buffered as they are received. This specifies - the size of the receive buffer. - -config Z180_UART0_TXBUFSIZE - int "Transmit Buffer Size" - default 64 - ---help--- - Characters are buffered before being sent. This specifies - the size of the transmit buffer. - -config Z180_UART0_BAUD - int "Baud Rate" - default 9600 - ---help--- - The configured BAUD of the SCC. - -config Z180_UART0_BITS - int "Character Size" - default 8 - ---help--- - The number of bits in one character. Must be either 5, 6, 7, or 8. - -config Z180_UART0_PARITY - int "Parity Setting" - default 0 - ---help--- - 0=no parity, 1=odd parity, 2=even parity - -config Z180_UART0_2STOP - int "use 2 stop bits" - default 0 - ---help--- - 1=Two stop bits - -endmenu - -menu "UART1 Configuration" - depends on Z180_UART1 - -config Z180_UART1_RXBUFSIZE - int "Receive Buffer Size" - default 64 - ---help--- - Characters are buffered as they are received. This specifies - the size of the receive buffer. - -config Z180_UART1_TXBUFSIZE - int "Transmit Buffer Size" - default 64 - ---help--- - Characters are buffered before being sent. This specifies - the size of the transmit buffer. - -config Z180_UART1_BAUD - int "Baud Rate" - default 9600 - ---help--- - The configured BAUD of the SCC. - -config Z180_UART1_BITS - int "Character Size" - default 8 - ---help--- - The number of bits in one character. Must be either 5, 6, 7, or 8. - -config Z180_UART1_PARITY - int "Parity Setting" - default 0 - ---help--- - 0=no parity, 1=odd parity, 2=even parity - -config Z180_UART1_2STOP - int "use 2 stop bits" - default 0 - ---help--- - 1=Two stop bits - -endmenu - -menu "SCC Configuration" - depends on Z180_SCC - -config Z180_SCC_RXBUFSIZE - int "Receive Buffer Size" - default 64 - ---help--- - Characters are buffered as they are received. This specifies - the size of the receive buffer. - -config Z180_SCC_TXBUFSIZE - int "Transmit Buffer Size" - default 64 - ---help--- - Characters are buffered before being sent. This specifies - the size of the transmit buffer. - -config Z180_SCC_BAUD - int "Baud Rate" - default 9600 - ---help--- - The configured BAUD of the SCC. - -config Z180_SCC_BITS - int "Character Size" - default 8 - ---help--- - The number of bits in one character. Must be either 5, 6, 7, or 8. - -config Z180_SCC_PARITY - int "Parity Setting" - default 0 - ---help--- - 0=no parity, 1=odd parity, 2=even parity - -config Z180_SCC_2STOP - int "use 2 stop bits" - default 0 - ---help--- - 1=Two stop bits - -endmenu - -menu "ESCC Channel A Configuration" - depends on Z180_ESCCA - -config Z180_ESCCA_RXBUFSIZE - int "Receive Buffer Size" - default 64 - ---help--- - Characters are buffered as they are received. This specifies - the size of the receive buffer. - -config Z180_ESCCA_TXBUFSIZE - int "Transmit Buffer Size" - default 64 - ---help--- - Characters are buffered before being sent. This specifies - the size of the transmit buffer. - -config Z180_ESCCA_BAUD - int "Baud Rate" - default 9600 - ---help--- - The configured BAUD of the SCC. - -config Z180_ESCCA_BITS - int "Character Size" - default 8 - ---help--- - The number of bits in one character. Must be either 5, 6, 7, or 8. - -config Z180_ESCCA_PARITY - int "Parity Setting" - default 0 - ---help--- - 0=no parity, 1=odd parity, 2=even parity - -config Z180_ESCCA_2STOP - int "use 2 stop bits" - default 0 - ---help--- - 1=Two stop bits - -endmenu - -menu "ESCC Channel B Configuration" - depends on Z180_ESCCB - -config Z180_ESCCB_RXBUFSIZE - int "Receive Buffer Size" - default 64 - ---help--- - Characters are buffered as they are received. This specifies - the size of the receive buffer. - -config Z180_ESCCB_TXBUFSIZE - int "Transmit Buffer Size" - default 64 - ---help--- - Characters are buffered before being sent. This specifies - the size of the transmit buffer. - -config Z180_ESCCB_BAUD - int "Baud Rate" - default 9600 - ---help--- - The configured BAUD of the SCC. - -config Z180_ESCCB_BITS - int "Character Size" - default 8 - ---help--- - The number of bits in one character. Must be either 5, 6, 7, or 8. - -config Z180_ESCCB_PARITY - int "Parity Setting" - default 0 - ---help--- - 0=no parity, 1=odd parity, 2=even parity - -config Z180_ESCCB_2STOP - int "use 2 stop bits" - default 0 - ---help--- - 1=Two stop bits - -endmenu -endif diff --git a/arch/z80/src/z180/Toolchain.defs b/arch/z80/src/z180/Toolchain.defs deleted file mode 100644 index b1d681ce0a..0000000000 --- a/arch/z80/src/z180/Toolchain.defs +++ /dev/null @@ -1,125 +0,0 @@ -############################################################################ -# arch/z80/src/z180/Toolchain.defs -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -# Setup for the selected toolchain - -# -# SDCC is currently the only z180 toolchain supported. See -# http://sdcc.sourceforge.net/. Source and pre-built SDCC binaries can be -# downloaded from the SDCC SourceForge site: -# http://sourceforge.net/projects/sdcc/files/. Pre-built binaries are -# available for Linux, macOS, and for Win32. In addition, SDCC can be -# built to run on Windows as a POSIX toolchain. The various SDCC options -# are selected in the NuttX configuration with: -# -# CONFIG_Z180_TOOLCHAIN_SDCC=y : Win32, SDCC for Linux, macOS or Cygwin -# - -# These are the directories where the SDCC toolchain is installed. NOTE -# that short 8.3 path names are used in order to avoid spaces. On my machine -# I have: -# -# C:\PROGRA~1\ = C:\Profram Files\ -# C:\PROGRA~2\ = C:\Program Files (x86)\ -# -# Your PC may be configured differently. - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) - SDCC_INSTALLDIR = C:\PROGRA~2\SDCC - SDCC_BINDIR = $(SDCC_INSTALLDIR)\bin - SDCC_LIBDIR = $(SDCC_INSTALLDIR)\lib\z180 -else - SDCC_INSTALLDIR = /usr/local - SDCC_BINDIR = $(SDCC_INSTALLDIR)/bin - SDCC_LIBDIR = $(SDCC_INSTALLDIR)/share/sdcc/lib/z180 -endif - -ARCHCPUFLAGS = -mz180 - -ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - ARCHOPTIMIZATION = --debug -endif - -SDCCLIB = z180.lib - -# Custom ASSEMBLE definition. The most common toolchain, GCC, uses the -# compiler to assemble files because this has the advantage of running the C -# Pre-Processor against. This is not possible with other SDCC; we need to -# define AS and over-ride the common definition in order to use the assembler -# directly. - -define ASSEMBLE - @echo "AS: $1" - $(Q) $(AS) $(AFLAGS) $($(strip $1)_AFLAGS) $2 $1 -endef - -# Custom CLEAN definition - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) -define CLEAN - $(Q) if exist *.o (del /f /q *.o) - $(Q) if exist *.asm (del /f /q *.asm) - $(Q) if exist *.rel (del /f /q *.rel) - $(Q) if exist *.lst (del /f /q *.lst) - $(Q) if exist *.rst (del /f /q *.rst) - $(Q) if exist *.sym (del /f /q *.sym) - $(Q) if exist *.adb (del /f /q *.adb) - $(Q) if exist *.lnk (del /f /q *.lnk) - $(Q) if exist *.map (del /f /q *.map) - $(Q) if exist *.mem (del /f /q *.mem) - $(Q) if exist *.hex (del /f /q *.hex) - $(Q) if exist *.cmd (del /f /q *.cmd) -endef -else -define CLEAN - $(Q) rm -f *.o *.asm *.rel *.lst *.rst *.sym *.adb *.lnk *.map *.mem *.hex *.cmd -endef -endif - -# Tool names/paths - -CC = sdcc -CPP = sdcpp -LD = sdldz80 -AS = sdasz80 -AR = sdar -r -UNAR = sdar -x - -# File extensions - -ASMEXT = .asm -OBJEXT = .rel -LIBEXT = .lib -EXEEXT = .hex - -# Loadable module definitions - -CMODULEFLAGS = $(CFLAGS) -fvisibility=hidden -LDMODULEFLAGS = -r -T $(call CONVERT_PATH,$(TOPDIR)/libs/libc/elf/gnu-elf.ld) - -# ELF module definitions - -CELFFLAGS = $(CFLAGS) -fvisibility=hidden -CXXELFFLAGS = $(CXXFLAGS) -fvisibility=hidden - -LDELFFLAGS = -r -e __start -LDELFFLAGS += -T $(call CONVERT_PATH,$(TOPDIR)$(DELIM)libs$(DELIM)libc$(DELIM)elf$(DELIM)gnu-elf.ld) diff --git a/arch/z80/src/z180/chip.h b/arch/z80/src/z180/chip.h deleted file mode 100644 index d71000cc67..0000000000 --- a/arch/z80/src/z180/chip.h +++ /dev/null @@ -1,40 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z180/chip.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z80_SRC_Z180_CHIP_H -#define __ARCH_Z80_SRC_Z180_CHIP_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#endif /* __ARCH_Z80_SRC_Z180_CHIP_H */ diff --git a/arch/z80/src/z180/switch.h b/arch/z80/src/z180/switch.h deleted file mode 100644 index d83f32e170..0000000000 --- a/arch/z80/src/z180/switch.h +++ /dev/null @@ -1,235 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z180/switch.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z80_SRC_Z180_SWITCH_H -#define __ARCH_Z80_SRC_Z180_SWITCH_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include - -#include "z180_iomap.h" -#include "z80_internal.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Macros for portability *************************************************** - * - * Common logic in arch/z80/src/common is customized for - * the z180 context switching logic via the following macros. - */ - -/* Initialize the IRQ state */ - -#define INIT_IRQCONTEXT() \ - up_set_current_regs(NULL) - -/* IN_INTERRUPT returns true if the system is currently operating - * in the interrupt context. IN_INTERRUPT is the inline equivalent - * of up_interrupt_context(). - */ - -#define IN_INTERRUPT() \ - (up_current_regs() != NULL) - -/* The following macro declares the variables need by IRQ_ENTER - * and IRQ_LEAVE. These variables are used to support nested interrupts. - * - * - savestate holds the previous value of current_state. - * - savecpr holds the previous value of current_cpr. - * - * NOTE: Nested interrupts are not supported in this implementation. - * If you want to implement nested interrupts, you would have to change - * the way that g_current_regs/cbr is handled. The savestate/savecbr - * variables would not work for that purpose as implemented here because - * only the outermost nested interrupt can result in a context switch - * (they can probably be deleted). - */ - -#define DECL_SAVESTATE() \ - FAR chipreg_t *savestate; \ - uint8_t savecbr; - -/* The following macro is used when the system enters interrupt - * handling logic. The entry values of g_current_regs and current_cbr - * and stored in local variables. Then g_current_regs and current_cbr - * are set to the values of the interrupted task. - */ - -#define IRQ_ENTER(irq, regs) \ - do \ - { \ - savestate = up_current_regs(); \ - savecbr = current_cbr; \ - up_set_current_regs(regs) \ - current_cbr = inp(Z180_MMU_CBR); \ - } \ - while (0) - -/* The following macro is used when the system exits interrupt - * handling logic. The value of g_current_regs is restored. - * If we are not processing a nested interrupt (meaning - * that we going to return to the user task), then also - * set the MMU's CBR register. - */ - -#define IRQ_LEAVE(irq) \ - do \ - { \ - up_set_current_regs(savestate); \ - if (up_current_regs()) \ - { \ - current_cbr = savecbr; \ - } \ - else \ - { \ - outp(Z180_MMU_CBR, savecbr); \ - } \ - } \ - while (0) - -/* The following macro is used to sample the interrupt state - * (as a opaque handle) - */ - -#define IRQ_STATE() \ - up_current_regs() - -/* Save the current IRQ context in the specified TCB */ - -#define SAVE_IRQCONTEXT(tcb) \ - z180_copystate((tcb)->xcp.regs, up_current_regs()) - -/* Set the current IRQ context to the state specified in the TCB */ - -#define SET_IRQCONTEXT(tcb) \ - do \ - { \ - if ((tcb)->xcp.cbr) \ - { \ - current_cbr = (tcb)->xcp.cbr->cbr; \ - } \ - z180_copystate(up_current_regs(), (tcb)->xcp.regs); \ - } \ - while (0) - -/* Save the user context in the specified TCB. User context saves can be - * simpler because only those registers normally saved in a C called - * need be stored. - */ - -#define SAVE_USERCONTEXT(tcb) \ - up_saveusercontext((tcb)->xcp.regs) - -/* Restore the full context -- either a simple user state save or the full, - * IRQ state save. - */ - -#define RESTORE_USERCONTEXT(tcb) \ - do \ - { \ - if ((tcb)->xcp.cbr) \ - { \ - outp(Z180_MMU_CBR, (tcb)->xcp.cbr->cbr); \ - } \ - z180_restoreusercontext((tcb)->xcp.regs); \ - } \ - while (0) - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -/* This holds a references to the current interrupt level register - * storage structure. It is non-NULL only during interrupt processing. - */ - -extern volatile chipreg_t *g_current_regs; - -/* This holds the value of the MMU's CBR register. This value is set to the - * interrupted tasks's CBR on interrupt entry, changed to the new task's CBR - * if an interrupt level context switch occurs, and restored on interrupt - * exit. In this way, the CBR is always correct on interrupt exit. - */ - -extern uint8_t current_cbr; -#endif - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Defined in z180_copystate.c */ - -void z180_copystate(FAR chipreg_t *dest, FAR const chipreg_t *src); - -/* Defined in z180_saveusercontext.asm */ - -int up_saveusercontext(FAR chipreg_t *regs); - -/* Defined in z180_restoreusercontext.asm */ - -void z180_restoreusercontext(FAR chipreg_t *regs); - -/* Defined in z180_sigsetup.c */ - -void z180_sigsetup(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver, - FAR chipreg_t *regs); - -/**************************************************************************** - * Inline Functions - ****************************************************************************/ - -static inline_function chipreg_t *up_current_regs(void) -{ - return (FAR chipreg_t *)g_current_regs; -} - -static inline_function void up_set_current_regs(FAR chipreg_t *regs) -{ - g_current_regs = regs; -} - -#ifdef __cplusplus -} -#endif -#endif - -#endif /* __ARCH_Z80_SRC_Z180_SWITCH_H */ diff --git a/arch/z80/src/z180/z180_config.h b/arch/z80/src/z180/z180_config.h deleted file mode 100644 index d461078c89..0000000000 --- a/arch/z80/src/z180/z180_config.h +++ /dev/null @@ -1,221 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z180/z180_config.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z80_SRC_Z180_Z180_CONFIG_H -#define __ARCH_Z80_SRC_Z180_Z180_CONFIG_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include "z80_internal.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Verify that selected features match the capability of the selected CPU */ - -#ifndef HAVE_Z8X181 -# undef CONFIG_Z180_SCC -# undef CONFIG_Z180_CTC -#endif - -#ifndef HAVE_Z8X182 -# undef CONFIG_Z180_ESCCA -# undef CONFIG_Z180_ESCCB -# undef CONFIG_Z180_PORTC -# undef CONFIG_Z180_MIMIC -#endif - -#if !defined(HAVE_Z8X181) && !defined(HAVE_Z8X182) -# undef CONFIG_Z180_PORTA -# undef CONFIG_Z180_PORTB -#endif - -/* Are any UARTs enabled? */ - -#undef HAVE_UART -#undef HAVE_SCC -#undef HAVE_SERIAL - -#if defined(CONFIG_Z180_UART0) || defined(CONFIG_Z180_UART1) -# define HAVE_UART 1 -# define HAVE_SERIAL 1 -#endif - -#if defined(CONFIG_Z180_SCC) || defined(CONFIG_Z180_ESCCA) || \ - defined(CONFIG_Z180_ESCCB) -# define HAVE_SCC 1 -# define HAVE_SERIAL 1 -#endif - -/* Make sure all features are disabled for disabled UARTs/[E]SCC channels. - * This simplifies checking later. - */ - -#ifndef CONFIG_Z180_UART0 -# undef CONFIG_Z180_UART0_SERIAL_CONSOLE -#endif - -#ifndef CONFIG_Z180_UART1 -# undef CONFIG_Z180_UART1_SERIAL_CONSOLE -#endif - -#ifndef CONFIG_Z180_SCC -# undef CONFIG_SCC_SERIAL_CONSOLE -#endif - -#ifndef CONFIG_Z180_ESCCA -# undef CONFIG_Z180_ESCCA_SERIAL_CONSOLE -#endif - -#ifndef CONFIG_Z180_ESCCB -# undef CONFIG_Z180_ESCCB_SERIAL_CONSOLE -#endif - -/* Is there a serial console? There should be at most one defined. */ - -#undef HAVE_UART_CONSOLE -#undef HAVE_SCC_CONSOLE -#undef HAVE_SERIAL_CONSOLE - -#if defined(CONFIG_Z180_UART0_SERIAL_CONSOLE) -# define HAVE_UART_CONSOLE 1 -# define HAVE_SERIAL_CONSOLE 1 - - /* Disable other console selections */ - -# undef CONFIG_Z180_UART1_SERIAL_CONSOLE -# undef CONFIG_Z180_SCC_SERIAL_CONSOLE -# undef CONFIG_Z180_ESCCA_SERIAL_CONSOLE -# undef CONFIG_Z180_ESCCB_SERIAL_CONSOLE - -/* If we are not using the serial driver, then the serial console is all - * that we will support. - */ - -# ifndef USE_SERIALDRIVER -# undef CONFIG_Z180_UART1 -# undef CONFIG_Z180_SCC -# undef CONFIG_Z180_ESCCA -# undef CONFIG_Z180_ESCCB -# endif - -#elif defined(CONFIG_Z180_UART1_SERIAL_CONSOLE) -# define HAVE_UART_CONSOLE 1 -# define HAVE_SERIAL_CONSOLE 1 - -/* Disable other console selections */ - -# undef CONFIG_Z180_SCC_SERIAL_CONSOLE -# undef CONFIG_Z180_ESCCA_SERIAL_CONSOLE -# undef CONFIG_Z180_ESCCB_SERIAL_CONSOLE - -/* If we are not using the serial driver, then the serial console is all - * that we will support. - */ - -# ifndef USE_SERIALDRIVER -# undef CONFIG_Z180_UART0 -# undef CONFIG_Z180_SCC -# undef CONFIG_Z180_ESCCA -# undef CONFIG_Z180_ESCCB -# endif - -#elif defined(CONFIG_Z180_SCC_SERIAL_CONSOLE) -# define HAVE_SCC_CONSOLE 1 -# define HAVE_SERIAL_CONSOLE 1 - -/* Disable other console selections */ - -# undef CONFIG_Z180_ESCCA_SERIAL_CONSOLE -# undef CONFIG_Z180_ESCCB_SERIAL_CONSOLE - -/* If we are not using the serial driver, then the serial console is all - * that we will support. - */ - -# ifndef USE_SERIALDRIVER -# undef CONFIG_Z180_UART0 -# undef CONFIG_Z180_UART1 -# undef CONFIG_Z180_ESCCA -# undef CONFIG_Z180_ESCCB -# endif - -#elif defined(CONFIG_Z180_ESCCA_SERIAL_CONSOLE) -# define HAVE_SCC_CONSOLE 1 -# define HAVE_SERIAL_CONSOLE 1 - -/* Disable other console selections */ - -# undef CONFIG_Z180_ESCCB_SERIAL_CONSOLE - -/* If we are not using the serial driver, then the serial console is all - * that we will support. - */ - -# ifndef USE_SERIALDRIVER -# undef CONFIG_Z180_UART0 -# undef CONFIG_Z180_UART1 -# undef CONFIG_Z180_SCC -# undef CONFIG_Z180_ESCCB -# endif - -/* If we are not using the serial driver, then the serial console is all - * that we will support. - */ - -#elif defined(CONFIG_Z180_ESCCB_SERIAL_CONSOLE) -# define HAVE_SCC_CONSOLE 1 -# define HAVE_SERIAL_CONSOLE 1 - -/* If we are not using the serial driver, then the serial console is all - * that we will support. - */ - -# ifndef USE_SERIALDRIVER -# undef CONFIG_Z180_UART0 -# undef CONFIG_Z180_UART1 -# undef CONFIG_Z180_SCC -# undef CONFIG_Z180_ESCCA -# endif - -#endif - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Public Functions Prototypes - ****************************************************************************/ - -#endif /* __ARCH_Z80_SRC_Z180_Z180_CONFIG_H */ diff --git a/arch/z80/src/z180/z180_copystate.c b/arch/z80/src/z180/z180_copystate.c deleted file mode 100644 index 59719d206a..0000000000 --- a/arch/z80/src/z180/z180_copystate.c +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z180/z180_copystate.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include "chip/switch.h" -#include "z80_internal.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: z180_copystate - ****************************************************************************/ - -/* Maybe a little faster than most memcpy's */ - -void z180_copystate(FAR chipreg_t *dest, FAR const chipreg_t *src) -{ - int i; - for (i = 0; i < XCPTCONTEXT_REGS; i++) - { - *dest++ = *src++; - } -} diff --git a/arch/z80/src/z180/z180_head.asm b/arch/z80/src/z180/z180_head.asm deleted file mode 100644 index 47b839ac2f..0000000000 --- a/arch/z80/src/z180/z180_head.asm +++ /dev/null @@ -1,198 +0,0 @@ -;************************************************************************** -; arch/z80/src/z180/z180_head.asm -; -; SPDX-License-Identifier: Apache-2.0 -; -; Licensed to the Apache Software Foundation (ASF) under one or more -; contributor license agreements. See the NOTICE file distributed with -; this work for additional information regarding copyright ownership. The -; ASF licenses this file to you under the Apache License, Version 2.0 (the -; "License"); you may not use this file except in compliance with the -; License. You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -; License for the specific language governing permissions and limitations -; under the License. -; -;************************************************************************** - - .title NuttX for the Z180 - .module z180_head - -;************************************************************************** -; Constants -;************************************************************************** - - ; Default stack base (needs to be fixed) - - .include "asm_mem.h" - -;************************************************************************** -; Global symbols used -;************************************************************************** - - .globl _nx_start ; OS entry point - .globl _up_vectcommon ; Common interrupt handling logic - .globl _z180_mmu_lowinit ; MMU initialization logic - .globl s__HEAP ; Start of the heap - -;************************************************************************** -; Reset entry point -;************************************************************************** - - .area _HEADER (ABS) - .org 0x0000 - - di ; Disable interrupts - im 1 ; Set interrupt mode 1 - jr _up_reset ; And boot the system - -;************************************************************************** -; Other reset handlers -;************************************************************************** - - .org 0x0008 ; RST 1 - - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #0 ; 0 = Z180_RST1 - jp _up_vectcommon ; Remaining RST handling is common - - .org 0x0010 ; RST 2 - - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #1 ; 1 = Z180_RST2 - jp _up_vectcommon ; Remaining RST handling is common - - .org 0x0018 ; RST 3 - - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #2 ; 2 = Z180_RST3 - jp _up_vectcommon ; Remaining RST handling is common - - .org 0x0020 ; RST 4 - - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #3 ; 3 = Z180_RST4 - jp _up_vectcommon ; Remaining RST handling is common - - .org 0x0028 ; RST 5 - - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #4 ; 4 = Z180_RST5 - jp _up_vectcommon ; Remaining RST handling is common - - .org 0x0030 ; RST 6 - - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #5 ; 5 = Z180_RST6 - jp _up_vectcommon ; Remaining RST handling is common - - .org 0x0038 ; Int mode 1 / RST 7 - - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #6 ; 6 = Z180_RST7 - jp _up_vectcommon ; Remaining RST handling is common - -;************************************************************************** -; NMI interrupt handler -;************************************************************************** - - .org 0x0066 - retn - -;************************************************************************** -; System start logic -;************************************************************************** - -_up_reset: - ; Set up the stack pointer at the location determined the Makefile - ; and stored in asm_mem.h - - ld SP, #CONFIG_STACK_END ; Set stack pointer - - ; Configure the MMU so that things will lie at the addresses that we - ; expect them to - - call _z180_mmu_lowinit ; Initialize the MMU - - ; Performed initialization unique to the SDCC toolchain - - call gsinit ; Initialize the data section - - ; Then start NuttX - - call _nx_start ; jump to the OS entry point - - ; NuttX will never return, but just in case... - -_up_halt:: - halt ; We should never get here - jp _up_halt - -;************************************************************************** -; Ordering of segments for the linker (SDCC only) -;************************************************************************** - - .area _HOME - .area _CODE - .area _INITIALIZER - .area _GSINIT - .area _GSFINAL - - .area _DATA - .area _INITIALIZED - .area _BSEG - .area _BSS - .area _HEAP - -;************************************************************************** -; Global data initialization logic (SDCC only) -;************************************************************************** - - .area _GSINIT -gsinit:: - ld bc, #l__INITIALIZER - ld a, b - or a, c - jr Z, gsinit_next - ld de, #s__INITIALIZED - ld hl, #s__INITIALIZER - ldir -gsinit_next: - - .area _GSFINAL - ret - -;************************************************************************** -; The start of the heap (SDCC only). Note that is actually resides in -; the _CODE area (which may be FLASH or ROM) -;************************************************************************** - - .area _CODE -_g_heapbase:: - .dw #s__HEAP diff --git a/arch/z80/src/z180/z180_initialstate.c b/arch/z80/src/z180/z180_initialstate.c deleted file mode 100644 index b029c8f12e..0000000000 --- a/arch/z80/src/z180/z180_initialstate.c +++ /dev/null @@ -1,90 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z180/z180_initialstate.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include - -#include "chip.h" -#include "z80_internal.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_initial_state - * - * Description: - * A new thread is being started and a new TCB - * has been created. This function is called to initialize - * the processor specific portions of the new TCB. - * - * This function must setup the initial architecture registers - * and/or stack so that execution will begin at tcb->start - * on the next context switch. - * - ****************************************************************************/ - -void up_initial_state(struct tcb_s *tcb) -{ - struct xcptcontext *xcp = &tcb->xcp; - - /* Initialize the idle thread stack */ - - if (tcb->pid == IDLE_PROCESS_ID) - { - char *stack_ptr = (char *)CONFIG_STACK_BASE; -#ifdef CONFIG_STACK_COLORATION - char *stack_end = (char *)up_getsp(); - - /* If stack debug is enabled, then fill the stack with a - * recognizable value that we can use later to test for high - * water marks. - */ - - while (stack_ptr < stack_end) - { - *--stack_end = 0xaa; - } -#endif /* CONFIG_STACK_COLORATION */ - - tcb->stack_alloc_ptr = stack_ptr; - tcb->stack_base_ptr = stack_ptr; - tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE; - } - - /* Initialize the initial exception register context structure */ - - memset(xcp, 0, sizeof(struct xcptcontext)); -#ifndef CONFIG_SUPPRESS_INTERRUPTS - xcp->regs[XCPT_I] = Z180_PV_FLAG; /* Parity flag will enable interrupts */ -#endif - xcp->regs[XCPT_SP] = (chipreg_t)tcb->stack_base_ptr + - tcb->adj_stack_size; - xcp->regs[XCPT_PC] = (chipreg_t)tcb->start; -} diff --git a/arch/z80/src/z180/z180_io.c b/arch/z80/src/z180/z180_io.c deleted file mode 100644 index 027c266f4d..0000000000 --- a/arch/z80/src/z180/z180_io.c +++ /dev/null @@ -1,80 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z180/z180_io.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include -/* #include */ - -#include "z80_internal.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: outb - * - * Description: - * Output byte c on port p - * - ****************************************************************************/ - -void outp(char p, char c) -{ - __asm - ld c, 4(ix) ; port - ld a, 5(ix) ; value - out (c), a - __endasm; -} - -/**************************************************************************** - * Name: inpb - * - * Description: - * Input byte from port p - * - ****************************************************************************/ - -char inp(char p) __naked -{ - __asm - ld c, 4(ix) ; port - in l, (c) - __endasm; -} diff --git a/arch/z80/src/z180/z180_iomap.h b/arch/z80/src/z180/z180_iomap.h deleted file mode 100644 index a514579131..0000000000 --- a/arch/z80/src/z180/z180_iomap.h +++ /dev/null @@ -1,982 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z180/z180_iomap.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z80_SRC_Z180_Z180_IOMAP_H -#define __ARCH_Z80_SRC_Z180_Z180_IOMAP_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -/* These registers may be relocated to multiples of 0x40 by setting the IO - * Control Register (ICR). Relocatable to 0x40-0x7f, or 0x80-0xbf. The - * configuration setting, CONFIG_Z180_SFROFFSET, indicates that offset - * (but is not fully supported yet!) - */ - -#ifdef CONFIG_Z180_SFROFFSET -# define SFR_OFFSET CONFIG_Z180_SFROFFSET -#else -# define SFR_OFFSET 0 -#endif - -/* Z180 Register Bit addresses **********************************************/ - -/* ASCI Registers */ - -#define Z180_ASCI0_CNTLA (SFR_OFFSET+0x00) /* ASCI Control Register A Ch 0 */ -#define Z180_ASCI1_CNTLA (SFR_OFFSET+0x01) /* ASCI Control Register A Ch 1 */ -#define Z180_ASCI0_CNTLB (SFR_OFFSET+0x02) /* ASCI Control Register B Ch 0 */ -#define Z180_ASCI1_CNTLB (SFR_OFFSET+0x03) /* ASCI Control Register B Ch 1 */ -#define Z180_ASCI0_STAT (SFR_OFFSET+0x04) /* ASCI Status Register Ch 0 */ -#define Z180_ASCI1_STAT (SFR_OFFSET+0x05) /* ASCI Status Register Ch 1 */ -#define Z180_ASCI0_TDR (SFR_OFFSET+0x06) /* ASCI Transmit Data Register Ch 0 */ -#define Z180_ASCI1_TDR (SFR_OFFSET+0x07) /* ASCI Transmit Data Register Ch 1 */ -#define Z180_ASCI0_RDR (SFR_OFFSET+0x08) /* ASCI Receive Data Register Ch 0 */ -#define Z180_ASCI1_RDR (SFR_OFFSET+0x09) /* ASCI Receive Data Register Ch 1 */ - -#ifdef HAVE_Z8S180 /* Z8S180/Z8L180 class processors */ -# define Z180_ASCI0_ASEXT (SFR_OFFSET+0x12) /* ASCI Extension Control Register */ -# define Z180_ASCI1_ASEXT (SFR_OFFSET+0x13) /* ASCI Extension Control Register */ -#endif - -#ifdef HAVE_Z8S180 /* Z8S180/Z8L180 class processors */ -# define Z180_ASCI0_ASTCL (SFR_OFFSET+0x1a) /* ASCI Time Constant Low */ -# define Z180_ASCI0_ASTCH (SFR_OFFSET+0x1b) /* ASCI Time Constant High */ -# define Z180_ASCI1_ASTCL (SFR_OFFSET+0x1c) /* ASCI Time Constant Low */ -# define Z180_ASCI1_ASTCH (SFR_OFFSET+0x1d) /* ASCI Time Constant High */ -#endif - -/* CSI/O Registers */ - -#define Z180_CSIO_CNTR (SFR_OFFSET+0x0a) /* CSI/O Control Register */ -#define Z180_CSIO_TRD (SFR_OFFSET+0x0b) /* Transmit/Receive Data Register */ - -/* Programmable Reload Timer (PTR) Registers */ - -#define Z180_PRT0_DRL (SFR_OFFSET+0x0c) /* Timer Data Register Ch 0 L */ -#define Z180_PRT0_DRH (SFR_OFFSET+0x0d) /* Data Register Ch 0 H */ -#define Z180_PRT0_RLDRL (SFR_OFFSET+0x0e) /* Reload Register Ch 0 L */ -#define Z180_PRT0_RLDRH (SFR_OFFSET+0x0f) /* Reload Register Ch 0 H */ -#define Z180_PRT_TCR (SFR_OFFSET+0x10) /* Timer Control Register */ - -#define Z180_PRT1_DRL (SFR_OFFSET+0x14) /* Data Register Ch 1 L */ -#define Z180_PRT1_DRH (SFR_OFFSET+0x15) /* Data Register Ch 1 H */ -#define Z180_PRT1_RLDRL (SFR_OFFSET+0x16) /* Reload Register Ch 1 L */ -#define Z180_PRT1_RLDRH (SFR_OFFSET+0x17) /* Reload Register Ch 1 H */ - -#define Z180_FRC (SFR_OFFSET+0x18) /* Free Running Counter */ - -/* DMA Registers */ - -#define Z180_DMA0_SARL (SFR_OFFSET+0x20) /* DMA Source Address Register Ch 0L */ -#define Z180_DMA0_SARH (SFR_OFFSET+0x21) /* DMA Source Address Register Ch 0H */ -#define Z180_DMA0_SARB (SFR_OFFSET+0x22) /* DMA Source Address Register Ch 0B */ -#define Z180_DMA0_DARL (SFR_OFFSET+0x23) /* DMA Destination Address Register Ch 0L */ -#define Z180_DMA0_DARH (SFR_OFFSET+0x24) /* DMA Destination Address Register Ch 0H */ -#define Z180_DMA0_DARB (SFR_OFFSET+0x25) /* DMA Destination Address Register Ch 0B */ -#define Z180_DMA0_BCRL (SFR_OFFSET+0x26) /* DMA Byte Count Register Ch 0L */ -#define Z180_DMA0_BCRH (SFR_OFFSET+0x27) /* DMA Byte Count Register Ch 0H */ - -#define Z180_DMA1_MARL (SFR_OFFSET+0x28) /* DMA Memory Address Register Ch 1L */ -#define Z180_DMA1_MARH (SFR_OFFSET+0x29) /* DMA Memory Address Register Ch 1H */ -#define Z180_DMA1_MARB (SFR_OFFSET+0x2a) /* DMA Memory Address Register Ch 1B */ -#define Z180_DMA1_IARL (SFR_OFFSET+0x2b) /* DMA I/0 Address Register Ch 1L */ -#define Z180_DMA1_IARH (SFR_OFFSET+0x2c) /* DMA I/0 Address Register Ch 1H */ - -#ifdef HAVE_Z8S180 /* Z8S180/Z8L180 class processors */ -# define Z180_DMA1_IARB (SFR_OFFSET+0x2d) /* DMA I/O Address Register Ch 1B */ -#endif -#define Z180_DMA1_BCRL (SFR_OFFSET+0x2e) /* DMA Byte Count Register Ch 1L */ -#define Z180_DMA1_BCRH (SFR_OFFSET+0x2f) /* DMA Byte Count Register Ch 1H */ - -#define Z180_DMA_DSTAT (SFR_OFFSET+0x30) /* DMA Status Register */ -#define Z180_DMA_DMODE (SFR_OFFSET+0x31) /* DMA Mode Register */ -#define Z180_DMA_DCNTL (SFR_OFFSET+0x32) /* DMA/WAIT Control Register */ - -/* System Control Registers */ - -#ifdef HAVE_Z8S180 /* Z8S180/Z8L180 class processors */ -# define Z180_CMR (SFR_OFFSET+0x1e) /* Clock Multiplier Register */ -#endif - -#if defined(HAVE_Z8S180) || defined(HAVE_Z8X182) -# define Z180_CCR (SFR_OFFSET+0x1f) /* CPU Control Register */ -#endif - -#define Z180_INT_IL (SFR_OFFSET+0x33) /* IL Register (Interrupt Vector Low Register) */ -#define Z180_INT_ITC (SFR_OFFSET+0x34) /* INT/TRAP Control Register */ - -#define Z180_RCR (SFR_OFFSET+0x36) /* Refresh Control Register */ - -#define Z180_MMU_CBR (SFR_OFFSET+0x38) /* MMU Common Base Register */ -#define Z180_MMU_BBR (SFR_OFFSET+0x39) /* MMU Bank Base Register */ -#define Z180_MMU_CBAR (SFR_OFFSET+0x3a) /* MMU Common/Bank Area Register */ - -#define Z180_OMCR (SFR_OFFSET+0x3e) /* Operation Mode Control Register */ -#define Z180_ICR (SFR_OFFSET+0x3f) /* I/O Control Register */ - -/* The following registers are not relocatable */ - -/* Registers unique to Z8x181 class CPUs */ - -#ifdef HAVE_Z8X181 - -/* PIA Registers */ - -# define Z181_PIA1_DDR 0xe0 /* PIA1 Data Direction Register */ -# define Z181_PIA1_DP 0xe1 /* PIA1 Data Port */ -# define Z181_PIA2_DDR 0xe2 /* PIA2 Data Direction Register */ -# define Z181_PIA1_DP 0xe3 /* PIA2 Data Register */ - -/* CTC Registers */ - -# define Z181_CTC0 0xe4 /* CTC Channel 0 Control/Vector Register */ -# define Z181_CTC1 0xe5 /* CTC Channel 1 Control/Vector Register */ -# define Z181_CTC2 0xe6 /* CTC Channel 2 Control/Vector Register */ -# define Z181_CTC3 0xe7 /* CTC Channel 3 Control/Vector Register */ - -/* SCC Registers */ - -# define Z181_SCC_CR 0xe8 /* SCC Control Register */ -# define Z181_SCC_DR 0xe9 /* SCC Data Register */ - -/* System Control Registers */ - -# define Z181_RAM_UBR 0xea /* RAM Upper Boundary Address Register */ -# define Z181_RAM_LBR 0xeb /* RAM Lower Boundary Address Register */ -# define Z181_ROM_BR 0xec /* ROM Address Boundary Register */ -# define Z181_SCR 0xed /* System Configuration Register */ -#endif - -/* Registers unique to Z8x182 class CPUs */ - -#ifdef HAVE_Z8X182 -# define Z182_WSGCS 0xd8 /* WSG Chip Select Register */ -# define Z182_ENH182 0xd9 /* Z80182 Enhancements Register */ -# define Z182_INTEDGE 0xdf /* Interrupt Edge/Pin MUX Control */ - -/* PIA Registers */ - -# define Z182_PA_DDR 0xed /* PA Data Direction Register */ -# define Z182_PA_DR 0xee /* PA Data Register */ -# define Z182_PB_DDR 0xe4 /* PB Data Direction Register */ -# define Z182_PB_DR 0xe5 /* PB Data Register */ -# define Z182_PC_DDR 0xdd /* PC Data Direction Register */ -# define Z182_PC_DR 0xde /* PC Data Register */ - -/* ESCC Registers */ - -# define Z182_ESCCA_CR 0xe0 /* ESCC Chan A Control Register */ -# define Z182_ESCCA_DR 0xe1 /* ESCC Chan A Data Register */ -# define Z182_ESCCB_CR 0xe2 /* ESCC Chan B Control Register */ -# define Z182_ESCCB_DR 0xe3 /* ESCC Chan B Data Register */ - -/* System Control Registers */ - -# define Z182_RAM_UBR 0xe6 /* RAMUBR RAM Upper Boundary Register */ -# define Z182_RAM_LBR 0xe7 /* RAMLBR RAM Lower Boundary Register */ -# define Z182_ROM_BR 0xe8 /* ROM Address Boundary Register */ -# define Z182_SCR 0xef /* System Configuration Register */ - -/* 16550 MIMIC Registers */ - -# define Z182_MIMIC_FCR 0xe9 /* FIFO Control Register */ -# define Z182_MIMIC_MM 0xe9 /* MM register */ -# define Z182_MIMIC_RTTC 0xea /* Receive Timeout Time Constant */ -# define Z182_MIMIC_TTTC 0xeb /* Transmit Timeout Time Constant */ -# define Z182_MIMIC_FSCR 0xec /* FIFO Status and Control */ -# define Z182_MIMIC_RBR 0xf0 /* Receive Buffer Register */ -# define Z182_MIMIC_THR 0xf0 /* Transmit Holding Register */ -# define Z182_MIMIC_IER 0xf1 /* Interrupt Enable Register */ -# define Z182_MIMIC_LCR 0xf3 /* Line Control Register */ -# define Z182_MIMIC_MCR 0xf4 /* Modem Control Register */ -# define Z182_MIMIC_LSR 0xf5 /* Line Status Register */ -# define Z182_MIMIC_MSR 0xf6 /* Modem Status Register */ -# define Z182_MIMIC_SCR 0xf7 /* Scratch Register */ -# define Z182_MIMIC_DLL 0xf8 /* Divisor Latch (LSByte) */ -# define Z182_MIMIC_DLM 0xf9 /* Divisor Latch (MSByte) */ -# define Z182_MIMIC_TTCR 0xfa /* Transmit Time Constant */ -# define Z182_MIMIC_RTCR 0xfb /* Receive Time Constant */ -# define Z182_MIMIC_IVEC 0xfc /* Interrupt Vector */ -# define Z182_MIMIC_IE 0xfd /* Interrupt Enable */ - -# define Z182_MIMIC_IUSIP 0xfe /* Interrupt Under-Service/Interrupt Pending */ -# define Z182_MIMIC_MMC 0xff /* MIMIC Master Control Register */ - -/* Some of the MIMIC registers are accessible to memory-mapped addresses */ - -# define Z182_MIMIC_RBR_ADDR 0x0000 /* Receive Buffer Register */ -# define Z182_MIMIC_DLL_ADDR 0x0000 /* Divisor Latch (LSByte) */ -# define Z182_MIMIC_THR_ADDR 0x0000 /* Transmit Holding Register */ -# define Z182_MIMIC_DLM_ADDR 0x0001 /* Divisor Latch (MSByte) */ -# define Z182_MIMIC_IER_ADDR 0x0001 /* Interrupt Enable Register */ -# define Z182_MIMIC_IIR_ADDR 0x0002 /* Interrupt Identification */ -# define Z182_MIMIC_FCR_ADDR 0x0002 /* FIFO Control Register */ -# define Z182_MIMIC_LCR_ADDR 0x0003 /* Line Control Register */ -# define Z182_MIMIC_MCR_ADDR 0x0004 /* Modem Control Register */ -# define Z182_MIMIC_LSR_ADDR 0x0005 /* Line Status Register */ -# define Z182_MIMIC_MSR_ADDR 0x0006 /* Modem Status Register */ -# define Z182_MIMIC_SCR_ADDR 0x0007 /* Scratch Register */ -#endif - -/* [E]SCC Internal Register Definitions */ - -/* Read Registers. The SCC contains eight read registers. To read the - * contents of a register (rather than RR0), the program must first - * initialize a pointer to WR0 in exactly the same manner as a write - * operation. The next I/O read cycle will place the contents of the - * selected read registers onto the data bus - */ - -#define Z18X_SCC_RR0 0x00 /* Transmit and Receive buffer status and external status */ -#define Z18X_SCC_RR1 0x01 /* Special Receive Condition status */ -#define Z18X_SCC_RR2 0x02 /* Interrupt vector (modified if VIS Bit in WR9 is set) */ -#define Z18X_SCC_RR3 0x03 /* Interrupt pending bits */ -#define Z18X_SCC_RR6 0x06 /* SDLC FIFO byte counter lower byte (only when enabled) */ -#define Z18X_SCC_RR7 0x07 /* SDLC FIFO byte count and status (only when enabled) */ -#define Z18X_SCC_RR8 0x08 /* Receive buffer */ -#define Z18X_SCC_RR10 0x0a /* Miscellaneous status bits */ -#define Z18X_SCC_RR12 0x0c /* Lower byte of baud rate generator time constant */ -#define Z18X_SCC_RR13 0x0d /* Upper byte of baud rate generator time constant */ -#define Z18X_SCC_RR15 0x0f /* External Status interrupt information */ - -/* Write Registers. The SCC contains fifteen write registers that are - * programmed to configure the operating modes of the channel. With the - * exception of WR0, programming the write registers is a two step operation. - * The first operation is a pointer written to WR0 that points to the - * selected register. The second operation is the actual control word that is - * written into the register to configure the SCC channel - */ - -#define Z18X_SCC_WR0 0x00 /* Register Pointers, various initialization commands */ -#define Z18X_SCC_WR1 0x01 /* Transmit and Receive interrupt enables, WAIT/DMA commands */ -#define Z18X_SCC_WR2 0x02 /* Interrupt Vector */ -#define Z18X_SCC_WR3 0x03 /* Receive parameters and control modes */ -#define Z18X_SCC_WR4 0x04 /* Transmit and Receive modes and parameters */ -#define Z18X_SCC_WR5 0x05 /* Transmit parameters and control modes */ -#define Z18X_SCC_WR6 0x06 /* Sync Character or SDLC address */ -#define Z18X_SCC_WR7 0x07 /* Sync Character or SDLC flag */ -#define Z18X_SCC_WR8 0x08 /* Transmit buffer */ -#define Z18X_SCC_WR9 0x09 /* Master Interrupt control and reset commands */ -#define Z18X_SCC_WR10 0x0a /* Miscellaneous transmit and receive control bits */ -#define Z18X_SCC_WR11 0x0b /* Clock mode controls for receive and transmit */ -#define Z18X_SCC_WR12 0x0c /* Lower byte of baud rate generator */ -#define Z18X_SCC_WR13 0x0d /* Upper byte of baud rate generator */ -#define Z18X_SCC_WR14 0x0e /* Miscellaneous control bits */ -#define Z18X_SCC_WR15 0x0f /* External status interrupt enable control */ - -/* Z180 Register Bit definitions ********************************************/ - -/* ASCI Registers ***********************************************************/ - -/* ASCI Control Register A 0 (CNTLA0: 0x00) */ - -/* ASCI Control Register A 1 (CNTLA1: 0x01) */ - -#define ASCI_CNTRLA_MPE (0x80) /* Bit 7: Multi-Processor Mode Enable */ -#define ASCI_CNTRLA_RE (0x40) /* Bit 6: Receiver Enab */ -#define ASCI_CNTRLA_TE (0x20) /* Bit 5: Transmitter Enable */ -#define ASCI_CNTRLA_RTS0 (0x10) /* Bit 4: Request to Send Channel 0 (ASCI0 only) */ -#define ASCI_CNTRLA_CKA1D (0x10) /* Bit 4: CKA1 Clock Disable (ASCI1 only) */ -#define ASCI_CNTRLA_MPBR (0x08) /* Bit 3: Multiprocessor Bit Receive */ -#define ASCI_CNTRLA_EFR (0x08) /* Bit 3: Error Flag Reset */ -#define ASCI_CNTRLA_MOD2 (0x04) /* Bit 2: 8 bit data */ -#define ASCI_CNTRLA_MOD1 (0x02) /* Bit 1: Parity enabled */ -#define ASCI_CNTRLA_MOD0 (0x01) /* Bit 0: Parity enabled */ - -/* ASCI Control Register B 0 (CNTLB0: 0x02) */ - -/* ASCI Control Register B 1 (CNTLB1: 0x03) */ - -#define ASCI_CNTRLB_MPBT (0x80) /* Bit 7: Multiprocessor Bit Transmit */ -#define ASCI_CNTRLB_MP (0x40) /* Bit 6: Multiprocessor Mode */ -#define ASCI_CNTRLB_CTS (0x20) /* Bit 5: Clear to Send */ -#define ASCI_CNTRLB_PS (0x20) /* Bit 5: Prescale */ -#define ASCI_CNTRLB_PEO (0x10) /* Bit 4: Parity Even Odd */ -#define ASCI_CNTRLB_DR (0x08) /* Bit 3: Divide Ratio */ - -#define ASCI_CNTRLB_SS_SHIFT (0) /* Bits 0-2: Source/Speed Select */ -#define ASCI_CNTRLB_SS_MASK (7 << ASCI_CNTRLB_SS_SHIFT) -# define ASCI_CNTRLB_SS_DIV1 (0 << ASCI_CNTRLB_SS_SHIFT) /* Divide Ratio: 1 */ -# define ASCI_CNTRLB_SS_DIV2 (1 << ASCI_CNTRLB_SS_SHIFT) /* Divide Ratio: 2 */ -# define ASCI_CNTRLB_SS_DIV4 (2 << ASCI_CNTRLB_SS_SHIFT) /* Divide Ratio: 4 */ -# define ASCI_CNTRLB_SS_DIV8 (3 << ASCI_CNTRLB_SS_SHIFT) /* Divide Ratio: 8 */ -# define ASCI_CNTRLB_SS_DIV16 (4 << ASCI_CNTRLB_SS_SHIFT) /* Divide Ratio: 16 */ -# define ASCI_CNTRLB_SS_DIV32 (5 << ASCI_CNTRLB_SS_SHIFT) /* Divide Ratio: 32 */ -# define ASCI_CNTRLB_SS_DIV64 (6 << ASCI_CNTRLB_SS_SHIFT) /* Divide Ratio: 64 */ -# define ASCI_CNTRLB_SS_EXT (7 << ASCI_CNTRLB_SS_SHIFT) /* External clock */ - -/* ASCI Status Register 0 (STAT0: 0x04) */ - -/* ASCI Status Register 1 (STAT1: 0x05) */ - -#define ASCI_STAT_RFRF (0x80) /* Bit 7: Receive Data Register Full */ -#define ASCI_STAT_OVRN (0x40) /* Bit 6: Overrun Error */ -#define ASCI_STAT_PE (0x20) /* Bit 5: Parity Error */ -#define ASCI_STAT_FE (0x10) /* Bit 4: Framing Error */ -#define ASCI_STAT_RIE (0x08) /* Bit 3: Receive Interrupt Enable */ -#define ASCI_STAT_DCD0 (0x04) /* Bit 2: Data Carrier Detect (ASCI0 only) */ -#define ASCI_STAT_CTS1E (0x04) /* Bit 2: Channel 1 CTS Enable (ASCI1 only) */ -#define ASCI_STAT_TDRE (0x02) /* Bit 1: Transmit Data Register Empty */ -#define ASCI_STAT_TIE (0x01) /* Bit 0: Transmit Interrupt Enable */ - -/* ASCI Transmit Data Register Ch. 0 (TDR0: 0x06) - 8-bit data */ - -/* ASCI Transmit Data Register Ch. 1 (TDR1: 0x07) - 8-bit data */ - -/* ASCI Receive Data Register Ch. 0 (RDR0: 0x08) - 8-bit data */ - -/* ASCI Receive Data Register Ch. 1 (RDR0: 0x09) - 8-bit data */ - -/* ASCI0 Extension Control Register (I/O Address: 0x12) - * (Z8S180/L180-Class Processors Only) - */ - -/* ASCI1 Extension Control Register (I/O Address: 0x13) - * (Z8S180/L180-Class Processors Only) - */ - -#ifdef HAVE_Z8S180 /* Z8S180/Z8L180 class processors */ -# define ASCI_ASEXT_RDRF (0x80) /* Bit 7: RDRF Interrupt Inhibit */ -# define ASCI0_ASEXT_DCD0 (0x80) /* Bit 6: DCD0 advisory to SW (ASCI0 only) */ -# define ASCI0_ASEXT_CTS0 (0x80) /* Bit 5: CTS0 advisory to SW (ASCI0 only) */ -# define ASCI_ASEXT_X1BC (0x80) /* Bit 4: CKA0 is bit clock */ -# define ASCI_ASEXT_BRG (0x80) /* Bit 3: Enable 16-bit BRG counter */ -# define ASCI_ASEXT_BRKEN (0x80) /* Bit 2: Break Feature Enable */ -# define ASCI_ASEXT_BRKDET (0x80) /* Bit 1: Break Detect */ -# define ASCI_ASEXT_SNDBRK (0x80) /* Bit 0: Send Break */ -#endif - -/* ASCI0 Time Constant Low Register (I/O Address: 0x1a) - * (Z8S180/L180-Class Processors Only) -- 8-bit data - */ - -/* ASCI0 Time Constant High Register (I/O Address: 0x1b) - * (Z8S180/L180-Class Processors Only) -- 8-bit data - */ - -/* ASCI1 Time Constant Low Register (I/O Address: 0x1c) - * (Z8S180/L180-Class Processors Only) -- 8-bit data - */ - -/* ASCI1 Time Constant High Register (I/O Address: 0x1d) - * (Z8S180/L180-Class Processors Only) -- 8-bit data - */ - -/* CSI/O Registers **********************************************************/ - -/* CSI/O Control/Status Register (CNTR: 0x0a) */ - -#define CSIO_CNTR_EF (0x80) /* Bit 7: End Flag */ -#define CSIO_CNTR_EIE (0x40) /* Bit 6: End Interrupt Enable */ -#define CSIO_CNTR_RE (0x20) /* Bit 5: Receive Enable */ -#define CSIO_CNTR_TE (0x10) /* Bit 4: Transmit Enable */ -#define CSIO_CNTR_SS_SHIFT (0) /* Bits 0-2: Speed Select */ -#define CSIO_CNTR_SS_MASK (7 << CSIO_CNTR_SS_SHIFT) -# define CSIO_CNTR_DIV20 (0 << CSIO_CNTR_SS_SHIFT) /* Divide Ratio: 20 Baud: 200000 */ -# define CSIO_CNTR_DIV40 (1 << CSIO_CNTR_SS_SHIFT) /* Divide Ratio: 40 Baud: 100000 */ -# define CSIO_CNTR_DIV80 (2 << CSIO_CNTR_SS_SHIFT) /* Divide Ratio: 80 Baud: 50000 */ -# define CSIO_CNTR_DIV160 (3 << CSIO_CNTR_SS_SHIFT) /* Divide Ratio: 160 Baud: 25000 */ -# define CSIO_CNTR_DIV320 (4 << CSIO_CNTR_SS_SHIFT) /* Divide Ratio: 320 Baud: 12500 */ -# define CSIO_CNTR_DIV640 (5 << CSIO_CNTR_SS_SHIFT) /* Divide Ratio: 640 Baud: 6250 */ -# define CSIO_CNTR_DIV1280 (6 << CSIO_CNTR_SS_SHIFT) /* Divide Ratio: 1280 Baud: 3125 */ -# define CSIO_CNTR_EXT (7 << CSIO_CNTR_SS_SHIFT) /* External Clock input (less than 20) */ - /* Baud at Phi = 4 MHz */ - -/* CSI/O Transmit/Receive Register (TRDR: 0x0b) -- 8-bit data */ - -/* Timer Registers **********************************************************/ - -/* Timer Data Register 0L (TMDR0L: 0x0c) -- 8-bit data */ - -/* Timer Data Register 0H (TMDR0H: 0x0d) -- 8-bit data */ - -/* Timer Reload Register Channel 0L (RLDR0L: 0x0e) -- 8-bit data */ - -/* Timer Reload Register Channel 0H (RLDR0H: 0x0f) -- 8-bit data */ - -/* Programmable Reload Timer (PTR) Control Register (TCR: 0x10) */ - -#define PRT_TCR_TIF1 (0x80) /* Bit 7: Timer 1 Interrupt Flag */ -#define PRT_TCR_TIF0 (0x40) /* Bit 6: Timer 0 Interrupt Flag */ -#define PRT_TCR_TIE1 (0x20) /* Bit 5: Timer 1 Interrupt Enable */ -#define PRT_TCR_TIE0 (0x10) /* Bit 4: Timer 0 Interrupt Enable */ -#define PRT_TCR_TOC1 (0x08) /* Bit 3: Timer 1 Output Control */ -#define PRT_TCR_TOC0 (0x04) /* Bit 2: Timer 0 Output Control */ -#define PRT_TCR_TDE1 (0x02) /* Bit 1: Timer 1 Down Count Enable */ -#define PRT_TCR_TDE0 (0x01) /* Bit 0: Timer 0 Down Count Enable */ - -/* Timer Data Register 1L (TMDR1L: 0x14) -- 8-bit data */ - -/* Timer Data Register 1H (TMDR1H: 0x15) -- 8-bit data */ - -/* Timer Reload Register Channel 1L (RLDR1L: 0x16) -- 8-bit data */ - -/* Timer Reload Register Channel 1H (RLDR1H: 0x17) -- 8-bit data */ - -/* Free Running counter (FRC: 0x18) -- 8-bit data */ - -/* DMA Registers ************************************************************/ - -/* DMA Destination Address Register Channel 0 - * (DAR0 I/O Address 0x23 to 0x25) -- 8-bit data - */ - -/* DMA Byte Count Register Channel 0 - * (BCR0 I/O Address = 0x26 to 0x27) -- 8-bit data - */ - -/* DMA Memory Address Register Channel 1 - * (MAR1: I/O Address = 0x28 to 0x2a) -- 8-bit data - */ - -/* DMA I/O Address Register Channel 1 - * (IAR1: I/O Address = 0x2b to 0x2c) -- 8-bit data - */ - -/* DMA I/O Address Register Ch. 1 - * (IAR1B: 0x2d) (Z8S180/L180-Class Processor Only) - */ - -#ifdef HAVE_Z8S180 /* Z8S180/Z8L180 class processors */ -# define IAR1B_ALTCH (0x80) /* Bit 7: Alternating Channels */ -# define IAR1B_CURRCH (0x40) /* Bit 6: Currently selected DMA channel */ -# define IAR1B_TOUT (0x08) /* Bit 3: TOUT/DREQ is TOUT Out */ -# define IAR1B_IO_SHIFT (0) /* Bits 0-2: I/O selection*/ -# define IAR1B_IO_MASK (3 << IAR1B_IO_SHIFT) -# define IAR1B_IO_TOUT (0 << IAR1B_IO_SHIFT) /* DMA1 ext TOUT */ -# define IAR1B_IO_DREQ (0 << IAR1B_IO_SHIFT) /* DMA1 ext DREQ */ -# define IAR1B_IO_ASCI0 (1 << IAR1B_IO_SHIFT) /* DMA1 ASCI0 */ -# define IAR1B_IO_ASCI1 (2 << IAR1B_IO_SHIFT) /* DMA1 ASCI1 */ -# define IAR1B_IO_ESCC (3 << IAR1B_IO_SHIFT) /* DMA1 ESCC */ -# define IAR1B_IO_PIA (7 << IAR1B_IO_SHIFT) /* DMA1 PIA27-20 (P1284) */ -#endif - -/* DMA Byte Count Register Channel 1 - * (BCR1: I/O Address = 0x2e to 0x2f) -- 8-bit data - */ - -/* DMA Status Register (DSTAT: 0x30) */ - -#define DSTAT_DE1 (0x80) /* Bit 7: Enable Channel 1 */ -#define DSTAT_DE0 (0x40) /* Bit 6: Enable Channel 0 */ -#define DSTAT_DWE1 (0x20) /* Bit 5: Bit Write Enable 1 */ -#define DSTAT_DWE0 (0x10) /* Bit 4: Bit Write Enable 0 */ -#define DSTAT_DIE1 (0x08) /* Bit 3: DMA Interrupt Enable Channel 1 */ -#define DSTAT_DIE0 (0x04) /* Bit 2: DMA Interrupt Enable Channel 0 */ -#define DSTAT_DME (0x01) /* Bit 0: DMA Main Enable */ - -/* DMA Mode Register (DMODE: 0x31) */ - -#define DMODE_DM_SHIFT (4) /* Bits 4-5: Destination Mode Channel 0 */ -#define DMODE_DM_MASK (3 << DMODE_DM_SHIFT) -# define DMODE_DM_MEMINCR (0 << DMODE_DM_SHIFT) /* Memory with address increment */ -# define DMODE_DM_MEMDECR (1 << DMODE_DM_SHIFT) /* Memory with address decrement */ -# define DMODE_DM_MEM (2 << DMODE_DM_SHIFT) /* Memory with fixed address */ -# define DMODE_DM_IO (3 << DMODE_DM_SHIFT) /* I/O */ - -#define DMODE_SM_SHIFT (2) /* Bits 2-3: Source Mode Channel */ -#define DMODE_SM_MASK (3 << DMODE_SM_SHIFT) -# define DMODE_SM_MEMINCR (0 << DMODE_SM_SHIFT) /* Memory with address increment */ -# define DMODE_SM_MEMDECR (1 << DMODE_SM_SHIFT) /* Memory with address decrement */ -# define DMODE_SM_MEM (2 << DMODE_SM_SHIFT) /* Memory with fixed address */ -# define DMODE_SM_IO (3 << DMODE_SM_SHIFT) /* I/O */ - -#define DMODE_MMODE (0x01) /* Bit 0: DMA Memory Mode Channel 0 */ - -/* DMA/WAIT Control Register (DCNTL: 0x32) */ - -#define DCNTL_MWI_SHIFT (6) /* Bits 6-7: Memory Wait Insertion */ -#define DCNTL_MWI_MASK (3 << DCNTL_MWI_SHIFT) -#define DCNTL_IWI_SHIFT (4) /* Bits 4-5: Wait Insertion */ -#define DCNTL_IWI_MASK (3 << DCNTL_IWI_SHIFT) -#define DCNTL_DMS_SHIFT (4) /* Bits 2-3: DMA Request Sense */ -#define DCNTL_DMS_MASK (3 << DCNTL_DMS_SHIFT) -# define DCNTL_DMS_DREQ0 (1 << DCNTL_DMS_SHIFT) -# define DCNTL_DMS_DREQ1 (2 << DCNTL_DMS_SHIFT) -#define DCNTL_DIM_SHIFT (0) /* Bits 0-1: DMA Channel 1 I/O and Memory Mode */ -#define DCNTL_DIM_MASK (3 << DCNTL_DIM_SHIFT) -# define DCNTL_DIM_M2IOI (0 << DCNTL_DIM_SHIFT) /* Memory to I/O, increment MARI */ -# define DCNTL_DIM_M2IOD (1 << DCNTL_DIM_SHIFT) /* Memory to I/O, decrement MARI */ -# define DCNTL_DIM_IO2MI (2 << DCNTL_DIM_SHIFT) /* I/O to memory, increment MARI */ -# define DCNTL_DIM_IO2MD (3 << DCNTL_DIM_SHIFT) /* I/O to memory, decrement MARI */ - -/* System Control Registers *************************************************/ - -/* Clock Multiplier Register (CMR: 0x1e) - * (Z8S180/L180-Class Processors Only) - */ - -#ifdef HAVE_Z8S180 /* Z8S180/Z8L180 class processors */ -# define CMR_CMM (0x80) /* Bit 7: X2 Clock Multiplier Mode */ -#endif - -/* CPU Control Register (CCR: 0x1f) (Z8S180/L180-Class Processors Only) */ - -#ifdef HAVE_Z8S180 /* Z8S180/Z8L180 class processors */ -# define CCR_XTAL_DIV (0x80) /* Bit 7: Clock Divide */ -# define CCR_STBYIDLE (0x48) /* Bits 3 & 6: STANDBY/IDLE mode */ -# define CCR_NOSTDBY (0x00) /* No STANDBY */ -# define CCR_IDLE (0x08) /* IDLE after SLEEP */ -# define CCR_STBY (0x40) /* STANDBY after SLEEP */ -# define CCR_STBY64 (0x48) /* STANDBY after SLEEP 64 Cycle Exit */ -# define CCR_BREXT (0x20) /* Bit 5: STANDBY/IDLE exit on BUSREQ */ -# define CCR_LNPHI (0x10) /* Bit 4: 33% Drive on EXTPHI Clock */ -# define CCR_LNIO (0x04) /* Bit 2: 33% Drive on certain external I/O */ -# define CCR_LNCPUCTLR (0x02) /* Bit 1: 33% Drive on CPU control signals */ -# define LNADDATA (0x01) /* Bit 0: 33% drive on A10-A0, D7-D0 */ -#endif - -/* Interrupt Vector Low Register (IL: 0x33) */ - -#define IL_SHIFT (5) /* Bits 5-7: 3-bits of vector interrupt table address */ -#define IL_MASK (7 << IL_SHIFT) - -/* INT/TRAP Control Register (ITC: 0x34) */ - -#define ITC_TRAP (0x80) /* Bit 7: Undefined opcode fetch */ -#define ITC_UFO (0x40) /* Bit 6: Undefined fetch object */ -#define ITC_ITE_SHIFT (0) /* Bits 0-2: Interrupt enable bits */ -#define ITC_ITE_MASK (7 << ITC_ITE_SHIFT) -# define ITC_ITE0 (1 << ITC_ITE_SHIFT) -# define ITC_ITE1 (2 << ITC_ITE_SHIFT) -# define ITC_ITE2 (4 << ITC_ITE_SHIFT) - -/* Refresh Control Register (RCR: 0x36) */ - -#define RCR_REFE (0x80) /* Bit 7: Refresh Enable */ -#define RCR_REFW (0x40) /* Bit 6: Refresh Wait */ -#define RCR_CYC_SHIFT (0) /* Bits 0-1: Cycle Interval */ -#define RCR_CYC_MASK (3 << RCR_CYC_SHIFT) -# define RCR_CYC0 (1 << RCR_CYC_SHIFT) -# define RCR_CYC1 (2 << RCR_CYC_SHIFT) - -/* MMU Common Base Register (CBR: 0x38) - * - 8-bit base address of Common Area 1 - */ - -/* MMU Bank Base Register (BBR: 0x39) - 8-bit address of Bank area */ - -/* MMU Common/Bank Area Register (CBAR: 0x3a) */ - -#define CBAR_CA_SHIFT (4) /* Bits 4-7: Low address for Common Area 1 */ -#define CBAR_CA_MASK (15 << CBAR_CA_SHIFT) -#define CBAR_BA_SHIFT (0) /* Bits 0-3: Low address for Bank Area */ -#define CBAR_BA_MASK (15 << CBAR_BA_SHIFT) - -/* Operation Mode Control Register (OMCR: 0x3e) */ - -#define OMCR_M1E (0x80) /* Bit 7: M1 Enable */ -#define OMCR_M1TE (0x40) /* Bit 6: M1 Temporary Enable */ -#define OMCR_IOC (0x20) /* Bit 5: Controls the timing of the IORQ and RD signals */ - -/* I/O Control Register (ICR: 0x3f) */ - -#define ICR_IOA_SHIFT (6) /* Bits 6-7: Internal I/O address bits */ -#define ICR_IOA_MASK (3 << ICR_IOA_SHIFT) -# define ICR_IOA6 (1 << ICR_IOA_SHIFT) -# define ICR_IOA7 (2 << ICR_IOA_SHIFT) -#define ICR_IOSTP (0x20) /* Bit 5: Enable I/O stop mode */ - -/* Registers unique to Z8x181 class CPUs ************************************/ - -#ifdef HAVE_Z8X181 -/* PIA Registers */ - -/* PIAn Data Direction and Data Registers */ - -# define PIA(n) (1 << (n)) - -/* CTC Registers */ - -/* CTC Channel Control/Vector Registers */ - -/* Control Bit Definitions */ - -# define CTC_IE (0x80) /* Bit 7: Interrupt Enable */ -# define CTC_MODE (0x40) /* Bit 6: Mode bit */ -# define CTC_PF (0x20) /* Bit 5: Pre-scaler factor */ -# define CTC_CTES (0x10) /* Bit 4: Clock/Trigger Edge Selector */ -# define CTC_TT (0x08) /* Bit 3: Timer Trigger */ -# define CTC_TC (0x04) /* Bit 2: Time Constant */ -# define CTC_SR (0x02) /* Bit 1: Software Reset */ - -/* Vector Bit Definitions */ - -# define CTC_CHAN_SHIFT (1) /* Bits 1-2: Channel Identifier */ -# define CTC_CHAN_MASK (3 << CTC_CHAN_SHIFT) -# define CTC_VECT_SHIFT (3) /* Bits 3-7: Vector word */ -# define CTC_VECT_MASK (31 << CTC_VECT_SHIFT) - -# define CTC_CNTRL (0x01) /* Bit 0: 0=Vector 1=Control */ - -/* SCC Registers -- See interface description below */ - -/* System Control Registers */ - -/* RAM Upper Boundary Address Register -- 8-bit address (A12-A19) */ - -/* RAM Lower Boundary Address Register -- 8-bit address (A12-A19) */ - -/* ROM Address Boundary Register -- 8-bit address (A12-A19) */ - -/* System Configuration Register */ - -#define SCR_DCCONFIG (0x40) /* Bit 6: Daisy Chain Configuration */ -#define SCR_ROMCSDIS (0x20) /* Bit 5: Disable /ROMCS */ -#define SCR_REME (0x04) /* Bit 2: ROM Emulator Mode */ -#define SCR_PIA1_CTIO (0x01) /* Bit 0: PIA1 Functions as I/O port or CTC's I/O Pins */ - -#endif - -/* Registers unique to Z8x182 class CPUs ************************************/ - -#ifdef HAVE_Z8X182 -/* PIA Registers */ - -/* Pn Data Direction and Data Register */ - -# define PIA(n) (1 << (n)) - -/* ESCC Registers -- See interface description below */ - -/* System Control Registers */ - -# define SCR_PCSEL (0x80) /* Bit 7: Port C Select */ -# define SCR_PB57SEL (0x40) /* Bit 6: Port PB7-PB5 Selec */ -# define SCR_PB04SEL (0x20) /* Bit 5: Port PB4-PB0 Select */ -# define SCR_DOUT (0x10) /* Bit 4: Data Out */ -# define SCR_ROMDIS (0x08) /* Bit 3: Disable ROMs */ -# define SCR_TRIMUX (0x04) /* Bit 2: Tri-Muxed Pins */ -# define SCR_MIMIC (0x02) /* Bit 1: ESCC/MIMIC */ -# define SCR_DC (0x01) /* Bit 0: Daisy Chain */ - -/* 16550 MIMIC Registers */ - -/* To be provided */ - -#endif - -/* [E]SCC Internal Register Definitions *************************************/ - -/* Read Registers */ - -/* RR0: Transmit and Receive buffer status and external status */ - -#define RR0_BA (0x80) /* Bit 7: Break/abort */ -#define RR0_TXUEOM (0x40) /* Bit 6: Tx Underrun/EOM */ -#define RR0_CTS (0x20) /* Bit 5: CTS */ -#define RR0_SH (0x10) /* Bit 4: Sync/Hunt */ -#define RR0_DCD (0x08) /* Bit 3: DCD */ -#define RR0_TXBE (0x04) /* Bit 2: Tx Buffer Empty */ -#define RR0_ZC (0x02) /* Bit 1: Zero Count */ -#define RR0_RXA (0x01) /* Bit 0: Rx Character Available */ - -/* RR1: Special Receive Condition status */ - -#define RR0_EOF (0x80) /* Bit 7: End of Frame (SDLC)*/ -#define RR0_CRCFE (0x40) /* Bit 6: CRC/Framing Error */ -#define RR0_RXOE (0x20) /* Bit 5: Rx Overrun Error */ -#define RR0_PE (0x10) /* Bit 4: Parity Error */ -#define RR0_RES0 (0x08) /* Bit 3: Residue Code 0 */ -#define RR0_RES1 (0x04) /* Bit 2: Residue Code 1 */ -#define RR0_RES2 (0x02) /* Bit 1: Residue Code 2 */ -#define RR0_ALL (0x01) /* Bit 0: All Sent */ - -/* RR2: Interrupt vector (modified if VIS Bit in WR9 is set) - * -- 8-bit vector value - */ - -/* RR3: Interrupt pending bits */ - -#define RR3_RX (0x20) /* Bit 5: Rx IP */ -#define RR3_TX (0x10) /* Bit 4: Tx IP */ -#define RR3_EXT (0x08) /* Bit 3: Ext/Status IP */ - -/* RR6: SDLC FIFO byte counter lower byte (only when enabled) -- - * 8-bit counter value - */ - -/* RR7: SDLC FIFO byte count and status (only when enabled) */ - -#define RR7_BC_SHIFT (0) /* Bits 0-5 : Upper 6-bits of counter */ -#define RR7_BC_MASK (0x3f << RR7_BC_SHIFT) -#define RR7_FDA (0x40) /* Bit 6: FIFO Available Status */ -#define RR7_FOS (0x80) /* Bit 7: FIFO Overflow Status */ - -/* RR8: Receive buffer */ - -/* RR10: Miscellaneous status bits */ - -#define RR10_1MISS (0x80) /* Bit 7: One Clock Missing */ -#define RR10_2MISS (0x40) /* Bit 6: Two Clocks Missing */ -#define RR10_SEND (0x10) /* Bit 4: Loop Sending */ -#define RR10_ON (0x02) /* Bit 1: On Loop */ - -/* RR12: Lower byte of baud rate generator time constant -- - * 8-bit time constant value - */ - -/* RR13: Upper byte of baud rate generator time constant -- - * 8-bit time constant value - */ - -/* RR15: External Status interrupt information */ - -#define RR15_BAIE (0x80) /* Bit 7: Break/Abort IE */ -#define RR15_TXUEOMIE (0x40) /* Bit 6: Tx Underrun/EOM IE */ -#define RR15_CTSIE (0x20) /* Bit 5: CTS IE */ -#define RR15_SHIE (0x10) /* Bit 4: Sync/Hunt IE */ -#define RR15_DCDIE (0x08) /* Bit 3: DCD IE */ -#ifdef HAVE_Z8X182 /* ESCC only */ -# define RR15_SDLCIE (0x04) /* Bit 2: SDLC Status FIFO Enable */ -#endif -#define RR15_ZCIE (0x02) /* Bit 1: Zero Count IE */ - -/* Write Registers */ - -/* WR0: Register Pointers, various initialization commands */ - -#define WR0_CMD1_SHIFT (6) /* Bits 6-7: Command */ -#define WR0_CMD1_MASK (3 << WR0_CMD1_SHIFT); -# define WR0_CMD1_NULL (0 << WR0_CMD1_SHIFT); /* Null Code */ -# define WR0_CMD1_RXCRCRST (1 << WR0_CMD1_SHIFT); /* Reset Rx CRC Checker */ -# define WR0_CMD1_TXCRCRST (2 << WR0_CMD1_SHIFT); /* Reset Tx CRC Generator */ -# define WR0_CMD1_TXURRST (3 << WR0_CMD1_SHIFT); /* Reset Tx Underrun/EOM Latch */ - -#define WR0_CMD2_SHIFT (3) /* Bits 3-5: Command */ -#define WR0_CMD2_MASK (3 << WR0_CMD2_SHIFT); -# define WR0_CMD2_NULL (0 << WR0_CMD2_SHIFT); /* Null Code */ -# define WR0_CMD2_HP (1 << WR0_CMD2_SHIFT); /* Point High */ -# define WR0_CMD2_EXTRST (2 << WR0_CMD2_SHIFT); /* Reset Ext/Status Interrupts */ -# define WR0_CMD2_ABORT (3 << WR0_CMD2_SHIFT); /* Send Abort (SDLC) */ -# define WR0_CMD2_ENRX (4 << WR0_CMD2_SHIFT); /* Enable Int on Next Rx Character */ -# define WR0_CMD2_TXPRST (5 << WR0_CMD2_SHIFT); /* Reset Tx Int Pending */ -# define WR0_CMD2_ERRRST (6 << WR0_CMD2_SHIFT); /* Error Reset */ -# define WR0_CMD2_IUSRST (7 << WR0_CMD2_SHIFT); /* Reset Highest IUS */ - -#define WR0_REG_SHIFT (0) /* Bits 0-2 : Register address */ -#define WR0_REG_MASK (7 << WR0_REG_SHIFT); - -/* WR1: Transmit and Receive interrupt enables, WAIT/DMA commands */ - -#define WR1_WDMAEN (0x80) /* Bit 7: WAIT/DMA Request Enable */ -#define WR1_WDMAFN (0x40) /* Bit : /WAIT/DMA Request Function */ -#define WR1_WDMAXFR (0x20) /* Bit : WAIT/DMA Request On Receive//Transmit */ -#define WR1_CMD_SHIFT (3) /* Bits 3-4: Command */ -#define WR1_CMD_MASK (3 << WR1_CMD_SHIFT) -# define WR1_CMD_RXDIS (0 << WR1_CMD_SHIFT) /* Rx Int Disable */ -# define WR1_CMD_RXINT1ST (1 << WR1_CMD_SHIFT) /* Rx Int On First Character or Special Condition */ -# define WR1_CMD_RXINTALL (2 << WR1_CMD_SHIFT) /* Int On All Rx Characters or Special Condition */ -# define WR1_CMD_RXINTSPEC (3 << WR1_CMD_SHIFT) /* Rx Int On Special Condition Only */ - -#define WR1_PSPEC (0x04) /* Bit 2: Parity is Special Condition */ -#define WR1_TXIE (0x02) /* Bit 1: Tx Int Enable */ -#define WR1_EXTIE (0x01) /* Bit 0: Ext Int Enable */ - -/* WR2: Interrupt Vector -- 8-bit interrupt vector */ - -/* WR3: Receive parameters and control modes */ - -#define WR3_BPC_SHIFT (6) /* Bit 6-7: Bits/character */ -#define WR3_BPC_MASK (3 << WR3_BPC_SHIFT) -# define WR3_BPC_5 (0 << WR3_BPC_SHIFT) /* Rx 5 Bits/Character */ -# define WR3_BPC_7 (1 << WR3_BPC_SHIFT) /* Rx 7 Bits/Character */ -# define WR3_BPC_6 (2 << WR3_BPC_SHIFT) /* Rx 6 Bits/Character */ -# define WR3_BPC_8 (3 << WR3_BPC_SHIFT) /* Rx 8 Bits/Character */ - -#define WR3_AE (0x20) /* Bit 5: Auto Enables */ -#define WR3_EHM (0x10) /* Bit 4: Enter Hunt Mode */ -#define WR3_RXCRCEN (0x08) /* Bit 3: Rx CRC Enable */ -#define WR3_ASM (0x04) /* Bit 2: Address Search Mode (SDLC) */ -#define WR3_SCLI (0x02) /* Bit 1: Sync Character Load Inhibit */ -#define WR3_RXEN (0x01) /* Bit 0: Rx Enable */ - -/* WR4: Transmit and Receive modes and parameters */ - -#define WR4_CM_SHIFT (6) /* Bits 6-7: X1 Clock Mode */ -#define WR4_CM_MASK (3 << WR4_CM_SHIFT) -# define WR4_CM_X1 (0 << WR4_CM_SHIFT) /* X1 Clock Mode */ -# define WR4_CM_X16 (1 << WR4_CM_SHIFT) /* X16 Clock Mode */ -# define WR4_CM_X32 (2 << WR4_CM_SHIFT) /* X32 Clock Mode */ -# define WR4_CM_X64 (3 << WR4_CM_SHIFT) /* X64 Clock Mode */ - -#define WR4_SM_SHIFT (4) /* Bits 4-5: Sync mode */ -#define WR4_SM_MASK (3 << WR4_SM_SHIFT) -# define WR4_SM_8BIT (0 << WR4_SM_SHIFT) /* 8-Bit Sync Character */ -# define WR4_SM_16BIT (1 << WR4_SM_SHIFT) /* 16-Bit Sync Character */ -# define WR4_SM_SDLC (2 << WR4_SM_SHIFT) /* SDLC Mode (01111110 Flag) */ -# define WR4_SM_EXT (3 << WR4_SM_SHIFT) /* External Sync Mode */ - -#define WR4_SB_SHIFT (2) /* Bits 2-3: Sync mode enables */ -#define WR4_SB_MASK (3 << WR4_SB_SHIFT) -# define WR4_SB_SME (0 << WR4_SB_SHIFT) /* Sync Modes Enable */ -# define WR4_SB_STOP1 (1 << WR4_SB_SHIFT) /* 1 Stop Bit/Character */ -# define WR4_SB_STOP1p5 (2 << WR4_SB_SHIFT) /* 1 1/2 Stop Bits/Character */ -# define WR4_SB_STOP2 (3 << WR4_SB_SHIFT) /* 2 Stop Bits/Character */ - -#define WR4_PEO (0x02) /* Bit 1: Parity EVEN//ODD */ -#define WR4_PEN (0x01) /* Bit : Parity Enable */ - -/* WR5: Transmit parameters and control modes */ - -#define WR5_DTR (0x80) /* Bit 7: DTR */ -#define WR5_TXBITS_SHIFT (5) /* Bits 5-6: Number of Tx bits */ -#define WR5_TXBITS_MASK (3 << WR5_TXBITS_SHIFT) -# define WR5_TXBITS_5 (0 << WR5_TXBITS_SHIFT) /* Tx 5 Bits(Or Less)/Character */ -# define WR5_TXBITS_7 (1 << WR5_TXBITS_SHIFT) /* Tx 7 Bits/Character */ -# define WR5_TXBITS_6 (2 << WR5_TXBITS_SHIFT) /* Tx 6 Bits/Character */ -# define WR5_TXBITS_8 (3 << WR5_TXBITS_SHIFT) /* Tx 8 Bits/Character */ - -#define WR5_SENDBRK (0x10) /* Bit 4: Send Break */ -#define WR5_TXEN (0x08) /* Bit 3: Tx Enable */ -#define WR5_CRC16 (0x04) /* Bit 2: /SDLC/CRC-16 */ -#define WR5_RTS (0x02) /* Bit 1: RTS */ -#define WR5_TXCRCEN (0x01) /* Bit 0: Tx CRC Enable */ - -/* WR6: Sync Character or SDLC address -- - * 8-bit Monosync, Bisync, or SDLC value - */ - -/* WR7: Sync Character or SDLC flag -- - * 8-bit Monosync, Bisync, or SDLC value - */ - -#define WR7_SDLC_SYNC (0x7e) - -#ifdef HAVE_Z8X182 /* ESCC only */ -# define WR7P_CRC32EN (0x80) /* Bit 7: 32-bit CRC Enable */ -# define WR7P_EXTRDEN (0x40) /* Bit 6: Extended Read Enable */ -# define WR7P_TXFLVL (0x20) /* Bit 5: Tx FIFO Int Level */ -# define WR7P_TMODE (0x10) /* Bit 4: DTR/REQ Timing Mode */ -# define WR7P_RXFLVL (0x08) /* Bit 3: Rx FIFO Int Level */ -# define WR7P_AUTORTS (0x04) /* Bit 2: Auto RTS Deactivation */ -# define WR7P_AUTOEOM (0x02) /* Bit 1: Auto EOM Reset */ -# define WR7P_AUTOTX (0x01) /* Bit 0: Auto Tx Flag */ -#endif - -/* WR8: Transmit buffer */ - -/* WR9: Master Interrupt control and reset commands */ - -#define WR9_RST_SHIFT (6) /* Bits 6-7: Resets */ -#define WR9_RST_MASK (3 << WR9_RST_SHIFT) -# define WR9_RST_NONE (0 << WR9_RST_SHIFT) /* No Reset */ -# define WR9_RST_CHAN (2 << WR9_RST_SHIFT) /* Channel Reset */ -# define WR9_RST_HWRST (3 << WR9_RST_SHIFT) /* Force Hardware Reset */ - -#ifdef HAVE_Z8X182 /* ESCC only */ -# define WR9_INTACKEN (0x20) /* Bit 5: Software INTACK Enable */ -#endif -#define WR9_SHL (0x10) /* Bit 4: Status High//Status Low */ -#define WR9_MIE (0x08) /* Bit 3: MIE */ -#define WR9_DLC (0x04) /* Bit 2: DLC */ -#define WR9_NV (0x02) /* Bit 1: NV */ -#define WR9_VIS (0x01) /* Bit 0: VIS */ - -/* WR10: Miscellaneous transmit and receive control bits */ - -#define WR10_CRCPRE (0x80) /* Bit 7: CRC Preset I/O */ -#define WR10_NRZFM_SHIFT (5) /* Bits 5-6: NRZ/FM */ -#define WR10_NRZFM_MASK (3 << WR10_NRZFM_SHIFT) -# define WR10_NRZ (0 << WR10_NRZFM_SHIFT) /* NRZ */ -# define WR10_NRZI (1 << WR10_NRZFM_SHIFT) /* NRZI */ -# define WR10_FM1 (2 << WR10_NRZFM_SHIFT) /* FM1 (Transition = 1) */ -# define WR10_FM0 (3 << WR10_NRZFM_SHIFT) /* FM0 (Transition = 0) */ - -#define WR10_ACTPOLL (0x10) /* Bit 4: Go Active On Poll */ -#define WR10_IDLE (0x08) /* Bit 3: Mark/Flag Idle */ -#define WR10_URABORT (0x04) /* Bit 2: Abort/Flag On Underrun */ -#define WR10_LOOP (0x02) /* Bit 1: Loop Mode */ -#define WR10_68SYNC (0x01) /* Bit 0: 6-Bit//8-Bit Sync */ - -/* WR11: Clock mode controls for receive and transmit */ - -#define WR11_XTAL (0x80) /* Bit 7: /RTxC Xtal//No Xtal */ -#define WR11_RCLK_SHIFT (5) /* Bits 5-6: Receive Clock */ -#define WR11_RCLK_MASK (3 << WR11_RCLK_SHIFT) -# define WR11_RCLK_RTXC (0 << WR11_RCLK_SHIFT) /* Receive Clock = /RTxC Pin */ -# define WR11_RCLK_TRXC (1 << WR11_RCLK_SHIFT) /* Receive Clock = /TRxC Pin */ -# define WR11_RCLK_BRG (2 << WR11_RCLK_SHIFT) /* Receive Clock = BR Generator Output */ -# define WR11_RCLK_DPLL (3 << WR11_RCLK_SHIFT) /* Receive Clock = DPLL Output */ - -#define WR11_TCLK_SHIFT (3) /* Bits 3-4: Transmit Clock */ -#define WR11_TCLK_MASK (3 << WR11_TCLK_SHIFT) -# define WR11_TCLK_RTXC (0 << WR11_TCLK_SHIFT) /* Transmit Clock = /RTxC Pin */ -# define WR11_TCLK_TRXC (1 << WR11_TCLK_SHIFT) /* Transmit Clock = /TRxC Pin */ -# define WR11_TCLK_BRG (2 << WR11_TCLK_SHIFT) /* Transmit Clock = BR Generator Output */ -# define WR11_TCLK_DPLL (3 << WR11_TCLK_SHIFT) /* Transmit Clock = DPLL Output */ - -#define WR11_TRXCIO (0x04) /* Bit 2: /TRxC O/I */ -#define WR11_TRXCO_SHIFT (0) /* Bits 0-1 : /TRxC Out */ -#define WR11_TRXO_MASK (3 << WR11_TRXCO_SHIFT) -# define WR11_TRXO_XTAL (0 << WR11_TRXCO_SHIFT) /* /TRxC Out = Xtal Output */ -# define WR11_TRXO_TCLK (1 << WR11_TRXCO_SHIFT) /* /TRxC Out = Transmit Clock */ -# define WR11_TRXO_BRG (2 << WR11_TRXCO_SHIFT) /* /TRxC Out = BR Generator Output */ -# define WR11_TRXO_DPLL (3 << WR11_TRXCO_SHIFT) /* /TRxC Out = DPLL Output */ - -/* WR12: Lower byte of baud rate generator -- 8-bit time constant value */ - -/* WR13: Upper byte of baud rate generator -- 8-bit time constant value */ - -/* WR14: Miscellaneous control bits */ - -#define WR14_CMD_SHIFT (5) /* Bits 5-7: Command */ -#define WR14_CMD_MASK (7 << WR14_CMD_SHIFT) -# define WR14_CMD_NULL (0 << WR14_CMD_SHIFT) /* Null Command */ -# define WR14_CMD_ESM (1 << WR14_CMD_SHIFT) /* Enter Search Mode */ -# define WR14_CMD_RMCLK (2 << WR14_CMD_SHIFT) /* Reset Missing Clock */ -# define WR14_CMD_DPLLDIS (3 << WR14_CMD_SHIFT) /* Disable DPLL */ -# define WR14_CMD_SRCBRG (4 << WR14_CMD_SHIFT) /* Set Source = BR Generator */ -# define WR14_CMD_SRCRTXC (5 << WR14_CMD_SHIFT) /* Set Source = /RTxC */ -# define WR14_CMD_FM (6 << WR14_CMD_SHIFT) /* Set FM Mode */ -# define WR14_CMD_NRZI (7 << WR14_CMD_SHIFT) /* Set NRZI Mode */ - -#define WR14_LPBK (0x10) /* Bit 4: Local Loopback */ -#define WR14_AUTOECHO (0x08) /* Bit 3: Auto Echo */ -#define WR14_DTRREQ (0x04) /* Bit 2: /DTR/Request Function */ -#define WR14_BRGSRC (0x02) /* Bit 1: BR Generator Source */ -#define WR14_BRGEN (0x01) /* Bit 0: BR Generator Enable */ - -/* WR15: External status interrupt enable control */ - -#define WR15_BAIE (0x80) /* Bit 7: Break/Abort IE */ -#define WR15_TXUEOMIE (0x40) /* Bit 6: Tx Underrun/EOM IE */ -#define WR15_CTSIS (0x20) /* Bit 5: CTS IE */ -#define WR15_SHIE (0x10) /* Bit 4: Sync/Hunt IE */ -#define WR15_DCDIE (0x08) /* Bit 3: DCD IE */ -#define WR15_FIFOEN (0x04) /* Bit 2: SDLC FIFO Enable */ -#define WR15_ZCIE (0x02) /* Bit 1: Zero Count IE */ -#ifdef HAVE_Z8X182 /* ESCC only */ -# define WR15_WR7PEN (0x01) /* Bit 0: WR7' SDLC Feature Enable */ -#endif - -#endif /* __ARCH_Z80_SRC_Z180_Z180_IOMAP_H */ diff --git a/arch/z80/src/z180/z180_irq.c b/arch/z80/src/z180/z180_irq.c deleted file mode 100644 index c80a196cbb..0000000000 --- a/arch/z80/src/z180/z180_irq.c +++ /dev/null @@ -1,175 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z180/z180_irq.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include -#include - -#include - -#include "switch.h" -#include "z180_iomap.h" -#include "z80_internal.h" - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/* This holds the value of the MMU's CBR register. This value is set to the - * interrupted tasks's CBR on interrupt entry, changed to the new task's CBR - * if an interrupt level context switch occurs, and restored on interrupt - * exit. In this way, the CBR is always correct on interrupt exit. - */ - -uint8_t current_cbr; - -/* The interrupt vector table is exported by z180_vectors.asm or - * z180_romvectors.asm with the name up_vectors: - */ - -extern uintptr_t up_vectors[16]; - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: z180_seti - * - * Description: - * Input byte from port p - * - ****************************************************************************/ - -static void z180_seti(uint8_t value) __naked -{ - __asm - ld a, 4(ix) ; value - ld l, a - __endasm; -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_irq_save - * - * Description: - * Disable all interrupts; return previous interrupt state - * - ****************************************************************************/ - -irqstate_t up_irq_save(void) __naked -{ - __asm - ld a, i ; AF parity bit holds interrupt state - di ; interrupts are disabled - push af; return AF in HL - pop hl ; - ret ; - __endasm; -} - -/**************************************************************************** - * Name: up_irq_restore - * - * Description: - * Restore previous interrupt state - * - ****************************************************************************/ - -void up_irq_restore(irqstate_t flags) __naked -{ - __asm - di ; assume disabled - pop hl ; HL = return address - pop af ; AF parity bit holds interrupt state - jp po, statedisable - ei -statedisable: - push af ; restore stack - push hl ; - ret ; and return - __endasm; -} - -/**************************************************************************** - * Name: up_irq_enable - * - * Description: - * Enable all interrupts; return previous interrupt state - * - ****************************************************************************/ - -irqstate_t up_irq_enable(void) __naked -{ - __asm - ld a, i ; AF parity bit holds interrupt state - ei ; interrupts are enabled - push af ; return AF in HL - pop hl ; - ret ; - __endasm; -} - -/**************************************************************************** - * Name: up_irqinitialize - * - * Description: - * Initialize and enable interrupts - * - ****************************************************************************/ - -void up_irqinitialize(void) -{ - uint16_t vectaddr = (uint16_t)up_vectors; - uint8_t regval; - - /* Initialize the I and IL registers so that the interrupt vector table - * is used. - */ - - regval = (uint8_t)(vectaddr >> 8); - z180_seti(regval); - - regval = (uint8_t)(vectaddr & IL_MASK); - outp(Z180_INT_IL, regval); - - /* Disable external interrupts */ - - outp(Z180_INT_ITC, 0); - - /* And finally, enable interrupts (including the timer) */ - -#ifndef CONFIG_SUPPRESS_INTERRUPTS - up_irq_restore(Z180_C_FLAG); -#endif -} diff --git a/arch/z80/src/z180/z180_lowscc.c b/arch/z80/src/z180/z180_lowscc.c deleted file mode 100644 index c498505b82..0000000000 --- a/arch/z80/src/z180/z180_lowscc.c +++ /dev/null @@ -1,104 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z180/z180_lowscc.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include - -#include -#include -#include - -#include "chip.h" -#include "common/z80_internal.h" -#include "z180_config.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Select UART parameters for the selected console */ - -#if defined(CONFIG_Z180_SCC_SERIAL_CONSOLE) -# define CONSOLE_CR Z181_SCC_CR -# define CONSOLE_DR Z181_SCC_DR -# define CONSOLE_BAUD CONFIG_Z180_SCC_BAUD -# define CONSOLE_BITS CONFIG_Z180_SCC_BITS -# define CONSOLE_2STOP CONFIG_Z180_SCC_2STOP -# define CONSOLE_PARITY CONFIG_Z180_SCC_PARITY - -#elif defined(CONFIG_Z180_ESCCA_SERIAL_CONSOLE) -# define CONSOLE_CR Z182_ESCCA_CR -# define CONSOLE_DR Z182_ESCCA_DR -# define CONSOLE_BAUD CONFIG_Z180_ESCCA_BAUD -# define CONSOLE_BITS CONFIG_Z180_ESCCA_BITS -# define CONSOLE_2STOP CONFIG_Z180_ESCCA_2STOP -# define CONSOLE_PARITY CONFIG_Z180_ESCCA_PARITY - -#elif defined(CONFIG_Z180_ESCCB_SERIAL_CONSOLE) -# define CONSOLE_CR Z182_ESCCB_CR -# define CONSOLE_DR Z182_ESCCB_DR -# define CONSOLE_BAUD CONFIG_Z180_ESCCB_BAUD -# define CONSOLE_BITS CONFIG_Z180_ESCCB_BITS -# define CONSOLE_PARITY CONFIG_Z180_ESCCB_PARITY -#endif - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: z180_putc - * - * Description: - * Low-level character output - * - ****************************************************************************/ - -#ifdef HAVE_SCC_CONSOLE -void z180_putc(uint8_t ch) __naked -{ - __asm -txbe: - in0 a, (CONSOLE_CR) ; read RR0 - bit 2, a ; bit 2, tx buffer empty? - jr z, txbe ; no, wait until the tx buffer is empty - - ld a, 4(ix) ; character to output - out (CONSOLE_DR), a ; send it - ret - __endasm; -} -#endif diff --git a/arch/z80/src/z180/z180_lowserial.c b/arch/z80/src/z180/z180_lowserial.c deleted file mode 100644 index 816f43f42b..0000000000 --- a/arch/z80/src/z180/z180_lowserial.c +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z180/z180_lowserial.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include "common/z80_internal.h" - -#include "z180_config.h" -#include "z180_serial.h" - -#ifdef HAVE_SERIAL - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_putc/z80_lowputc - * - * Description: - * Low-level console output - * - ****************************************************************************/ - -#ifdef USE_SERIALDRIVER -int z80_lowputc(int ch) -#else -void up_putc(int ch) -#endif -{ - /* Output the character */ - - z180_putc(ch); -} - -#endif /* HAVE_SERIAL */ diff --git a/arch/z80/src/z180/z180_lowuart.c b/arch/z80/src/z180/z180_lowuart.c deleted file mode 100644 index 24d984e694..0000000000 --- a/arch/z80/src/z180/z180_lowuart.c +++ /dev/null @@ -1,88 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z180/z180_lowuart.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include - -#include -#include -#include - -#include "chip.h" -#include "common/z80_internal.h" -#include "z180_config.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Select UART parameters for the selected console */ - -#if defined(CONFIG_Z180_UART0_SERIAL_CONSOLE) -# define CONSOLE_CR Z181_UART0_CR -# define CONSOLE_DR Z181_UART0_DR -# define CONSOLE_BAUD CONFIG_Z180_UART0_BAUD -# define CONSOLE_BITS CONFIG_Z180_UART0_BITS -# define CONSOLE_2STOP CONFIG_Z180_UART0_2STOP -# define CONSOLE_PARITY CONFIG_Z180_UART0_PARITY - -#elif defined(CONFIG_Z180_UART1_SERIAL_CONSOLE) -# define CONSOLE_CR Z182_UART1_CR -# define CONSOLE_DR Z182_UART1_DR -# define CONSOLE_BAUD CONFIG_Z180_UART1_BAUD -# define CONSOLE_BITS CONFIG_Z180_UART1_BITS -# define CONSOLE_2STOP CONFIG_Z180_UART1_2STOP -# define CONSOLE_PARITY CONFIG_Z180_UART1_PARITY -#endif - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: z180_putc - * - * Description: - * Low-level character output - * - ****************************************************************************/ - -#ifdef HAVE_UART_CONSOLE -void z180_putc(uint8_t ch) -{ -#warning "Missing logic" -} -#endif diff --git a/arch/z80/src/z180/z180_mmu.c b/arch/z80/src/z180/z180_mmu.c deleted file mode 100644 index 27e5577460..0000000000 --- a/arch/z80/src/z180/z180_mmu.c +++ /dev/null @@ -1,574 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z180/z180_mmu.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* See arch/z80/src/z180/z180_mmu.txt for additional information */ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include - -#include -#include - -#include -#include - -#include "z80_internal.h" -#include "z180_mmu.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -#ifndef CONFIG_ARCH_ADDRENV -# warning "OS address environment support is required (CONFIG_ARCH_ADDRENV)" -#endif - -#ifndef CONFIG_GRAN -# warning "This file requires the granual allocator (CONFIG_GRAN)" -#endif - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -static GRAN_HANDLE g_physhandle; -static struct z180_cbr_s g_cbrs[CONFIG_Z180_MAX_TASKS]; - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: z180_mmu_alloccbr - * - * Description: - * Find an unused structure in g_cbrs - * (i.e., one with reference count == 0). - * If a structure is found, its reference count is set to one and a pointer - * to the structure is returned. - * - ****************************************************************************/ - -static inline FAR struct z180_cbr_s *z180_mmu_alloccbr(void) -{ - int i; - - for (i = 0; i < CONFIG_Z180_MAX_TASKS; i++) - { - FAR struct z180_cbr_s *cbr = &g_cbrs[i]; - if (cbr->crefs == 0) - { - cbr->crefs = 1; - return cbr; - } - } - - return NULL; -} - -/**************************************************************************** - * Name: z180_mmu_freecbr - * - * Description: - * Free a structure in g_cbrs by setting its reference count to 0; - * - ****************************************************************************/ - -#define z180_mmu_freecbr(cbr) (cbr)->crefs = 0 - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: z180_mmu_lowinit - * - * Description: - * Low-level, power-up initialization of the z180 MMU. this must be - * called very early in the boot process to get the basic operating - * memory configuration correct. This function does *not* perform all - * necessray MMU initialization... only the basics needed at power-up. - * z80_mmu_initialize() must be called later to complete the entire MMU - * initialization. - * - ****************************************************************************/ - -void z180_mmu_lowinit(void) __naked -{ - /* Set the CBAR register to set up the virtual address of the Bank Area and - * Common Area 1. Set the BBR register to set up the physical mapping for - * the Bank Area (the physical mapping for Common Area 1 will not be done - * until the first task is started. - */ - - __asm - ld c, #Z180_MMU_CBAR ; port - ld a, #Z180_CBAR_VALUE ; value - out (c), a - - ld c, #Z180_MMU_BBR ; port - ld a, #Z180_BBR_VALUE ; value - out (c), a - __endasm; -} - -/**************************************************************************** - * Name: z80_mmu_initialize - * - * Description: - * Perform higher level initialization of the MMU and physical memory - * memory management logic. - * - ****************************************************************************/ - -int z80_mmu_initialize(void) -{ - /* Here we use the granule allocator as a page allocator. We lie and - * say that 1 page is 1 byte. - */ - - g_physhandle = gran_initialize((FAR void *)Z180_PHYSHEAP_STARTPAGE, - Z180_PHYSHEAP_NPAGES, 0, 0); - return g_physhandle ? OK : -ENOMEM; -} - -/**************************************************************************** - * Address Environment Interfaces - * - * Low-level interfaces used in binfmt/ to instantiate tasks with address - * environments. These interfaces all operate on type arch_addrenv_t which - * is an abstract representation of a task group's address environment and - * must be defined in arch/arch.h if CONFIG_ARCH_ADDRENV is defined. - * - * up_addrenv_create - Create an address environment - * up_addrenv_destroy - Destroy an address environment. - * up_addrenv_vtext - Returns the virtual base address of the .text - * address environment - * up_addrenv_vdata - Returns the virtual base address of the .bss/.data - * address environment - * up_addrenv_heapsize - Returns the size of the initial heap allocation. - * up_addrenv_select - Instantiate an address environment - * up_addrenv_clone - Copy an address environment from one location to - * another. - * - * Higher-level interfaces used by the tasking logic. These interfaces are - * used by the functions in sched/ and all operate on the thread which whose - * group been assigned an address environment by up_addrenv_clone(). - * - * up_addrenv_attach - Clone the address environment assigned to one TCB - * to another. This operation is done when a pthread - * is created that share's the same address - * environment. - * up_addrenv_detach - Release the threads reference to an address - * environment when a task/thread exits. - * - ****************************************************************************/ - -/**************************************************************************** - * Name: up_addrenv_create - * - * Description: - * This function is called when a new task is created in order to - * instantiate an address environment for the new task group. - * up_addrenv_create() is essentially the allocator of the physical - * memory for the new task. - * - * Input Parameters: - * textsize - The size (in bytes) of the .text address environment needed - * by the task. This region may be read/execute only. - * datasize - The size (in bytes) of the .data/.bss address environment - * needed by the task. This region may be read/write only. NOTE: The - * actual size of the data region that is allocated will include a - * OS private reserved region at the beginning. The size of the - * private, reserved region is give by ARCH_DATA_RESERVE_SIZE. - * heapsize - The initial size (in bytes) of the heap address environment - * needed by the task. This region may be read/write only. - * addrenv - The location to return the representation of the task address - * environment. - * - * Returned Value: - * Zero (OK) on success; a negated errno value on failure. - * - ****************************************************************************/ - -int up_addrenv_create(size_t textsize, size_t datasize, size_t heapsize, - FAR arch_addrenv_t *addrenv) -{ - FAR struct z180_cbr_s *cbr; - irqstate_t flags; - size_t envsize; - uintptr_t alloc; - unsigned int npages; - int ret; - - /* Convert the size from bytes to numbers of pages */ - -#ifdef CONFIG_BUILD_KERNEL - envsize = textsize + datasize + heapsize; -#else - envsize = textsize + datasize; -#endif - - npages = PHYS_ALIGNUP(envsize); - if (npages < 1) - { - /* No address environment... but I suppose that is not an error */ - - serr("ERROR: npages is zero\n"); - return OK; - } - - /* Allocate a structure in the common .bss to hold information about the - * task's address environment. NOTE that this is not a part of the TCB, - * but rather a break-away structure that can be shared by the task as - * well as other threads. That is necessary because the life of the - * address of environment might be longer than the life of the task. - */ - - flags = enter_critical_section(); - cbr = z180_mmu_alloccbr(); - if (!cbr) - { - serr("ERROR: No free CBR structures\n"); - ret = -ENOMEM; - goto errout_with_irq; - } - - /* Now allocate the physical memory to back up the address environment */ - - alloc = (uintptr_t)gran_alloc(g_physhandle, npages); - if (alloc == NULL) - { - serr("ERROR: Failed to allocate %d pages\n", npages); - ret = -ENOMEM; - goto errout_with_cbr; - } - - /* Save the information in the CBR structure. Note that alloc is in - * 4KB pages, already in the right form for the CBR. - */ - - DEBUGASSERT(alloc <= 0xff); - - cbr->cbr = (uint8_t)alloc; - cbr->pages = (uint8_t)npages; - *addrenv = (arch_addrenv_t)cbr; - - leave_critical_section(flags); - return OK; - -errout_with_cbr: - z180_mmu_freecbr(cbr); - -errout_with_irq: - leave_critical_section(flags); - return ret; -} - -/**************************************************************************** - * Name: up_addrenv_destroy - * - * Description: - * This function is called when a final thread leaves the task group and - * the task group is destroyed. This function then destroys the defunct - * address environment, releasing the underlying physical memory. - * - * Input Parameters: - * addrenv - The address environment to be destroyed. - * - * Returned Value: - * Zero (OK) on success; a negated errno value on failure. - * - ****************************************************************************/ - -int up_addrenv_destroy(FAR arch_addrenv_t *addrenv) -{ - FAR struct z180_cbr_s *cbr = (FAR struct z180_cbr_s *)*addrenv; - - DEBUGASSERT(cbr); - - /* Free the physical address space backing up the mapping */ - - gran_free(g_physhandle, (FAR void *)cbr->cbr, cbr->pages); - - /* And make the CBR structure available for reuse */ - - z180_mmu_freecbr(cbr); - return OK; -} - -/**************************************************************************** - * Name: up_addrenv_vtext - * - * Description: - * Return the virtual address associated with the newly create .text - * address environment. This function is used by the binary loaders in - * order get an address that can be used to initialize the new task. - * - * Input Parameters: - * addrenv - The representation of the task address environment previously - * returned by up_addrenv_create. - * vtext - The location to return the virtual address. - * - * Returned Value: - * Zero (OK) on success; a negated errno value on failure. - * - ****************************************************************************/ - -int up_addrenv_vtext(FAR arch_addrenv_t *addrenv, FAR void **vtext) -{ - return CONFIG_Z180_COMMON1AREA_VIRTBASE; -} - -/**************************************************************************** - * Name: up_addrenv_vdata - * - * Description: - * Return the virtual address associated with the newly create .text - * address environment. This function is used by the binary loaders in - * order get an address that can be used to initialize the new task. - * - * Input Parameters: - * addrenv - The representation of the task address environment previously - * returned by up_addrenv_create. - * textsize - For some implementations, the text and data will be saved - * in the same memory region (read/write/execute) and, in this case, - * the virtual address of the data just lies at this offset into the - * common region. - * vdata - The location to return the virtual address. - * - * Returned Value: - * Zero (OK) on success; a negated errno value on failure. - * - ****************************************************************************/ - -int up_addrenv_vdata(FAR arch_addrenv_t *addrenv, uintptr_t textsize, - FAR void **vdata) -{ - return CONFIG_Z180_COMMON1AREA_VIRTBASE + textsize; -} - -/**************************************************************************** - * Name: up_addrenv_vheap - * - * Description: - * Return the heap virtual address associated with the newly created - * address environment. This function is used by the binary loaders in - * order get an address that can be used to initialize the new task. - * - * Input Parameters: - * addrenv - The representation of the task address environment previously - * returned by up_addrenv_create. - * vheap - The location to return the virtual address. - * - * Returned Value: - * Zero (OK) on success; a negated errno value on failure. - * - ****************************************************************************/ - -#ifdef CONFIG_BUILD_KERNEL -int up_addrenv_vheap(FAR const arch_addrenv_t *addrenv, FAR void **vheap) -{ - /* Not implemented */ - - return -ENOSYS; -} -#endif - -/**************************************************************************** - * Name: up_addrenv_heapsize - * - * Description: - * Return the initial heap allocation size. That is the amount of memory - * allocated by up_addrenv_create() when the heap memory region was first - * created. This may or may not differ from the heapsize parameter that - * was passed to up_addrenv_create() - * - * Input Parameters: - * addrenv - The representation of the task address environment previously - * returned by up_addrenv_create. - * - * Returned Value: - * The initial heap size allocated is returned on success; a negated - * errno value on failure. - * - ****************************************************************************/ - -#ifdef CONFIG_BUILD_KERNEL -ssize_t up_addrenv_heapsize(FAR const arch_addrenv_t *addrenv) -{ - /* Not implemented */ - - return (ssize_t)-ENOSYS; -} -#endif - -/**************************************************************************** - * Name: up_addrenv_select - * - * Description: - * After an address environment has been established for a task (via - * up_addrenv_create()), this function may be called to instantiate - * that address environment in the virtual address space. This might be - * necessary, for example, to load the code for the task from a file or - * to access address environment private data. - * - * Input Parameters: - * addrenv - The representation of the task address environment previously - * returned by up_addrenv_create. - * - * Returned Value: - * Zero (OK) on success; a negated errno value on failure. - * - ****************************************************************************/ - -int up_addrenv_select(FAR const arch_addrenv_t *addrenv) -{ - FAR struct z180_cbr_s *cbr = (FAR struct z180_cbr_s *)addrenv; - irqstate_t flags; - - DEBUGASSERT(cbr); - - flags = enter_critical_section(); - - /* Write the new CBR value into CBR register */ - - outp(Z180_MMU_CBR, cbr->cbr); - leave_critical_section(flags); - return OK; -} - -/**************************************************************************** - * Name: up_addrenv_coherent - * - * Description: - * Flush D-Cache and invalidate I-Cache in preparation for a change in - * address environments. This should immediately precede a call to - * up_addrenv_select(); - * - * Input Parameters: - * addrenv - Describes the address environment to be made coherent. - * - * Returned Value: - * Zero (OK) on success; a negated errno value on failure. - * - ****************************************************************************/ - -int up_addrenv_coherent(FAR const arch_addrenv_t *addrenv) -{ - /* There are no caches */ - - return OK; -} - -/**************************************************************************** - * Name: up_addrenv_clone - * - * Description: - * Duplicate an address environment. This does not copy the underlying - * memory, only the representation that can be used to instantiate that - * memory as an address environment. - * - * Input Parameters: - * src - The address environment to be copied. - * dest - The location to receive the copied address environment. - * - * Returned Value: - * Zero (OK) on success; a negated errno value on failure. - * - ****************************************************************************/ - -int up_addrenv_clone(FAR const arch_addrenv_t *src, - FAR arch_addrenv_t *dest) -{ - DEBUGASSERT(src && dest); - - /* Copy the CBR structure. This is an atomic operation so no special - * precautions should be needed. - */ - - *dest = *src; - return OK; -} - -/**************************************************************************** - * Name: up_addrenv_attach - * - * Description: - * This function is called from the core scheduler logic when a thread - * is created that needs to share the address environment of its task - * group. - * - * Input Parameters: - * ptcb - The tcb of the parent task. - * tcb - The tcb of the thread needing the address environment. - * - * Returned Value: - * Zero (OK) on success; a negated errno value on failure. - * - ****************************************************************************/ - -int up_addrenv_attach(FAR struct tcb_s *ptcb, FAR struct tcb_s *tcb) -{ - /* There is nothing that needs to be done */ - - return OK; -} - -/**************************************************************************** - * Name: up_addrenv_detach - * - * Description: - * This function is called when a task or thread exits in order to release - * its reference to an address environment. The address environment, - * however, should persist until up_addrenv_destroy() is called when the - * task group is itself destroyed. Any resources unique to this thread - * may be destroyed now. - * - * NOTE: In some platforms, nothing will need to be done in this case. - * Simply being a member of the group that has the address environment - * may be sufficient. - * - * Input Parameters: - * tcb - The TCB of the task or thread whose the address environment will - * be released. - * - * Returned Value: - * Zero (OK) on success; a negated errno value on failure. - * - ****************************************************************************/ - -int up_addrenv_detach(FAR struct tcb_s *tcb) -{ - /* There is nothing that needs to be done */ - - return OK; -} diff --git a/arch/z80/src/z180/z180_mmu.h b/arch/z80/src/z180/z180_mmu.h deleted file mode 100644 index 17bc7b2e80..0000000000 --- a/arch/z80/src/z180/z180_mmu.h +++ /dev/null @@ -1,135 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z180/z180_mmu.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z80_SRC_Z180_Z180_MMU_H -#define __ARCH_Z80_SRC_Z180_Z180_MMU_H - -/* See arch/z80/src/z180/z180_mmu.txt for additional information */ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include "z180_iomap.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -/* Virtual addresses */ - -#ifndef CONFIG_Z180_BANKAREA_VIRTBASE -# warning "Assuming Bank Area at virtual address 0x8000" -# define CONFIG_Z180_BANKAREA_VIRTBASE 0x8000 -#endif - -#ifndef CONFIG_Z180_COMMON1AREA_VIRTBASE -# warning "Assuming Common Area 1 at virtual address 0xc000" -# define CONFIG_Z180_COMMON1AREA_VIRTBASE 0xc000 -#endif - -#if CONFIG_Z180_BANKAREA_VIRTBASE > CONFIG_Z180_COMMON1AREA_VIRTBASE -# error "CONFIG_Z180_BANKAREA_VIRTBASE > CONFIG_Z180_COMMON1AREA_VIRTBASE" -#endif - -/* Physical addresses */ - -#ifndef CONFIG_Z180_BANKAREA_PHYSBASE -# warning "Assuming Bank Area 1 at physical address 0x080000" -# define CONFIG_Z180_BANKAREA_PHYSBASE 0x08000 -#endif - -#ifndef CONFIG_Z180_PHYSHEAP_START -# warning "Assuming physical heap starts at physical address 0x0c000" -# define CONFIG_Z180_PHYSHEAP_START 0x0c000 -#endif - -#ifndef CONFIG_Z180_PHYSHEAP_END -# warning "Assuming physical heap ends at physical address 0x100000" -# define CONFIG_Z180_PHYSHEAP_END 0x100000 -#endif - -#if CONFIG_Z180_BANKAREA_PHYSBASE > CONFIG_Z180_PHYSHEAP_START -# error "CONFIG_Z180_BANKAREA_PHYSBASE > CONFIG_Z180_PHYSHEAP_START" -#endif - -#if CONFIG_Z180_PHYSHEAP_START > CONFIG_Z180_PHYSHEAP_END -# error "CONFIG_Z180_PHYSHEAP_START > CONFIG_Z180_PHYSHEAP_END" -#endif - -/* Each page is 4KB */ - -#define Z180_PAGESHIFT (12) -#define Z180_PAGESIZE (1 << Z180_PAGESHIFT) -#define Z180_PAGEMASK (Z180_PAGESIZE - 1) -#define PHYS_ALIGN(phys) ((phys) >> Z180_PAGESHIFT) -#define PHYS_ALIGNUP(phys) (((phys) + Z180_PAGEMASK) >> Z180_PAGESHIFT) - -/* Physical pages */ - -#define Z180_BANKAREA_PHYSPAGE PHYS_ALIGN(CONFIG_Z180_BANKAREA_PHYSBASE) -#define Z180_PHYSHEAP_STARTPAGE PHYS_ALIGN(CONFIG_Z180_PHYSHEAP_START) -#define Z180_PHYSHEAP_ENDPAGE PHYS_ALIGN(CONFIG_Z180_PHYSHEAP_END) -#define Z180_PHYSHEAP_NPAGES (Z180_PHYSHEAP_ENDPAGE - Z180_PHYSHEAP_STARTPAGE + 1) - -/* MMU register values */ - -#define Z180_CBAR_BA_VALUE (((CONFIG_Z180_BANKAREA_VIRTBASE >> 12) & 0x0f) << CBAR_BA_SHIFT) -#define Z180_CBAR_CA_VALUE (((CONFIG_Z180_COMMON1AREA_VIRTBASE >> 12) & 0x0f) << CBAR_CA_SHIFT) -#define Z180_CBAR_VALUE (Z180_CBAR_BA_VALUE | Z180_CBAR_CA_VALUE) -#define Z180_BBR_VALUE ((CONFIG_Z180_BANKAREA_PHYSBASE >> 12) & 0xff) - -/**************************************************************************** - * Public Functions Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Name: z180_mmu_lowinit - * - * Description: - * Low-level, power-up initialization of the z180 MMU. this must be - * called very early in the boot process to get the basic operating - * memory configuration correct. This function does *not* perform all - * necessray MMU initialization... only the basics needed at power-up. - * z80_mmu_initialize() must be called later to complete the entire MMU - * initialization. - * - ****************************************************************************/ - -void z180_mmu_lowinit(void) __naked; - -/**************************************************************************** - * Name: z80_mmu_initialize - * - * Description: - * Perform higher level initialization of the MMU and physical memory - * memory management logic. More correctly prototypes in z80_internal.h. - * - ****************************************************************************/ - -int z80_mmu_initialize(void); - -#endif /* __ARCH_Z80_SRC_Z180_Z180_MMU_H */ diff --git a/arch/z80/src/z180/z180_mmu.txt b/arch/z80/src/z180/z180_mmu.txt deleted file mode 100644 index c336c59af6..0000000000 --- a/arch/z80/src/z180/z180_mmu.txt +++ /dev/null @@ -1,114 +0,0 @@ -The MMU translates every memory address from 16 to 20 bits. The MMU uses -three internal control registers. On reset the MMU gives a straight logical -to physical mapping, simulating the Z80 and, of course, limiting the address -space to 64k. - -Logical Address Spaces -====================== - -The 64KB CPU logical address space is interpreted by the MMU as consisting -of up to three separate logical address areas: - - Common Area 0, - Bank Area, and - Common Area 1. - -Common 0, if it exists, always starts at logical address 0000 and runs up -to the Bank Area. The Bank Area then runs to the start of Common Area 1. - -Registers -========= - -CBAR (Common/Bank Area Register) - - CBAR is an 8 bit I/O port that can be accessed by the processor's OUT and - IN instructions. The lower 4-bits of CBAR (BA) specify the starting logical - address of the Bank Area, and the upper 4-bits (CA) give the start of - Common Area 1. These bits determine the upper four bits of the 16-bit - address. If CBAR were 0xa8, then the Base Area starts at logical address - 0x8000 and Common Area 1 starts at logical address 0xa000. This gives a - mapping granualarity of 4Kb in the logical address space. - - The CA and BA fields of CBAR may be freely programmed subject only to the - restriction that CA may never be less than BA. - -BBAR (Base Area Bank Register) - - BBR specifies the starting physical address of the base area (the logical - start address is in CBAR). - -CBR (Common Bank Register) - - CBR provides the same information for Common Area 1. - -Both the BBAR and the CBR specify the upper 8-bits of the 20-bit physical -address in the mapping. Hence, mapping is performed with a granularity of -4Kb in the physical address space. - -Physical to Logical Address Mapping -=================================== - -A simple formula gives the translation from logical to physical address for -the Bank Area: - - Physical = Logical + (BBR * 4096) - -The same formula gives Common Area 1: - - Physical = Logical + (CBR * 4096) - -Reset Configuration -=================== - -On reset, the CBAR is set to 0xf0, and CBR and BBR are set to 0x00. This -maps logical to physical with no translation; the Bank Area starts at -logical address 0x0000 and Common 1 at 0xf000. The Bank Area starts at -phsycial address 0x00000 (BBR=0), as does Common Area 1 (CBR=0). If the -logical address is 0x1000, then the MMU allocates this to the Bank Area -and adds the physical base of bank to it (0x00000), giving a translated -address of 0x01000. Similarly, logical 0xf800 is in Common Area 1, and -translates to 0x0f800. - -Configurations -============== - -You can divide the logical address space into one, two, or three areas. - -1) Three areas: - - CBAR:CA > CBAR:BA > 0x0000 - -2a) Two areas (Bank Area and Common Area 1): - - CBAR:CA > CBAR:BA = 0x0000 - -2a) Two areas (Common Area 0 and Common Area 1): - - CBAR:CA = CBAR:BA > 0x0000 - -3) One area (Common Area 1): - - CBAR:CA = CBAR:BA = 0x0000 - -NuttX Memory Organization -========================= - -Common Area 0: This area holds the common NuttX code that is directly -call-able from all application threads. Common Area always starts at -logical address 0x0000 and extends to the Bank Area - -Base Area: This area holds the common NuttX data (including the share- -able heap) that is accessible from all applications and extends to -Common Area 1. - -NOTE: That is execution from RAM, the common NuttX code and data may -be contiguous and lie in the same areas (either Common Area 0 or the -Bank Area). The two areas above would apply in a ROM'ed system, where -Common Area 1 is ROM and the Base Area is RAM. - -Common Area 1: This area holds the code and data that is unique to -a particular task. This area extends to the end of the logical address -space. All tasks share the same logical Common Area 2 logical address -(in the CBAR), but each has a unique mapping to different, underlying -physical addresses. Each task will then have its own, unique CBR value -that must be restored with each context switch to the task. diff --git a/arch/z80/src/z180/z180_modifiyreg8.c b/arch/z80/src/z180/z180_modifiyreg8.c deleted file mode 100644 index 35a4ca63e7..0000000000 --- a/arch/z80/src/z180/z180_modifiyreg8.c +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z180/z180_modifiyreg8.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include -#include -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -static spinlock_t g_modifyreg_lock = SP_UNLOCKED; - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: modifyreg8 - * - * Description: - * Atomically modify the specified bits in a I/O register - * - ****************************************************************************/ - -void modifyreg8(uint16_t addr, uint8_t clearbits, uint8_t setbits) -{ - irqstate_t flags; - uint8_t regval; - - flags = spin_lock_irqsave(&g_modifyreg_lock); - regval = inp(addr); - regval &= ~clearbits; - regval |= setbits; - outp(regval, addr); - spin_unlock_irqrestore(&g_modifyreg_lock, flags); -} diff --git a/arch/z80/src/z180/z180_registerdump.c b/arch/z80/src/z180/z180_registerdump.c deleted file mode 100644 index e4ed83d91f..0000000000 --- a/arch/z80/src/z180/z180_registerdump.c +++ /dev/null @@ -1,59 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z180/z180_registerdump.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include -#include - -#include "chip/switch.h" -#include "z80_internal.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_dump_register - ****************************************************************************/ - -void up_dump_register(FAR void *dumpregs) -{ - FAR volatile chipreg_t *regs = dumpregs ? dumpregs : up_current_regs(); - - _alert("AF: %04x I: %04x\n", - regs[XCPT_AF], regs[XCPT_I]); - _alert("BC: %04x DE: %04x HL: %04x\n", - regs[XCPT_BC], regs[XCPT_DE], regs[XCPT_HL]); - _alert("IX: %04x IY: %04x\n", - regs[XCPT_IX], regs[XCPT_IY]); - _alert("SP: %04x PC: %04x\n" - regs[XCPT_SP], regs[XCPT_PC]); - _alert("CBAR: %02x BBR: %02x CBR: %02x\n" - inp(Z180_MMU_CBAR), inp(Z180_MMU_BBR), inp(Z180_MMU_CBR)); -} diff --git a/arch/z80/src/z180/z180_restoreusercontext.asm b/arch/z80/src/z180/z180_restoreusercontext.asm deleted file mode 100644 index 05a31117dd..0000000000 --- a/arch/z80/src/z180/z180_restoreusercontext.asm +++ /dev/null @@ -1,91 +0,0 @@ -;************************************************************************** -; arch/z80/src/z180/z180_restoreusercontext.asm -; -; SPDX-License-Identifier: Apache-2.0 -; -; Licensed to the Apache Software Foundation (ASF) under one or more -; contributor license agreements. See the NOTICE file distributed with -; this work for additional information regarding copyright ownership. The -; ASF licenses this file to you under the Apache License, Version 2.0 (the -; "License"); you may not use this file except in compliance with the -; License. You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -; License for the specific language governing permissions and limitations -; under the License. -; -;************************************************************************** - - ; Register save area layout - - .globl XCPT_I ; Offset 0: Saved I w/interrupt state in carry - .globl XCPT_BC ; Offset 1: Saved BC register - .globl XCPT_DE ; Offset 2: Saved DE register - .globl XCPT_IX ; Offset 3: Saved IX register - .globl XCPT_IY ; Offset 4: Saved IY register - .globl XCPT_SP ; Offset 5: Offset to SP at time of interrupt - .globl XCPT_HL ; Offset 6: Saved HL register - .globl XCPT_AF ; Offset 7: Saved AF register - .globl XCPT_PC ; Offset 8: Offset to PC at time of interrupt - -;************************************************************************** -; z180_restoreusercontext -;************************************************************************** - - .area _CODE -_z180_restoreusercontext: - ; On entry, stack contains return address (not used), then address - ; of the register save structure - - ; Discard the return address, we won't be returning - - pop hl - - ; Get the address of the beginning of the state save area. Each - ; pop will increment to the next element of the structure - - pop hl ; BC = Address of save structure - ld sp, hl ; SP points to top of storage area - - ; Disable interrupts while we muck with the alternative registers. The - ; Correct interrupt state will be restore below - - di - - ; Restore registers. HL points to the beginning of the reg structure to restore - - ex af, af' ; Select alternate AF - pop af ; Offset 0: AF' = I with interrupt state in parity - ex af, af' ; Restore original AF - pop bc ; Offset 1: BC - pop de ; Offset 2: DE - pop ix ; Offset 3: IX - pop iy ; Offset 4: IY - exx ; Use alternate BC/DE/HL - pop hl ; Offset 5: HL' = Stack pointer after return - exx ; Restore original BC/DE/HL - pop hl ; Offset 6: HL - pop af ; Offset 7: AF - - ; Restore the stack pointer - - exx ; Use alternate BC/DE/HL - pop de ; DE' = return address - ld sp, hl ; Set SP = saved stack pointer value before return - push de ; Save return address for ret instruction - exx ; Restore original BC/DE/HL - - ; Restore interrupt state - - ex af, af' ; Recover interrupt state - jp po, noinrestore ; Odd parity, IFF2=0, means disabled - ex af, af' ; Restore AF (before enabling interrupts) - ei ; yes.. Enable interrupts - ret ; and return -noinrestore: - ex af, af' ; Restore AF - ret ; Return with interrupts disabled diff --git a/arch/z80/src/z180/z180_rom.asm b/arch/z80/src/z180/z180_rom.asm deleted file mode 100644 index e4a9f5c705..0000000000 --- a/arch/z80/src/z180/z180_rom.asm +++ /dev/null @@ -1,186 +0,0 @@ -;************************************************************************** -; arch/z80/src/z180/z180_rom.asm -; -; SPDX-License-Identifier: Apache-2.0 -; -; Licensed to the Apache Software Foundation (ASF) under one or more -; contributor license agreements. See the NOTICE file distributed with -; this work for additional information regarding copyright ownership. The -; ASF licenses this file to you under the Apache License, Version 2.0 (the -; "License"); you may not use this file except in compliance with the -; License. You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -; License for the specific language governing permissions and limitations -; under the License. -; -;************************************************************************** - - .title NuttX for the Z180 - .module z180_head - -;************************************************************************** -; Constants -;************************************************************************** - - ; Default stack base (needs to be fixed) - - .include "asm_mem.h" - -;************************************************************************** -; Global symbols used -;************************************************************************** - - .globl _nx_start ; OS entry point - .globl _up_vectcommon ; Common interrupt handling logic - .globl _z180_mmu_lowinit ; MMU initialization logic - .globl s__HEAP ; Start of the heap - -;************************************************************************** -; System start logic -;************************************************************************** - -_up_reset: - ; Set up the stack pointer at the location determined the Makefile - ; and stored in asm_mem.h - - ld SP, #CONFIG_STACK_END ; Set stack pointer - - ; Performed initialization unique to the SDCC toolchain - - call gsinit ; Initialize the data section - - ; Copy the reset vectors - - ld hl, #_up_rstvectors ; code for RAM - ld de, #0x4000 ; move it here - ld bc, #3*7 ; 7 vectors / 3 bytes each - ldir - - ; Then start NuttX - - call _nx_start ; jump to the OS entry point - - ; NuttX will never return, but just in case... - -_up_halt:: - halt ; We should never get here - jp _up_halt - - ; Data to copy to address 0x4000 - -_up_rstvectors: - jp _up_rst1 ; 0x4000 : RST 1 - jp _up_rst2 ; 0x4003 : RST 2 - jp _up_rst3 ; 0x4006 : RST 3 - jp _up_rst4 ; 0x4009 : RST 4 - jp _up_rst5 ; 0x400c : RST 5 - jp _up_rst6 ; 0x400f : RST 6 - jp _up_rst7 ; 0x4012 : RST 7 - -;************************************************************************** -; Other reset handlers -;************************************************************************** - -_up_rst1: ; RST 1 - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #0 ; 0 = Z180_RST1 - jp _up_vectcommon ; Remaining RST handling is common - -_up_rst2: ; RST 2 - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #1 ; 1 = Z180_RST2 - jp _up_vectcommon ; Remaining RST handling is common - -_up_rst3: ; RST 3 - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #2 ; 2 = Z180_RST3 - jp _up_vectcommon ; Remaining RST handling is common - -_up_rst4: ; RST 4 - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #3 ; 3 = Z180_RST4 - jp _up_vectcommon ; Remaining RST handling is common - -_up_rst5: ; RST 5 - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #4 ; 4 = Z180_RST5 - jp _up_vectcommon ; Remaining RST handling is common - -_up_rst6: ; RST 6 - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #5 ; 5 = Z180_RST6 - jp _up_vectcommon ; Remaining RST handling is common - -_up_rst7: ; RST 7 - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #6 ; 6 = Z180_RST7 - jp _up_vectcommon ; Remaining RST handling is common - -;************************************************************************** -; Ordering of segments for the linker (SDCC only) -;************************************************************************** - - .area _HOME - .area _CODE - .area _INITIALIZER - .area _GSINIT - .area _GSFINAL - - .area _DATA - .area _INITIALIZED - .area _BSEG - .area _BSS - .area _HEAP - -;************************************************************************** -; Global data initialization logic (SDCC only) -;************************************************************************** - - .area _GSINIT -gsinit:: - ld bc, #l__INITIALIZER - ld a, b - or a, c - jr Z, gsinit_next - ld de, #s__INITIALIZED - ld hl, #s__INITIALIZER - ldir -gsinit_next: - - .area _GSFINAL - ret - -;************************************************************************** -; The start of the heap (SDCC only). Note that is actually resides in -; the _CODE area (which may be FLASH or ROM) -;************************************************************************** - - .area _CODE -_g_heapbase:: - .dw #s__HEAP diff --git a/arch/z80/src/z180/z180_romvectors.asm b/arch/z80/src/z180/z180_romvectors.asm deleted file mode 100644 index 8c25cf4db6..0000000000 --- a/arch/z80/src/z180/z180_romvectors.asm +++ /dev/null @@ -1,70 +0,0 @@ -;************************************************************************** -; arch/z80/src/z180/z180_romvectors.asm -; -; SPDX-License-Identifier: Apache-2.0 -; -; Licensed to the Apache Software Foundation (ASF) under one or more -; contributor license agreements. See the NOTICE file distributed with -; this work for additional information regarding copyright ownership. The -; ASF licenses this file to you under the Apache License, Version 2.0 (the -; "License"); you may not use this file except in compliance with the -; License. You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -; License for the specific language governing permissions and limitations -; under the License. -; -;************************************************************************** - - .title NuttX for the Z180 - .module z180_romvectors - -;************************************************************************** -; Constants -;************************************************************************** - -;************************************************************************** -; Global symbols used -;************************************************************************** - - .globl _up_int1 ; Vector offset 0: External /INT1 - .globl _up_int2 ; Vector offset 2: External /INT2 - .globl _up_prt0 ; Vector offset 4: PRT channel 0 - .globl _up_prt1 ; Vector offset 6: PRT channel 1 - .globl _up_dma0 ; Vector offset 8: DMA channel 0 - .globl _up_dma1 ; Vector offset 8: DMA channel 1 - .globl _up_csio ; Vector offset 12: Clocked serial I/O - .globl _up_asci0 ; Vector offset 14: Async channel 0 - .globl _up_asci1 ; Vector offset 16: Async channel 1 - .globl _up_unused ; Vector offset 18: Unused - -;************************************************************************** -; Interrupt Vector Table -;************************************************************************** - -; The start of the _VECTORS area must be set by the linker to lie at some -; 32-byte-aligned address - - .area _VECTORS - -_up_vectors:: - .dw _up_int1 ; Vector offset 0: External /INT1 - .dw _up_int2 ; Vector offset 2: External /INT2 - .dw _up_prt0 ; Vector offset 4: PRT channel 0 - .dw _up_prt1 ; Vector offset 6: PRT channel 1 - .dw _up_dma0 ; Vector offset 8: DMA channel 0 - .dw _up_dma1 ; Vector offset 8: DMA channel 1 - .dw _up_csio ; Vector offset 12: Clocked serial I/O - .dw _up_asci0 ; Vector offset 14: Async channel 0 - .dw _up_asci1 ; Vector offset 16: Async channel 1 - .dw _up_unused ; Vector offset 18: Unused - .dw _up_unused ; Vector offset 20: Unused - .dw _up_unused ; Vector offset 22: Unused - .dw _up_unused ; Vector offset 24: Unused - .dw _up_unused ; Vector offset 26: Unused - .dw _up_unused ; Vector offset 28: Unused - .dw _up_unused ; Vector offset 30: Unused diff --git a/arch/z80/src/z180/z180_saveusercontext.asm b/arch/z80/src/z180/z180_saveusercontext.asm deleted file mode 100644 index d3428d5eec..0000000000 --- a/arch/z80/src/z180/z180_saveusercontext.asm +++ /dev/null @@ -1,130 +0,0 @@ -;************************************************************************* -; arch/z80/src/z180/z180_saveusercontext.asm -; -; SPDX-License-Identifier: Apache-2.0 -; -; Licensed to the Apache Software Foundation (ASF) under one or more -; contributor license agreements. See the NOTICE file distributed with -; this work for additional information regarding copyright ownership. The -; ASF licenses this file to you under the Apache License, Version 2.0 (the -; "License"); you may not use this file except in compliance with the -; License. You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -; License for the specific language governing permissions and limitations -; under the License. -; -;************************************************************************* - -;************************************************************************* -; Constants -;************************************************************************* - - ; Register save area layout - - .globl XCPT_I ; Offset 0: Saved I w/interrupt state in parity - .globl XCPT_BC ; Offset 1: Saved BC register - .globl XCPT_DE ; Offset 2: Saved DE register - .globl XCPT_IX ; Offset 3: Saved IX register - .globl XCPT_IY ; Offset 4: Saved IY register - .globl XCPT_SP ; Offset 5: Offset to SP at time of interrupt - .globl XCPT_HL ; Offset 6: Saved HL register - .globl XCPT_AF ; Offset 7: Saved AF register - .globl XCPT_PC ; Offset 8: Offset to PC at time of interrupt - - ; Stack frame - - FRAME_IY == 0 ; Location of IY on the stack - FRAME_IX == 2 ; Location of IX on the stack - FRAME_RET == 4 ; Location of return address on the stack - FRAME_REGS == 6 ; Location of reg save area on stack - - SP_OFFSET == 6 - -;************************************************************************* -; Name: up_saveusercontext -;************************************************************************* - - .area _CODE -_up_saveusercontext: - ; Set up a stack frame - - push ix ; Save IX and IY - push iy - ld ix, #0 - add ix, sp ; IX = stack frame - - ; Fetch the address of the save area - - ld e, FRAME_REGS(ix) ; HL = save area address - ld d, FRAME_REGS+1(ix) ; - ld iy, #0 - add iy, de ; IY = save area address - - ; Then save the registers - - ; Save the current interrupt state at offset 0 - - ld a, i ; Get interrupt state - push af - pop hl - ld XCPT_I(iy), l ; Offset 0: I w/interrupt state in parity - ld XCPT_I+1(iy), h - - ; Save BC at offset 1 - - ld XCPT_BC(iy), c ; Offset 1: BC - ld XCPT_BC+1(iy), b - - ; DE is not preserved (offset 2) - - ; Save IX at offset 3 - - ld l, FRAME_IX(ix) ; HL = Saved value of IX - ld h, FRAME_IX+1(ix) ; - ld XCPT_IX(iy), l ; Offset 3: IX - ld XCPT_IX+1(iy), h ; - - ; Save IY at offset 4 - - ld l, FRAME_IY(ix) ; HL = Saved value of IY - ld h, FRAME_IY+1(ix) ; - ld XCPT_IY(iy), l ; Offset 4: IY - ld XCPT_IY+1(iy), h - - ; Save that stack pointer as it would be upon return in offset 5 - - ld hl, #SP_OFFSET ; Value of stack pointer on return - add hl, sp - ld XCPT_SP(iy), l ; Offset 5 SP - ld XCPT_SP+1(iy), h - - ; HL is saved as the value 1 at offset 6 - - xor a ; A = 0 - ld XCPT_HL+1(iy), a ; Offset 2: HL on return (=1) - inc a ; A = 1 - ld XCPT_HL(iy), a ; - - ; AF is not preserved (offset 7) - - ; Save the return address in offset 8 - - ld l, FRAME_RET(ix) ; HL = Saved return address - ld h, FRAME_RET+1(ix) ; - ld XCPT_PC(iy), l ; Offset 8: PC - ld XCPT_PC+1(iy), h - - ; Return the value 0 - - xor a ; HL = return value of zero - ld l, a - ld h, a - - pop iy - pop ix - ret diff --git a/arch/z80/src/z180/z180_scc.c b/arch/z80/src/z180/z180_scc.c deleted file mode 100644 index fa3d5c6226..0000000000 --- a/arch/z80/src/z180/z180_scc.c +++ /dev/null @@ -1,610 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z180/z180_scc.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "chip.h" -#include "z80_internal.h" -#include "z180_config.h" -#include "z180_serial.h" - -#ifdef USE_SERIALDRIVER - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -struct z180_dev_s -{ - uint32_t baud; /* Configured baud */ - uint8_t cr; /* [E]SCC control register */ - uint8_t dr; /* [E]SCC data register */ - uint8_t irq; /* IRQ associated with this [E]SCC */ - uint8_t parity; /* 0=none, 1=odd, 2=even */ - uint8_t bits; /* Number of bits (7 or 8) */ - bool stopbits2; /* true: Configure with 2 (vs 1) */ -}; - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -static int z180_setup(struct uart_dev_s *dev); -static void z180_shutdown(struct uart_dev_s *dev); -static int z180_attach(struct uart_dev_s *dev); -static void z180_detach(struct uart_dev_s *dev); -static int z180_interrupt(int irq, void *context); -static int z180_ioctl(struct file *filep, int cmd, unsigned long arg); -static int z180_receive(struct uart_dev_s *dev, unsigned int *status); -static void z180_rxint(struct uart_dev_s *dev, bool enable); -static bool z180_rxavailable(struct uart_dev_s *dev); -static void z180_send(struct uart_dev_s *dev, int ch); -static void z180_txint(struct uart_dev_s *dev, bool enable); -static bool z180_txready(struct uart_dev_s *dev); -static bool z180_txempty(struct uart_dev_s *dev); - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -static const struct uart_ops_s g_uart_ops = -{ - z180_setup, /* setup */ - z180_shutdown, /* shutdown */ - z180_attach, /* attach */ - z180_detach, /* detach */ - z180_ioctl, /* ioctl */ - z180_receive, /* receive */ - z180_rxint, /* rxint */ - z180_rxavailable, /* rxavailable */ -#ifdef CONFIG_SERIAL_IFLOWCONTROL - NULL, /* rxflowcontrol */ -#endif - z180_send, /* send */ - z180_txint, /* txint */ - z180_txready, /* txready */ - z180_txempty /* txempty */ -}; - -/* I/O buffers */ - -#ifdef CONFIG_Z180_SCC -static char g_scc_rxbuffer[CONFIG_Z180_SCC_RXBUFSIZE]; -static char g_scc_txbuffer[CONFIG_Z180_SCC_TXBUFSIZE]; -#endif -#ifdef CONFIG_Z180_ESCCA -static char g_escca_rxbuffer[CONFIG_Z180_ESCCA_RXBUFSIZE]; -static char g_escca_txbuffer[CONFIG_Z180_ESCCA_TXBUFSIZE]; -#endif -#ifdef CONFIG_Z180_ESCCB -static char g_esccb_rxbuffer[CONFIG_Z180_ESCCB_RXBUFSIZE]; -static char g_esccb_txbuffer[CONFIG_Z180_ESCCB_TXBUFSIZE]; -#endif - -/* This describes the state of the SCC port. */ - -#ifdef CONFIG_Z180_SCC -static const struct z180_dev_s g_scc_priv = -{ - CONFIG_Z180_SCC_BAUD, /* baud */ - Z181_SCC_CR, /* cr */ - Z181_SCC_DR, /* dr */ - Z180_SCC_IRQ, /* irq */ - CONFIG_Z180_SCC_PARITY, /* parity */ - CONFIG_Z180_SCC_BITS, /* bits */ - CONFIG_Z180_SCC_2STOP /* stopbits2 */ -}; - -static uart_dev_t g_scc_port = -{ - 0, /* open_count */ -#ifdef CONFIG_Z180_SCC_SERIAL_CONSOLE - true, /* isconsole */ -#else - false, /* isconsole */ -#endif - { 0 }, /* closesem */ - { 0 }, /* xmitsem */ - { 0 }, /* recvsem */ - { - { 0 }, /* xmit.sem */ - 0, /* xmit.head */ - 0, /* xmit.tail */ - CONFIG_Z180_SCC_TXBUFSIZE, /* xmit.size */ - g_scc_txbuffer, /* xmit.buffer */ - }, - { - { 0 }, /* recv.sem */ - 0, /* recv.head */ - 0, /* recv.tail */ - CONFIG_Z180_SCC_RXBUFSIZE, /* recv.size */ - g_scc_rxbuffer, /* recv.buffer */ - }, - &g_uart_ops, /* ops */ - &g_scc_priv, /* priv */ -}; -#endif - -/* This describes the state of the ESCC Channel A port. */ - -#ifdef CONFIG_Z180_ESCCA -static const struct z180_dev_s g_escca_priv = -{ - CONFIG_Z180_ESCCA_BAUD, /* baud */ - Z182_ESCCA_CR, /* cr */ - Z182_ESCCA_DR, /* dr */ - Z180_UART1_IRQ, /* irq */ - CONFIG_Z180_ESCCA_PARITY, /* parity */ - CONFIG_Z180_ESCCA_BITS, /* bits */ - CONFIG_Z180_ESCCA_2STOP /* stopbits2 */ -}; - -static uart_dev_t g_escca_port = -{ - 0, /* open_count */ -#ifdef CONFIG_Z180_ESCCA_SERIAL_CONSOLE - true, /* isconsole */ -#else - false, /* isconsole */ -#endif - { 0 }, /* closesem */ - { 0 }, /* xmitsem */ - { 0 }, /* recvsem */ - { - { 0 }, /* xmit.sem */ - 0, /* xmit.head */ - 0, /* xmit.tail */ - CONFIG_Z180_ESCCA_TXBUFSIZE, /* xmit.size */ - g_escca_txbuffer, /* xmit.buffer */ - }, - { - { 0 }, /* recv.sem */ - 0, /* recv.head */ - 0, /* recv.tail */ - CONFIG_Z180_ESCCA_RXBUFSIZE, /* recv.size */ - g_escca_rxbuffer, /* recv.buffer */ - }, - &g_uart_ops, /* ops */ - &g_escca_priv, /* priv */ -}; -#endif - -/* This describes the state of the ESCC Channel B port. */ - -#ifdef CONFIG_Z180_ESCCB -static const struct z180_dev_s g_esccb_priv = -{ - CONFIG_Z180_ESCCB_BAUD, /* baud */ - Z182_ESCCB_CR, /* cr */ - Z182_ESCCB_DR, /* dr */ - Z180_UART1_IRQ, /* irq */ - CONFIG_Z180_ESCCB_PARITY, /* parity */ - CONFIG_Z180_ESCCB_BITS, /* bits */ - CONFIG_Z180_ESCCB_2STOP /* stopbits2 */ -}; - -static uart_dev_t g_escca_port = -{ - 0, /* open_count */ -#ifdef CONFIG_Z180_ESCCA_SERIAL_CONSOLE - true, /* isconsole */ -#else - false, /* isconsole */ -#endif - { 0 }, /* closesem */ - { 0 }, /* xmitsem */ - { 0 }, /* recvsem */ - { - { 0 }, /* xmit.sem */ - 0, /* xmit.head */ - 0, /* xmit.tail */ - CONFIG_Z180_ESCCA_TXBUFSIZE, /* xmit.size */ - g_escca_txbuffer, /* xmit.buffer */ - }, - { - { 0 }, /* recv.sem */ - 0, /* recv.head */ - 0, /* recv.tail */ - CONFIG_Z180_ESCCA_RXBUFSIZE, /* recv.size */ - g_escca_rxbuffer, /* recv.buffer */ - }, - &g_uart_ops, /* ops */ - &g_escca_priv, /* priv */ -}; -#endif - -/* Now, which one with be tty0/console and which tty1? NOTE: SCC and ESCCA/B - * and mutually exclusive. - */ - -#undef CONSOLE_DEV -#undef TTYS0_DEV -#undef TTYS1_DEV - -#if defined(CONFIG_Z180_SCC_SERIAL_CONSOLE) -# define CONSOLE_DEV g_scc_port -# define TTYS0_DEV g_scc_port -#elif defined(CONFIG_Z180_SCC) -# define TTYS0_DEV g_scc_port - -#elif defined(CONFIG_Z180_ESCCA_SERIAL_CONSOLE) -# define CONSOLE_DEV g_escca_port -# define TTYS0_DEV g_escca_port -# if defined(CONFIG_Z180_ESCCB) -# define TTYS1_DEV g_esccb_port -# endif - -#elif defined(CONFIG_Z180_ESCCB_SERIAL_CONSOLE) -# define CONSOLE_DEV g_esccb_port -# define TTYS0_DEV g_esccb_port -# if defined(CONFIG_Z180_ESCCA) -# define TTYS1_DEV g_escca_port -# endif - -#elif defined(CONFIG_Z180_ESCCA) -# define TTYS0_DEV g_escca_port -# if defined(CONFIG_Z180_ESCCB) -# define TTYS1_DEV g_esccb_port -# endif - -#elif defined(CONFIG_Z180_ESCCB) -# define TTYS0_DEV g_esccb_port -#endif - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: z180_serialin - ****************************************************************************/ - -static inline uint8_t z180_serialin(struct z180_dev_s *priv, uint8_t regaddr) -{ -#warning "Missing logic" -} - -/**************************************************************************** - * Name: z180_serialout - ****************************************************************************/ - -static inline void z180_serialout(struct z180_dev_s *priv, uint8_t regaddr, - uint8_t value) -{ -#warning "Missing logic" -} - -/**************************************************************************** - * Name: z180_disableuartint - ****************************************************************************/ - -static inline void z180_disableuartint(struct z180_dev_s *priv) -{ -#warning "Missing logic" -} - -/**************************************************************************** - * Name: z180_restoreuartint - ****************************************************************************/ - -static inline void z180_restoreuartint(struct z180_dev_s *priv, uint8_t bits) -{ -#warning "Missing logic" -} - -/**************************************************************************** - * Name: z180_waittxready - ****************************************************************************/ - -static inline void z180_waittxready(struct z180_dev_s *priv) -{ -#warning "Missing logic" -} - -/**************************************************************************** - * Name: z180_setbaud - ****************************************************************************/ - -static inline void z180_setbaud(struct z180_dev_s *priv, uint24_t baud) -{ -#warning "Missing logic" -} - -/**************************************************************************** - * Name: z180_setup - * - * Description: - * Configure the UART baud, bits, parity, fifos, etc. This method is called - * the first time that the serial port is opened. - * - ****************************************************************************/ - -static int z180_setup(struct uart_dev_s *dev) -{ -#ifndef CONFIG_SUPPRESS_UART_CONFIG -# warning "Missing logic" -#endif - return OK; -} - -/**************************************************************************** - * Name: z180_shutdown - * - * Description: - * Disable the UART. This method is called when the serial port is closed - * - ****************************************************************************/ - -static void z180_shutdown(struct uart_dev_s *dev) -{ -#warning "Missing logic" -} - -/**************************************************************************** - * Name: z180_attach - * - * Description: - * Configure the UART to operation in interrupt driven mode. This method - * is called when the serial port is opened. Normally, this is just after - * the setup() method is called, however, the serial console may operate in - * a non-interrupt driven mode during the boot phase. - * - * RX and TX interrupts are not enabled when by the attach method (unless - * the hardware supports multiple levels of interrupt enabling). The RX - * and TX interrupts are not enabled until the txint() and rxint() methods - * are called. - * - ****************************************************************************/ - -static int z180_attach(struct uart_dev_s *dev) -{ -#warning "Missing logic" -} - -/**************************************************************************** - * Name: z180_detach - * - * Description: - * Detach UART interrupts. This method is called when the serial port is - * closed normally just before the shutdown method is called. The - * exception is the serial console which is never shutdown. - * - ****************************************************************************/ - -static void z180_detach(struct uart_dev_s *dev) -{ -#warning "Missing logic" -} - -/**************************************************************************** - * Name: z180_interrupt - * - * Description: - * This is the UART interrupt handler. It will be invoked when an - * interrupt is received on the 'irq'. It should call uart_xmitchars or - * uart_recvchars to perform the appropriate data transfers. The - * interrupt handling logic must be able to map the 'arg' to the - * appropriate uart_dev_s structure in order to call these functions. - * - ****************************************************************************/ - -static int z180_interrupt(int irq, void *context) -{ -#warning "Missing logic" -} - -/**************************************************************************** - * Name: z180_ioctl - * - * Description: - * All ioctl calls will be routed through this method - * - ****************************************************************************/ - -static int z180_ioctl(struct file *filep, int cmd, unsigned long arg) -{ -#warning "Missing logic" -} - -/**************************************************************************** - * Name: z180_receive - * - * Description: - * Called (usually) from the interrupt level to receive one character from - * the UART. Error bits associated with the receipt are provided in the - * the return 'status'. - * - ****************************************************************************/ - -static int z180_receive(struct uart_dev_s *dev, unsigned int *status) -{ -#warning "Missing logic" -} - -/**************************************************************************** - * Name: z180_rxint - * - * Description: - * Call to enable or disable RX interrupts - * - ****************************************************************************/ - -static void z180_rxint(struct uart_dev_s *dev, bool enable) -{ -#warning "Missing logic" -} - -/**************************************************************************** - * Name: z180_rxavailable - * - * Description: - * Return true if the receive fifo is not empty - * - ****************************************************************************/ - -static bool z180_rxavailable(struct uart_dev_s *dev) -{ -#warning "Missing logic" -} - -/**************************************************************************** - * Name: z180_send - * - * Description: - * This method will send one byte on the UART - * - ****************************************************************************/ - -static void z180_send(struct uart_dev_s *dev, int ch) -{ -#warning "Missing logic" -} - -/**************************************************************************** - * Name: z180_txint - * - * Description: - * Call to enable or disable TX interrupts - * - ****************************************************************************/ - -static void z180_txint(struct uart_dev_s *dev, bool enable) -{ -#warning "Missing logic" -} - -/**************************************************************************** - * Name: z180_txready - * - * Description: - * Return true if the tranmsit fifo is not full - * - ****************************************************************************/ - -static bool z180_txready(struct uart_dev_s *dev) -{ -#warning "Missing logic" -} - -/**************************************************************************** - * Name: z180_txempty - * - * Description: - * Return true if the transmit fifo is empty - * - ****************************************************************************/ - -static bool z180_txempty(struct uart_dev_s *dev) -{ -#warning "Missing logic" -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: z80_serial_initialize - * - * Description: - * Register serial console and serial ports. - * - ****************************************************************************/ - -void z80_serial_initialize(void) -{ - /* Make sure that all UART interrupts are disabled */ -#warning "Missing logic" - - /* Configure for usage of [E]SCC channels */ - -#ifdef CONFIG_Z180_SCC -# warning "Missing logic" -#endif - -#ifdef CONFIG_Z180_ESCCA -# warning "Missing logic" -#endif - -#ifdef CONFIG_Z180_ESCCB -# warning "Missing logic" -#endif - - /* If there is a console, then configure the console now */ - -#ifdef CONSOLE_DEV - CONSOLE_DEV.isconsole = true; - z180_setup(&CONSOLE_DEV); -#endif - - /* Register console and tty devices */ - -#ifdef CONSOLE_DEV - uart_register("/dev/console", &CONSOLE_DEV); -#endif - uart_register("/dev/ttyS0", &TTYS0_DEV); -#ifdef TTYS1_DEV - uart_register("/dev/ttyS1", &TTYS1_DEV); -#endif -} - -/**************************************************************************** - * Name: up_putc - * - * Description: - * Provide priority, low-level access to support OS debug - * writes - * - ****************************************************************************/ - -void up_putc(int ch) -{ -#ifdef CONSOLE_DEV - /* Disable [E]SCC interrupts and perform the low-level output */ - - z180_disableuartint(priv); - z80_lowputc(ch); - z180_restoreuartint(priv); -#endif -} -#endif /* USE_SERIALDRIVER */ diff --git a/arch/z80/src/z180/z180_schedulesigaction.c b/arch/z80/src/z180/z180_schedulesigaction.c deleted file mode 100644 index fe072f1424..0000000000 --- a/arch/z80/src/z180/z180_schedulesigaction.c +++ /dev/null @@ -1,163 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z180/z180_schedulesigaction.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include - -#include -#include -#include - -#include - -#include "switch.h" -#include "sched/sched.h" -#include "z80_internal.h" - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: z180_sigsetup - ****************************************************************************/ - -static void z180_sigsetup(FAR struct tcb_s *tcb, FAR chipreg_t *regs) -{ - /* Save the return address and interrupt state. These will be restored by - * the signal trampoline after the signals have been delivered. - */ - - tcb->xcp.saved_pc = regs[XCPT_PC]; - tcb->xcp.saved_i = regs[XCPT_I]; - - /* Then set up to vector to the trampoline with interrupts disabled */ - - regs[XCPT_PC] = (chipreg_t)z80_sigdeliver; - regs[XCPT_I] = 0; -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_schedule_sigaction - * - * Description: - * This function is called by the OS when one or more - * signal handling actions have been queued for execution. - * The architecture specific code must configure things so - * that the 'sigdeliver' callback is executed on the thread - * specified by 'tcb' as soon as possible. - * - * This function may be called from interrupt handling logic. - * - * This operation should not cause the task to be unblocked - * nor should it cause any immediate execution of sigdeliver. - * Typically, a few cases need to be considered: - * - * (1) This function may be called from an interrupt handler - * During interrupt processing, all xcptcontext structures - * should be valid for all tasks. That structure should - * be modified to invoke sigdeliver() either on return - * from (this) interrupt or on some subsequent context - * switch to the recipient task. - * (2) If not in an interrupt handler and the tcb is NOT - * the currently executing task, then again just modify - * the saved xcptcontext structure for the recipient - * task so it will invoke sigdeliver when that task is - * later resumed. - * (3) If not in an interrupt handler and the tcb IS the - * currently executing task -- just call the signal - * handler now. - * - * Assumptions: - * Called from critical section - * - ****************************************************************************/ - -void up_schedule_sigaction(FAR struct tcb_s *tcb) -{ - sinfo("tcb=%p, rtcb=%p current_regs=%p\n", tcb, - this_task(), up_current_regs()); - - /* First, handle some special cases when the signal is being delivered - * to the currently executing task. - */ - - if (tcb == this_task()) - { - /* CASE 1: We are not in an interrupt handler and a task is - * signalling itself for some reason. - */ - - if (!IN_INTERRUPT()) - { - /* In this case just deliver the signal now. */ - - (tcb->sigdeliver)(tcb); - tcb->sigdeliver = NULL; - } - - /* CASE 2: We are in an interrupt handler AND the interrupted task - * is the same as the one that must receive the signal, then we - * will have to modify the return state as well as the state in - * the TCB. - */ - - else - { - /* Set up to vector to the trampoline with interrupts - * disabled. - */ - - z180_sigsetup(tcb, IRQ_STATE()); - - /* And make sure that the saved context in the TCB - * is the same as the interrupt return context. - */ - - SAVE_IRQCONTEXT(tcb); - } - } - - /* Otherwise, we are (1) signaling a task is not running - * from an interrupt handler or (2) we are not in an - * interrupt handler and the running task is signalling - * some non-running task. - */ - - else - { - /* Set up to vector to the trampoline with interrupts disabled. */ - - z180_sigsetup(tcb, tcb->xcp.regs); - } -} diff --git a/arch/z80/src/z180/z180_serial.h b/arch/z80/src/z180/z180_serial.h deleted file mode 100644 index ca40bbfdf1..0000000000 --- a/arch/z80/src/z180/z180_serial.h +++ /dev/null @@ -1,68 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z180/z180_serial.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z80_SRC_Z180_Z180_SERIAL_H -#define __ARCH_Z80_SRC_Z180_Z180_SERIAL_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include "z80_internal.h" -#include "z180_config.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Functions Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Name: z180_putc - * - * Description: - * Low-level character output - * - ****************************************************************************/ - -void z180_putc(uint8_t ch) __naked; - -/**************************************************************************** - * Name: up_putc/z80_lowputc - * - * Description: - * Low-level console output - * - ****************************************************************************/ - -#ifdef USE_SERIALDRIVER -int z80_lowputc(int ch); -#else -void up_putc(int ch); -# define z80_lowputc(ch) up_putc(ch) -#endif - -#endif /* __ARCH_Z80_SRC_Z180_Z180_SERIAL_H */ diff --git a/arch/z80/src/z180/z180_sigdeliver.c b/arch/z80/src/z180/z180_sigdeliver.c deleted file mode 100644 index 5f4a359990..0000000000 --- a/arch/z80/src/z180/z180_sigdeliver.c +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z180/z180_sigdeliver.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include - -#include -#include -#include - -#include "chip/switch.h" -#include "sched/sched.h" -#include "z80_internal.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: z80_sigdeliver - * - * Description: - * This is the a signal handling trampoline. When a signal action was - * posted. The task context was mucked with and forced to branch to this - * location with interrupts disabled. - * - ****************************************************************************/ - -void z80_sigdeliver(void) -{ - FAR struct tcb_s *rtcb = this_task(); - chipreg_t regs[XCPTCONTEXT_REGS]; - - board_autoled_on(LED_SIGNAL); - - sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head); - DEBUGASSERT(rtcb->sigdeliver != NULL); - - /* Save the return state on the stack. */ - - z180_copystate(regs, rtcb->xcp.regs); - -#ifndef CONFIG_SUPPRESS_INTERRUPTS - /* Then make sure that interrupts are enabled. Signal handlers must always - * run with interrupts enabled. - */ - - up_irq_enable(); -#endif - - /* Deliver the signals */ - - (rtcb->sigdeliver)(rtcb); - - /* Output any debug messages BEFORE restoring errno (because they may - * alter errno), then disable interrupts again and restore the original - * errno that is needed by the user logic (it is probably EINTR). - */ - - sinfo("Resuming\n"); - up_irq_save(); - - /* Modify the saved return state with the actual saved values in the - * TCB. This depends on the fact that nested signal handling is - * not supported. Therefore, these values will persist throughout the - * signal handling action. - * - * Keeping this data in the TCB resolves a security problem in protected - * and kernel mode: The regs[] array is visible on the user stack and - * could be modified by a hostile program. - */ - - regs[XCPT_PC] = rtcb->xcp.saved_pc; - regs[XCPT_I] = rtcb->xcp.saved_i; - rtcb->sigdeliver = NULL; /* Allows next handler to be scheduled */ - - /* Then restore the correct state for this thread of execution. */ - - board_autoled_off(LED_SIGNAL); - z180_restoreusercontext(regs); -} diff --git a/arch/z80/src/z180/z180_timerisr.c b/arch/z80/src/z180/z180_timerisr.c deleted file mode 100644 index 8d765f3662..0000000000 --- a/arch/z80/src/z180/z180_timerisr.c +++ /dev/null @@ -1,139 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z180/z180_timerisr.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include - -#include - -#include "clock/clock.h" -#include "z80_internal.h" -#include "chip.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* "The Z180 contains a two channel 16-bit Programmable Reload Timer. Each - * PRT channel contains a 16-bit down counter and a 16-bit reload register." - * Channel 0 is dedicated as the system timer. - */ - -/* "The PRT input clock for both channels is equal to the system clock - * divided by 20." - */ - -#define Z180_PRT_CLOCK (Z180_SYSCLOCK / 20) - -/* The data Register "(TMDR) is decremented once every twenty clocks. When - * TMDR counts down to 0, it is automatically reloaded with the value - * contained in the Reload Register (RLDR)." - */ - -#define A180_PRT0_RELOAD (Z180_PRT_CLOCK / CLK_TCK) - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Function: z180_timerisr - * - * Description: - * The timer ISR will perform a variety of services for various portions - * of the systems. - * - ****************************************************************************/ - -static int z180_timerisr(int irq, chipreg_t *regs, void *arg) -{ - /* "When TMDR0 decrements to 0, TIF0 is set to 1. This generates an - * interrupt request if enabled by TIE0 = 1. TIF0 is reset to 0 when TCR - * is read and the higher or lower byte of TMDR0 is read." - */ - - inp(Z180_PRT_TCR); - inp(Z180_PRT0_DRL); - inp(Z180_PRT0_DRH); - - /* Process timer interrupt */ - - nxsched_process_timer(); - return 0; -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Function: up_timer_initialize - * - * Description: - * This function is called during start-up to initialize the timer - * interrupt. - * - ****************************************************************************/ - -void up_timer_initialize(void) -{ - uint8_t regval; - - /* Configure PRT0 to interrupt at the requested rate */ - - /* First stop PRT0 and disable interrupts */ - - regval = inp(Z180_PRT_TCR); - regval &= (PRT_TCR_TIF0 | PRT_TCR_TIE0 | PRT_TCR_TDE0); - outp(Z180_PRT_TCR, regval); - - /* Set the timer reload value so that the timer will interrupt at the - * desired frequency. "For writing, the TMDR down counting must be - * inhibited using the TDE (Timer Down Count Enable) bits in the TCR - * (Timer Control Register). Then, any or both higher and lower bytes of - * TMDR can be freely written (and read) in any order." - */ - - outp(Z180_PRT0_RLDRL, (A180_PRT0_RELOAD & 0xff)); - outp(Z180_PRT0_RLDRH, (A180_PRT0_RELOAD >> 8)); - - /* Enable down-counting */ - - regval |= PRT_TCR_TDE0; - outp(Z180_PRT_TCR, regval); - - /* Attach the timer interrupt vector */ - - irq_attach(Z180_PRT0, (xcpt_t)z180_timerisr, NULL); - - /* And enable the timer interrupt */ - - regval |= PRT_TCR_TIE0; - outp(Z180_PRT_TCR, regval); -} diff --git a/arch/z80/src/z180/z180_vectcommon.asm b/arch/z80/src/z180/z180_vectcommon.asm deleted file mode 100644 index bbf6e3c8ea..0000000000 --- a/arch/z80/src/z180/z180_vectcommon.asm +++ /dev/null @@ -1,209 +0,0 @@ -;************************************************************************** -; arch/z80/src/z180/z180_vectcommon.asm -; -; SPDX-License-Identifier: Apache-2.0 -; -; Licensed to the Apache Software Foundation (ASF) under one or more -; contributor license agreements. See the NOTICE file distributed with -; this work for additional information regarding copyright ownership. The -; ASF licenses this file to you under the Apache License, Version 2.0 (the -; "License"); you may not use this file except in compliance with the -; License. You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -; License for the specific language governing permissions and limitations -; under the License. -; -;************************************************************************** - - .title NuttX for the Z180 - .module z180_vectcommon - -;************************************************************************** -; Constants -;************************************************************************** - - ; Register save area layout - - XCPT_I == 0 ; Offset 0: Saved I w/interrupt state in carry - XCPT_BC == 2 ; Offset 1: Saved BC register - XCPT_DE == 4 ; Offset 2: Saved DE register - XCPT_IX == 6 ; Offset 3: Saved IX register - XCPT_IY == 8 ; Offset 4: Saved IY register - XCPT_SP == 10 ; Offset 5: Offset to SP at time of interrupt - XCPT_HL == 12 ; Offset 6: Saved HL register - XCPT_AF == 14 ; Offset 7: Saved AF register - XCPT_PC == 16 ; Offset 8: Offset to PC at time of interrupt - -;************************************************************************** -; Global symbols used -;************************************************************************** - - .globl _z80_doirq ; Interrupt decoding logic - -;************************************************************************** -; Vector Handlers -;************************************************************************** - - .area _CODE - -_up_int1:: ; Vector offset 0: External /INT1 - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #9 ; 9 = Z180_INT1 - jr _up_vectcommon ; Remaining RST handling is common - -_up_int2:: ; Vector offset 2: External /INT2 - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #10 ; 10 = Z180_INT2 - jr _up_vectcommon ; Remaining RST handling is common - -_up_prt0:: ; Vector offset 4: PRT channel 0 - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #11 ; 11 = Z180_PRT0 - jr _up_vectcommon ; Remaining RST handling is common - -_up_prt1:: ; Vector offset 6: PRT channel 1 - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #12 ; 12 = Z180_PRT1 - jr _up_vectcommon ; Remaining RST handling is common - -_up_dma0:: ; Vector offset 8: DMA channel 0 - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #13 ; 13 = Z180_DMA0 - jr _up_vectcommon ; Remaining RST handling is common - -_up_dma1:: ; Vector offset 8: DMA channel 1 - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #14 ; 14 = Z180_DMA1 - jr _up_vectcommon ; Remaining RST handling is common - -_up_csio:: ; Vector offset 12: Clocked serial I/O - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #15 ; 15 = Z180_CSIO - jr _up_vectcommon ; Remaining RST handling is common - -_up_asci0:: ; Vector offset 14: Async channel 0 - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #16 ; 16 = Z180_ASCI0 - jr _up_vectcommon ; Remaining RST handling is common - -_up_asci1:: ; Vector offset 16: Async channel 1 - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #17 ; 17 = Z180_ASCI1 - jr _up_vectcommon ; Remaining RST handling is common - -_up_unused:: ; Vector offset 18: Unused - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #18 ; 18 = Z180_UNUSED - jr _up_vectcommon ; Remaining RST handling is common - -;************************************************************************** -; Common Interrupt handler -;************************************************************************** - -_up_vectcommon:: - ; Create a register frame. SP points to top of frame + 4, pushes - ; decrement the stack pointer. Already have - ; - ; Offset 8: Return PC is already on the stack - ; Offset 7: AF (retaining flags) - ; - ; IRQ number is in A - - push hl ; Offset 6: HL - ld hl, #(3*2) ; HL is the value of the stack pointer before - add hl, sp ; the interrupt occurred - push hl ; Offset 5: Stack pointer - push iy ; Offset 4: IY - push ix ; Offset 3: IX - push de ; Offset 2: DE - push bc ; Offset 1: BC - - ld b, a ; Save the reset number in B - ld a, i ; Parity bit holds interrupt state - push af ; Offset 0: I with interrupt state in parity - di - - ; Call the interrupt decode logic. SP points to the beginning of the reg structure - - ld hl, #0 ; Argument #2 is the beginning of the reg structure - add hl, sp ; - push hl ; Place argument #2 at the top of stack - push bc ; Argument #1 is the Reset number - inc sp ; (make byte sized) - call _z80_doirq ; Decode the IRQ - - ; On return, HL points to the beginning of the reg structure to restore - ; Note that (1) the arguments pushed on the stack are not popped, and (2) the - ; original stack pointer is lost. In the normal case (no context switch), - ; HL will contain the value of the SP before the arguments were pushed. - - ld sp, hl ; Use the new stack pointer - - ; Restore registers. HL points to the beginning of the reg structure to restore - - ex af, af' ; Select alternate AF - pop af ; Offset 0: AF' = I with interrupt state in carry - ex af, af' ; Restore original AF - pop bc ; Offset 1: BC - pop de ; Offset 2: DE - pop ix ; Offset 3: IX - pop iy ; Offset 4: IY - exx ; Use alternate BC/DE/HL - ld hl, #-2 ; Offset of SP to account for ret addr on stack - pop de ; Offset 5: HL' = Stack pointer after return - add hl, de ; HL = Stack pointer value before return - exx ; Restore original BC/DE/HL - pop hl ; Offset 6: HL - pop af ; Offset 7: AF - - ; Restore the stack pointer - - exx ; Use alternate BC/DE/HL - ld sp, hl ; Set SP = saved stack pointer value before return - exx ; Restore original BC/DE/HL - - ; Restore interrupt state - - ex af, af' ; Recover interrupt state - jp po, nointenable ; Odd parity, IFF2=0, means disabled - ex af, af' ; Restore AF (before enabling interrupts) - ei ; yes - reti -nointenable:: - ex af, af' ; Restore AF - reti diff --git a/arch/z80/src/z180/z180_vectors.asm b/arch/z80/src/z180/z180_vectors.asm deleted file mode 100644 index e180a0bdb7..0000000000 --- a/arch/z80/src/z180/z180_vectors.asm +++ /dev/null @@ -1,71 +0,0 @@ -;************************************************************************** -; arch/z80/src/z180/z180_vectors.asm -; -; SPDX-License-Identifier: Apache-2.0 -; -; Licensed to the Apache Software Foundation (ASF) under one or more -; contributor license agreements. See the NOTICE file distributed with -; this work for additional information regarding copyright ownership. The -; ASF licenses this file to you under the Apache License, Version 2.0 (the -; "License"); you may not use this file except in compliance with the -; License. You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -; License for the specific language governing permissions and limitations -; under the License. -; -;************************************************************************** - - .title NuttX for the Z180 - .module z180_vectors - -;************************************************************************** -; Constants -;************************************************************************** - -;************************************************************************** -; Global symbols used -;************************************************************************** - - .globl _up_int1 ; Vector offset 0: External /INT1 - .globl _up_int2 ; Vector offset 2: External /INT2 - .globl _up_prt0 ; Vector offset 4: PRT channel 0 - .globl _up_prt1 ; Vector offset 6: PRT channel 1 - .globl _up_dma0 ; Vector offset 8: DMA channel 0 - .globl _up_dma1 ; Vector offset 8: DMA channel 1 - .globl _up_csio ; Vector offset 12: Clocked serial I/O - .globl _up_asci0 ; Vector offset 14: Async channel 0 - .globl _up_asci1 ; Vector offset 16: Async channel 1 - .globl _up_unused ; Vector offset 18: Unused - -;************************************************************************** -; Interrupt Vector Table -;************************************************************************** - -; The Vector Table is located at address 0x0040, between the RST vectors -; and the NMI vector - - .area _VECTORS (ABS) - .org 0x0040 - -_up_vectors:: - .dw _up_int1 ; Vector offset 0: External /INT1 - .dw _up_int2 ; Vector offset 2: External /INT2 - .dw _up_prt0 ; Vector offset 4: PRT channel 0 - .dw _up_prt1 ; Vector offset 6: PRT channel 1 - .dw _up_dma0 ; Vector offset 8: DMA channel 0 - .dw _up_dma1 ; Vector offset 8: DMA channel 1 - .dw _up_csio ; Vector offset 12: Clocked serial I/O - .dw _up_asci0 ; Vector offset 14: Async channel 0 - .dw _up_asci1 ; Vector offset 16: Async channel 1 - .dw _up_unused ; Vector offset 18: Unused - .dw _up_unused ; Vector offset 20: Unused - .dw _up_unused ; Vector offset 22: Unused - .dw _up_unused ; Vector offset 24: Unused - .dw _up_unused ; Vector offset 26: Unused - .dw _up_unused ; Vector offset 28: Unused - .dw _up_unused ; Vector offset 30: Unused diff --git a/arch/z80/src/z180/z80_mem.h b/arch/z80/src/z180/z80_mem.h deleted file mode 100644 index 81128ffbe7..0000000000 --- a/arch/z80/src/z180/z80_mem.h +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z180/z80_mem.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z80_SRC_Z180_Z80_MEM_H -#define __ARCH_Z80_SRC_Z180_Z80_MEM_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Locate the IDLE thread stack at the end of RAM. */ - -#define CONFIG_STACK_END CONFIG_RAM_SIZE -#define CONFIG_STACK_BASE (CONFIG_STACK_END - CONFIG_IDLETHREAD_STACKSIZE) - -/* The heap then extends from the linker determined beginning of the - * heap (s__HEAP). to the bottom of the IDLE thread stack. - * NOTE: The symbol s__HEAP is not accessible from C because - * it does not begin with the _ character. g_heapbase is defined - * in z180_head.asm to provide that value to the C code. - */ - -#define CONFIG_HEAP1_END CONFIG_STACK_BASE -#define CONFIG_HEAP1_BASE g_heapbase - -/**************************************************************************** - * Public variables - ****************************************************************************/ - -/* This is the bottom of the heap as provided by the linker symbol s__HEAP. - * NOTE: The symbol s__HEAP is not accessible from C because - * it does not begin with the _ character. g_heapbase is defined - * in z180_head.asm to provide that value to the C code. - */ - -extern const uint16_t g_heapbase; - -#endif /* __ARCH_Z80_SRC_Z180_Z80_MEM_H */ diff --git a/arch/z80/src/z8/Kconfig b/arch/z80/src/z8/Kconfig deleted file mode 100644 index e516e79ece..0000000000 --- a/arch/z80/src/z8/Kconfig +++ /dev/null @@ -1,63 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_CHIP_Z8 - -config ARCH_CHIP_Z8F640X - bool - -config ARCH_CHIP_Z8F642X - bool - -choice - prompt "z8 Chip Selection" - default ARCH_CHIP_Z8F6403 - -config ARCH_CHIP_Z8F6403 - bool "Z8F6403" - select ARCH_CHIP_Z8F640X - ---help--- - ZiLOG Z8F6403 (z8 Encore) - -config ARCH_CHIP_Z8F6423 - bool "Z8F6423" - select ARCH_CHIP_Z8F642X - ---help--- - ZiLOG Z8F6423 (z8 Encore) - -endchoice - -# UART0/1 always enabled - -config Z8_UART0 - bool - default y - select UART0_SERIALDRIVER - -config Z8_UART1 - bool - default y - select UART1_SERIALDRIVER - -# The ZiLOG ZDS-II Windows toolchain is the only toolchain available for -# the ez80. -# - -config Z8_TOOLCHAIN_ZDSII - bool - default ARCH_CHIP_Z8 - -choice - prompt "ZDS-II Toolchain version" - default Z8_ZDSII_V522 - -config Z8_ZDSII_V500 - bool "ZDS-II 5.0.0" - -config Z8_ZDSII_V522 - bool "ZDS-II 5.2.2" - -endchoice # ZDS-II Toolchain version -endif # ARCH_CHIP_Z8 diff --git a/arch/z80/src/z8/Make.defs b/arch/z80/src/z8/Make.defs deleted file mode 100644 index 383ef92bb2..0000000000 --- a/arch/z80/src/z8/Make.defs +++ /dev/null @@ -1,38 +0,0 @@ -############################################################################ -# arch/z80/src/z8/Make.defs -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -HEAD_SSRC = z8_head.S - -CMN_CSRCS = z80_allocateheap.c z80_createstack.c z80_doirq.c -CMN_CSRCS += z80_exit.c z80_idle.c z80_interruptcontext.c -CMN_CSRCS += z80_initialize.c z80_mdelay.c z80_nputs.c -CMN_CSRCS += z80_releasestack.c z80_switchcontext.c -CMN_CSRCS += z80_stackframe.c z80_udelay.c z80_usestack.c - -CHIP_SSRCS = z8_vector.S z8_saveusercontext.S z8_restorecontext.S -CHIP_CSRCS = z8_initialstate.c z8_irq.c z8_saveirqcontext.c -CHIP_CSRCS += z8_schedulesigaction.c z8_sigdeliver.c -CHIP_CSRCS += z8_serial.c z8_i2c.c z8_registerdump.c - -ifneq ($(CONFIG_SCHED_TICKLESS),y) -CHIP_CSRCS += z8_timerisr.c -endif diff --git a/arch/z80/src/z8/Toolchain.defs b/arch/z80/src/z8/Toolchain.defs deleted file mode 100644 index bea30decf4..0000000000 --- a/arch/z80/src/z8/Toolchain.defs +++ /dev/null @@ -1,149 +0,0 @@ -############################################################################ -# arch/z80/src/z8/Toolchain.defs -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -# These are the directories where the ZDS-II toolchain is installed. NOTE -# that short 8.3 path names are used in order to avoid spaces. On my machine -# I have: -# -# C:\PROGRA~1\ = C:\Profram Files\ -# C:\PROGRA~2\ = C:\Program Files (x86)\ -# -# Your PC may be configured differently. - -ifeq ($(CONFIG_Z8_ZDSII_V522),y) -ZDSVERSION = 5.2.2 -else # ifeq ($(CONFIG_Z8_ZDSII_V500),y) -ZDSVERSION = 5.0.0 -endif - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) - ZDSINSTALLDIR = C:/PROGRA~2/ZiLOG/ZDSII_Z8Encore!_$(ZDSVERSION) - INSTALLDIR = $(shell echo $(ZDSINSTALLDIR)| sed -e "s/\//\\/g") - ZDSBINDIR = $(INSTALLDIR)\bin - ZDSSTDINCDIR = $(INSTALLDIR)\include\std - ZDSZILOGINCDIR = $(INSTALLDIR)\include\zilog -ifeq ($(CONFIG_ARCH_CHIP_Z8F642X),y) - ZDSDEVINCDIR = $(INSTALLDIR)\Z8Encore_F642X -endif -ifeq ($(CONFIG_ARCH_CHIP_Z8F640X),y) - ZDSDEVINCDIR = $(INSTALLDIR)\Z8Encore_F640X -endif - ZDSSTDLIBDIR = $(INSTALLDIR)\lib\std - ZDSZILOGLIBDIR = $(INSTALLDIR)\lib\zilog -else - ZDSINSTALLDIR = C:/PROGRA~2/ZiLOG/ZDSII_Z8Encore!_$(ZDSVERSION) - INSTALLDIR = $(shell cygpath -u "$(ZDSINSTALLDIR)") - ZDSBINDIR = $(INSTALLDIR)/bin - ZDSSTDINCDIR = $(INSTALLDIR)/include/std - ZDSZILOGINCDIR = $(INSTALLDIR)/include/zilog -ifeq ($(CONFIG_ARCH_CHIP_Z8F642X),y) - ZDSDEVINCDIR = $(ZDSZILOGINCDIR)/Z8Encore_F642X -endif -ifeq ($(CONFIG_ARCH_CHIP_Z8F640X),y) - ZDSDEVINCDIR = $(ZDSZILOGINCDIR)/Z8Encore_F640X -endif - ZDSSTDLIBDIR = $(INSTALLDIR)/lib/std - ZDSZILOGLIBDIR = $(INSTALLDIR)/lib/zilog - - # These are the same directories but with the directory separator - # character swapped as needed by the ZDS-II compiler - - WTOPDIR = $(shell cygpath -w "$(TOPDIR)") - WZDSSTDINCDIR = $(shell cygpath -w "$(ZDSSTDINCDIR)") - WZDSZILOGINCDIR = $(shell cygpath -w "$(ZDSZILOGINCDIR)") - WZDSDEVINCDIR = $(shell cygpath -w "$(ZDSDEVINCDIR)") - WZDSSTDLIBDIR = $(shell cygpath -w "$(ZDSSTDLIBDIR)") - WZDSZILOGLIBDIR = $(shell cygpath -w "$(ZDSZILOGLIBDIR)") - - # Escaped versions - - ETOPDIR = $(shell echo "$(WTOPDIR)" | sed -e "s/ /%20/g") - EZDSSTDINCDIR = $(shell echo "$(WZDSSTDINCDIR)" | sed -e "s/ /%20/g") - EZDSZILOGINCDIR = $(shell echo "$(WZDSZILOGINCDIR)" | sed -e "s/ /%20/g") -endif - -# CPU Identification - -ifeq ($(CONFIG_ARCH_CHIP_Z8F642X),y) - ARCHFAMILYDEF = _Z8ENCORE_F642X - ARCHSERIESDEF = _Z8ENCORE_64K_SERIES - ARCHREVAA = -NOrevaa -ifeq ($(CONFIG_ARCH_CHIP_Z8F6423),y) - ARCHCPU = Z8F6423 - ARCHCPUDEF = _Z8F6423 -endif -endif - -ifeq ($(CONFIG_ARCH_CHIP_Z8F640X),y) - ARCHFAMILYDEF = _Z8ENCORE_F640X - ARCHSERIESDEF = _Z8ENCORE_640_FAMILY - ARCHREVAA = -revaa -ifeq ($(CONFIG_ARCH_CHIP_Z8F6403),y) - ARCHCPU = Z8F6403 - ARCHCPUDEF = _Z8F6403 -endif -endif - -# Optimization level - -ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - ARCHOPTIMIZATION += -NOregvar -reduceopt - ARCHASMOPTIMIZATION = -debug -sdiopt -else - ARCHOPTIMIZATION += -regvar - ARCHASMOPTIMIZATION = -nodebug -sdiopt -endif - -ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - ARCHOPTIMIZATION = -debug -else - ARCHOPTIMIZATION = -nodebug -endif - -# Tool names/paths - -CROSSDEV = -CC = ez8cc.exe -CPP = gcc -E -P -x c -LD = ez8link.exe -AS = ez8asm.exe -AR = ez8lib.exe - -# File extensions - -ASMEXT = .asm -OBJEXT = .obj -LIBEXT = .lib -EXEEXT = .hex - -# Loadable module definitions - -CMODULEFLAGS = $(CFLAGS) -fvisibility=hidden -LDMODULEFLAGS = -r -T $(call CONVERT_PATH,$(TOPDIR)/libs/libc/elf/gnu-elf.ld) - -# ELF module definitions - -CELFFLAGS = $(CFLAGS) -fvisibility=hidden -CXXELFFLAGS = $(CXXFLAGS) -fvisibility=hidden - -LDELFFLAGS = -r -e __start -LDELFFLAGS += -T $(call CONVERT_PATH,$(TOPDIR)$(DELIM)libs$(DELIM)libc$(DELIM)elf$(DELIM)gnu-elf.ld) diff --git a/arch/z80/src/z8/chip.h b/arch/z80/src/z8/chip.h deleted file mode 100644 index 0ee335bd2a..0000000000 --- a/arch/z80/src/z8/chip.h +++ /dev/null @@ -1,210 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z8/chip.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z80_SRC_Z8_CHIP_H -#define __ARCH_Z80_SRC_Z8_CHIP_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -# include -#endif - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Hexadecimal Representation ***********************************************/ - -#ifdef __ASSEMBLY__ -# define _HX(h) %##h -#else -# define _HX(h) 0x##h -#endif - -/* Memory Map - * - * 64Kb Program Memory (64K series) - * C:0000 - C:0001 : Flash options - * C:0002 - C:0037 : Vectors - * : ROM data - * : Code - * - * 4Kb Register File (64K series) - * R:020 - R:0ff : 224 byte RDATA - * R:0e0 - R:0ef : 16-byte working register area (RDATA) - * E:100 - E:eff : 3.5 Kbyte EDATA - * f00 - fff : 256 byte control register area - */ - -/* Special Function Registers *********************************************** - * - * Because of the many different ez80 configurations, we will rely on the - * ZDS-II header file, ez8.h, to provide the correct addresses for - * each register. - */ - -/* Timer Register Bit Definitions *******************************************/ - -/* Timer control register */ - -#define Z8_TIMERCTL_TEN _HX(80) /* Bit 7: Timer enabled */ -#define Z8_TIMERCTL_TPOL _HX(40) /* Bit 6: Timer input/output polarity */ -#define Z8_TIMERCTL_DIV1 _HX(00) /* Bits 3-5: Pre-scale divisor */ -#define Z8_TIMERCTL_DIV2 _HX(08) -#define Z8_TIMERCTL_DIV4 _HX(10) -#define Z8_TIMERCTL_DIV8 _HX(18) -#define Z8_TIMERCTL_DIV16 _HX(20) -#define Z8_TIMERCTL_DIV32 _HX(28) -#define Z8_TIMERCTL_DIV64 _HX(30) -#define Z8_TIMERCTL_DIV128 _HX(38) -#define Z8_TIMERCTL_ONESHOT _HX(00) /* Bits 0-2: Timer mode */ -#define Z8_TIMERCTL_CONT _HX(01) -#define Z8_TIMERCTL_COUNTER _HX(02) -#define Z8_TIMERCTL_PWM _HX(03) -#define Z8_TIMERCTL_CAPTURE _HX(04) -#define Z8_TIMERCTL_COMPARE _HX(05) -#define Z8_TIMERCTL_GATED _HX(06) -#define Z8_TIMERCTL_CAPCMP _HX(07) - -/* UART Register Offsets ****************************************************/ - -#define Z8_UART_TXD _HX(00) /* 8-bits: UART Transmit Data */ -#define Z8_UART_RXD _HX(00) /* 8-bits: UART Receive Data */ -#define Z8_UART_STAT0 _HX(01) /* 8-bits: UART Status 0 */ -#define Z8_UART_CTL _HX(02) /* 16-bits: UART Control */ -#define Z8_UART_CTL0 _HX(02) /* 8-bits: UART Control 0 */ -#define Z8_UART_CTL1 _HX(03) /* 8-bits: UART COntrol 1 */ -#if defined(_Z8FMC16) || defined(_Z8F1680) -# define Z8_UART_MDSTAT _HX(04) /* 8-bits: UART Mode Select & Status */ -#else -# define Z8_UART_STAT1 _HX(04) /* 8-bits: UART Status 1 */ -#endif -#define Z8_UART_ADDR _HX(05) /* 8-bits: UART Address Compare */ -#define Z8_UART_BR _HX(06) /* 16-bits: UART Baud Rate */ -#define Z8_UART_BRH _HX(06) /* 8-bits: UART Baud Rate High Byte */ -#define Z8_UART_BRL _HX(07) /* 8-bits: UART Baud Rate Low Byte */ - -/* UART0/1 Base Register Addresses ******************************************/ - -#ifdef EZ8_UART0 -# define Z8_UART0_BASE ((uint8_t volatile far*)0xf40) -#endif - -#ifdef EZ8_UART1 -# define Z8_UART1_BASE ((uint8_t volatile far*)0xf48) -#endif - -/* UART0/1 Status 0 Register Bit Definitions ********************************/ - -#define Z8_UARTSTAT0_RDA _HX(80) /* Bit 7: Receive Data Available */ -#define Z8_UARTSTAT0_PE _HX(40) /* Bit 6: Parity Error */ -#define Z8_UARTSTAT0_OE _HX(20) /* Bit 5: Overrun Error */ -#define Z8_UARTSTAT0_FE _HX(10) /* Bit 4: Framing Error */ -#define Z8_UARTSTAT0_BRKD _HX(08) /* Bit 3: Break Detect */ -#define Z8_UARTSTAT0_TDRE _HX(04) /* Bit 2: Transmitter Data Register Empty */ -#define Z8_UARTSTAT0_TXE _HX(02) /* Bit 1: Transmitter Empty */ -#define Z8_UARTSTAT0_CTS _HX(01) /* Bit 0: Clear To Send */ - -/* UART0/1 Control 0/1 Register Bit Definitions *****************************/ - -#define Z8_UARTCTL0_TEN _HX(80) /* Bit 7: Transmit Enable */ -#define Z8_UARTCTL0_REN _HX(40) /* Bit 6: Receive Enable */ -#define Z8_UARTCTL0_CTSE _HX(20) /* Bit 5: CTS Enable */ -#define Z8_UARTCTL0_PEN _HX(10) /* Bit 4: Parity Enable */ -#define Z8_UARTCTL0_PSEL _HX(08) /* Bit 3: Odd Parity Select */ -#define Z8_UARTCTL0_SBRK _HX(04) /* Bit 2: Send Break */ -#define Z8_UARTCTL0_STOP _HX(02) /* Bit 1: Stop Bit Select */ -#define Z8_UARTCTL0_LBEN _HX(01) /* Bit 0: Loopback Enable */ - -#define Z8_UARTCTL1_MPMD1 _HX(80) /* Bit 7: Multiprocessor Mode (bit1) */ -#define Z8_UARTCTL1_MPEN _HX(40) /* Bit 6: Multiprocessor Enable */ -#define Z8_UARTCTL1_MPMD0 _HX(20) /* Bit 5: Multiprocessor Mode (bit0) */ -#define Z8_UARTCTL1_MPBT _HX(10) /* Bit 4: Multiprocessor Bit Transmit */ -#define Z8_UARTCTL1_DEPOL _HX(08) /* Bit 3: Driver Enable Polarity */ -#define Z8_UARTCTL1_BRGCTL _HX(04) /* Bit 2: Baud Rate Generator Control */ -#define Z8_UARTCTL1_RDAIRQ _HX(02) /* Bit 1: Receive Data Interrupt Enable */ -#define Z8_UARTCTL1_IREN _HX(01) /* Bit 0: Infrared Encoder/Decoder Enable */ - -/* UART0/1 Mode Status/Select Register Bit Definitions **********************/ - -#define Z8_UARTMDSEL_NORMAL _HX(00) /* Bits 5-7=0: Multiprocessor and Normal Mode */ -#define Z8_UARTMDSEL_FILTER HX(20) /* Bits 5-7=1: Noise Filter Control/Status */ -#define Z8_UARTMDSEL_LINP HX(40) /* Bits 5-7=2: LIN protocol Control/Status */ -#define Z8_UARTMDSEL_HWREV HX(e0) /* Bits 5-7=7: LIN-UART Hardware Revision */ - /* Bits 0-4: Mode dependent status */ - -/* I2C Status Register Bit Definitions **************************************/ - -#if defined(_Z8FMC16) || defined(_Z8F1680) -# define I2C_ISTAT_NCKI (1 << 0) /* Bit 0: 1=NAK Interrupt */ -# define I2C_ISTAT_SPRS (1 << 1) /* Bit 1: 1=STOP/RESTART condition Interrupt */ -# define I2C_ISTAT_ARBLST (1 << 2) /* Bit 2: 1=Arbitration lost */ -# define I2C_ISTAT_RD (1 << 3) /* Bit 3: 1=Read */ -# define I2C_ISTAT_GCA (1 << 4) /* Bit 4: 1=General Call Address */ -# define I2C_ISTAT_SAM (1 << 5) /* Bit 5: 1=Slave address match */ -# define I2C_ISTAT_RDRF (1 << 6) /* Bit 6: 1=Receive Data Register Full */ -# define I2C_ISTAT_TDRE (1 << 7) /* Bit 7: 1=Transmit Data Register Empty */ -#else -# define I2C_STAT_NCKI (1 << 0) /* Bit 0: 1=NAK Interrupt */ -# define I2C_STAT_DSS (1 << 1) /* Bit 1: 1=Data Shift State */ -# define I2C_STAT_TAS (1 << 2) /* Bit 2: 1=Transmit Address State */ -# define I2C_STAT_RD (1 << 3) /* Bit 3: 1=Read */ -# define I2C_STAT_10B (1 << 4) /* Bit 4: 1=10-Bit Address */ -# define I2C_STAT_ACK (1 << 5) /* Bit 5: 1=Acknowledge */ -# define I2C_STAT_RDRF (1 << 6) /* Bit 6: 1=Receive Data Register Full */ -# define I2C_STAT_TDRE (1 << 7) /* Bit 7: 1=Transmit Data Register Empty */ -#endif - -/* I2C Control Register Bit Definitions *************************************/ - -#define I2C_CTL_FILTEN (1 << 0) /* Bit 0: 1=I2C Signal Filter Enable */ -#define I2C_CTL_FLUSH (1 << 1) /* Bit 1: 1=Flush Data */ -#define I2C_CTL_NAK (1 << 2) /* Bit 2: 1=Send NAK */ -#define I2C_CTL_TXI (1 << 3) /* Bit 3: 1=Enable TDRE interrupts */ -#define I2C_CTL_BIRQ (1 << 4) /* Bit 4: 1=Baud Rate Generator Interrupt Request */ -#define I2C_CTL_STOP (1 << 5) /* Bit 5: 1=Send Stop Condition */ -#define I2C_CTL_START (1 << 6) /* Bit 6: 1=Send Start Condition */ -#define I2C_CTL_IEN (1 << 7) /* Bit 7: 1=I2C Enable */ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -#undef EXTERN -#ifdef __cplusplus -} -#endif -#endif - -#endif /* __ARCH_Z80_SRC_Z8_CHIP_H */ diff --git a/arch/z80/src/z8/switch.h b/arch/z80/src/z8/switch.h deleted file mode 100644 index c483d2d607..0000000000 --- a/arch/z80/src/z8/switch.h +++ /dev/null @@ -1,246 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z8/switch.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z80_SRC_Z8_SWITCH_H -#define __ARCH_Z80_SRC_Z8_SWITCH_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -# include -# include -# include -#endif -#include "z80_internal.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Z8_IRQSTATE_* definitions ************************************************ - * These are used in the state field of 'struct z8_irqstate_s' structure - * to define the current state of the interrupt handling. - * These definition support "lazy" interrupt context saving. See comments - * below associated with s'truct z8_irqstate_s'. - */ - -#define Z8_IRQSTATE_NONE 0 /* Not handling an interrupt */ -#define Z8_IRQSTATE_ENTRY 1 /* In interrupt, context has not been saved */ -#define Z8_IRQSTATE_SAVED 2 /* In interrupt, context has been saved */ - -/* The information saved on interrupt entry can be retained in a array of two - * uint24_t values. These are - * - * value[0] = RP (MS byte) and Flags (LS) byte - * value[1] = PC - * - * The pointer to the save structure is a stack pointer at the time - * that z80_doirq() was called: - * - * PC[7:0] - * PC[15:8] - * Flags Register - * SP -> RP - * - * The stack pointer on return from interrupt can be obtained by adding 4 - * to the pointer to the save structure. - */ - -#define Z8_IRQSAVE_RPFLAGS (0) /* Index 10: RP (MS) and FLAGS (LS) */ -#define Z8_IRQSAVE_PC (1) /* Index 2: PC[8:15] */ -#define Z8_IRQSAVE_REGS (2) /* Number 16-bit values saved */ - -/* Byte offsets */ - -#define Z8_IRQSAVE_RP_OFFS (2*Z8_IRQSAVE_RPFLAGS) /* Offset 0: RP */ -#define Z8_IRQSAVE_FLAGS_OFFS (2*Z8_IRQSAVE_RPFLAGS+1) /* Offset 1: FLAGS */ -#define Z8_IRQSAVE_PCH_OFFS (2*Z8_IRQSAVE_PC) /* Offset 2: PC[8:15] */ -#define Z8_IRQSAVE_PCL_OFFS (2*Z8_IRQSAVE_PC+1) /* Offset 3: PC[0:7] */ -#define Z8_IRQSAVE_SIZE (2*Z8_IRQSAVE_REGS) /* Number 8-bit values saved */ - -/* Macros for portability *************************************************** - * - * Common logic in arch/z80/src/common is customized for the z8 - * context switching logic via the following macros. - */ - -/* Initialize the IRQ state */ - -#define INIT_IRQCONTEXT() \ - do { \ - g_z8irqstate.state = Z8_IRQSTATE_NONE; \ - } while (0) - -/* IN_INTERRUPT returns true if the system is currently operating in the - * interrupt context. IN_INTERRUPT is the inline equivalent - * of up_interrupt_context(). - */ - -#define IN_INTERRUPT() \ - (g_z8irqstate.state != Z8_IRQSTATE_NONE) - -/* The following macro is used when the system enters interrupt - * handling logic - * - * NOTE: Nested interrupts are not supported in this implementation. If you - * want to implement nested interrupts, you would have to change the way that - * g_current_regs is handled. The savestate variable would not work for - * that purpose as implemented here because only the outermost nested - * interrupt can result in a context switch (it can probably be deleted). - */ - -#define DECL_SAVESTATE() \ - struct z8_irqstate_s savestate - -#define IRQ_ENTER(irq, regs) \ - do { \ - savestate.state = g_z8irqstate.state; \ - savestate.regs = g_z8irqstate.regs; \ - g_z8irqstate.state = Z8_IRQSTATE_ENTRY; \ - g_z8irqstate.regs = (regs); \ - up_ack_irq(irq); \ - } while (0) - -/* The following macro is used when the system exits interrupt - * handling logic - */ - -#define IRQ_LEAVE(irq) \ - do { \ - g_z8irqstate.state = savestate.state; \ - g_z8irqstate.regs = savestate.regs; \ - } while (0) - -/* The following macro is used to sample the interrupt state - * (as a opaque handle) - */ - -#define IRQ_STATE() \ - (g_z8irqstate.regs) - -/* Save the current IRQ context in the specified TCB */ - -#define SAVE_IRQCONTEXT(tcb) \ - z8_saveirqcontext((tcb)->xcp.regs) - -/* Set the current IRQ context to the state specified in the TCB */ - -#define SET_IRQCONTEXT(tcb) \ - do { \ - g_z8irqstate.state = Z8_IRQSTATE_SAVED; \ - g_z8irqstate.regs = (tcb)->xcp.regs; \ - } while (0) - -/* Save the user context in the specified TCB. User context saves - * can be simpler because only those registers normally - * saved in a C called need be stored. - */ - -#define SAVE_USERCONTEXT(tcb) \ - up_saveusercontext((tcb)->xcp.regs) - -/* Restore the full context -- either a simple user state save or the full, - * IRQ state save. - */ - -#define RESTORE_USERCONTEXT(tcb) \ - z8_restorecontext((tcb)->xcp.regs) - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -/* In order to provide faster interrupt handling, the interrupt logic does - * "lazy" context saving as described below: - * - * (1) At the time of the interrupt, minimum information is saved and the - * register pointer is changed so that the interrupt logic does not alter - * the state of the interrupted task's registers. - * (2) If no context switch occurs during the interrupt processing, then - * the return from interrupt is also simple. - * (3) If a context switch occurs during interrupt processing, then - * (a) The full context of the interrupt task is saved, and - * (b) A full context switch is performed when the interrupt exits (see - * z8_vector.S). - * - * The following structure is used to manage this "lazy" context saving. - */ - -#ifndef __ASSEMBLY__ -struct z8_irqstate_s -{ - uint8_t state; /* See Z8_IRQSTATE_* definitions above */ - chipreg_t *regs; /* Saved register information */ -}; -#endif - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -/* This structure holds information about the current interrupt - * processing state - */ - -extern struct z8_irqstate_s g_z8irqstate; -#endif - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Defined in z8_irq.c */ - -void up_ack_irq(int irq); - -/* Defined in z8_saveusercontext.asm */ - -int up_saveusercontext(FAR chipreg_t *regs); - -/* Defined in z8_saveirqcontext.c */ - -void z8_saveirqcontext(FAR chipreg_t *regs); - -/* Defined in z8_restorecontext.asm */ - -void z8_restorecontext(FAR chipreg_t *regs); - -/* Defined in z8_sigsetup.c */ - -void z8_sigsetup(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver, - FAR chipreg_t *regs); - -#ifdef __cplusplus -} -#endif -#endif - -#endif /* __ARCH_Z80_SRC_Z8_SWITCH_H */ diff --git a/arch/z80/src/z8/z80_mem.h b/arch/z80/src/z8/z80_mem.h deleted file mode 100644 index c74c41629a..0000000000 --- a/arch/z80/src/z8/z80_mem.h +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z8/z80_mem.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z80_SRC_Z8_Z80_MEM_H -#define __ARCH_Z80_SRC_Z8_Z80_MEM_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* For the ZiLOG ZDS-II toolchain(s), the heap will be set using linker- - * defined values: - * - * far_heapbot : set to the offset to the first unused value in EDATA - * far_stacktop : set to the highest address in EDATA - * - * The top of the heap is then determined by the amount of stack setaside - * in the NuttX configuration file - */ - -#ifndef CONFIG_HEAP1_BASE -extern far unsigned long far_heapbot; -# define CONFIG_HEAP1_BASE ((uint16_t)&far_heapbot) -#endif - -#ifndef CONFIG_HEAP1_END -extern far unsigned long far_stacktop; -# define CONFIG_HEAP1_END \ - (((uint16_t)&far_stacktop) - CONFIG_IDLETHREAD_STACKSIZE) -#endif - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -#undef EXTERN -#ifdef __cplusplus -} -#endif -#endif - -#endif /* __ARCH_Z80_SRC_Z8_Z80_MEM_H */ diff --git a/arch/z80/src/z8/z8_head.S b/arch/z80/src/z8/z8_head.S deleted file mode 100644 index 33d9dea718..0000000000 --- a/arch/z80/src/z8/z8_head.S +++ /dev/null @@ -1,238 +0,0 @@ -/************************************************************************** - * arch/z80/src/z8/z8_head.S - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - **************************************************************************/ - -/************************************************************************** - * Included Files - **************************************************************************/ - -#include -#include -#include -#include - -/************************************************************************** - * Pre-processor Definitions - **************************************************************************/ - -/* Assume the large model */ - -#if !defined(CONFIG_Z8_MODEL_LARGE) && !defined(CONFIG_Z8_MODEL_SMALL) -# define CONFIG_Z8_MODEL_LARGE 1 -# undef CONFIG_Z8_MODEL_SMALL -#endif - -#ifdef __Z8F1680 -# define CONFIG_Z8_COPYPRAM -#else -# undef CONFIG_Z8_COPYPRAM -#endif - -/************************************************************************** - * External References / External Definitions - **************************************************************************/ - - xref _z16f_clkinit:ROM - xref _z16f_board_initialize:ROM -#ifdef CONFIG_ARCH_LEDS - xref _board_autoled_initialize:ROM -#endif - xref _nx_start:ROM - xref _z80_doirq:ROM - xref _low_nearbss - xref _len_nearbss - xref _low_farbss - xref _len_farbss - xref _low_neardata - xref _len_neardata - xref _low_near_romdata - xref _low_fardata - xref _len_fardata - xref _low_far_romdata -#ifdef CONFIG_Z8_COPYPRAM - xref _low_pramseg - xref _len_pramseg - xref _low_pram_romdata -#endif - xref _far_stacktop - xdef _z8_reset - xdef __intrp - -/************************************************************************** - * Code - **************************************************************************/ - - segment CODE - -/************************************************************************** - * Interrupt Vectors - **************************************************************************/ - - /* Reset vector */ - - vector RESET = _z8_reset - -/************************************************************************** - * Name: _z16f_reset - * - * Description: - * Reset entry point - * - **************************************************************************/ - - define startup, space=rom - segment startup -_z8_reset: - /* Set the register pointer for working registers e0-ef */ - - srp #%e0 - - /* Initialize the stack pointer */ - - ldx spl, #low(_far_stacktop+1) - ldx sph, #high(_far_stacktop+1) - - /* Clear internal register ram area (c_nearbss) */ - - ld r0, #_low_nearbss - ld r2, #_len_nearbss - cp r2, #0 - jr z, _z8_reset2 - -_z8_reset1: - clr @r0 - inc r0 - djnz r2, _z8_reset1 - - /* Clear extended ram area (c_farbss) */ - -_z8_reset2: - ld r2, #high(_low_farbss) - ld r3, #low(_low_farbss) - ld r0, #high(_len_farbss) - ld r1, #low(_len_farbss) - - ld r4, r0 - or r4, r1 - jr z, _z8_reset4 - clr r4 - -_z8_reset3: - ldx @rr2,r4 - incw rr2 - decw rr0 - jr nz, _z8_reset3 - - /* Copy ROM data into internal RAM */ - -_z8_reset4: -#ifdef CONFIG_Z8_COPYNEARDATA - ld r0, #high(_low_near_romdata) - ld r1, #low(_low_near_romdata) - ld r3, #_len_neardata - ld r4, #_low_neardata - cp r3, #0 - jr z, _z8_reset6 - -_z8_reset5: - ldci @r4, @rr0 - djnz r3, _z8_reset5 - -_z8_reset6: -#endif - /* Copy ROM data into extended RAM */ - - ld r0, #high(_low_fardata) - ld r1, #low(_low_fardata) - ld r2, #high(_low_far_romdata) - ld r3, #low(_low_far_romdata) - ld r4, #high(_len_fardata) - ld r5, #low(_len_fardata) - - ld r6, r4 - or r6, r5 - jr z, _z8_reset8 - -_z8_reset7: - ldc r6, @rr2 - ldx @rr0, r6 - incw rr0 - incw rr2 - decw rr4 - jr nz, _z8_reset7 - - /* Copy ROM copy of code into Program RAM */ - -_z8_reset8: -#ifdef CONFIG_Z8_COPYPRAM - ld r0, #high(_low_pramseg) - ld r1, #low(_low_pramseg) - ld r2, #high(_low_pram_romdata) - ld r3, #low(_low_pram_romdata) - ld r4, #high(_len_pramseg) - ld r5, #low(_len_pramseg) - - ld r6, r4 - or r6, r5 - jr z, _z8_reset10 - -_z8_reset9: - ldc r6, @rr2 - ldc @rr0, r6 - incw rr0 - incw rr2 - decw rr4 - jr nz, _z8_reset9 - -_z8_reset10: -#endif - - /* Start NuttX */ - - ldx __intrp,#0 - xor r15, r15 - xor r14, r14 - call _nx_start - - /* We should never get here */ - -_z8_reset_halt: - jr _z8_reset_halt - -/************************************************************************** - * Data - **************************************************************************/ - -#ifdef CONFIG_Z8_MODEL_LARGE - segment FAR_BSS -__intrp ds 1 -#else - segment NEAR_BSS -__intrp ds 1 -#endif - - /* Set aside area for working registers */ - - define workingreg, space=rdata, org=%e0 - segment workingreg - ds %10 - - end _z8_reset diff --git a/arch/z80/src/z8/z8_i2c.c b/arch/z80/src/z8/z8_i2c.c deleted file mode 100644 index 9af2e59089..0000000000 --- a/arch/z80/src/z8/z8_i2c.c +++ /dev/null @@ -1,652 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z8/z8_i2c.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include /* eZ8 Register definitions */ -#include "chip.h" /* Register bit definitions */ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#define Z8_NOSTOP (1 << 0) /* Bit 0: No STOP on this transfer */ -#define Z8_NOSTART (1 << 1) /* Bit 1: No address or START on this transfers */ - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -struct z8_i2cdev_s -{ - const struct i2c_ops_s *ops; /* I2C vtable */ - uint32_t frequency; /* Currently selected I2C frequency */ - uint16_t brg; /* Baud rate generator value */ - uint8_t addr; /* 8-bit address */ -}; - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -/* Misc. Helpers */ - -static void z8_i2c_waittxempty(void); -static void z8_i2c_waitrxavail(void); -static void z8_i2c_setbrg(uint16_t brg); -static uint16_t z8_i2c_getbrg(uint32_t frequency); -static int z8_i2c_read_transfer(FAR struct z8_i2cdev_s *priv, - FAR uint8_t *buffer, int buflen, uint8_t flags); -static int z8_i2c_write_transfer(FAR struct z8_i2cdev_s *priv, - FAR const uint8_t *buffer, int buflen, uint8_t flags); -static void z8_i2c_setfrequency(FAR struct z8_i2cdev_s *priv, - uint32_t frequency); - -/* I2C methods */ - -static int z8_i2c_transfer(FAR struct i2c_master_s *dev, - FAR struct i2c_msg_s *msgs, int count); -#ifdef CONFIG_I2C_RESET -static int z8_i2c_reset(FAR struct i2c_master_s *dev); -#endif - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -/* This function is normally prototyped int the ZiLOG header file sio.h */ - -extern uint32_t get_freq(void); - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -static bool g_initialized; /* true:I2C has been initialized */ -static mutex_t g_i2clock = NXMUTEX_INITIALIZER; /* Serialize I2C transfers */ - -static const struct i2c_ops_s g_ops = -{ - z8_i2c_transfer, -#ifdef CONFIG_I2C_RESET - , z8_i2c_reset -#endif -}; - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: z8_i2c_waittxempty - * - * Description: - * Wait for the transmit data register to become empty. - * - * Input Parameters: - * None - * - * Returned Value: - * None - * - ****************************************************************************/ - -static void z8_i2c_waittxempty(void) -{ - int i; - for (i = 0; i < 10000 && (I2CSTAT & I2C_STAT_TDRE) == 0; i++); -} - -/**************************************************************************** - * Name: z8_i2c_waitrxavail - * - * Description: - * Wait until we have received a full byte of data. - * - * Input Parameters: - * None - * - * Returned Value: - * None - * - ****************************************************************************/ - -static void z8_i2c_waitrxavail(void) -{ - int i; - - for (i = 0; - i <= 10000 && (I2CSTAT & (I2C_STAT_RDRF | I2C_STAT_NCKI)) == 0; - i++) - { - } -} - -/**************************************************************************** - * Name: z8_i2c_setbrg - * - * Description: - * Set the current BRG value for this transaction - * - * Input Parameters: - * brg - BRG to set - * - * Returned Value: - * None - * - ****************************************************************************/ - -static void z8_i2c_setbrg(uint16_t brg) -{ - I2CBRH = (uint8_t)(brg >> 8); - I2CBRL = (uint8_t)(brg & 0xff); -} - -/**************************************************************************** - * Name: z8_i2c_getbrg - * - * Description: - * Calculate the BRG value - * - * Input Parameters: - * frequency - The I2C frequency requested - * - * Returned Value: - * Returns the actual frequency selected - * - ****************************************************************************/ - -static uint16_t z8_i2c_getbrg(uint32_t frequency) -{ - uint32_t sysclock = get_freq(); - - /* Max is 400 Kb/sec */ - - if (frequency > 400 * 1000) - { - _err("ERROR: Invalid inputs\n"); - frequency = 400 * 1000; - } - - /* BRG = sysclock / (4 * frequency) */ - - return ((sysclock >> 2) + (frequency >> 1)) / frequency; -} - -/**************************************************************************** - * Name: z8_i2c_read_transfer - * - * Description: - * Receive a block of data from I2C using the previously selected I2C - * frequency and slave address. Each read operational will be an 'atomic' - * operation in the sense that any other I2C actions will be serialized - * and pend until this read completes. Required. - * - * Input Parameters: - * dev - Device-specific state data - * buffer - A pointer to a buffer of data to receive the data from the - * device - * buflen - The requested number of bytes to be read - * flags - Determines is a START and/or STOP indication is needed. - * - * Returned Value: - * 0: success, <0: A negated errno - * - ****************************************************************************/ - -static int z8_i2c_read_transfer(FAR struct z8_i2cdev_s *priv, - FAR uint8_t *buffer, int buflen, - uint8_t flags) -{ - FAR uint8_t *ptr; - int retry; - int count; - - /* Retry as necessary to receive the whole message */ - - for (retry = 0; retry < 100; retry++) - { - if ((flags & Z8_NOSTART) == 0) - { - /* Load the address into the transmit register. It is not sent - * until the START bit is set. - */ - - I2CD = I2C_READADDR8(priv->addr); - - /* If we want only a single byte of data, then set the NACK - * bit now. - */ - - I2CCTL |= I2C_CTL_NAK; - - /* The START bit begins the transaction */ - - I2CCTL |= I2C_CTL_START; - } - - /* Now loop to receive each data byte */ - - ptr = buffer; - for (count = buflen; count; count--) - { - /* Wait for the receive buffer to fill */ - - z8_i2c_waitrxavail(); - - /* Did we get a byte? Or did an error occur? */ - - if (I2CSTAT & I2C_STAT_RDRF) - { - /* Save the data byte */ - - *ptr++ = I2CD; - - /* If the next byte is the last byte, then set NAK now */ - - if (count == 2 && (flags & Z8_NOSTOP) == 0) - { - I2CCTL |= I2C_CTL_NAK; - } - - /* If this was the last byte, then set STOP and return - * success - */ - - else if (count == 1) - { - if ((flags & Z8_NOSTOP) == 0) - { - I2CCTL |= I2C_CTL_STOP; - } - - return OK; - } - } - - /* An error occurred. Clear byte bus and break out of the loop - * to retry now. - */ - - else - { - /* No, flush the buffer and toggle the I2C on and off */ - - I2CCTL |= I2C_CTL_FLUSH; - I2CCTL &= ~I2C_CTL_IEN; - I2CCTL |= I2C_CTL_IEN; - - /* Break out of the loop early and try again */ - - break; - } - } - } - - return -ETIMEDOUT; -} - -/**************************************************************************** - * Name: z8_i2c_write_transfer - * - * Description: - * Send a block of data on I2C using the previously selected I2C - * frequency and slave address. Each write operational will be an 'atomic' - * operation in the sense that any other I2C actions will be serialized - * and pend until this write completes. Required. - * - * Input Parameters: - * dev - Device-specific state data - * buffer - A pointer to the read-only buffer of data to be written to - * device - * buflen - The number of bytes to send from the buffer - * flags - Determines is a START and/or STOP indication is needed. - * - * Returned Value: - * 0: success, <0: A negated errno - * - ****************************************************************************/ - -static int z8_i2c_write_transfer(FAR struct z8_i2cdev_s *priv, - FAR const uint8_t *buffer, int buflen, - uint8_t flags) -{ - FAR const uint8_t *ptr; - int retry; - int count; - - /* Retry as necessary to send this whole message */ - - for (retry = 0; retry < 100; retry++) - { - if ((flags & Z8_NOSTART) == 0) - { - /* Load the address into the transmit register. It is not sent - * until the START bit is set. - */ - - I2CD = I2C_WRITEADDR8(priv->addr); - I2CCTL |= I2C_CTL_START; - - /* Wait for the xmt buffer to become empty */ - - z8_i2c_waittxempty(); - } - - /* Then send all of the bytes in the buffer */ - - ptr = buffer; - for (count = buflen; count; count--) - { - /* Send a byte of data and wait for it to be sent */ - - I2CD = *ptr++; - z8_i2c_waittxempty(); - - /* If this was the last byte, then send STOP immediately. This - * is because the ACK will not be valid until the STOP clocks out - * the last bit.. Hmmm. If this true then we will never be - * able to send more than one data byte??? - */ - - if (count == 1) - { - if ((flags & Z8_NOSTOP) == 0) - { - I2CCTL |= I2C_CTL_STOP; - } - - /* If this last byte was ACKed, then the whole buffer - * was successfully sent and we can return success. - */ - - if ((I2CSTAT & I2C_STAT_ACK) != 0) - { - return OK; - } - - /* If was was not ACKed, then this inner loop will - * terminated (because count will decrement to zero - * and the whole message will be resent - */ - } - - /* Not the last byte... was this byte ACKed? */ - - else if ((I2CSTAT & I2C_STAT_ACK) == 0) - { - /* No, flush the buffer and toggle the I2C on and off */ - - I2CCTL |= I2C_CTL_FLUSH; - I2CCTL &= ~I2C_CTL_IEN; - I2CCTL |= I2C_CTL_IEN; - - /* Break out of the loop early and try again */ - - break; - } - } - } - - return -ETIMEDOUT; -} - -/**************************************************************************** - * Name: z8_i2c_setfrequency - * - * Description: - * Set the I2C frequency. This frequency will be retained in the struct - * i2c_master_s instance and will be used with all transfers. Required. - * - * Input Parameters: - * dev - Device-specific state data - * frequency - The I2C frequency requested - * - * Returned Value: - * None - * - ****************************************************************************/ - -static void z8_i2c_setfrequency(FAR struct z8_i2cdev_s *priv, - uint32_t frequency) -{ - uint16_t brg; - - /* Has the frequency changed? */ - - if (priv->frequency != frequency) - { - /* Calculate and save the BRG (we won't apply it until the first - * transfer) - */ - - brg = z8_i2c_getbrg(frequency); - z8_i2c_setbrg(brg); - - /* Save the new I2C frequency */ - - priv->frequency = frequency; - } -} - -/**************************************************************************** - * Name: z8_i2c_transfer - * - * Description: - * Perform a sequence of I2C transfers, each transfer is started with a - * START and the final transfer is completed with a STOP. Each sequence - * will be an 'atomic' operation in the sense that any other I2C actions - * will be serialized and pend until this read completes. Optional. - * - * Input Parameters: - * dev - Device-specific state data - * msgs - A pointer to a set of message descriptors - * msgcount - The number of transfers to perform - * - * Returned Value: - * The number of transfers completed - * - ****************************************************************************/ - -static int z8_i2c_transfer(FAR struct i2c_master_s *dev, - FAR struct i2c_msg_s *msgs, int count) -{ - FAR struct z8_i2cdev_s *priv = (FAR struct z8_i2cdev_s *)dev; - FAR struct i2c_msg_s *msg; - bool nostop; - uint8_t flags; - int ret; - int i; - - /* Perform each segment of the transfer, message at a time */ - - flags = 0; - - /* Get exclusive access to the I2C bus */ - - ret = nxmutex_lock(&g_i2clock); - if (ret < 0) - { - return ret; - } - - /* The process each message segment */ - - for (i = 0; i < count; i++) - { - msg = &msgs[i]; - - /* Set the I2C frequency and address */ - - z8_i2c_setfrequency(priv, msg->frequency); - - priv->addr = msg->addr; - DEBUGASSERT((msg->flags & I2C_M_TEN) == 0); - - /* Is this the last message in the sequence? */ - - nostop = false; - if (i < (count - 1)) - { - FAR struct i2c_msg_s *next; - - /* No... Check if the next message should have a repeated start or - * not. The conditions for NO repeated start are: - * - * - I2C_M_NOSTART bit set - * - Same direction (I2C_M_READ) - * - Same address (and I2C_M_TEN) - */ - - next = &msgs[i + 1]; - if ((msg->flags & I2C_M_NOSTART) != 0 && - (msg->flags & (I2C_M_READ | I2C_M_TEN)) == - (next->flags & (I2C_M_READ | I2C_M_TEN)) && - msg->addr == next->addr) - { - nostop = true; - } - } - - /* Perform the read or write operation */ - - flags |= (nostop) ? Z8_NOSTOP : 0; - if ((msg->flags & I2C_M_READ) != 0) - { - ret = z8_i2c_read_transfer(priv, msg->buffer, msg->length, flags); - } - else - { - ret = z8_i2c_write_transfer(priv, msg->buffer, msg->length, flags); - } - - /* Check for I2C transfer errors */ - - if (ret < 0) - { - break; - } - - /* If there was no STOP bit on this segment, then there should be no - * START on the next segment. - */ - - flags = (nostop) ? Z8_NOSTART : 0; - } - - nxmutex_unlock(&g_i2clock); - return ret; -} - -/**************************************************************************** - * Name: z8_i2c_reset - * - * Description: - * Perform an I2C bus reset in an attempt to break loose stuck I2C devices. - * - * Input Parameters: - * dev - Device-specific state data - * - * Returned Value: - * Zero (OK) on success; a negated errno value on failure. - * - ****************************************************************************/ - -#ifdef CONFIG_I2C_RESET -static int z8_i2c_reset(FAR struct i2c_master_s *dev) -{ - return OK; -} -#endif - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: z8_i2cbus_initialize - * - * Description: - * Initialize the selected I2C port. And return a unique instance of struct - * struct i2c_master_s. This function may be called to obtain multiple - * instances of the interface, each of which may be set up with a - * different frequency and slave address. - * - * Input Parameters: - * Port number (for hardware that has multiple I2C interfaces) - * - * Returned Value: - * Valid I2C device structure reference on success; a NULL on failure - * - ****************************************************************************/ - -FAR struct i2c_master_s *z8_i2cbus_initialize(int port) -{ - FAR struct z8_i2cdev_s *i2c; - - if (!g_initialized) - { - /* Set up some initial BRG value */ - - uint16_t brg = z8_i2c_getbrg(100 * 1000); - z8_i2c_setbrg(brg); - - /* Make sure that GPIOs are configured for the alternate function (this - * varies with silicon revisions). - */ - - PAADDR = 0x02; - PACTL |= 0xc0; - - /* Enable I2C -- no interrupts */ - - I2CCTL = I2C_CTL_IEN; - } - - /* Now, allocate an I2C instance for this caller */ - - i2c = kmm_zalloc(sizeof(struct z8_i2cdev_s)); - if (i2c) - { - /* Initialize the allocated instance */ - - i2c->ops = &g_ops; - } - - return (FAR struct i2c_master_s *)i2c; -} diff --git a/arch/z80/src/z8/z8_initialstate.c b/arch/z80/src/z8/z8_initialstate.c deleted file mode 100644 index 075940a1ff..0000000000 --- a/arch/z80/src/z8/z8_initialstate.c +++ /dev/null @@ -1,81 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z8/z8_initialstate.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include -#include - -#include "chip.h" -#include "z80_internal.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_initial_state - * - * Description: - * A new thread is being started and a new TCB - * has been created. This function is called to initialize - * the processor specific portions of the new TCB. - * - * This function must setup the initial architecture registers - * and/or stack so that execution will begin at tcb->start - * on the next context switch. - * - ****************************************************************************/ - -void up_initial_state(FAR struct tcb_s *tcb) -{ - struct xcptcontext *xcp = &tcb->xcp; - - /* Initialize the initial exception register context structure */ - - memset(xcp, 0, sizeof(struct xcptcontext)); -#ifndef CONFIG_SUPPRESS_INTERRUPTS - xcp->regs[XCPT_IRQCTL] = 0x0080; /* IRQE bit will enable interrupts */ -#endif - xcp->regs[XCPT_RPFLAGS] = 0xe000; /* RP=%e0 */ - xcp->regs[XCPT_SP] = (chipreg_t)tcb->stack_base_ptr + - tcb->adj_stack_size; - xcp->regs[XCPT_PC] = (chipreg_t)tcb->start; -} diff --git a/arch/z80/src/z8/z8_irq.c b/arch/z80/src/z8/z8_irq.c deleted file mode 100644 index afa3924974..0000000000 --- a/arch/z80/src/z8/z8_irq.c +++ /dev/null @@ -1,249 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z8/z8_irq.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include -#include - -#include "chip/switch.h" -#include "z80_internal.h" - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/* This structure holds information about the current interrupt processing - * state - */ - -struct z8_irqstate_s g_z8irqstate; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_irqinitialize - ****************************************************************************/ - -void up_irqinitialize(void) -{ - /* Clear and disable all interrupts. Set all to priority 0. */ - - putreg8(0xff, IRQ0); - putreg8(0xff, IRQ1); - putreg8(0xff, IRQ2); - - putreg16(0x0000, IRQ0EN); - putreg16(0x0000, IRQ1EN); - putreg16(0x0000, IRQ2EN); - - /* And finally, enable interrupts */ - -#ifndef CONFIG_SUPPRESS_INTERRUPTS - EI(); -#endif -} - -/**************************************************************************** - * Name: up_irq_save - * - * Description: - * Disable all interrupts; return previous interrupt state. - * REVISIT: Doesn't TDI() do all of this? - * - ****************************************************************************/ - -irqstate_t up_irq_save(void) -{ - /* Bit 7 (IRQE) of the IRQCTL register determines if interrupts were - * enabled when this function was called. - */ - - register irqstate_t retval = getreg8(IRQCTL); - - /* Disable interrupts */ - - DI(); - - /* Return the previous interrupt state */ - - return retval; -} - -/**************************************************************************** - * Name: up_irq_restore - * - * Description: - * Restore previous interrupt state - * - ****************************************************************************/ - -void up_irq_restore(irqstate_t flags) -{ - /* Bit 7 (IRQE) of the IRQCTL register determines if interrupts were - * enabled when up_irq_save() was called. - */ - - if ((flags & 0x80) != 0) - { - /* The IRQE bit was set, re-enable interrupts. - * REVISIT: Could not RI() so all of this? - */ - - EI(); - } -} - -/**************************************************************************** - * Name: up_irq_enable - * - * Description: - * Enable all interrupts; return previous interrupt state - * - ****************************************************************************/ - -irqstate_t up_irq_enable(void) -{ - /* Bit 7 (IRQE) of the IRQCTL register determines if interrupts were - * enabled when this function was called. - */ - - register irqstate_t retval = getreg8(IRQCTL); - - /* Enable interrupts */ - - EI(); - - /* Return the previous interrupt state */ - - return retval; -} - -/**************************************************************************** - * Name: up_disable_irq - * - * Description: - * Disable the IRQ specified by 'irq' - * - ****************************************************************************/ - -void up_disable_irq(int irq) -{ - /* System exceptions cannot be disabled */ - - if (irq >= Z8_IRQ0_MIN) - { - /* Disable the interrupt by clearing the corresponding bit in the - * appropriate IRQ enable high register. The enable low - * register is assumed to be zero, resulting interrupt disabled. - */ - - if (irq <= Z8_IRQ0_MAX) - { - putreg8((getreg8(IRQ0ENH) & ~Z8_IRQ0_BIT(irq)), IRQ0ENH); - } - else if (irq <= Z8_IRQ1_MAX) - { - putreg8((getreg8(IRQ1ENH) & ~Z8_IRQ1_BIT(irq)), IRQ1ENH); - } - else if (irq < NR_IRQS) - { - putreg8((getreg8(IRQ2ENH) & ~Z8_IRQ2_BIT(irq)), IRQ2ENH); - } - } -} - -/**************************************************************************** - * Name: up_enable_irq - * - * Description: - * Enable the IRQ specified by 'irq' - * - ****************************************************************************/ - -void up_enable_irq(int irq) -{ - /* System exceptions cannot be disabled */ - - if (irq >= Z8_IRQ0_MIN) - { - /* Enable the interrupt by setting the corresponding bit in the - * appropriate IRQ enable high register. The enable low - * register is assumed to be zero, resulting in "nominal" interrupt - * priority. - */ - - if (irq <= Z8_IRQ0_MAX) - { - putreg8((getreg8(IRQ0ENH) | Z8_IRQ0_BIT(irq)), IRQ0ENH); - } - else if (irq <= Z8_IRQ1_MAX) - { - putreg8((getreg8(IRQ1ENH) | Z8_IRQ1_BIT(irq)), IRQ1ENH); - } - else if (irq < NR_IRQS) - { - putreg8((getreg8(IRQ2ENH) | Z8_IRQ2_BIT(irq)), IRQ2ENH); - } - } -} - -/**************************************************************************** - * Name: up_ack_irq - * - * Description: - * Acknowledge the interrupt - * - ****************************************************************************/ - -void up_ack_irq(int irq) -{ - /* System exceptions cannot be disabled or acknowledged */ - - if (irq >= Z8_IRQ0_MIN) - { - /* Acknowledge the interrupt by setting the* corresponding bit in the - * IRQ status register. - */ - - if (irq <= Z8_IRQ0_MAX) - { - putreg8(Z8_IRQ0_BIT(irq), IRQ0); - } - else if (irq <= Z8_IRQ1_MAX) - { - putreg8(Z8_IRQ1_BIT(irq), IRQ2); - } - else if (irq < NR_IRQS) - { - putreg8(Z8_IRQ2_BIT(irq), IRQ2); - } - } -} diff --git a/arch/z80/src/z8/z8_registerdump.c b/arch/z80/src/z8/z8_registerdump.c deleted file mode 100644 index ef3cc26a46..0000000000 --- a/arch/z80/src/z8/z8_registerdump.c +++ /dev/null @@ -1,110 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z8/z8_registerdump.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include - -#include -#include - -#include "chip/switch.h" -#include "z80_internal.h" - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -static inline void z8_dumpregs(FAR chipret_t *regs) -{ - _alert("REGS: %04x %04x %04x %04x %04x %04x %04x %04x\n", - regs[XCPT_RR0], regs[XCPT_RR2], regs[XCPT_RR4], regs[XCPT_RR6], - regs[XCPT_RR8], regs[XCPT_RR10], regs[XCPT_RR12], regs[XCPT_RR14]); -} - -static inline void z8_dumpstate(chipreg_t sp, chipreg_t pc, uint8_t irqctl, - chipreg_t rpflags) -{ - _alert("SP: %04x PC: %04x IRQCTL: %02x RP: %02x FLAGS: %02x\n", - sp, pc, irqctl & 0xff, rpflags >> 8, rpflags & 0xff); -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_dump_register - ****************************************************************************/ - -void up_dump_register(FAR void *dumpregs) -{ - FAR chipret_t *regs; - chipreg_t sp; - uint16_t rp; - - switch (g_z8irqstate.state) - { - case Z8_IRQSTATE_ENTRY: - - /* Calculate the source address based on the saved RP value */ - - rp = g_z8irqstate.regs[Z8_IRQSAVE_RPFLAGS] >> 8; - regs = (FAR uint16_t *)(rp & 0xf0); - - /* Then dump the register values */ - - z8_dumpregs(regs); - - /* Dump the saved machine state: - * The g_z8irqstate.regs pointer is the value of the stack pointer at - * the time that z80_doirq() was called. Therefore, we can calculate - * the correct value for the stack pointer on return from interrupt: - */ - - sp = ((chipreg_t)g_z8irqstate.regs) + Z8_IRQSAVE_SIZE; - z8_dumpstate(sp, g_z8irqstate.regs[Z8_IRQSAVE_PC], 0x80, - g_z8irqstate.regs[Z8_IRQSAVE_RPFLAGS]); - break; - - case Z8_IRQSTATE_SAVED: - regs = g_z8irqstate.regs; - z8_dumpregs(regs); - z8_dumpstate(regs[XCPT_SP], regs[XCPT_PC], - regs[XCPT_IRQCTL], regs[XCPT_RPFLAGS]); - break; - - case Z8_IRQSTATE_NONE: - default: - up_saveusercontext(s_last_regs); - regs = s_last_regs; - z8_dumpregs(regs); - z8_dumpstate(regs[XCPT_SP], regs[XCPT_PC], - regs[XCPT_IRQCTL], regs[XCPT_RPFLAGS]); - break; - } -} diff --git a/arch/z80/src/z8/z8_restorecontext.S b/arch/z80/src/z8/z8_restorecontext.S deleted file mode 100644 index de9c27783a..0000000000 --- a/arch/z80/src/z8/z8_restorecontext.S +++ /dev/null @@ -1,150 +0,0 @@ -/************************************************************************** - * arch/z80/src/z8/z8_saveusercontext.S - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - **************************************************************************/ - -/************************************************************************** - * Included Files - **************************************************************************/ - -#include -#include -#include - -/************************************************************************** - * Pre-processor Definitions - **************************************************************************/ - - xdef _z8_restorecontext - -/************************************************************************** - * Code - **************************************************************************/ - - segment CODE - -/**************************************************************************** - * Name: _z8_restorecontext - * - * Description: - * Restore the task context that was previously saved via - * _up_saveusercontext() or by interrupt handling. Unlike the - * _up_saveusercontext() counterpart, we do not know the context of the - * restored task and, hence, we must handle the worst case -- restore - * everythihng. - * - * Input Parameters: - * On entry, the following stack organization is assumed: - * - * Pointer to the context save structure - * TOS -> Return address (2) - * - * Assumptions: - * Large model, dynamic frames - * - **************************************************************************/ - -_z8_restorecontext: - /* Disable all interrupts because we are going to be using - * the IRQ register set. - */ - - di - - /* Switch to IRQ register set */ - - srp #%f0 - - /* Get the rr0 = the current value of the stack pointer */ - - ldx r0, sph /* rr0 = stack pointer */ - ldx r1, spl - - /* Get rr6 = the pointer to the context save structure */ - - ldx r6, 2(rr0) /* rr6 = pointer to context structure */ - ldx r7, 3(rr0) - - /* Copy all registers into the user register area. NOTE: we - * use the saved RP value to determine the destination address. - */ - - clr r0 /* rr0 = destination address */ - ldx r1, XCPT_RP_OFFS(rr6) - ld r2, r6 /* rr2 = source address */ - ld r3, r7 - ld r4, #16 /* r4 = number of bytes to copy */ - -_z8_restore: - ldx r5, @rr2 - ldx @rr0, r5 - incw rr0 - incw rr2 - djnz r4, _z8_restore - - /* Set the new stack pointer */ - - ldx r0, XCPT_SPH_OFFS(rr6) - ldx r1, XCPT_SPL_OFFS(rr6) - ldx sph, r0 - ldx spl, r1 - - /* Push the return address onto the stack */ - - ldx r0, XCPT_PCH_OFFS(rr6) - ldx r1, XCPT_PCL_OFFS(rr6) - push r1 - push r0 - - /* Recover the flags and RP settings.. but don't restore them yet */ - - ldx r1, XCPT_FLAGS_OFFS(rr6) - ldx r2, XCPT_RP_OFFS(rr6) - - /* Determine whether interrupts must be enabled on return. This - * would be nicer to do below, but later we will need to preserve - * the condition codes in the flags. - */ - - ldx r0, XCPT_IRQCTL_OFFS(rr6) - tm r0, #%80 - jr nz, _z8_returnenabled - - /* Restore the flag settings */ - - ldx flags, r1 - - /* Restore the user register page and return with interrupts disabled */ - - ldx rp, r2 /* Does not effect flags */ - ret /* Does not effect flags */ - -_z8_returnenabled: - /* Restore the flag settings */ - - ldx flags, r1 - - /* Restore the user register page, re-enable interrupts and return */ - - ldx rp, r2 /* Does not effect flags */ - ei /* Does not effect flags */ - ret /* Does not effect flags */ - - end diff --git a/arch/z80/src/z8/z8_saveirqcontext.c b/arch/z80/src/z8/z8_saveirqcontext.c deleted file mode 100644 index 8ee6b54130..0000000000 --- a/arch/z80/src/z8/z8_saveirqcontext.c +++ /dev/null @@ -1,123 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z8/z8_saveirqcontext.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include - -#include "chip/switch.h" -#include "z80_internal.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: z8_saveirqcontext - * - * Description: - * In order to provide faster interrupt handling, the interrupt logic does - * "lazy" context saving as described below: - * - * (1) At the time of the interrupt, minimum information is saved and the - * register pointer is changed so that the interrupt logic does not - * alter the state of the interrupted task's registers. - * (2) If no context switch occurs during the interrupt processing, then - * the return from interrupt is also simple. - * (3) If a context switch occurs during interrupt processing, then - * (a) The full context of the interrupt task is saved, and - * (b) A full context switch is performed when the interrupt exits - * (see z8_vector.S). - * - * This function implements the full-context switch of bullet 3a. - * - ****************************************************************************/ - -void z8_saveirqcontext(FAR chipreg_t *regs) -{ - /* If we have already saved the interrupted task's registers in the TCB, - * then we do not need to do anything. - */ - - if (g_z8irqstate.state == Z8_IRQSTATE_ENTRY) - { - /* Calculate the source address based on the saved RP value */ - - uint16_t rp = g_z8irqstate.regs[Z8_IRQSAVE_RPFLAGS] >> 8; - FAR chipreg_t *src = (FAR uint16_t *)(rp & 0xf0); - FAR chipreg_t *dest = ®s[XCPT_RR0]; - - /* Copy the interrupted tasks register into the TCB register save - * area. - */ - - int i; - for (i = 0; i < XCPTCONTEXT_REGS; i++) - { - *dest++ = *src++; - } - - /* Since the task was interrupted, we know that interrupts were - * enabled - */ - - regs[XCPT_IRQCTL] = 0x0080; /* IRQE bit will enable interrupts */ - - /* The g_z8irqstate.regs pointer is the value of the stack pointer at - * the time that z80_doirq() was called. Therefore, we can calculate - * the correct value for the stack pointer on return from interrupt: - */ - - regs[XCPT_SP] = ((chipreg_t)g_z8irqstate.regs) + Z8_IRQSAVE_SIZE; - - /* Copy the PC, RP, and FLAGS information from the lazy save to the TCB - * register save area. - */ - - regs[XCPT_RPFLAGS] = g_z8irqstate.regs[Z8_IRQSAVE_RPFLAGS]; - regs[XCPT_PC] = g_z8irqstate.regs[Z8_IRQSAVE_PC]; - - /* Now update the IRQ save area so that we will know that we have - * already done this. - */ - - g_z8irqstate.state = Z8_IRQSTATE_SAVED; - g_z8irqstate.regs = regs; - } -} diff --git a/arch/z80/src/z8/z8_saveusercontext.S b/arch/z80/src/z8/z8_saveusercontext.S deleted file mode 100644 index 400c6db3f6..0000000000 --- a/arch/z80/src/z8/z8_saveusercontext.S +++ /dev/null @@ -1,150 +0,0 @@ -/************************************************************************** - * arch/z80/src/z8/z8_saveusercontext.S - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - **************************************************************************/ - -/************************************************************************** - * Included Files - **************************************************************************/ - -#include -#include -#include - -/************************************************************************** - * Pre-processor Definitions - **************************************************************************/ - - xdef _up_saveusercontext - -/************************************************************************** - * Code - **************************************************************************/ - - segment CODE - -/**************************************************************************** - * Name: _up_saveusercontext - * - * Description: - * Save the current state of the user thread. Since this function is - * called from user code, it is only necessary to save the parts of the - * context that must be preserved between function calls. This includes - * - * - Frame pointer (r14, r15) - * - Register pointer (RP) - * - Interrupt state (flags) - * - Stack pointer (sph, spl) - * - Return address - * - * Input Parameters: - * On entry, the following stack organization is assumed: - * - * Pointer to the context save structure - * TOS -> Return address (2) - * - * Assumptions: - * Large model, dynamic frames - * - **************************************************************************/ - -_up_saveusercontext: - /* Get the rr6 = the current value of the stack pointer */ - - ldx r6, sph /* rr6 = stack pointer */ - ldx r7, spl - - /* Get rr2 = the pointer to the context save structure */ - - ldx r2, 2(rr6) /* rr2 = pointer to context structure */ - ldx r3, 3(rr6) - - /* Get the value currently in the interrupt control register. - * Bit 7 (IRQE) determines whether or not interrupts are - * currently enabled (0:disabled, 1:enabled) - */ - - ldx r4, IRQCTL /* r4 = IRQCTL value */ - - /* Disable all interrupts so that there can be no concurrent - * modification of the TCB state save area. - */ - - di - - /* Fetch and save the return address from the stack */ - - ldx r0, @rr6 /* rr0 = return address */ - ldx r1, 1(rr6) - ldx XCPT_PCH_OFFS(rr2), r0 - ldx XCPT_PCL_OFFS(rr2), r1 - - /* Fetch and save the register pointer */ - - ldx r0, rp /* r0 = register pointer */ - ldx XCPT_RP_OFFS(rr2), r0 - - /* Calculate the value of the stack pointer on return - * from this function - */ - - ld r1, #3 /* rr0 = 3 */ - clr r0 - add r1, r7 /* rr0 = SP + 3 */ - adc r0, r6 - ldx XCPT_SPH_OFFS(rr2), r0 - ldx XCPT_SPL_OFFS(rr2), r1 - - /* Save the IRQCTL register value */ - - clr r0 - ldx XCPT_UNUSED_OFFS(rr2), r0 - ldx XCPT_IRQCTL_OFFS(rr2), r4 - - /* Save the frame pointer (rr14) in the context structure */ - - ldx XCPT_R14_OFFS(rr2), r14 - ldx XCPT_R15_OFFS(rr2), r15 - - /* Set the return value of 1 in the context structure. When the - * state is restored (via z8_restorecontext() or an interrupt - * return), the return value of 1 distinguishes the no-context- - * switch case. - */ - - /* clr r0 */ - ld r1, #1 - ldx XCPT_R0_OFFS(rr2), r0 - ldx XCPT_R1_OFFS(rr2), r1 - - /* Setup to return zero for the no-context-switch case */ - - /* clr r0 */ - clr r1 - - /* Now decide if we need to re-enable interrupts or not */ - - tm r4, #%80 - jr z, _z8_noenable - ei -_z8_noenable: - ret - - end diff --git a/arch/z80/src/z8/z8_schedulesigaction.c b/arch/z80/src/z8/z8_schedulesigaction.c deleted file mode 100644 index 3972096018..0000000000 --- a/arch/z80/src/z8/z8_schedulesigaction.c +++ /dev/null @@ -1,162 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z8/z8_schedulesigaction.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include - -#include -#include - -#include "chip/switch.h" -#include "sched/sched.h" -#include "z80_internal.h" - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: z8_sigsetup - ****************************************************************************/ - -static void z8_sigsetup(FAR struct tcb_s *tcb, FAR chipreg_t *regs) -{ - /* Save the return address and interrupt state. These will be restored by - * the signal trampoline after the signals have been delivered. - */ - - tcb->xcp.saved_pc = regs[XCPT_PC]; - tcb->xcp.saved_irqctl = regs[XCPT_IRQCTL]; - - /* Then set up to vector to the trampoline with interrupts disabled */ - - regs[XCPT_PC] = (chipreg_t)z80_sigdeliver; - regs[XCPT_IRQCTL] = 0; -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_schedule_sigaction - * - * Description: - * This function is called by the OS when one or more - * signal handling actions have been queued for execution. - * The architecture specific code must configure things so - * that the 'sigdeliver' callback is executed on the thread - * specified by 'tcb' as soon as possible. - * - * This function may be called from interrupt handling logic. - * - * This operation should not cause the task to be unblocked - * nor should it cause any immediate execution of sigdeliver. - * Typically, a few cases need to be considered: - * - * (1) This function may be called from an interrupt handler - * During interrupt processing, all xcptcontext structures - * should be valid for all tasks. That structure should - * be modified to invoke sigdeliver() either on return - * from (this) interrupt or on some subsequent context - * switch to the recipient task. - * (2) If not in an interrupt handler and the tcb is NOT - * the currently executing task, then again just modify - * the saved xcptcontext structure for the recipient - * task so it will invoke sigdeliver when that task is - * later resumed. - * (3) If not in an interrupt handler and the tcb IS the - * currently executing task -- just call the signal - * handler now. - * - * Assumptions: - * Called from critical section - * - ****************************************************************************/ - -void up_schedule_sigaction(FAR struct tcb_s *tcb) -{ - sinfo("tcb=%p, rtcb=%p current_regs=%p\n", tcb, - this_task(), up_current_regs()); - - /* First, handle some special cases when the signal is being delivered - * to the currently executing task. - */ - - if (tcb == this_task()) - { - /* CASE 1: We are not in an interrupt handler and a task is - * signalling itself for some reason. - */ - - if (!IN_INTERRUPT()) - { - /* In this case just deliver the signal now. */ - - (tcb->sigdeliver)(tcb); - tcb->sigdeliver = NULL; - } - - /* CASE 2: We are in an interrupt handler AND the interrupted task - * is the same as the one that must receive the signal, then we - * will have to modify the return state as well as the state in - * the TCB. - */ - - else - { - /* Set up to vector to the trampoline with interrupts - * disabled. - */ - - z8_sigsetup(tcb, IRQ_STATE()); - - /* And make sure that the saved context in the TCB - * is the same as the interrupt return context. - */ - - SAVE_IRQCONTEXT(tcb); - } - } - - /* Otherwise, we are (1) signaling a task is not running - * from an interrupt handler or (2) we are not in an - * interrupt handler and the running task is signalling - * some non-running task. - */ - - else - { - /* Set up to vector to the trampoline with interrupts - * disabled. - */ - - z8_sigsetup(tcb, tcb->xcp.regs); - } -} diff --git a/arch/z80/src/z8/z8_serial.c b/arch/z80/src/z8/z8_serial.c deleted file mode 100644 index feb63355f4..0000000000 --- a/arch/z80/src/z8/z8_serial.c +++ /dev/null @@ -1,824 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z8/z8_serial.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "chip.h" -#include "z80_internal.h" - -#ifdef USE_SERIALDRIVER - -extern uint32_t get_freq(void); - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* System clock frequency value from ZDS target settings */ - -#define STATE_DISABLED 0 -#define STATE_RXENABLED 1 -#define STATE_TXENABLED 2 - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -struct z8_uart_s -{ - uint8_t volatile far * uartbase; /* Base address of UART registers */ - uint32_t baud; /* Configured baud */ - bool rxenabled; /* RX interrupt enabled */ - bool txenabled; /* TX interrupt enabled */ - uint8_t rxirq; /* RX IRQ associated with this UART */ - uint8_t txirq; /* RX IRQ associated with this UART */ - uint8_t parity; /* 0=none, 1=odd, 2=even */ - spinlock_t lock; /* Spinlock */ - bool stopbits2; /* true: Configure with 2 stop bits - * (instead of 1) */ -}; - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -static int z8_setup(FAR struct uart_dev_s *dev); -static void z8_shutdown(FAR struct uart_dev_s *dev); -static int z8_attach(FAR struct uart_dev_s *dev); -static void z8_detach(FAR struct uart_dev_s *dev); -static int z8_rxinterrupt(int irq, FAR void *context, FAR void *arg); -static int z8_txinterrupt(int irq, FAR void *context, FAR void *arg); -static int z8_ioctl(FAR struct file *filep, int cmd, unsigned long arg); -static int z8_receive(FAR struct uart_dev_s *dev, FAR uint32_t *status); -static void z8_rxint(FAR struct uart_dev_s *dev, bool enable); -static bool z8_rxavailable(FAR struct uart_dev_s *dev); -static void z8_send(FAR struct uart_dev_s *dev, int ch); -static void z8_txint(FAR struct uart_dev_s *dev, bool enable); -static bool z8_txready(FAR struct uart_dev_s *dev); -static bool z8_txempty(FAR struct uart_dev_s *dev); - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -static const struct uart_ops_s g_uart_ops = -{ - z8_setup, /* setup */ - z8_shutdown, /* shutdown */ - z8_attach, /* attach */ - z8_detach, /* detach */ - z8_ioctl, /* ioctl */ - z8_receive, /* receive */ - z8_rxint, /* rxint */ - z8_rxavailable, /* rxavailable */ -#ifdef CONFIG_SERIAL_IFLOWCONTROL - NULL, /* rxflowcontrol */ -#endif - z8_send, /* send */ - z8_txint, /* txint */ - z8_txready, /* txready */ - z8_txempty /* txempty */ -}; - -/* I/O buffers */ - -static char g_uart0rxbuffer[CONFIG_UART0_RXBUFSIZE]; -static char g_uart0txbuffer[CONFIG_UART0_TXBUFSIZE]; -static char g_uart1rxbuffer[CONFIG_UART1_RXBUFSIZE]; -static char g_uart1txbuffer[CONFIG_UART1_TXBUFSIZE]; - -/* This describes the state of the DM320 uart0 port. */ - -static struct z8_uart_s g_uart0priv = -{ - Z8_UART0_BASE, /* uartbase */ - CONFIG_UART0_BAUD, /* baud */ - false, /* rxenabled */ - false, /* txenabled */ - Z8_UART0_RX_IRQ, /* rxirq */ - Z8_UART0_TX_IRQ, /* txirq */ - CONFIG_UART0_PARITY, /* parity */ - SP_UNLOCKED, /* Spinlock */ - CONFIG_UART0_2STOP /* stopbits2 */ -}; - -static uart_dev_t g_uart0port = -{ - 0, /* open_count */ -#ifdef CONFIG_UART0_SERIAL_CONSOLE - true, /* isconsole */ -#else - false, /* isconsole */ -#endif - { 0 }, /* closesem */ - { 0 }, /* xmitsem */ - { 0 }, /* recvsem */ - { 0 }, /* pollsem */ - { - { 0 }, /* xmit.sem */ - 0, /* xmit.head */ - 0, /* xmit.tail */ - CONFIG_UART0_TXBUFSIZE, /* xmit.size */ - g_uart0txbuffer, /* xmit.buffer */ - }, - { - { 0 }, /* recv.sem */ - 0, /* recv.head */ - 0, /* recv.tail */ - CONFIG_UART0_RXBUFSIZE, /* recv.size */ - g_uart0rxbuffer, /* recv.buffer */ - }, - &g_uart_ops, /* ops */ - &g_uart0priv, /* priv */ - NULL, /* pollfds */ -}; - -/* This describes the state of the DM320 uart1 port. */ - -static struct z8_uart_s g_uart1priv = -{ - Z8_UART1_BASE, /* uartbase */ - CONFIG_UART1_BAUD, /* baud */ - false, /* rxenabled */ - false, /* txenabled */ - Z8_UART1_RX_IRQ, /* rxirq */ - Z8_UART1_TX_IRQ, /* txirq */ - CONFIG_UART1_PARITY, /* parity */ - SP_UNLOCKED, /* Spinlock */ - CONFIG_UART1_2STOP /* stopbits2 */ -}; - -static uart_dev_t g_uart1port = -{ - 0, /* open_count */ -#ifdef CONFIG_UART1_SERIAL_CONSOLE - true, /* isconsole */ -#else - false, /* isconsole */ -#endif - { 0 }, /* closesem */ - { 0 }, /* xmitsem */ - { 0 }, /* recvsem */ - { 0 }, /* pollsem */ - { - { 0 }, /* xmit.sem */ - 0, /* xmit.head */ - 0, /* xmit.tail */ - CONFIG_UART1_TXBUFSIZE, /* xmit.size */ - g_uart1txbuffer, /* xmit.buffer */ - }, - { - { 0 }, /* recv.sem */ - 0, /* recv.head */ - 0, /* recv.tail */ - CONFIG_UART1_RXBUFSIZE, /* recv.size */ - g_uart0rxbuffer, /* recv.buffer */ - }, - &g_uart_ops, /* ops */ - &g_uart1priv, /* priv */ - NULL, /* pollfds */ -}; - -/* Now, which one with be tty0/console and which tty1? */ - -#ifdef CONFIG_UART1_SERIAL_CONSOLE -# define CONSOLE_DEV g_uart1port -# define TTYS0_DEV g_uart1port -# define TTYS1_DEV g_uart0port -#else -# define CONSOLE_DEV g_uart0port -# define TTYS0_DEV g_uart0port -# define TTYS1_DEV g_uart1port -#endif - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: z8_putuart - ****************************************************************************/ - -static inline void z8_putuart(FAR struct z8_uart_s *priv, uint8_t value, - uint8_t offset) -{ - putreg8(value, *(priv->uartbase + offset)); -} - -/**************************************************************************** - * Name: z8_getuart - ****************************************************************************/ - -static inline uint8_t z8_getuart(FAR struct z8_uart_s *priv, uint8_t offset) -{ - return getreg8(*(priv->uartbase + offset)); -} - -/**************************************************************************** - * Name: z8_disableuartirq - ****************************************************************************/ - -static uint8_t z8_disableuartirq(FAR struct uart_dev_s *dev) -{ - struct z8_uart_s *priv = (struct z8_uart_s *)dev->priv; - irqstate_t flags = spin_lock_irqsave(&priv->lock); - uint8_t state = priv->rxenabled ? - STATE_RXENABLED : STATE_DISABLED | \ - priv->txenabled ? - STATE_TXENABLED : STATE_DISABLED; - - z8_txint_nolock(dev, false); - z8_rxint_nolock(dev, false); - - spin_unlock_irqrestore(&priv->lock, flags); - return state; -} - -/**************************************************************************** - * Name: z8_restoreuartirq - ****************************************************************************/ - -static void z8_restoreuartirq(FAR struct uart_dev_s *dev, uint8_t state) -{ - irqstate_t flags = spin_lock_irqsave(&priv->lock); - - z8_txint_nolock(dev, (state & STATE_TXENABLED) ? true : false); - z8_rxint_nolock(dev, (state & STATE_RXENABLED) ? true : false); - - spin_unlock_irqrestore(&priv->lock, flags); -} - -/**************************************************************************** - * Name: z8_consoleput - ****************************************************************************/ - -static void z8_consoleput(uint8_t ch) -{ - struct z8_uart_s *priv = (struct z8_uart_s *)CONSOLE_DEV.priv; - int tmp; - - for (tmp = 1000 ; tmp > 0 ; tmp--) - { - if (z8_txready(&CONSOLE_DEV)) - { - break; - } - } - - z8_putuart(priv, ch, Z8_UART_TXD); -} - -/**************************************************************************** - * Name: z8_uartconfigure - * - * Description: - * Configure hardware for UART functionality - * - ****************************************************************************/ - -void z8_uartconfigure(void) -{ - uint8_t val; - - /* Configure GPIO Port A pins 4 & 5 for alternate function */ - - putreg8(0x02, PAADDR); - val = getreg8(PACTL) | 0x30; /* Set bits in alternate function register */ - putreg8(val, PACTL); - putreg8(0x07, PAADDR); - val = getreg8(PACTL) & 0xcf; /* Reset bits in alternate function set-1 register */ - putreg8(val, PACTL); - putreg8(0x08, PAADDR); - val = getreg8(PACTL) & 0xcf; /* Reset bits in alternate function set-2 register */ - putreg8(val, PACTL); - putreg8(0x00, PAADDR); - -#ifdef EZ8_UART1 - /* Configure GPIO Port D pins 4 & 5 for alternate function */ - - putreg8(0x02, PAADDR); - val = getreg8(PDCTL) | 0x30; /* Set bits in alternate function register */ - putreg8(val, PDCTL); - putreg8(0x07, PDADDR); - val = getreg8(PDCTL) & 0xcf; /* Reset bits in alternate function set-1 register */ - putreg8(val, PDCTL); - putreg8(0x08, PDADDR); - val = getreg8(PDCTL) & 0xcf; /* Reset bits in alternate function set-2 register */ - putreg8(val, PDCTL); - putreg8(0x00, PDADDR); -#endif -} - -/**************************************************************************** - * Name: z8_setup - * - * Description: - * Configure the UART baud, parity, etc. This method is called the first - * time that the serial port is opened. - * - ****************************************************************************/ - -static int z8_setup(FAR struct uart_dev_s *dev) -{ -#ifndef CONFIG_SUPPRESS_UART_CONFIG - struct z8_uart_s *priv = (struct z8_uart_s *)dev->priv; - uint32_t freq = get_freq(); - uint16_t brg; - uint8_t ctl0; - uint8_t ctl1; - - /* Calculate and set the baud rate generation register. - * BRG = (freq + baud * 8)/(baud * 16) - */ - - brg = (freq + (priv->baud << 3)) / (priv->baud << 4); - z8_putuart(priv, brg >> 8, Z8_UART_BRH); - z8_putuart(priv, brg & 0xff, Z8_UART_BRL); - - /* Configure STOP bits */ - - ctl0 = ctl1 = 0; - if (priv->stopbits2) - { - ctl0 |= Z8_UARTCTL0_STOP; - } - - /* Configure parity */ - - if (priv->parity == 1) - { - ctl0 |= (Z8_UARTCTL0_PEN | Z8_UARTCTL0_PSEL); - } - else if (priv->parity == 2) - { - ctl0 |= Z8_UARTCTL0_PEN; - } - - z8_putuart(priv, ctl0, Z8_UART_CTL0); - z8_putuart(priv, ctl1, Z8_UART_CTL1); - - /* Enable UART receive (REN) and transmit (TEN) */ - - ctl0 |= (Z8_UARTCTL0_TEN | Z8_UARTCTL0_REN); - z8_putuart(priv, ctl0, Z8_UART_CTL0); -#endif - return OK; -} - -/**************************************************************************** - * Name: z8_shutdown - * - * Description: - * Disable the UART. This method is called when the serial - * port is closed - * - ****************************************************************************/ - -static void z8_shutdown(FAR struct uart_dev_s *dev) -{ - z8_disableuartirq(dev); -} - -/**************************************************************************** - * Name: z8_attach - * - * Description: - * Configure the UART to operation in interrupt driven mode. This method - * is called when the serial port is opened. Normally, this is just after - * the the setup() method is called, however, the serial console may - * operate in a non-interrupt driven mode during the boot phase. - * - * RX and TX interrupts are not enabled when by the attach method (unless - * the hardware supports multiple levels of interrupt enabling). The RX - * and TX interrupts are not enabled until the txint() and rxint() methods - * are called. - * - ****************************************************************************/ - -static int z8_attach(FAR struct uart_dev_s *dev) -{ - struct z8_uart_s *priv = (struct z8_uart_s *)dev->priv; - int ret; - - /* Attach the RX IRQ */ - - ret = irq_attach(priv->rxirq, z8_rxinterrupt, dev); - if (ret == OK) - { - /* Attach the TX IRQ */ - - ret = irq_attach(priv->txirq, z8_txinterrupt, dev); - if (ret != OK) - { - irq_detach(priv->rxirq); - } - } - - return ret; -} - -/**************************************************************************** - * Name: z8_detach - * - * Description: - * Detach UART interrupts. This method is called when the serial port is - * closed normally just before the shutdown method is called. The - * exception is the serial console which is never shutdown. - * - ****************************************************************************/ - -static void z8_detach(FAR struct uart_dev_s *dev) -{ - struct z8_uart_s *priv = (struct z8_uart_s *)dev->priv; - up_disable_irq(priv->rxirq); - up_disable_irq(priv->txirq); - irq_detach(priv->rxirq); - irq_detach(priv->txirq); -} - -/**************************************************************************** - * Name: z8_rxinterrupt - * - * Description: - * This is the UART interrupt handler. It will be invoked when an RX - * event occurs at the z8's LIN-UART. - * - ****************************************************************************/ - -static int z8_rxinterrupt(int irq, FAR void *context, FAR void *arg) -{ - struct uart_dev_s *dev = (struct uart_dev_s *)arg; - struct z8_uart_s *priv; - uint8_t status; - - DEBUGASSERT(dev != NULL && dev->priv != NULL); - priv = (struct z8_uart_s *)dev->priv; - - /* Check the LIN-UART status 0 register to determine whether the source of - * the interrupt is error, break, or received data - */ - - status = z8_getuart(priv, Z8_UART_STAT0); - - /* REVISIT error and break handling */ - - /* Check if received data is available */ - - if (status & Z8_UARTSTAT0_RDA) - { - /* Handline an incoming, receive byte */ - - uart_recvchars(dev); - } - - return OK; -} - -/**************************************************************************** - * Name: z8_txinterrupt - * - * Description: - * This is the UART TX interrupt handler. This interrupt handler will - * be invoked when the X16F LIN UART transmit data register is empty. - * - ****************************************************************************/ - -static int z8_txinterrupt(int irq, FAR void *context, FAR void *arg) -{ - struct uart_dev_s *dev = (struct uart_dev_s *)arg; - struct z8_uart_s *priv; - uint8_t status; - - DEBUGASSERT(dev != NULL && dev->priv != NULL); - priv = (struct z8_uart_s *)dev->priv; - - /* Verify that the transmit data register is empty */ - - status = z8_getuart(priv, Z8_UART_STAT0); - if (status & Z8_UARTSTAT0_TDRE) - { - /* Handle outgoing, transmit bytes */ - - uart_xmitchars(dev); - } - - return OK; -} - -/**************************************************************************** - * Name: z8_ioctl - * - * Description: - * All ioctl calls will be routed through this method - * - ****************************************************************************/ - -static int z8_ioctl(FAR struct file *filep, int cmd, unsigned long arg) -{ - return -ENOTTY; -} - -/**************************************************************************** - * Name: z8_receive - * - * Description: - * Called (usually) from the interrupt level to receive one character from - * the UART. Error bits associated with the receipt are provided in the - * return 'status'. - * - ****************************************************************************/ - -static int z8_receive(FAR struct uart_dev_s *dev, FAR uint32_t *status) -{ - struct z8_uart_s *priv = (struct z8_uart_s *)dev->priv; - uint8_t rxd; - uint8_t stat0; - - rxd = z8_getuart(priv, Z8_UART_RXD); - stat0 = z8_getuart(priv, Z8_UART_STAT0); - *status = (uint32_t)rxd | (((uint32_t)stat0) << 8); - return rxd; -} - -/**************************************************************************** - * Name: z8_rxint - * - * Description: - * Call to enable or disable RX interrupts - * - ****************************************************************************/ - -static void z8_rxint_nolock(FAR struct uart_dev_s *dev, bool enable) -{ - struct z8_uart_s *priv = (struct z8_uart_s *)dev->priv; - - if (enable) - { -#ifndef CONFIG_SUPPRESS_SERIAL_INTS - up_enable_irq(priv->rxirq); -#endif - } - else - { - up_disable_irq(priv->rxirq); - } - - priv->rxenabled = enable; -} - -static void z8_rxint(FAR struct uart_dev_s *dev, bool enable) -{ - struct z8_uart_s *priv = (struct z8_uart_s *)dev->priv; - irqstate_t flags = spin_lock_irqsave(&priv->lock); - - z8_rxint_nolock(dev, enable); - spin_unlock_irqrestore(&priv->lock, flags); -} - -/**************************************************************************** - * Name: z8_rxavailable - * - * Description: - * Return true if the receive fifo is not empty - * - ****************************************************************************/ - -static bool z8_rxavailable(FAR struct uart_dev_s *dev) -{ - struct z8_uart_s *priv = (struct z8_uart_s *)dev->priv; - return ((z8_getuart(priv, Z8_UART_STAT0) & Z8_UARTSTAT0_RDA) != 0); -} - -/**************************************************************************** - * Name: z8_send - * - * Description: - * This method will send one byte on the UART - * - ****************************************************************************/ - -static void z8_send(FAR struct uart_dev_s *dev, int ch) -{ - struct z8_uart_s *priv = (struct z8_uart_s *)dev->priv; - z8_putuart(priv, ch, Z8_UART_TXD); -} - -/**************************************************************************** - * Name: z8_txint - * - * Description: - * Call to enable or disable TX interrupts - * - ****************************************************************************/ - -static void z8_txint_nolock(FAR struct uart_dev_s *dev, bool enable) -{ - struct z8_uart_s *priv = (struct z8_uart_s *)dev->priv; - - if (enable) - { -#ifndef CONFIG_SUPPRESS_SERIAL_INTS - up_enable_irq(priv->txirq); -#endif - } - else - { - up_disable_irq(priv->txirq); - } - - priv->txenabled = enable; -} - -static void z8_txint(FAR struct uart_dev_s *dev, bool enable) -{ - struct z8_uart_s *priv = (struct z8_uart_s *)dev->priv; - irqstate_t flags = spin_lock_irqsave(&priv->lock); - - z8_txint_nolock(dev, enable); - spin_unlock_irqrestore(&priv->lock, flags); -} - -/**************************************************************************** - * Name: z8_txready - * - * Description: - * Return true if the tranmsit fifo is not full - * - ****************************************************************************/ - -static bool z8_txready(FAR struct uart_dev_s *dev) -{ - struct z8_uart_s *priv = (struct z8_uart_s *)dev->priv; - return ((z8_getuart(priv, Z8_UART_STAT0) & Z8_UARTSTAT0_TDRE) != 0); -} - -/**************************************************************************** - * Name: z8_txempty - * - * Description: - * Return true if the transmit fifo is empty - * - ****************************************************************************/ - -static bool z8_txempty(FAR struct uart_dev_s *dev) -{ - struct z8_uart_s *priv = (struct z8_uart_s *)dev->priv; - return ((z8_getuart(priv, Z8_UART_STAT0) & Z8_UARTSTAT0_TXE) != 0); -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: z80_serial_initialize - * - * Description: - * Register serial console and serial ports. - * - ****************************************************************************/ - -void z80_serial_initialize(void) -{ - /* Disable all UART interrupts */ - - z8_disableuartirq(&TTYS0_DEV); - z8_disableuartirq(&TTYS1_DEV); - - /* Initialize the console for early use */ - - CONSOLE_DEV.isconsole = true; - z8_setup(&CONSOLE_DEV); - - /* Register console and tty devices */ - - uart_register("/dev/console", &CONSOLE_DEV); - uart_register("/dev/ttyS0", &TTYS0_DEV); - uart_register("/dev/ttyS1", &TTYS1_DEV); -} - -/**************************************************************************** - * Name: up_putc - * - * Description: - * Provide priority, low-level access to support OS debug - * writes - * - ****************************************************************************/ - -void up_putc(int ch) -{ - uint8_t state; - - /* Keep interrupts disabled so that we do not interfere with normal - * driver operation - */ - - state = z8_disableuartirq(&CONSOLE_DEV); - - /* Output the character */ - - z8_consoleput((uint8_t)ch); - - /* It is important to restore the TX interrupt while the send is pending. - * otherwise, TRDE interrupts can be lost since they do not pend after the - * TRDE false->true transition. - */ - - z8_restoreuartirq(&CONSOLE_DEV, state); -} - -#else /* USE_SERIALDRIVER */ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#ifdef CONFIG_UART1_SERIAL_CONSOLE -# define z8_contrde() \ - ((getreg8(*(Z8_UART1_BASE+Z8_UART_STAT0)) & Z8_UARTSTAT0_TDRE) != 0) -# define z8_contxd(ch) \ - putreg8((uint8_t)(ch), *(Z8_UART1_BASE+Z8_UART_TXD)) -#else -# define z8_contrde() \ - ((getreg8(*(Z8_UART0_BASE+Z8_UART_STAT0)) & Z8_UARTSTAT0_TDRE) != 0) -# define z8_contxd(ch) \ - putreg8((uint8_t)(ch), *(Z8_UART0_BASE+Z8_UART_TXD)) -#endif - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: z8_putc - ****************************************************************************/ - -static void z8_putc(int ch) -{ - int tmp; - for (tmp = 1000 ; tmp > 0 && !z8_contrde(); tmp--); - z8_contxd(ch); -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_putc - ****************************************************************************/ - -void up_putc(int ch) -{ - /* Output character */ - - z8_putc(ch); -} - -#endif /* USE_SERIALDRIVER */ diff --git a/arch/z80/src/z8/z8_sigdeliver.c b/arch/z80/src/z8/z8_sigdeliver.c deleted file mode 100644 index 257b512e33..0000000000 --- a/arch/z80/src/z8/z8_sigdeliver.c +++ /dev/null @@ -1,127 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z8/z8_sigdeliver.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include - -#include -#include -#include - -#include "chip/switch.h" -#include "sched/sched.h" -#include "z80_internal.h" - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: z8_copystate - ****************************************************************************/ - -/* Maybe a little faster than most memcpy's */ - -static void z8_copystate(FAR chipreg_t *dest, FAR const chipreg_t *src) -{ - int i; - for (i = 0; i < XCPTCONTEXT_REGS; i++) - { - *dest++ = *src++; - } -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: z80_sigdeliver - * - * Description: - * This is the a signal handling trampoline. When a signal action was - * posted. The task context was mucked with and forced to branch to this - * location with interrupts disabled. - * - ****************************************************************************/ - -void z80_sigdeliver(void) -{ - FAR struct tcb_s *rtcb = this_task(); - chipreg_t regs[XCPTCONTEXT_REGS]; - - board_autoled_on(LED_SIGNAL); - - sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head); - DEBUGASSERT(rtcb->sigdeliver != NULL); - - /* Save the return state on the stack. */ - - z8_copystate(regs, rtcb->xcp.regs); - -#ifndef CONFIG_SUPPRESS_INTERRUPTS - /* Then make sure that interrupts are enabled. Signal handlers must always - * run with interrupts enabled. - */ - - up_irq_enable(); -#endif - - /* Deliver the signals */ - - (rtcb->sigdeliver)(rtcb); - - /* Output any debug messages BEFORE restoring errno (because they may - * alter errno), then disable interrupts again and restore the original - * errno that is needed by the user logic (it is probably EINTR). - */ - - sinfo("Resuming\n"); - up_irq_save(); - - /* Modify the saved return state with the actual saved values in the - * TCB. This depends on the fact that nested signal handling is - * not supported. Therefore, these values will persist throughout the - * signal handling action. - * - * Keeping this data in the TCB resolves a security problem in protected - * and kernel mode: The regs[] array is visible on the user stack and - * could be modified by a hostile program. - */ - - regs[XCPT_PC] = rtcb->xcp.saved_pc; - regs[XCPT_IRQCTL] = rtcb->xcp.saved_irqctl; - rtcb->sigdeliver = NULL; /* Allows next handler to be scheduled */ - - /* Then restore the correct state for this thread of execution. */ - - board_autoled_off(LED_SIGNAL); - z8_restorecontext(regs); -} diff --git a/arch/z80/src/z8/z8_timerisr.c b/arch/z80/src/z8/z8_timerisr.c deleted file mode 100644 index 226ebee5bb..0000000000 --- a/arch/z80/src/z8/z8_timerisr.c +++ /dev/null @@ -1,129 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z8/z8_timerisr.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include - -#include - -#include "chip.h" -#include "clock/clock.h" -#include "z80_internal.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/* This function is normally prototyped int the ZiLOG header file sio.h */ - -extern uint32_t get_freq(void); - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Function: z8_timerisr - * - * Description: - * The timer ISR will perform a variety of services for various portions - * of the system. - * - ****************************************************************************/ - -static int z8_timerisr(int irq, uint32_t *regs, void *arg) -{ - /* Process timer interrupt */ - - nxsched_process_timer(); - return 0; -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Function: up_timer_initialize - * - * Description: - * This function is called during start-up to initialize the timer - * interrupt. - * - ****************************************************************************/ - -void up_timer_initialize(void) -{ - uint32_t reload; - - up_disable_irq(Z8_IRQ_SYSTIMER); - - /* Write to the timer control register to disable the timer, configure - * the timer for continuous mode, and set up the pre-scale value for - * divide by 4. - */ - - putreg8((Z8_TIMERCTL_DIV4 | Z8_TIMERCTL_CONT), T0CTL); - - /* Write to the timer high and low byte registers to set a starting - * count value (this effects only the first pass in continuous mode) - */ - - putreg16(0x0001, T0); - - /* Write to the timer reload register to set the reload value. - * - * In continuous mode: - * - * timer_period = reload_value x prescale / system_clock_frequency - * or - * reload_value = (timer_period * system_clock_frequency) / prescale - * - * For system_clock_frequency=18.432MHz, timer_period=10mS, and prescale=4, - * then reload_value=46,080 - OR: - * - * reload_value = system_clock_frequency / 400 - */ - - reload = get_freq() / 400; - putreg16((uint16_t)reload, T0R); - - /* Write to the timer control register to enable the timer and to - * initiate counting - */ - - putreg8((getreg8(T0CTL) | Z8_TIMERCTL_TEN), T0CTL); - - /* Set the timer priority */ - - /* Attach and enable the timer interrupt (leaving at priority 0 */ - - irq_attach(Z8_IRQ_SYSTIMER, (xcpt_t)z8_timerisr, NULL); - up_enable_irq(Z8_IRQ_SYSTIMER); -} diff --git a/arch/z80/src/z8/z8_vector.S b/arch/z80/src/z8/z8_vector.S deleted file mode 100644 index 9a1c135115..0000000000 --- a/arch/z80/src/z8/z8_vector.S +++ /dev/null @@ -1,859 +0,0 @@ -/************************************************************************** - * arch/z80/src/z8/z8_xdef.S - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - **************************************************************************/ - -/************************************************************************** - * Included Files - **************************************************************************/ - -#include -#include - -#include -#include - -/************************************************************************** - * Pre-processor Definitions - **************************************************************************/ - -/************************************************************************** - * External References / External Definitions - **************************************************************************/ - - xref _z80_doirq:ROM - -#if defined(ENCORE_VECTORS) - xdef _z8_wdt_handler - xdef _z8_trap_handler -if EZ8_TIMER3=1 - xdef _z8_timer2_handler -endif - xdef _z8_timer1_handler - xdef _z8_timer0_handler -if EZ8_UART0=1 - xdef _z8_uart0rx_handler - xdef _z8_uart0tx_handler -endif -if EZ8_I2C=1 - xdef _z8_i2c_handler -endif -if EZ8_SPI=1 - xdef _z8_spi_handler -endif -if EZ8_ADC=1 - xdef _z8_adc_handler -endif - xdef _z8_p7ad_handler - xdef _z8_p6ad_handler - xdef _z8_p5ad_handler - xdef _z8_p4ad_handler - xdef _z8_p3ad_handler - xdef _z8_p2ad_handler - xdef _z8_p1ad_handler - xdef _z8_p0ad_handler -if EZ8_TIMER4=1 - xdef _z8_timer3_handler -endif -if EZ8_UART1=1 - xdef _z8_uart1rx_handler - xdef _z8_uart1tx_handler -endif -if EZ8_DMA=1 - xdef _z8_dma_handler -endif -if EZ8_PORT1=0 - xdef _z8_c3_handler - xdef _z8_c2_handler - xdef _z8_c1_handler - xdef _z8_c0_handler -endif - -/**************************************************************************/ - -#elif defined(ENCORE_XP_VECTORS) - - xdef _z8_wdt_handler - xdef _z8_trap_handler -if EZ8_TIMER3=1 - xdef _z8_timer2_handler -endif - xdef _z8_timer1_handler - xdef _z8_timer0_handler -if EZ8_UART0=1 - xdef _z8_uart0rx_handler - xdef _z8_uart0tx_handler -endif -if EZ8_I2C=1 - xdef _z8_i2c_handler -endif -if EZ8_SPI=1 - xdef _z8_spi_handler -endif -if (EZ8_ADC=1) || (EZ8_ADC_NEW=1) - xdef _z8_adc_handler -endif - xdef _z8_p7ad_handler - xdef _z8_p6ad_handler - xdef _z8_p5ad_handler - xdef _z8_p4ad_handler - xdef _z8_p3ad_handler - xdef _z8_p2ad_handler - xdef _z8_p1ad_handler - xdef _z8_p0ad_handler -if EZ8_TIMER4=1 - xdef _z8_timer3_handler -endif -if EZ8_UART1=1 - xdef _z8_uart1rx_handler - xdef _z8_uart1tx_handler -endif -if EZ8_DMA=1 - xdef _z8_dma_handler -endif -if (EZ8_PORT1=0) - xdef _z8_c3_handler - xdef _z8_c2_handler - xdef _z8_c1_handler - xdef _z8_c0_handler -endif - xdef _z8_potrap_handler - xdef _z8_wotrap_handler - -/**************************************************************************/ - -#elif defined(ENCORE_XP16K_VECTORS) - - xdef _z8_wdt_handler - xdef _z8_trap_handler -if EZ8_TIMER3=1 - xdef _z8_timer2_handler -endif - xdef _z8_timer1_handler - xdef _z8_timer0_handler -if EZ8_UART0=1 - xdef _z8_uart0rx_handler - xdef _z8_uart0tx_handler -endif -if EZ8_I2C=1 - xdef _z8_i2c_handler -endif -if EZ8_ESPI=1 - xdef _z8_spi_handler -endif -if EZ8_ADC_NEW=1 - xdef _z8_adc_handler -endif - xdef _z8_p7ad_handler - xdef _z8_p6ad_handler - xdef _z8_p5ad_handler - xdef _z8_p4ad_handler - xdef _z8_p3ad_handler - xdef _z8_p2ad_handler - xdef _z8_p1ad_handler - xdef _z8_p0ad_handler -if EZ8_MCT=1 - xdef _z8_mct_handler -endif -if EZ8_UART1=1 - xdef _z8_uart1rx_handler - xdef _z8_uart1tx_handler -endif - xdef _z8_c3_handler - xdef _z8_c2_handler - xdef _z8_c1_handler - xdef _z8_c0_handler - xdef _z8_potrap_handler - xdef _z8_wotrap_handler - -/**************************************************************************/ - -#elif defined(ENCORE_MC_VECTORS) - - xdef _z8_wdt_handler - xdef _z8_trap_handler - xdef _z8_pwmtimer_handler - xdef _z8_pwmfault_handler -if EZ8_ADC_NEW=1 - xdef _z8_adc_handler -endif - xdef _z8_cmp_handler - xdef _z8_timer0_handler -if EZ8_UART0 - xdef _z8_uart0rx_handler - xdef _z8_uart0tx_handler -endif -if EZ8_SPI=1 - xdef _z8_spi_handler -endif -if EZ8_I2C=1 - xdef _z8_i2c_handler -endif - xdef _z8_c0_handler - xdef _z8_pb_handler - xdef _z8_p7ap3a_handler - xdef _z8_p6ap2a_handler - xdef _z8_p5ap1a_handler - xdef _z8_p4ap0a_handler - xdef _z8_potrap_handler - xdef _z8_wotrap_handler -#endif - -/************************************************************************** - * Macros - **************************************************************************/ - -ENTER : MACRO val - pushx rp /* Save the current RP value in the stack */ - srp #%f0 /* Load the interrupt register pointer */ - ld r0, #val /* Pass the new value in r0 */ - jr _z8_common_handler /* The rest of the handling is common */ - ENDMAC ENTER - -LEAVE : MACRO - popx rp /* Restore the user register pointer */ - iret /* And return from interrupt */ - ENDMAC LEAVE - -/************************************************************************** - * Code - **************************************************************************/ - - segment CODE - -/************************************************************************** - * Interrupt Vectors - **************************************************************************/ - -#if defined(ENCORE_VECTORS) - vector WDT = _z8_wdt_handler - vector TRAP = _z8_trap_handler -if EZ8_TIMER3=1 - vector TIMER2 = _z8_timer2_handler -endif - vector TIMER1 = _z8_timer1_handler - vector TIMER0 = _z8_timer0_handler -if EZ8_UART0=1 - vector UART0_RX = _z8_uart0rx_handler - vector UART0_TX = _z8_uart0tx_handler -endif -if EZ8_I2C=1 - vector I2C = _z8_i2c_handler -endif -if EZ8_SPI=1 - vector SPI = _z8_spi_handler -endif -if EZ8_ADC=1 - vector ADC = _z8_adc_handler -endif - vector P7AD = _z8_p7ad_handler - vector P6AD = _z8_p6ad_handler - vector P5AD = _z8_p5ad_handler - vector P4AD = _z8_p4ad_handler - vector P3AD = _z8_p3ad_handler - vector P2AD = _z8_p2ad_handler - vector P1AD = _z8_p1ad_handler - vector P0AD = _z8_p0ad_handler -if EZ8_TIMER4=1 - vector TIMER3 = _z8_timer3_handler -endif -if EZ8_UART1=1 - vector UART1_RX = _z8_uart1rx_handler - vector UART1_TX = _z8_uart1tx_handler -endif -if EZ8_DMA=1 - vector DMA = _z8_dma_handler -endif -if EZ8_PORT1=0 - vector C3 = _z8_c3_handler - vector C2 = _z8_c2_handler - vector C1 = _z8_c1_handler - vector C0 = _z8_c0_handler -endif - -/**************************************************************************/ - -#elif defined(ENCORE_XP_VECTORS) - - vector WDT = _z8_wdt_handler - vector TRAP = _z8_trap_handler -if EZ8_TIMER3=1 - vector TIMER2 = _z8_timer2_handler -endif - vector TIMER1 = _z8_timer1_handler - vector TIMER0 = _z8_timer0_handler -if EZ8_UART0=1 - vector UART0_RX = _z8_uart0rx_handler - vector UART0_TX = _z8_uart0tx_handler -endif -if EZ8_I2C=1 - vector I2C = _z8_i2c_handler -endif -if EZ8_SPI=1 - vector SPI = _z8_spi_handler -endif -if (EZ8_ADC=1) || (EZ8_ADC_NEW=1) - vector ADC = _z8_adc_handler -endif - vector P7AD = _z8_p7ad_handler - vector P6AD = _z8_p6ad_handler - vector P5AD = _z8_p5ad_handler - vector P4AD = _z8_p4ad_handler - vector P3AD = _z8_p3ad_handler - vector P2AD = _z8_p2ad_handler - vector P1AD = _z8_p1ad_handler - vector P0AD = _z8_p0ad_handler -if EZ8_TIMER4=1 - vector TIMER3 = _z8_timer3_handler -endif -if EZ8_UART1=1 - vector UART1_RX = _z8_uart1rx_handler - vector UART1_TX = _z8_uart1tx_handler -endif -if EZ8_DMA=1 - vector DMA = _z8_dma_handler -endif -if EZ8_PORT1=0 - vector C3 = _z8_c3_handler - vector C2 = _z8_c2_handler - vector C1 = _z8_c1_handler - vector C0 = _z8_c0_handler -endif - vector POTRAP = _z8_potrap_handler - vector WOTRAP = _z8_wotrap_handler - -/**************************************************************************/ - -#elif defined(ENCORE_XP16K_VECTORS) - - vector WDT = _z8_wdt_handler - vector TRAP = _z8_trap_handler -if EZ8_TIMER3=1 - vector TIMER2 = _z8_timer2_handler -endif - vector TIMER1 = _z8_timer1_handler - vector TIMER0 = _z8_timer0_handler -if EZ8_UART0=1 - vector UART0_RX = _z8_uart0rx_handler - vector UART0_TX = _z8_uart0tx_handler -endif -if EZ8_I2C=1 - vector I2C = _z8_i2c_handler -endif -if EZ8_ESPI=1 - vector SPI = _z8_spi_handler -endif -if EZ8_ADC_NEW=1 - vector ADC = _z8_adc_handler -endif - vector P7AD = _z8_p7ad_handler - vector P6AD = _z8_p6ad_handler - vector P5AD = _z8_p5ad_handler - vector P4AD = _z8_p4ad_handler - vector P3AD = _z8_p3ad_handler - vector P2AD = _z8_p2ad_handler - vector P1AD = _z8_p1ad_handler - vector P0AD = _z8_p0ad_handler -if EZ8_MCT=1 - vector MCT = _z8_mct_handler -endif -if EZ8_UART1=1 - vector UART1_RX = _z8_uart1rx_handler - vector UART1_TX = _z8_uart1tx_handler -endif - vector C3 = _z8_c3_handler - vector C2 = _z8_c2_handler - vector C1 = _z8_c1_handler - vector C0 = _z8_c0_handler - vector POTRAP = _z8_potrap_handler - vector WOTRAP = _z8_wotrap_handler - -/**************************************************************************/ - -#elif defined(ENCORE_MC_VECTORS) - - vector WDT = _z8_wdt_handler - vector TRAP = _z8_trap_handler - vector PWMTIMER = _z8_pwmtimer_handler - vector PWMFAULT = _z8_pwmfault_handler -if EZ8_ADC_NEW=1 - vector ADC = _z8_adc_handler -endif - vector CMP = _z8_cmp_handler - vector TIMER0 = _z8_timer0_handler -if EZ8_UART0 - vector UART0_RX = _z8_uart0rx_handler - vector UART0_TX = _z8_uart0tx_handler -endif -if EZ8_SPI=1 - vector SPI = _z8_spi_handler -endif -if EZ8_I2C=1 - vector I2C = _z8_i2c_handler -endif - vector C0 = _z8_c0_handler - vector PB = _z8_pb_handler - vector P7A = _z8_p7ap3a_handler - vector P6A = _z8_p6ap2a_handler - vector P5A = _z8_p5ap1a_handler - vector P4A = _z8_p4ap0a_handler - vector POTRAP = _z8_potrap_handler - vector WOTRAP = _z8_wotrap_handler -#endif - -/************************************************************************** - * Name: _z16f_*_handler - * - * Description: - * Map individual interrupts into interrupt number and branch to common - * interrupt handling logic. If higher interrupt handling performance - * for particular interrupts is required, then those interrupts should - * be picked off here and handled outside of the common logic. - * - * On entry to any of these handlers, the stack contains the following: - * - * TOS before interrupt - * PC[7:0] - * PC[15:8] - * SP -> Flags Register - * - **************************************************************************/ - -#if defined(ENCORE_VECTORS) -_z8_wdt_handler: - ENTER(Z8_WDT_IRQ) -_z8_trap_handler: - ENTER(Z8_TRAP_IRQ) -if EZ8_TIMER3=1 -_z8_timer2_handler: - ENTER(Z8_TIMER2_IRQ) -endif -_z8_timer1_handler: - ENTER(Z8_TIMER1_IRQ) -_z8_timer0_handler: - ENTER(Z8_TIMER0_IRQ) -if EZ8_UART0=1 -_z8_uart0rx_handler: - ENTER(Z8_UART0_RX_IRQ) -_z8_uart0tx_handler: - ENTER(Z8_UART0_TX_IRQ) -endif -if EZ8_I2C=1 -_z8_i2c_handler: - ENTER(Z8_I2C_IRQ) -endif -if EZ8_SPI=1 -_z8_spi_handler: - ENTER(Z8_SPI_IRQ) -endif -if EZ8_ADC=1 -_z8_adc_handler: - ENTER(Z8_ADC_IRQ) -endif -_z8_p7ad_handler: - ENTER(Z8_P7AD_IRQ) -_z8_p6ad_handler: - ENTER(Z8_P6AD_IRQ) -_z8_p5ad_handler: - ENTER(Z8_P5AD_IRQ) -_z8_p4ad_handler: - ENTER(Z8_P4AD_IRQ) -_z8_p3ad_handler: - ENTER(Z8_P3AD_IRQ) -_z8_p2ad_handler: - ENTER(Z8_P2AD_IRQ) -_z8_p1ad_handler: - ENTER(Z8_P1AD_IRQ) -_z8_p0ad_handler: - ENTER(Z8_P0AD_IRQ) -if EZ8_TIMER4=1 -_z8_timer3_handler: - ENTER(Z8_TIMER3_IRQ) -endif -if EZ8_UART1=1 -_z8_uart1rx_handler: - ENTER(Z8_UART1_RX_IRQ) -_z8_uart1tx_handler: - ENTER(Z8_UART1_TX_IRQ) -endif -if EZ8_DMA=1 -_z8_dma_handler: - ENTER(Z8_DMA_IRQ) -endif -if EZ8_PORT1=0 -_z8_c3_handler: - ENTER(Z8_C3_IRQ) -_z8_c2_handler: - ENTER(Z8_C2_IRQ) -_z8_c1_handler: - ENTER(Z8_C1_IRQ) -_z8_c0_handler: - ENTER(Z8_C0_IRQ) -endif - -/**************************************************************************/ - -#elif defined(ENCORE_XP_VECTORS) - -_z8_wdt_handler: - ENTER(Z8_WDT_IRQ) -_z8_trap_handler: - ENTER(Z8_TRAP_IRQ) -if EZ8_TIMER3=1 -_z8_timer2_handler: - ENTER(Z8_TIMER2_IRQ) -endif -_z8_timer1_handler: - ENTER(Z8_TIMER1_IRQ) -_z8_timer0_handler: - ENTER(Z8_TIMER0_IRQ) -if EZ8_UART0=1 -_z8_uart0rx_handler: - ENTER(Z8_UART0_RX_IRQ) -_z8_uart0tx_handler: - ENTER(Z8_UART0_TX_IRQ) -endif -if EZ8_I2C=1 -_z8_i2c_handler: - ENTER(Z8_I2C_IRQ) -endif -if EZ8_SPI=1 -_z8_spi_handler: - ENTER(Z8_SPI_IRQ) -endif -if (EZ8_ADC=1) || (EZ8_ADC_NEW=1) -_z8_adc_handler: - ENTER(Z8_ADC_IRQ) -endif -_z8_p7ad_handler: - ENTER(Z8_P7AD_IRQ) -_z8_p6ad_handler: - ENTER(Z8_P6AD_IRQ) -_z8_p5ad_handler: - ENTER(Z8_P5AD_IRQ) -_z8_p4ad_handler: - ENTER(Z8_P4AD_IRQ) -_z8_p3ad_handler: - ENTER(Z8_P3AD_IRQ) -_z8_p2ad_handler: - ENTER(Z8_P2AD_IRQ) -_z8_p1ad_handler: - ENTER(Z8_P1AD_IRQ) -_z8_p0ad_handler: - ENTER(Z8_P0AD_IRQ) -if EZ8_TIMER4=1 -_z8_timer3_handler: - ENTER(Z8_TIMER3_IRQ) -endif -if EZ8_UART1=1 -_z8_uart1rx_handler: - ENTER(Z8_UART1_RX_IRQ) -_z8_uart1tx_handler: - ENTER(Z8_UART1_TX_IRQ) -endif -if EZ8_DMA=1 -_z8_dma_handler: - ENTER(Z8_DMA_IRQ) -endif -if EZ8_PORT1=0 -_z8_c3_handler: - ENTER(Z8_C3_IRQ) -_z8_c2_handler: - ENTER(Z8_C2_IRQ) -_z8_c1_handler: - ENTER(Z8_C1_IRQ) -_z8_c0_handler: - ENTER(Z8_C0_IRQ) -endif -_z8_potrap_handler: - ENTER(Z8_POTRAP_IRQ) -_z8_wotrap_handler: - ENTER(Z8_WOTRAP_IRQ) - -/**************************************************************************/ - -#elif defined(ENCORE_XP16K_VECTORS) - -_z8_wdt_handler: - ENTER(Z8_WDT_IRQ) -_z8_trap_handler: - ENTER(Z8_TRAP_IRQ) -if EZ8_TIMER3=1 -_z8_timer2_handler: - ENTER(Z8_TIMER2_IRQ) -endif -_z8_timer1_handler: - ENTER(Z8_TIMER1_IRQ) -_z8_timer0_handler: - ENTER(Z8_TIMER0_IRQ) -if EZ8_UART0=1 -_z8_uart0rx_handler: - ENTER(Z8_UART0_RX_IRQ) -_z8_uart0tx_handler: - ENTER(Z8_UART0_TX_IRQ) -endif -if EZ8_I2C=1 -_z8_i2c_handler: - ENTER(Z8_I2C_IRQ) -endif -if EZ8_ESPI=1 -_z8_spi_handler: - ENTER(Z8_SPI_IRQ) -endif -if EZ8_ADC_NEW=1 -_z8_adc_handler: - ENTER(Z8_ADC_IRQ) -endif -_z8_p7ad_handler: - ENTER(Z8_P7AD_IRQ) -_z8_p6ad_handler: - ENTER(Z8_P6AD_IRQ) -_z8_p5ad_handler: - ENTER(Z8_P5AD_IRQ) -_z8_p4ad_handler: - ENTER(Z8_P4AD_IRQ) -_z8_p3ad_handler: - ENTER(Z8_P3AD_IRQ) -_z8_p2ad_handler: - ENTER(Z8_P2AD_IRQ) -_z8_p1ad_handler: - ENTER(Z8_P1AD_IRQ) -_z8_p0ad_handler: - ENTER(Z8_P0AD_IRQ) -if EZ8_MCT=1 -_z8_mct_handler: - ENTER(Z8_MCT_IRQ) -endif -if EZ8_UART1=1 -_z8_uart1rx_handler: - ENTER(Z8_UART1_RX_IRQ) -_z8_uart1tx_handler: - ENTER(Z8_UART1_TX_IRQ) -endif -_z8_c3_handler: - ENTER(Z8_C3_IRQ) -_z8_c2_handler: - ENTER(Z8_C2_IRQ) -_z8_c1_handler: - ENTER(Z8_C1_IRQ) -_z8_c0_handler: - ENTER(Z8_C0_IRQ) -_z8_potrap_handler: - ENTER(Z8_POTRAP_IRQ) -_z8_wotrap_handler: - ENTER(Z8_WOTRAP_IRQ) - -/**************************************************************************/ - -#elif defined(ENCORE_MC_VECTORS) - -_z8_wdt_handler: - ENTER(Z8_WDT_IRQ) -_z8_trap_handler: - ENTER(Z8_TRAP_IRQ) -_z8_pwmtimer_handler: - ENTER(Z8_PWMTIMER_IRQ) -_z8_pwmfault_handler: - ENTER(Z8_PWMFAULT_IRQ) -if EZ8_ADC_NEW=1 -_z8_adc_handler: - ENTER(Z8_ADC_IRQ) -endif -_z8_cmp_handler: - ENTER(Z8_CMP_IRQ) -_z8_timer0_handler: - ENTER(Z8_TIMER0_IRQ) -if EZ8_UART0 -_z8_uart0rx_handler: - ENTER(Z8_UART0_RX_IRQ) -_z8_uart0tx_handler: - ENTER(Z8_UART0_TX_IRQ) -endif -if EZ8_SPI=1 -_z8_spi_handler: - ENTER(Z8_SPI_IRQ) -endif -if EZ8_I2C=1 -_z8_i2c_handler: - ENTER(Z8_I2C_IRQ) -endif -_z8_c0_handler: - ENTER(Z8_C0_IRQ) -_z8_pb_handler: - ENTER(Z8_PB_IRQ) -_z8_p7ap3a_handler: - ENTER(Z8_P7A_IRQ) -_z8_p6ap2a_handler: - ENTER(Z8_P6AP2A_IRQ) -_z8_p5ap1a_handler: - ENTER(Z8_P5AP1A_IRQ) -_z8_p4ap0a_handler: - ENTER(Z8_P4AP0A_IRQ) -_z8_potrap_handler: - ENTER(Z8_POTRAP_IRQ) -_z8_wotrap_handler: - ENTER(Z8_WOTRAP_IRQ) -#endif - -/************************************************************************** - * Name: _z16f_common_handler - * - * Description: - * Common IRQ handling logic - * - * On entry, the stack contains the following: - * - * TOS before interrupt - * PC[7:0] - * PC[15:8] - * Flags Register - * SP -> RP - * - * R0 holds the IRQ number and the RP has been reset to %f0 - * - **************************************************************************/ - -_z8_common_handler: - /* Pass the address of the IRQ stack frame */ - - ldx r2, sph /* rr2 = stack pointer */ - ldx r3, spl - push r3 /* Pass as a parameter */ - push r2 - - /* Pass the IRQ number */ - - push r0 - - /* Process the interrupt */ - - call _z80_doirq /* Call the IRQ handler */ - - /* Release arguments from the stack */ - - pop r4 /* Discard the IRQ argument */ - pop r2 /* Recover the stack pointer parameter */ - pop r3 - - /* If a interrupt level context switch occurred, then the - * return value will be the same as the input value - */ - - cp r0, r2 /* Same as the return value? */ - jr nz, _z8_switch - cp r1, r3 - jr z, _z8_noswitch - - /* A context switch occurs. Restore the use context. - * rr0 = pointer to context structgure. - */ - -_z8_switch: - - /* Destroy the interrupt return information on the stack */ - - pop r4 /* Destroy saved RP */ - pop r4 /* Destroy saved flags */ - pop r4 /* Destroy saved return address */ - pop r4 - - /* Copy all registers into the user register area. */ - - clr r2 /* rr2 = destination address */ - ldx r3, XCPT_RP_OFFS(rr0) - ld r4, r0 /* rr4 = source address */ - ld r5, r1 - ld r6, #16 /* r6 = number of bytes to copy */ - -_z8_restore: - ldx r7, @rr4 - ldx @rr2, r7 - incw rr2 - incw rr4 - djnz r6, _z8_restore - - /* Set the new stack pointer */ - - ldx r2, XCPT_SPH_OFFS(rr0) - ldx r3, XCPT_SPL_OFFS(rr0) - ldx sph, r2 - ldx spl, r3 - - /* Push the return address onto the stack */ - - ldx r2, XCPT_PCH_OFFS(rr0) - ldx r3, XCPT_PCL_OFFS(rr0) - push r3 - push r2 - - /* Recover the flags and RP settings.. but don't restore them yet */ - - ldx r3, XCPT_FLAGS_OFFS(rr0) - ldx r4, XCPT_RP_OFFS(rr0) - - /* Determine whether interrupts must be enabled on return. This - * would be nicer to do below, but later we will need to preserve - * the condition codes in the flags. - */ - - ldx r2, XCPT_IRQCTL_OFFS(rr0) - tm r2, #%80 - jr nz, _z8_returnenabled - - /* Restore the flag settings */ - - ldx flags, r3 - - /* Restore the user register page and return with interrupts disabled. - * Note that we cannot use the iret instruction because it unconditionally - * re-enabled interrupts - */ - - ldx rp, r4 /* Does not effect flags */ - ret /* Does not effect flags */ - -_z8_returnenabled: - /* Restore the flag settings */ - - ldx flags, r1 - - /* Restore the user register page, re-enable interrupts and return. - * Note that we cannot use the iret instruction because it unconditionally - * re-enabled interrupts - */ - - ldx rp, r4 /* Does not effect flags */ - ei /* Does not effect flags */ - ret /* Does not effect flags */ - -_z8_noswitch: - LEAVE - -/************************************************************************** - * Data - **************************************************************************/ - - /* Set aside area for interrupt registers */ - - define interruptreg, space=rdata, org=%f0 - segment interruptreg - ds %10 - - end _z8_common_handler diff --git a/arch/z80/src/z80/.gitignore b/arch/z80/src/z80/.gitignore deleted file mode 100644 index 7227d197ac..0000000000 --- a/arch/z80/src/z80/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -!*.asm - diff --git a/arch/z80/src/z80/Kconfig b/arch/z80/src/z80/Kconfig deleted file mode 100644 index b5bfd1d37e..0000000000 --- a/arch/z80/src/z80/Kconfig +++ /dev/null @@ -1,49 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_CHIP_Z80 - -choice - prompt "Toolchain Selection" - default Z80_TOOLCHAIN_SDCC - -config Z80_TOOLCHAIN_SDCC - bool "Win32, SDCC for Linux, macOS, or Cygwin" - -endchoice - -config LINKER_HOME_AREA - hex "Start of _HOME area" - default 0x0000 - ---help--- - Start of the linker HOME area. Default: 0x0000 - -config LINKER_CODE_AREA - hex "Start of _CODE area" - default 0x0200 - ---help--- - Start of the linker _CODE area. Default: 0x0200 - -config LINKER_DATA_AREA - hex "Start of _DATA area" - default 0x8000 - ---help--- - Start of the linker _DATA area. Default: 0x8000 - -config LINKER_ROM_AT_0000 - bool "ROM at 0x0000" - default n - ---help--- - Some architectures may have ROM located at address zero. In this - case, a special version of the "head" file must be used. - -config ARCH_HAVEHEAD - bool "Board-specific Head File" - default n - ---help--- - Use a board-specific version of the "head" file in the - boards/z80/z80//src directory - -endif diff --git a/arch/z80/src/z80/Make.defs b/arch/z80/src/z80/Make.defs deleted file mode 100644 index 8555cf59ee..0000000000 --- a/arch/z80/src/z80/Make.defs +++ /dev/null @@ -1,41 +0,0 @@ -############################################################################ -# arch/z80/src/z80/Make.defs -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -ifeq ($(CONFIG_ARCH_HAVEHEAD),) -ifeq ($(CONFIG_LINKER_ROM_AT_0000),y) -HEAD_ASRC = z80_rom.asm -else -HEAD_ASRC = z80_head.asm -endif -endif - -CMN_CSRCS = z80_allocateheap.c z80_createstack.c z80_doirq.c -CMN_CSRCS += z80_exit.c z80_initialize.c z80_interruptcontext.c -CMN_CSRCS += z80_idle.c z80_mdelay.c z80_releasestack.c -CMN_CSRCS += z80_switchcontext.c z80_stackframe.c -CMN_CSRCS += z80_udelay.c z80_usestack.c - -CHIP_ASRCS = z80_saveusercontext.asm z80_restoreusercontext.asm - -CHIP_CSRCS = z80_initialstate.c z80_io.c z80_irq.c z80_copystate.c -CHIP_CSRCS += z80_schedulesigaction.c z80_sigdeliver.c -CHIP_CSRCS += z80_registerdump.c diff --git a/arch/z80/src/z80/Toolchain.defs b/arch/z80/src/z80/Toolchain.defs deleted file mode 100644 index 12d0c4bc02..0000000000 --- a/arch/z80/src/z80/Toolchain.defs +++ /dev/null @@ -1,125 +0,0 @@ -############################################################################ -# arch/z80/src/z80/Toolchain.defs -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -# Setup for the selected toolchain - -# -# SDCC is currently the only z80 toolchain supported. See -# http://sdcc.sourceforge.net/. Source and pre-built SDCC binaries can be -# downloaded from the SDCC SourceForge site: -# http://sourceforge.net/projects/sdcc/files/. Pre-built binaries are -# available for Linux, macOS, and for Win32. In addition, SDCC can be -# built to run on Windows as a POSIX toolchain. The various SDCC options are -# selected in the NuttX configuration with: -# -# CONFIG_Z80_TOOLCHAIN_SDCC=y : Win32, SDCC for Linux, macOS or Cygwin -# - -# These are the directories where the SDCC toolchain is installed. NOTE -# that short 8.3 path names are used in order to avoid spaces. On my machine -# I have: -# -# C:\PROGRA~1\ = C:\Profram Files\ -# C:\PROGRA~2\ = C:\Program Files (x86)\ -# -# Your PC may be configured differently. - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) - SDCC_INSTALLDIR = C:\PROGRA~2\SDCC - SDCC_BINDIR = $(SDCC_INSTALLDIR)\bin - SDCC_LIBDIR = $(SDCC_INSTALLDIR)\lib\z80 -else - SDCC_INSTALLDIR = /usr/local - SDCC_BINDIR = $(SDCC_INSTALLDIR)/bin - SDCC_LIBDIR = $(SDCC_INSTALLDIR)/share/sdcc/lib/z80 -endif - -ARCHCPUFLAGS = -mz80 - -ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - ARCHOPTIMIZATION = --debug -endif - -SDCCLIB = z80.lib - -# Custom ASSEMBLE definition. The most common toolchain, GCC, uses the -# compiler to assemble files because this has the advantage of running the C -# Pre-Processor against. This is not possible with other SDCC; we need to -# define AS and over-ride the common definition in order to use the assembler -# directly. - -define ASSEMBLE - @echo "AS: $1" - $(Q) $(AS) $(AFLAGS) $($(strip $1)_AFLAGS) $2 $1 -endef - -# Custom CLEAN definition - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) -define CLEAN - $(Q) if exist *.o (del /f /q *.o) - $(Q) if exist *.asm (del /f /q *.asm) - $(Q) if exist *.rel (del /f /q *.rel) - $(Q) if exist *.lst (del /f /q *.lst) - $(Q) if exist *.rst (del /f /q *.rst) - $(Q) if exist *.sym (del /f /q *.sym) - $(Q) if exist *.adb (del /f /q *.adb) - $(Q) if exist *.lnk (del /f /q *.lnk) - $(Q) if exist *.map (del /f /q *.map) - $(Q) if exist *.mem (del /f /q *.mem) - $(Q) if exist *.hex (del /f /q *.hex) - $(Q) if exist *.cmd (del /f /q *.cmd) -endef -else -define CLEAN - $(Q) rm -f *.o *.asm *.rel *.lst *.rst *.sym *.adb *.lnk *.map *.mem *.hex *.cmd -endef -endif - -# Tool names/paths - -CC = sdcc -CPP = sdcpp -LD = sdldz80 -AS = sdasz80 -AR = sdar -r -UNAR = sdar -x - -# File extensions - -ASMEXT = .asm -OBJEXT = .rel -LIBEXT = .lib -EXEEXT = .hex - -# Loadable module definitions - -CMODULEFLAGS = $(CFLAGS) -fvisibility=hidden -LDMODULEFLAGS = -r -T $(call CONVERT_PATH,$(TOPDIR)/libs/libc/elf/gnu-elf.ld) - -# ELF module definitions - -CELFFLAGS = $(CFLAGS) -fvisibility=hidden -CXXELFFLAGS = $(CXXFLAGS) -fvisibility=hidden - -LDELFFLAGS = -r -e __start -LDELFFLAGS += -T $(call CONVERT_PATH,$(TOPDIR)$(DELIM)libs$(DELIM)libc$(DELIM)elf$(DELIM)gnu-elf.ld) diff --git a/arch/z80/src/z80/chip.h b/arch/z80/src/z80/chip.h deleted file mode 100644 index 8241eeb925..0000000000 --- a/arch/z80/src/z80/chip.h +++ /dev/null @@ -1,40 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z80/chip.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z80_SRC_Z80_CHIP_H -#define __ARCH_Z80_SRC_Z80_CHIP_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#endif /* __ARCH_Z80_SRC_Z80_CHIP_H */ diff --git a/arch/z80/src/z80/switch.h b/arch/z80/src/z80/switch.h deleted file mode 100644 index 4e628cc106..0000000000 --- a/arch/z80/src/z80/switch.h +++ /dev/null @@ -1,168 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z80/switch.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z80_SRC_Z80_SWITCH_H -#define __ARCH_Z80_SRC_Z80_SWITCH_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include - -#include "z80_internal.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Macros for portability *************************************************** - * - * Common logic in arch/z80/src/common is customized for the z80 - * context switching logic via the following macros. - */ - -/* Initialize the IRQ state */ - -#define INIT_IRQCONTEXT() up_set_current_regs(NULL) - -/* IN_INTERRUPT returns true if the system is currently operating in the - * interrupt context. - * IN_INTERRUPT is the inline equivalent of up_interrupt_context(). - */ - -#define IN_INTERRUPT() (up_current_regs() != NULL) - -/* The following macro is used when the system enters interrupt - * handling logic - * - * NOTE: Nested interrupts are not supported in this implementation. - * If you want to implement nested interrupts, you would have to change - * the way that g_current_regs is handled. The savestate variable - * would not work for that purpose as implemented here because only the - * outermost nested interrupt can result in a context switch - * (it can probably be deleted). - */ - -#define DECL_SAVESTATE() \ - FAR chipreg_t *savestate - -#define IRQ_ENTER(irq, regs) \ - do \ - { \ - savestate = up_current_regs(); \ - up_set_current_regs(regs); \ - } \ - while (0) - -/* The following macro is used when the system exits - * interrupt handling logic - */ - -#define IRQ_LEAVE(irq) up_set_current_regs(savestate) - -/* The following macro is used to sample the interrupt state - * (as a opaque handle) - */ - -#define IRQ_STATE() up_current_regs() - -/* Save the current IRQ context in the specified TCB */ - -#define SAVE_IRQCONTEXT(tcb) z80_copystate((tcb)->xcp.regs, up_current_regs()) - -/* Set the current IRQ context to the state specified in the TCB */ - -#define SET_IRQCONTEXT(tcb) z80_copystate(up_current_regs(), (tcb)->xcp.regs) - -/* Save the user context in the specified TCB. User context saves - * can be simpler because only those registers normally saved in a C called - * need be stored. - */ - -#define SAVE_USERCONTEXT(tcb) up_saveusercontext((tcb)->xcp.regs) - -/* Restore the full context -- either a simple user state save or the full, - * IRQ state save. - */ - -#define RESTORE_USERCONTEXT(tcb) z80_restoreusercontext((tcb)->xcp.regs) - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -/* This holds a references to the current interrupt level register - * storage structure. It is non-NULL only during interrupt processing. - */ - -extern volatile chipreg_t *g_current_regs; -#endif - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Defined in z80_copystate.c */ - -void z80_copystate(FAR chipreg_t *dest, FAR const chipreg_t *src); - -/* Defined in z80_saveusercontext.asm */ - -int up_saveusercontext(FAR chipreg_t *regs); - -/* Defined in z80_restoreusercontext.asm */ - -void z80_restoreusercontext(FAR chipreg_t *regs); - -/**************************************************************************** - * Inline Functions - ****************************************************************************/ - -static inline_function chipreg_t *up_current_regs(void) -{ - return (FAR chipreg_t *)g_current_regs; -} - -static inline_function void up_set_current_regs(FAR chipreg_t *regs) -{ - g_current_regs = regs; -} - -#ifdef __cplusplus -} -#endif -#endif - -#endif /* __ARCH_Z80_SRC_Z80_SWITCH_H */ diff --git a/arch/z80/src/z80/z80_copystate.c b/arch/z80/src/z80/z80_copystate.c deleted file mode 100644 index b1d07d2cb8..0000000000 --- a/arch/z80/src/z80/z80_copystate.c +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z80/z80_copystate.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include "chip/switch.h" -#include "z80_internal.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: z80_copystate - ****************************************************************************/ - -/* Maybe a little faster than most memcpy's */ - -void z80_copystate(FAR chipreg_t *dest, FAR const chipreg_t *src) -{ - int i; - for (i = 0; i < XCPTCONTEXT_REGS; i++) - { - *dest++ = *src++; - } -} diff --git a/arch/z80/src/z80/z80_head.asm b/arch/z80/src/z80/z80_head.asm deleted file mode 100644 index 0679293fc5..0000000000 --- a/arch/z80/src/z80/z80_head.asm +++ /dev/null @@ -1,290 +0,0 @@ -;************************************************************************** -; arch/z80/src/z80/z80_head.asm -; -; SPDX-License-Identifier: Apache-2.0 -; -; Licensed to the Apache Software Foundation (ASF) under one or more -; contributor license agreements. See the NOTICE file distributed with -; this work for additional information regarding copyright ownership. The -; ASF licenses this file to you under the Apache License, Version 2.0 (the -; "License"); you may not use this file except in compliance with the -; License. You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -; License for the specific language governing permissions and limitations -; under the License. -; -;************************************************************************** - - .title NuttX for the Z80 - .module z80_head - -;************************************************************************** -; Constants -;************************************************************************** - - ; Register save area layout - - XCPT_I == 0 ; Offset 0: Saved I w/interrupt state in carry - XCPT_BC == 2 ; Offset 1: Saved BC register - XCPT_DE == 4 ; Offset 2: Saved DE register - XCPT_IX == 6 ; Offset 3: Saved IX register - XCPT_IY == 8 ; Offset 4: Saved IY register - XCPT_SP == 10 ; Offset 5: Offset to SP at time of interrupt - XCPT_HL == 12 ; Offset 6: Saved HL register - XCPT_AF == 14 ; Offset 7: Saved AF register - XCPT_PC == 16 ; Offset 8: Offset to PC at time of interrupt - - ; Default stack base (needs to be fixed) - - .include "asm_mem.h" - -;************************************************************************** -; Global symbols used -;************************************************************************** - - .globl _nx_start ; OS entry point - .globl _z80_doirq ; Interrupt decoding logic - -;************************************************************************** -; Reset entry point -;************************************************************************** - - .area _HEADER (ABS) - .org 0x0000 - - di ; Disable interrupts - im 1 ; Set interrupt mode 1 - jr _up_reset ; And boot the system - -;************************************************************************** -; Other reset handlers -; -; Interrupt mode 1 behavior: -; -; 1. M1 cycle: 7 ticks -; Acknowledge interrupt and decrements SP -; 2. M2 cycle: 3 ticks -; Writes the MS byte of the PC onto the stack and decrements SP -; 3. M3 cycle: 3 ticks -; Writes the LS byte of the PC onto the stack and sets the PC to 0x0038. -; -;************************************************************************** - - .org 0x0008 ; RST 1 - - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #1 ; 1 = Z80_RST1 - jr _up_rstcommon ; Remaining RST handling is common - - .org 0x0010 ; RST 2 - - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #2 ; 2 = Z80_RST2 - jr _up_rstcommon ; Remaining RST handling is common - - .org 0x0018 ; RST 3 - - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #3 ; 1 = Z80_RST3 - jr _up_rstcommon ; Remaining RST handling is common - - .org 0x0020 ; RST 4 - - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #4 ; 1 = Z80_RST4 - jr _up_rstcommon ; Remaining RST handling is common - - .org 0x0028 ; RST 5 - - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #5 ; 1 = Z80_RST5 - jr _up_rstcommon ; Remaining RST handling is common - - .org 0x0030 ; RST 6 - - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #6 ; 1 = Z80_RST6 - jr _up_rstcommon ; Remaining RST handling is common - - .org 0x0038 ; Int mode 1 / RST 7 - - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #7 ; 7 = Z80_RST7 - jr _up_rstcommon ; Remaining RST handling is common - -;************************************************************************** -; NMI interrupt handler -;************************************************************************** - - .org 0x0066 - retn - -;************************************************************************** -; System start logic -;************************************************************************** - -_up_reset: - ; Set up the stack pointer at the location determined the Makefile - ; and stored in asm_mem.h - - ld SP, #CONFIG_STACK_END ; Set stack pointer - - ; Performed initialization unique to the SDCC toolchain - - call gsinit ; Initialize the data section - - ; Then start NuttX - - call _nx_start ; jump to the OS entry point - - ; NuttX will never return, but just in case... - -_up_halt:: - halt ; We should never get here - jp _up_halt - -;************************************************************************** -; Common Interrupt handler -;************************************************************************** - -_up_rstcommon:: - ; Create a register frame. SP points to top of frame + 4, pushes - ; decrement the stack pointer. Already have - ; - ; Offset 8: Return PC is already on the stack - ; Offset 7: AF (retaining flags) - ; - ; IRQ number is in A - - push hl ; Offset 6: HL - ld hl, #(3*2) ; HL is the value of the stack pointer before - add hl, sp ; the interrupt occurred - push hl ; Offset 5: Stack pointer - push iy ; Offset 4: IY - push ix ; Offset 3: IX - push de ; Offset 2: DE - push bc ; Offset 1: BC - - ld b, a ; Save the reset number in B - ld a, i ; Parity bit holds interrupt state - push af ; Offset 0: I with interrupt state in parity - di - - ; Call the interrupt decode logic. SP points to the beginning of the reg structure - - ld hl, #0 ; Argument #2 is the beginning of the reg structure - add hl, sp ; - push hl ; Place argument #2 at the top of stack - push bc ; Argument #1 is the Reset number - inc sp ; (make byte sized) - call _z80_doirq ; Decode the IRQ - - ; On return, HL points to the beginning of the reg structure to restore - ; Note that (1) the arguments pushed on the stack are not popped, and (2) the - ; original stack pointer is lost. In the normal case (no context switch), - ; HL will contain the value of the SP before the arguments were pushed. - - ld sp, hl ; Use the new stack pointer - - ; Restore registers. HL points to the beginning of the reg structure to restore - - ex af, af' ; Select alternate AF - pop af ; Offset 0: AF' = I with interrupt state in carry - ex af, af' ; Restore original AF - pop bc ; Offset 1: BC - pop de ; Offset 2: DE - pop ix ; Offset 3: IX - pop iy ; Offset 4: IY - exx ; Use alternate BC/DE/HL - ld hl, #-2 ; Offset of SP to account for ret addr on stack - pop de ; Offset 5: HL' = Stack pointer after return - add hl, de ; HL = Stack pointer value before return - exx ; Restore original BC/DE/HL - pop hl ; Offset 6: HL - pop af ; Offset 7: AF - - ; Restore the stack pointer - - exx ; Use alternate BC/DE/HL - ld sp, hl ; Set SP = saved stack pointer value before return - exx ; Restore original BC/DE/HL - - ; Restore interrupt state - - ex af, af' ; Recover interrupt state - jp po, nointenable ; Odd parity, IFF2=0, means disabled - ex af, af' ; Restore AF (before enabling interrupts) - ei ; yes - reti -nointenable:: - ex af, af' ; Restore AF - reti - -;************************************************************************** -; Ordering of segments for the linker (SDCC only) -;************************************************************************** - - .area _HOME - .area _CODE - .area _INITIALIZER - .area _GSINIT - .area _GSFINAL - - .area _DATA - .area _INITIALIZED - .area _BSEG - .area _BSS - .area _HEAP - -;************************************************************************** -; Global data initialization logic (SDCC only) -;************************************************************************** - - .area _GSINIT -gsinit:: - ld bc, #l__INITIALIZER - ld a, b - or a, c - jr Z, gsinit_next - ld de, #s__INITIALIZED - ld hl, #s__INITIALIZER - ldir -gsinit_next: - - .area _GSFINAL - ret - -;************************************************************************** -; The start of the heap (SDCC only). Note that is actually resides in -; the _CODE area (which may be FLASH or ROM) -;************************************************************************** - - .area _CODE -_g_heapbase:: - .dw #s__HEAP diff --git a/arch/z80/src/z80/z80_initialstate.c b/arch/z80/src/z80/z80_initialstate.c deleted file mode 100644 index ad8dc25eac..0000000000 --- a/arch/z80/src/z80/z80_initialstate.c +++ /dev/null @@ -1,90 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z80/z80_initialstate.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include - -#include "chip.h" -#include "z80_internal.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_initial_state - * - * Description: - * A new thread is being started and a new TCB - * has been created. This function is called to initialize - * the processor specific portions of the new TCB. - * - * This function must setup the initial architecture registers - * and/or stack so that execution will begin at tcb->start - * on the next context switch. - * - ****************************************************************************/ - -void up_initial_state(struct tcb_s *tcb) -{ - struct xcptcontext *xcp = &tcb->xcp; - - /* Initialize the idle thread stack */ - - if (tcb->pid == IDLE_PROCESS_ID) - { - char *stack_ptr = (char *)CONFIG_STACK_BASE; -#ifdef CONFIG_STACK_COLORATION - char *stack_end = (char *)up_getsp(); - - /* If stack debug is enabled, then fill the stack with a - * recognizable value that we can use later to test for high - * water marks. - */ - - while (stack_ptr < stack_end) - { - *--stack_end = 0xaa; - } -#endif /* CONFIG_STACK_COLORATION */ - - tcb->stack_alloc_ptr = stack_ptr; - tcb->stack_base_ptr = stack_ptr; - tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE; - } - - /* Initialize the initial exception register context structure */ - - memset(xcp, 0, sizeof(struct xcptcontext)); -#ifndef CONFIG_SUPPRESS_INTERRUPTS - xcp->regs[XCPT_I] = Z80_PV_FLAG; /* Parity flag will enable interrupts */ -#endif - xcp->regs[XCPT_SP] = (chipreg_t)tcb->stack_base_ptr + - tcb->adj_stack_size; - xcp->regs[XCPT_PC] = (chipreg_t)tcb->start; -} diff --git a/arch/z80/src/z80/z80_io.c b/arch/z80/src/z80/z80_io.c deleted file mode 100644 index 81d6336813..0000000000 --- a/arch/z80/src/z80/z80_io.c +++ /dev/null @@ -1,81 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z80/z80_io.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include - -/* #include */ - -#include "z80_internal.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: outb - * - * Description: - * Output byte c on port p - * - ****************************************************************************/ - -void outp(char p, char c) -{ - __asm - ld c, 4(ix) ; port - ld a, 5(ix) ; value - out (c), a - __endasm; -} - -/**************************************************************************** - * Name: inpb - * - * Description: - * Input byte from port p - * - ****************************************************************************/ - -char inp(char p) __naked -{ - __asm - ld c, 4(ix) ; port - in l, (c) - __endasm; -} diff --git a/arch/z80/src/z80/z80_irq.c b/arch/z80/src/z80/z80_irq.c deleted file mode 100644 index 19f778e884..0000000000 --- a/arch/z80/src/z80/z80_irq.c +++ /dev/null @@ -1,97 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z80/z80_irq.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include -#include - -#include "chip/switch.h" -#include "z80_internal.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_irq_save - * - * Description: - * Disable all interrupts; return previous interrupt state - * - ****************************************************************************/ - -irqstate_t up_irq_save(void) __naked -{ - __asm - ld a, i ; AF parity bit holds interrupt state - di ; interrupts are disabled - push af ; return AF in HL - pop hl ; - ret ; - __endasm; -} - -/**************************************************************************** - * Name: up_irq_restore - * - * Description: - * Restore previous interrupt state - * - ****************************************************************************/ - -void up_irq_restore(irqstate_t flags) __naked -{ - __asm - di ; assume disabled - pop hl ; HL = return address - pop af ; AF parity bit holds interrupt state - jp po, statedisable - ei -statedisable: - push af ; restore stack - push hl ; - ret ; and return - __endasm; -} - -/**************************************************************************** - * Name: up_irq_enable - * - * Description: - * Enable all interrupts; return previous interrupt state - * - ****************************************************************************/ - -irqstate_t up_irq_enable(void) __naked -{ - __asm - ld a, i ; AF parity bit holds interrupt state - ei ; interrupts are enabled - push af ; return AF in HL - pop hl ; - ret ; - __endasm; -} diff --git a/arch/z80/src/z80/z80_mem.h b/arch/z80/src/z80/z80_mem.h deleted file mode 100644 index 21d704b2cf..0000000000 --- a/arch/z80/src/z80/z80_mem.h +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z80/z80_mem.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_Z80_SRC_Z80_Z80_MEM_H -#define __ARCH_Z80_SRC_Z80_Z80_MEM_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Locate the IDLE thread stack at the end of RAM. */ - -#define CONFIG_STACK_END CONFIG_RAM_SIZE -#define CONFIG_STACK_BASE (CONFIG_STACK_END - CONFIG_IDLETHREAD_STACKSIZE) - -/* The heap then extends from the linker determined beginning of the heap - * (s__HEAP) to the bottom of the IDLE thread stack. - * NOTE: The symbol s__HEAP is not accessible from C because - * it does not begin with the _ character. g_heapbase is defined - * in z80_head.asm to provide that value to the C code. - */ - -#define CONFIG_HEAP1_END CONFIG_STACK_BASE -#define CONFIG_HEAP1_BASE g_heapbase - -/**************************************************************************** - * Public variables - ****************************************************************************/ - -/* This is the bottom of the heap as provided by the linker symbol s__HEAP. - * NOTE: The symbol s__HEAP is not accessible from C because - * it does not begin with the _ character. g_heapbase is defined in - * z80_head.asm to provide that value to the C code. - */ - -extern const uint16_t g_heapbase; - -#endif /* __ARCH_Z80_SRC_Z80_Z80_MEM_H */ diff --git a/arch/z80/src/z80/z80_registerdump.c b/arch/z80/src/z80/z80_registerdump.c deleted file mode 100644 index 4199f4e1aa..0000000000 --- a/arch/z80/src/z80/z80_registerdump.c +++ /dev/null @@ -1,57 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z80/z80_registerdump.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include -#include - -#include "chip/switch.h" -#include "z80_internal.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_dump_register - ****************************************************************************/ - -void up_dump_register(FAR void *dumpregs) -{ - FAR volatile chipreg_t *regs = dumpregs ? dumpregs : up_current_regs(); - - _alert("AF: %04x I: %04x\n", - regs[XCPT_AF], regs[XCPT_I]); - _alert("BC: %04x DE: %04x HL: %04x\n", - regs[XCPT_BC], regs[XCPT_DE], regs[XCPT_HL]); - _alert("IX: %04x IY: %04x\n", - regs[XCPT_IX], regs[XCPT_IY]); - _alert("SP: %04x PC: %04x\n" - regs[XCPT_SP], regs[XCPT_PC]); -} diff --git a/arch/z80/src/z80/z80_restoreusercontext.asm b/arch/z80/src/z80/z80_restoreusercontext.asm deleted file mode 100644 index 07bbeb3bdd..0000000000 --- a/arch/z80/src/z80/z80_restoreusercontext.asm +++ /dev/null @@ -1,91 +0,0 @@ -;************************************************************************** -; arch/z80/src/z80/z80_restoreusercontext.asm -; -; SPDX-License-Identifier: Apache-2.0 -; -; Licensed to the Apache Software Foundation (ASF) under one or more -; contributor license agreements. See the NOTICE file distributed with -; this work for additional information regarding copyright ownership. The -; ASF licenses this file to you under the Apache License, Version 2.0 (the -; "License"); you may not use this file except in compliance with the -; License. You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -; License for the specific language governing permissions and limitations -; under the License. -; -;************************************************************************** - - ; Register save area layout - - .globl XCPT_I ; Offset 0: Saved I w/interrupt state in carry - .globl XCPT_BC ; Offset 1: Saved BC register - .globl XCPT_DE ; Offset 2: Saved DE register - .globl XCPT_IX ; Offset 3: Saved IX register - .globl XCPT_IY ; Offset 4: Saved IY register - .globl XCPT_SP ; Offset 5: Offset to SP at time of interrupt - .globl XCPT_HL ; Offset 6: Saved HL register - .globl XCPT_AF ; Offset 7: Saved AF register - .globl XCPT_PC ; Offset 8: Offset to PC at time of interrupt - -;************************************************************************** -; z80_restoreusercontext -;************************************************************************** - - .area _CODE -_z80_restoreusercontext: - ; On entry, stack contains return address (not used), then address - ; of the register save structure - - ; Discard the return address, we won't be returning - - pop hl - - ; Get the address of the beginning of the state save area. Each - ; pop will increment to the next element of the structure - - pop hl ; BC = Address of save structure - ld sp, hl ; SP points to top of storage area - - ; Disable interrupts while we muck with the alternative registers. The - ; Correct interrupt state will be restore below - - di - - ; Restore registers. HL points to the beginning of the reg structure to restore - - ex af, af' ; Select alternate AF - pop af ; Offset 0: AF' = I with interrupt state in parity - ex af, af' ; Restore original AF - pop bc ; Offset 1: BC - pop de ; Offset 2: DE - pop ix ; Offset 3: IX - pop iy ; Offset 4: IY - exx ; Use alternate BC/DE/HL - pop hl ; Offset 5: HL' = Stack pointer after return - exx ; Restore original BC/DE/HL - pop hl ; Offset 6: HL - pop af ; Offset 7: AF - - ; Restore the stack pointer - - exx ; Use alternate BC/DE/HL - pop de ; DE' = return address - ld sp, hl ; Set SP = saved stack pointer value before return - push de ; Save return address for ret instruction - exx ; Restore original BC/DE/HL - - ; Restore interrupt state - - ex af, af' ; Recover interrupt state - jp po, noinrestore ; Odd parity, IFF2=0, means disabled - ex af, af' ; Restore AF (before enabling interrupts) - ei ; yes.. Enable interrupts - ret ; and return -noinrestore: - ex af, af' ; Restore AF - ret ; Return with interrupts disabled diff --git a/arch/z80/src/z80/z80_rom.asm b/arch/z80/src/z80/z80_rom.asm deleted file mode 100644 index 8877fe61ff..0000000000 --- a/arch/z80/src/z80/z80_rom.asm +++ /dev/null @@ -1,283 +0,0 @@ -;************************************************************************** -; arch/z80/src/z80/z80_rom.asm -; -; SPDX-License-Identifier: Apache-2.0 -; -; Licensed to the Apache Software Foundation (ASF) under one or more -; contributor license agreements. See the NOTICE file distributed with -; this work for additional information regarding copyright ownership. The -; ASF licenses this file to you under the Apache License, Version 2.0 (the -; "License"); you may not use this file except in compliance with the -; License. You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -; License for the specific language governing permissions and limitations -; under the License. -; -;************************************************************************** - - .title NuttX for the Z80 - .module z80_head - -;************************************************************************** -; Constants -;************************************************************************** - - ; Register save area layout - - XCPT_I == 0 ; Offset 0: Saved I w/interrupt state in carry - XCPT_BC == 2 ; Offset 1: Saved BC register - XCPT_DE == 4 ; Offset 2: Saved DE register - XCPT_IX == 6 ; Offset 3: Saved IX register - XCPT_IY == 8 ; Offset 4: Saved IY register - XCPT_SP == 10 ; Offset 5: Offset to SP at time of interrupt - XCPT_HL == 12 ; Offset 6: Saved HL register - XCPT_AF == 14 ; Offset 7: Saved AF register - XCPT_PC == 16 ; Offset 8: Offset to PC at time of interrupt - - ; Default stack base (needs to be fixed) - - .include "asm_mem.h" - -;************************************************************************** -; Global symbols used -;************************************************************************** - - .globl _nx_start ; OS entry point - .globl _z80_doirq ; Interrupt decoding logic - -;************************************************************************** -; System start logic -;************************************************************************** - -_up_reset: - ; Set up the stack pointer at the location determined the Makefile - ; and stored in asm_mem.h - - ld SP, #CONFIG_STACK_END ; Set stack pointer - - ; Performed initialization unique to the SDCC toolchain - - call gsinit ; Initialize the data section - - ; Copy the reset vectors - - ld hl, #_up_rstvectors ; code for RAM - ld de, #0x4000 ; move it here - ld bc, #3*7 ; 7 vectors / 3 bytes each - ldir - - ; Then start NuttX - - call _nx_start ; jump to the OS entry point - - ; NuttX will never return, but just in case... - -_up_halt:: - halt ; We should never get here - jp _up_halt - - ; Data to copy to address 0x4000 - -_up_rstvectors: - jp _up_rst1 ; 0x4000 : RST 1 - jp _up_rst2 ; 0x4003 : RST 2 - jp _up_rst3 ; 0x4006 : RST 3 - jp _up_rst4 ; 0x4009 : RST 4 - jp _up_rst5 ; 0x400c : RST 5 - jp _up_rst6 ; 0x400f : RST 6 - jp _up_rst7 ; 0x4012 : RST 7 - -;************************************************************************** -; Other reset handlers -; -; Interrupt mode 1 behavior: -; -; 1. M1 cycle: 7 ticks -; Acknowledge interrupt and decrements SP -; 2. M2 cycle: 3 ticks -; Writes the MS byte of the PC onto the stack and decrements SP -; 3. M3 cycle: 3 ticks -; Writes the LS byte of the PC onto the stack and sets the PC to 0x0038. -; -;************************************************************************** - -_up_rst1: ; RST 1 - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #1 ; 1 = Z80_RST1 - jr _up_rstcommon ; Remaining RST handling is common - -_up_rst2: ; RST 2 - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #2 ; 2 = Z80_RST2 - jr _up_rstcommon ; Remaining RST handling is common - -_up_rst3: ; RST 3 - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #3 ; 1 = Z80_RST3 - jr _up_rstcommon ; Remaining RST handling is common - -_up_rst4: ; RST 4 - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #4 ; 1 = Z80_RST4 - jr _up_rstcommon ; Remaining RST handling is common - -_up_rst5: ; RST 5 - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #5 ; 1 = Z80_RST5 - jr _up_rstcommon ; Remaining RST handling is common - -_up_rst6: ; RST 6 - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #6 ; 1 = Z80_RST6 - jr _up_rstcommon ; Remaining RST handling is common - -_up_rst7: ; RST 7 - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #7 ; 7 = Z80_RST7 - jr _up_rstcommon ; Remaining RST handling is common - -;************************************************************************** -; Common Interrupt handler -;************************************************************************** - -_up_rstcommon: - ; Create a register frame. SP points to top of frame + 4, pushes - ; decrement the stack pointer. Already have - ; - ; Offset 8: Return PC is already on the stack - ; Offset 7: AF (retaining flags) - ; - ; IRQ number is in A - - push hl ; Offset 6: HL - ld hl, #(3*2) ; HL is the value of the stack pointer before - add hl, sp ; the interrupt occurred - push hl ; Offset 5: Stack pointer - push iy ; Offset 4: IY - push ix ; Offset 3: IX - push de ; Offset 2: DE - push bc ; Offset 1: BC - - ld b, a ; Save the reset number in B - ld a, i ; Parity bit holds interrupt state - push af ; Offset 0: I with interrupt state in parity - di - - ; Call the interrupt decode logic. SP points to the beginning of the reg structure - - ld hl, #0 ; Argument #2 is the beginning of the reg structure - add hl, sp ; - push hl ; Place argument #2 at the top of stack - push bc ; Argument #1 is the Reset number - inc sp ; (make byte sized) - call _z80_doirq ; Decode the IRQ - - ; On return, HL points to the beginning of the reg structure to restore - ; Note that (1) the arguments pushed on the stack are not popped, and (2) the - ; original stack pointer is lost. In the normal case (no context switch), - ; HL will contain the value of the SP before the arguments were pushed. - - ld sp, hl ; Use the new stack pointer - - ; Restore registers. HL points to the beginning of the reg structure to restore - - ex af, af' ; Select alternate AF - pop af ; Offset 0: AF' = I with interrupt state in carry - ex af, af' ; Restore original AF - pop bc ; Offset 1: BC - pop de ; Offset 2: DE - pop ix ; Offset 3: IX - pop iy ; Offset 4: IY - exx ; Use alternate BC/DE/HL - ld hl, #-2 ; Offset of SP to account for ret addr on stack - pop de ; Offset 5: HL' = Stack pointer after return - add hl, de ; HL = Stack pointer value before return - exx ; Restore original BC/DE/HL - pop hl ; Offset 6: HL - pop af ; Offset 7: AF - - ; Restore the stack pointer - - exx ; Use alternate BC/DE/HL - ld sp, hl ; Set SP = saved stack pointer value before return - exx ; Restore original BC/DE/HL - - ; Restore interrupt state - - ex af, af' ; Recover interrupt state - jp po, nointenable ; Odd parity, IFF2=0, means disabled - ex af, af' ; Restore AF (before enabling interrupts) - ei ; yes - reti -nointenable:: - ex af, af' ; Restore AF - reti - -;************************************************************************** -; Ordering of segments for the linker (SDCC only) -;************************************************************************** - - .area _HOME - .area _CODE - .area _INITIALIZER - .area _GSINIT - .area _GSFINAL - - .area _DATA - .area _INITIALIZED - .area _BSEG - .area _BSS - .area _HEAP - -;************************************************************************** -; Global data initialization logic (SDCC only) -;************************************************************************** - - .area _GSINIT -gsinit:: - ld bc, #l__INITIALIZER - ld a, b - or a, c - jr Z, gsinit_next - ld de, #s__INITIALIZED - ld hl, #s__INITIALIZER - ldir -gsinit_next: - - .area _GSFINAL - ret - -;************************************************************************** -; The start of the heap (SDCC only). Note that is actually resides in -; the _CODE area (which may be FLASH or ROM) -;************************************************************************** - - .area _CODE -_g_heapbase:: - .dw #s__HEAP diff --git a/arch/z80/src/z80/z80_saveusercontext.asm b/arch/z80/src/z80/z80_saveusercontext.asm deleted file mode 100644 index 214be78f54..0000000000 --- a/arch/z80/src/z80/z80_saveusercontext.asm +++ /dev/null @@ -1,130 +0,0 @@ -;************************************************************************* -; arch/z80/src/z80/z80_saveusercontext.asm -; -; SPDX-License-Identifier: Apache-2.0 -; -; Licensed to the Apache Software Foundation (ASF) under one or more -; contributor license agreements. See the NOTICE file distributed with -; this work for additional information regarding copyright ownership. The -; ASF licenses this file to you under the Apache License, Version 2.0 (the -; "License"); you may not use this file except in compliance with the -; License. You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -; License for the specific language governing permissions and limitations -; under the License. -; -;************************************************************************* - -;************************************************************************* -; Constants -;************************************************************************* - - ; Register save area layout - - .globl XCPT_I ; Offset 0: Saved I w/interrupt state in parity - .globl XCPT_BC ; Offset 1: Saved BC register - .globl XCPT_DE ; Offset 2: Saved DE register - .globl XCPT_IX ; Offset 3: Saved IX register - .globl XCPT_IY ; Offset 4: Saved IY register - .globl XCPT_SP ; Offset 5: Offset to SP at time of interrupt - .globl XCPT_HL ; Offset 6: Saved HL register - .globl XCPT_AF ; Offset 7: Saved AF register - .globl XCPT_PC ; Offset 8: Offset to PC at time of interrupt - - ; Stack frame - - FRAME_IY == 0 ; Location of IY on the stack - FRAME_IX == 2 ; Location of IX on the stack - FRAME_RET == 4 ; Location of return address on the stack - FRAME_REGS == 6 ; Location of reg save area on stack - - SP_OFFSET == 6 - -;************************************************************************* -; Name: up_saveusercontext -;************************************************************************* - - .area _CODE -_up_saveusercontext: - ; Set up a stack frame - - push ix ; Save IX and IY - push iy - ld ix, #0 - add ix, sp ; IX = stack frame - - ; Fetch the address of the save area - - ld e, FRAME_REGS(ix) ; HL = save area address - ld d, FRAME_REGS+1(ix) ; - ld iy, #0 - add iy, de ; IY = save area address - - ; Then save the registers - - ; Save the current interrupt state at offset 0 - - ld a, i ; Get interrupt state - push af - pop hl - ld XCPT_I(iy), l ; Offset 0: I w/interrupt state in parity - ld XCPT_I+1(iy), h - - ; Save BC at offset 1 - - ld XCPT_BC(iy), c ; Offset 1: BC - ld XCPT_BC+1(iy), b - - ; DE is not preserved (offset 2) - - ; Save IX at offset 3 - - ld l, FRAME_IX(ix) ; HL = Saved value of IX - ld h, FRAME_IX+1(ix) ; - ld XCPT_IX(iy), l ; Offset 3: IX - ld XCPT_IX+1(iy), h ; - - ; Save IY at offset 4 - - ld l, FRAME_IY(ix) ; HL = Saved value of IY - ld h, FRAME_IY+1(ix) ; - ld XCPT_IY(iy), l ; Offset 4: IY - ld XCPT_IY+1(iy), h - - ; Save that stack pointer as it would be upon return in offset 5 - - ld hl, #SP_OFFSET ; Value of stack pointer on return - add hl, sp - ld XCPT_SP(iy), l ; Offset 5 SP - ld XCPT_SP+1(iy), h - - ; HL is saved as the value 1 at offset 6 - - xor a ; A = 0 - ld XCPT_HL+1(iy), a ; Offset 2: HL on return (=1) - inc a ; A = 1 - ld XCPT_HL(iy), a ; - - ; AF is not preserved (offset 7) - - ; Save the return address in offset 8 - - ld l, FRAME_RET(ix) ; HL = Saved return address - ld h, FRAME_RET+1(ix) ; - ld XCPT_PC(iy), l ; Offset 8: PC - ld XCPT_PC+1(iy), h - - ; Return the value 0 - - xor a ; HL = return value of zero - ld l, a - ld h, a - - pop iy - pop ix - ret diff --git a/arch/z80/src/z80/z80_schedulesigaction.c b/arch/z80/src/z80/z80_schedulesigaction.c deleted file mode 100644 index a8d93fd1f9..0000000000 --- a/arch/z80/src/z80/z80_schedulesigaction.c +++ /dev/null @@ -1,161 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z80/z80_schedulesigaction.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include - -#include -#include -#include - -#include "chip/switch.h" -#include "sched/sched.h" -#include "z80_internal.h" - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: z80_sigsetup - ****************************************************************************/ - -static void z80_sigsetup(FAR struct tcb_s *tcb, FAR chipreg_t *regs) -{ - /* Save the return address and interrupt state. These will be restored by - * the signal trampoline after the signals have been delivered. - */ - - tcb->xcp.saved_pc = regs[XCPT_PC]; - tcb->xcp.saved_i = regs[XCPT_I]; - - /* Then set up to vector to the trampoline with interrupts disabled */ - - regs[XCPT_PC] = (chipreg_t)z80_sigdeliver; - regs[XCPT_I] = 0; -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_schedule_sigaction - * - * Description: - * This function is called by the OS when one or more - * signal handling actions have been queued for execution. - * The architecture specific code must configure things so - * that the 'sigdeliver' callback is executed on the thread - * specified by 'tcb' as soon as possible. - * - * This function may be called from interrupt handling logic. - * - * This operation should not cause the task to be unblocked - * nor should it cause any immediate execution of sigdeliver. - * Typically, a few cases need to be considered: - * - * (1) This function may be called from an interrupt handler - * During interrupt processing, all xcptcontext structures - * should be valid for all tasks. That structure should - * be modified to invoke sigdeliver() either on return - * from (this) interrupt or on some subsequent context - * switch to the recipient task. - * (2) If not in an interrupt handler and the tcb is NOT - * the currently executing task, then again just modify - * the saved xcptcontext structure for the recipient - * task so it will invoke sigdeliver when that task is - * later resumed. - * (3) If not in an interrupt handler and the tcb IS the - * currently executing task -- just call the signal - * handler now. - * - * Assumptions: - * Called from critical section - * - ****************************************************************************/ - -void up_schedule_sigaction(FAR struct tcb_s *tcb) -{ - sinfo("tcb=%p, rtcb=%p current_regs=%p\n", tcb, - this_task(), up_current_regs()); - - /* First, handle some special cases when the signal is being delivered - * to the currently executing task. - */ - - if (tcb == this_task()) - { - /* CASE 1: We are not in an interrupt handler and a task is - * signalling itself for some reason. - */ - - if (!IN_INTERRUPT()) - { - /* In this case just deliver the signal now. */ - - (tcb->sigdeliver)(tcb); - tcb->sigdeliver = NULL; - } - - /* CASE 2: We are in an interrupt handler AND the interrupted task - * is the same as the one that must receive the signal, then we - * will have to modify the return state as well as the state in - * the TCB. - */ - - else - { - /* Set up to vector to the trampoline with interrupts - * disabled. - */ - - z80_sigsetup(tcb, IRQ_STATE()); - - /* And make sure that the saved context in the TCB - * is the same as the interrupt return context. - */ - - SAVE_IRQCONTEXT(tcb); - } - } - - /* Otherwise, we are (1) signaling a task is not running - * from an interrupt handler or (2) we are not in an - * interrupt handler and the running task is signalling - * some non-running task. - */ - - else - { - /* Set up to vector to the trampoline with interrupts disabled. */ - - z80_sigsetup(tcb, tcb->xcp.regs); - } -} diff --git a/arch/z80/src/z80/z80_sigdeliver.c b/arch/z80/src/z80/z80_sigdeliver.c deleted file mode 100644 index 5afdd263f1..0000000000 --- a/arch/z80/src/z80/z80_sigdeliver.c +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** - * arch/z80/src/z80/z80_sigdeliver.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include - -#include -#include -#include - -#include "chip/switch.h" -#include "sched/sched.h" -#include "z80_internal.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: z80_sigdeliver - * - * Description: - * This is the a signal handling trampoline. When a signal action was - * posted. The task context was mucked with and forced to branch to this - * location with interrupts disabled. - * - ****************************************************************************/ - -void z80_sigdeliver(void) -{ - FAR struct tcb_s *rtcb = this_task(); - chipreg_t regs[XCPTCONTEXT_REGS]; - - board_autoled_on(LED_SIGNAL); - - sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head); - DEBUGASSERT(rtcb->sigdeliver != NULL); - - /* Save the return state on the stack. */ - - z80_copystate(regs, rtcb->xcp.regs); - -#ifndef CONFIG_SUPPRESS_INTERRUPTS - /* Then make sure that interrupts are enabled. Signal handlers must always - * run with interrupts enabled. - */ - - up_irq_enable(); -#endif - - /* Deliver the signals */ - - (rtcb->sigdeliver)(rtcb); - - /* Output any debug messages BEFORE restoring errno (because they may - * alter errno), then disable interrupts again and restore the original - * errno that is needed by the user logic (it is probably EINTR). - */ - - sinfo("Resuming\n"); - up_irq_save(); - - /* Modify the saved return state with the actual saved values in the - * TCB. This depends on the fact that nested signal handling is - * not supported. Therefore, these values will persist throughout the - * signal handling action. - * - * Keeping this data in the TCB resolves a security problem in protected - * and kernel mode: The regs[] array is visible on the user stack and - * could be modified by a hostile program. - */ - - regs[XCPT_PC] = rtcb->xcp.saved_pc; - regs[XCPT_I] = rtcb->xcp.saved_i; - rtcb->sigdeliver = NULL; /* Allows next handler to be scheduled */ - - /* Then restore the correct state for this thread of execution. */ - - board_autoled_off(LED_SIGNAL); - z80_restoreusercontext(regs); -} diff --git a/audio/Kconfig b/audio/Kconfig index 512d91a566..d7ffc470e1 100644 --- a/audio/Kconfig +++ b/audio/Kconfig @@ -3,7 +3,7 @@ # see the file kconfig-language.txt in the NuttX tools repository. # -config AUDIO +menuconfig AUDIO bool "Audio Support" default n ---help--- @@ -277,4 +277,4 @@ config AUDIO_FONT endif -endif +endif # AUDIO diff --git a/audio/Makefile b/audio/Makefile index d3b50e96f7..23ec850235 100644 --- a/audio/Makefile +++ b/audio/Makefile @@ -20,8 +20,6 @@ # ############################################################################ -include $(TOPDIR)/Make.defs - CSRCS = audio.c ifeq ($(CONFIG_AUDIO_COMP),y) @@ -36,42 +34,35 @@ ifeq ($(CONFIG_AUDIO_FORMAT_PCM),y) CSRCS += pcm_decode.c endif -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS := $(ASRCS:.S=.o) +AOBJS := $(addprefix ${NXOUT}/, $(AOBJS)) + +COBJS := $(CSRCS:.c=.o) +COBJS := $(addprefix ${NXOUT}/, $(COBJS)) SRCS = $(ASRCS) $(CSRCS) OBJS = $(AOBJS) $(COBJS) -BIN = libaudio$(LIBEXT) +BIN = libaudio.a -all: $(BIN) -.PHONY: depend clean distclean +$(AOBJS): ${NXOUT}/%.o: %.S + $(call ASSEMBLE, $<, $@, -MMD) -$(AOBJS): %$(OBJEXT): %.S - $(call ASSEMBLE, $<, $@) +$(COBJS): ${NXOUT}/%.o: %.c + $(call COMPILE, $<, $@, -MMD) -$(COBJS): %$(OBJEXT): %.c - $(call COMPILE, $<, $@) +symlink: + $(call LINK, ${ARCH_DIR}/include, ${NXBASE}/include/arch) + $(call LINK, ${NXOUT}/config.h, ${NXBASE}/include/nuttx/config.h) + +unlink: + $(call UNLINK, ${NXBASE}/include/arch) + $(call UNLINK, ${NXBASE}/include/nuttx/config.h) $(BIN): $(OBJS) - $(call ARCHIVE, $@, $(OBJS)) + $(call ARCHIVE, ${NXOUT}/$@, $^) -makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds) - $(call CATFILE, Make.dep, $^) - $(call DELFILE, $^) +.PHONY: symlink unlink all +.IGNORE: ${BIN} -.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config - $(Q) $(MAKE) makedepfile - $(Q) touch $@ - -depend: .depend - -clean: - $(call DELFILE, $(BIN)) - $(call CLEAN) - -distclean: clean - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - --include Make.dep +all: symlink $(BIN) unlink \ No newline at end of file diff --git a/binfmt/CMakeLists.txt b/binfmt/CMakeLists.txt deleted file mode 100644 index 0f0578ebce..0000000000 --- a/binfmt/CMakeLists.txt +++ /dev/null @@ -1,68 +0,0 @@ -# ############################################################################## -# binfmt/CMakeLists.txt -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more contributor -# license agreements. See the NOTICE file distributed with this work for -# additional information regarding copyright ownership. The ASF licenses this -# file to you under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy of -# the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. -# -# ############################################################################## - -set(SRCS) - -nuttx_add_kernel_library(binfmt) - -nuttx_add_subdirectory() - -list( - APPEND - SRCS - binfmt_globals.c - binfmt_initialize.c - binfmt_register.c - binfmt_unregister.c - binfmt_loadmodule.c - binfmt_unloadmodule.c - binfmt_execmodule.c - binfmt_exec.c - binfmt_copyargv.c - binfmt_copyactions.c - binfmt_dumpmodule.c) - -if(CONFIG_BINFMT_LOADABLE) - list(APPEND SRCS binfmt_exit.c) -endif() - -if(CONFIG_LIBC_EXECFUNCS) - list(APPEND SRCS binfmt_execsymtab.c) -endif() - -if(CONFIG_ELF) - list(APPEND SRCS elf.c) -endif() - -if(CONFIG_NXFLAT) - list(APPEND SRCS nxflat.c) -endif() - -# Builtin application interfaces - -if(CONFIG_BUILTIN) - list(APPEND SRCS builtin.c) -endif() - -target_sources(binfmt PRIVATE ${SRCS}) -target_include_directories(binfmt PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) -target_include_directories(binfmt PRIVATE ${CMAKE_SOURCE_DIR}/sched) diff --git a/binfmt/Kconfig b/binfmt/Kconfig index fc8255b021..da110c4ffa 100644 --- a/binfmt/Kconfig +++ b/binfmt/Kconfig @@ -5,7 +5,7 @@ config BINFMT_DISABLE bool "Disable BINFMT support" - default DEFAULT_SMALL + default y ---help--- By default, support for loadable binary formats is built. This logic may be suppressed by defining this setting. @@ -61,7 +61,6 @@ config ELF_STACKSIZE ---help--- This is the default stack size that will be used when starting ELF binaries. endif -endif config BINFMT_CONSTRUCTORS bool "C++ Static Constructor Support" @@ -89,3 +88,4 @@ config BINFMT_ELF_EXECUTABLE Produce a full linked executable object as output. endchoice +endif \ No newline at end of file diff --git a/binfmt/Makefile b/binfmt/Makefile index 30863b285e..56be1969be 100644 --- a/binfmt/Makefile +++ b/binfmt/Makefile @@ -20,8 +20,6 @@ # ############################################################################ -include $(TOPDIR)/Make.defs - # Basic BINFMT source files CSRCS = binfmt_globals.c binfmt_initialize.c binfmt_register.c binfmt_unregister.c @@ -29,73 +27,69 @@ CSRCS += binfmt_loadmodule.c binfmt_unloadmodule.c binfmt_execmodule.c CSRCS += binfmt_exec.c binfmt_copyargv.c binfmt_copyactions.c binfmt_dumpmodule.c ifeq ($(CONFIG_BINFMT_LOADABLE),y) -CSRCS += binfmt_exit.c + CSRCS += binfmt_exit.c endif ifeq ($(CONFIG_LIBC_EXECFUNCS),y) -CSRCS += binfmt_execsymtab.c + CSRCS += binfmt_execsymtab.c endif # Builtin application interfaces ifeq ($(CONFIG_BUILTIN),y) -CSRCS += builtin.c + CSRCS += builtin.c endif # ELF application interfaces ifeq ($(CONFIG_ELF),y) -CSRCS += elf.c + CSRCS += elf.c endif # NXFLAT application interfaces ifeq ($(CONFIG_NXFLAT),y) -CSRCS += nxflat.c + CSRCS += nxflat.c endif # Add configured binary modules +ifeq ($(CONFIG_NXFLAT),y) + VPATH += libnxflat + include libnxflat/Make.defs +endif -include libnxflat/Make.defs +CFLAGS += -I ${NXBASE}/sched -CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)sched +AOBJS = $(ASRCS:.S=.o) +AOBJS := $(addprefix ${NXOUT}/, $(AOBJS)) -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +COBJS = $(CSRCS:.c=.o) +COBJS := $(addprefix ${NXOUT}/, $(COBJS)) SRCS = $(ASRCS) $(CSRCS) OBJS = $(AOBJS) $(COBJS) -BIN = libbinfmt$(LIBEXT) +BIN = libbinfmt.a -all: $(BIN) -.PHONY: depend clean distclean - -$(AOBJS): %$(OBJEXT): %.S +$(AOBJS): ${NXOUT}/%.o: %.S $(call ASSEMBLE, $<, $@) -$(COBJS): %$(OBJEXT): %.c +$(COBJS): ${NXOUT}/%.o: %.c $(call COMPILE, $<, $@) $(BIN): $(OBJS) - $(call ARCHIVE, $@, $(OBJS)) + $(call ARCHIVE, ${NXOUT}/$@, $^) -makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds) - $(call CATFILE, Make.dep, $^) - $(call DELFILE, $^) +symlink: + $(call LINK, ${ARCH_DIR}/include, ${NXBASE}/include/arch) + $(call LINK, ${NXBASE}/soc/arm/include/${ARCH_CHIP}, ${NXBASE}/include/chip) + $(call LINK, ${NXOUT}/config.h, ${NXBASE}/include/nuttx/config.h) -.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config - $(Q) $(MAKE) makedepfile - $(Q) touch $@ +unlink: + $(call UNLINK, ${NXBASE}/include/arch) + $(call UNLINK, ${NXBASE}/include/chip) + $(call UNLINK, ${NXBASE}/include/nuttx/config.h) -depend: .depend - -clean: - $(call DELFILE, $(BIN)) - $(call CLEAN) - -distclean: clean - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - --include Make.dep +.PHONY: symlink unlink all +.IGNORE: $(BIN) +all: symlink $(BIN) unlink diff --git a/binfmt/libnxflat/CMakeLists.txt b/binfmt/libnxflat/CMakeLists.txt deleted file mode 100644 index 2845a81df8..0000000000 --- a/binfmt/libnxflat/CMakeLists.txt +++ /dev/null @@ -1,37 +0,0 @@ -# ############################################################################## -# binfmt/libnxflat/CMakeLists.txt -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more contributor -# license agreements. See the NOTICE file distributed with this work for -# additional information regarding copyright ownership. The ASF licenses this -# file to you under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy of -# the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. -# -# ############################################################################## - -if(CONFIG_NXFLAT) - - target_sources( - binfmt - PRIVATE # NXFLAT library - libnxflat_init.c - libnxflat_uninit.c - libnxflat_addrenv.c - libnxflat_load.c - libnxflat_unload.c - libnxflat_verify.c - libnxflat_read.c - libnxflat_bind.c) - -endif() diff --git a/binfmt/libnxflat/Make.defs b/binfmt/libnxflat/Make.defs index 5438992bfd..fff0515351 100644 --- a/binfmt/libnxflat/Make.defs +++ b/binfmt/libnxflat/Make.defs @@ -20,18 +20,8 @@ # ############################################################################ -ifeq ($(CONFIG_NXFLAT),y) - # NXFLAT library CSRCS += libnxflat_init.c libnxflat_uninit.c libnxflat_addrenv.c CSRCS += libnxflat_load.c libnxflat_unload.c libnxflat_verify.c CSRCS += libnxflat_read.c libnxflat_bind.c - -# Hook the libnxflat subdirectory into the build - -VPATH += libnxflat -SUBDIRS += libnxflat -DEPPATH += --dep-path libnxflat - -endif diff --git a/boards/Kconfig b/boards/Kconfig index 41ff901032..aead990c95 100644 --- a/boards/Kconfig +++ b/boards/Kconfig @@ -4674,9 +4674,6 @@ endif if ARCH_BOARD_MOTEINO_MEGA source "boards/avr/atmega/moteino-mega/Kconfig" endif -if ARCH_BOARD_CUSTOM -source "$BINDIR/boards/dummy/Kconfig" -endif if ARCH_BOARD_DEMOS92S12NEC64 source "boards/hc/m9s12/demo9s12ne64/Kconfig" endif diff --git a/boards/Makefile b/boards/Makefile index 64db0b0337..20a62de89a 100644 --- a/boards/Makefile +++ b/boards/Makefile @@ -20,39 +20,23 @@ # ############################################################################ -include $(TOPDIR)/Make.defs - -# The board configuration should be installed in the arch/ directory - -BOARDDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board -BOARD_INSTALLED = $(if $(wildcard $(BOARDDIR)$(DELIM)Makefile),y,) - -# Basic - -CONFIG_CSRCS = dummy.c - # boardctl support ifeq ($(CONFIG_BOARDCTL),y) -CONFIG_CSRCS += boardctl.c + CSRCS = boardctl.c endif -ASRCS = $(CONFIG_ASRCS) -AOBJS = $(ASRCS:.S=$(OBJEXT)) +AOBJS = $(ASRCS:.S=.o) -CSRCS = $(CONFIG_CSRCS) -COBJS = $(CSRCS:.c=$(OBJEXT)) +COBJS = $(CSRCS:.c=.o) -CXXSRCS = $(CONFIG_CXXSRCS) -CXXOBJS = $(CXXSRCS:.cxx=$(OBJEXT)) +SRCS = $(ASRCS) $(CSRCS) +OBJS := $(addprefix ${OUT}/, $(AOBJS) $(COBJS)) -SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS) -OBJS = $(AOBJS) $(COBJS) $(CXXOBJS) - -BIN = libboards$(LIBEXT) +BIN = ${OUT}/libboardctl.a all: $(BIN) -.PHONY: depend context clean_context clean distclean +.PHONY: depend $(AOBJS): %$(OBJEXT): %.S $(call ASSEMBLE, $<, $@) @@ -60,9 +44,6 @@ $(AOBJS): %$(OBJEXT): %.S $(COBJS): %$(OBJEXT): %.c $(call COMPILE, $<, $@) -$(CXXOBJS): %$(OBJEXT): %.cxx - $(call COMPILEXX, $<, $@) - $(BIN): $(OBJS) $(call ARCHIVE, $@, $(OBJS)) @@ -76,19 +57,4 @@ makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds) $(CXXSRCS:.cxx=.ddx) depend: .depend -context: -ifeq ($(BOARD_INSTALLED),y) - $(Q) $(MAKE) -C $(BOARDDIR) context -endif - -clean_context: - -clean: clean_context - $(call DELFILE, $(BIN)) - $(call CLEAN) - -distclean: clean - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - -include Make.dep diff --git a/boards/arm/cxd56xx/drivers/sensors/ak09912_scu.c b/boards/arm/cxd56xx/drivers/sensors/ak09912_scu.c index 28b6701307..5b44e4712b 100644 --- a/boards/arm/cxd56xx/drivers/sensors/ak09912_scu.c +++ b/boards/arm/cxd56xx/drivers/sensors/ak09912_scu.c @@ -32,7 +32,7 @@ #include #include #include -#include +include #include #include #include diff --git a/boards/arm/cxd56xx/drivers/sensors/apds9930_scu.c b/boards/arm/cxd56xx/drivers/sensors/apds9930_scu.c index 4e81c41969..683dbb2d1e 100644 --- a/boards/arm/cxd56xx/drivers/sensors/apds9930_scu.c +++ b/boards/arm/cxd56xx/drivers/sensors/apds9930_scu.c @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/boards/arm/cxd56xx/drivers/sensors/bh1721fvc_scu.c b/boards/arm/cxd56xx/drivers/sensors/bh1721fvc_scu.c index 23c50dbd7a..3b7f8e9b1b 100644 --- a/boards/arm/cxd56xx/drivers/sensors/bh1721fvc_scu.c +++ b/boards/arm/cxd56xx/drivers/sensors/bh1721fvc_scu.c @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/boards/arm/cxd56xx/drivers/sensors/bh1745nuc_scu.c b/boards/arm/cxd56xx/drivers/sensors/bh1745nuc_scu.c index 80b765623e..a59ef21cae 100644 --- a/boards/arm/cxd56xx/drivers/sensors/bh1745nuc_scu.c +++ b/boards/arm/cxd56xx/drivers/sensors/bh1745nuc_scu.c @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/boards/arm/cxd56xx/drivers/sensors/bm1383glv_scu.c b/boards/arm/cxd56xx/drivers/sensors/bm1383glv_scu.c index 63846b5f14..338902e5dc 100644 --- a/boards/arm/cxd56xx/drivers/sensors/bm1383glv_scu.c +++ b/boards/arm/cxd56xx/drivers/sensors/bm1383glv_scu.c @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/boards/arm/cxd56xx/drivers/sensors/bm1422gmv_scu.c b/boards/arm/cxd56xx/drivers/sensors/bm1422gmv_scu.c index 1958d818b2..e52633710e 100644 --- a/boards/arm/cxd56xx/drivers/sensors/bm1422gmv_scu.c +++ b/boards/arm/cxd56xx/drivers/sensors/bm1422gmv_scu.c @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/boards/arm/cxd56xx/drivers/sensors/kx022_scu.c b/boards/arm/cxd56xx/drivers/sensors/kx022_scu.c index f90009bb6a..cfa60758f9 100644 --- a/boards/arm/cxd56xx/drivers/sensors/kx022_scu.c +++ b/boards/arm/cxd56xx/drivers/sensors/kx022_scu.c @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/boards/arm/cxd56xx/drivers/sensors/lt1pa01_scu.c b/boards/arm/cxd56xx/drivers/sensors/lt1pa01_scu.c index 6db59dd344..64bb262985 100644 --- a/boards/arm/cxd56xx/drivers/sensors/lt1pa01_scu.c +++ b/boards/arm/cxd56xx/drivers/sensors/lt1pa01_scu.c @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/boards/arm/cxd56xx/drivers/sensors/rpr0521rs_scu.c b/boards/arm/cxd56xx/drivers/sensors/rpr0521rs_scu.c index cdbc4f7c97..ad90adcb09 100644 --- a/boards/arm/cxd56xx/drivers/sensors/rpr0521rs_scu.c +++ b/boards/arm/cxd56xx/drivers/sensors/rpr0521rs_scu.c @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/boards/z16/z16f/z16f2800100zcog/configs/nsh/defconfig b/boards/z16/z16f/z16f2800100zcog/configs/nsh/defconfig deleted file mode 100644 index a0455d088b..0000000000 --- a/boards/z16/z16f/z16f2800100zcog/configs/nsh/defconfig +++ /dev/null @@ -1,37 +0,0 @@ -# -# This file is autogenerated: PLEASE DO NOT EDIT IT. -# -# You can use "make menuconfig" to make any modifications to the installed .config file. -# You can then do "make savedefconfig" to generate a new defconfig file that includes your -# modifications. -# -# CONFIG_NSH_ARGCAT is not set -# CONFIG_NSH_CMDOPT_HEXDUMP is not set -# CONFIG_NSH_DISABLE_IFCONFIG is not set -# CONFIG_NSH_DISABLE_PS is not set -CONFIG_ARCH="z16" -CONFIG_ARCH_BOARD="z16f2800100zcog" -CONFIG_ARCH_BOARD_Z16F2800100ZCOG=y -CONFIG_ARCH_CHIP="z16f" -CONFIG_ARCH_CHIP_Z16F2811=y -CONFIG_ARCH_CHIP_Z16F=y -CONFIG_ARCH_Z16=y -CONFIG_BOARD_LOOPSPERMSEC=1250 -CONFIG_BUILTIN=y -CONFIG_ENDIAN_BIG=y -CONFIG_INIT_ENTRYPOINT="nsh_main" -CONFIG_NSH_BUILTIN_APPS=y -CONFIG_NSH_FILEIOSIZE=512 -CONFIG_NSH_READLINE=y -CONFIG_POSIX_SPAWN_DEFAULT_STACKSIZE=1536 -CONFIG_PREALLOC_TIMERS=4 -CONFIG_PTHREAD_STACK_DEFAULT=1536 -CONFIG_RAM_SIZE=65536 -CONFIG_RR_INTERVAL=200 -CONFIG_SCHED_WAITPID=y -CONFIG_START_YEAR=2014 -CONFIG_SYSTEM_NSH=y -CONFIG_TASK_NAME_SIZE=0 -CONFIG_UART0_BAUD=57600 -CONFIG_UART0_SERIAL_CONSOLE=y -CONFIG_UART1_BAUD=57600 diff --git a/boards/z16/z16f/z16f2800100zcog/configs/nsh/nsh.zfpproj b/boards/z16/z16f/z16f2800100zcog/configs/nsh/nsh.zfpproj deleted file mode 100644 index 3859a4d4fb..0000000000 --- a/boards/z16/z16f/z16f2800100zcog/configs/nsh/nsh.zfpproj +++ /dev/null @@ -1,238 +0,0 @@ - -Z16F2811AL - - - -..\..\..\nuttx.hex - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/boards/z16/z16f/z16f2800100zcog/configs/ostest/defconfig b/boards/z16/z16f/z16f2800100zcog/configs/ostest/defconfig deleted file mode 100644 index 01c59faf5f..0000000000 --- a/boards/z16/z16f/z16f2800100zcog/configs/ostest/defconfig +++ /dev/null @@ -1,33 +0,0 @@ -# -# This file is autogenerated: PLEASE DO NOT EDIT IT. -# -# You can use "make menuconfig" to make any modifications to the installed .config file. -# You can then do "make savedefconfig" to generate a new defconfig file that includes your -# modifications. -# -CONFIG_ARCH="z16" -CONFIG_ARCH_BOARD="z16f2800100zcog" -CONFIG_ARCH_BOARD_Z16F2800100ZCOG=y -CONFIG_ARCH_CHIP="z16f" -CONFIG_ARCH_CHIP_Z16F2811=y -CONFIG_ARCH_CHIP_Z16F=y -CONFIG_ARCH_Z16=y -CONFIG_BOARD_LOOPSPERMSEC=1250 -CONFIG_CONSOLE_SYSLOG=y -CONFIG_ENDIAN_BIG=y -CONFIG_HOST_WINDOWS=y -CONFIG_IDLETHREAD_STACKSIZE=4096 -CONFIG_INIT_ENTRYPOINT="ostest_main" -CONFIG_INIT_STACKSIZE=4096 -CONFIG_PREALLOC_TIMERS=4 -CONFIG_PTHREAD_STACK_DEFAULT=4096 -CONFIG_RAM_SIZE=65536 -CONFIG_RR_INTERVAL=200 -CONFIG_START_DAY=29 -CONFIG_START_MONTH=11 -CONFIG_START_YEAR=2012 -CONFIG_TASK_NAME_SIZE=0 -CONFIG_TESTING_OSTEST=y -CONFIG_UART0_BAUD=57600 -CONFIG_UART0_SERIAL_CONSOLE=y -CONFIG_UART1_BAUD=57600 diff --git a/boards/z16/z16f/z16f2800100zcog/configs/ostest/ostest.zfpproj b/boards/z16/z16f/z16f2800100zcog/configs/ostest/ostest.zfpproj deleted file mode 100644 index c331d3a192..0000000000 --- a/boards/z16/z16f/z16f2800100zcog/configs/ostest/ostest.zfpproj +++ /dev/null @@ -1,238 +0,0 @@ - -Z16F2811AL - - - -..\..\..\nuttx.hex - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/boards/z16/z16f/z16f2800100zcog/include/board.h b/boards/z16/z16f/z16f2800100zcog/include/board.h deleted file mode 100644 index 0d6d7403ab..0000000000 --- a/boards/z16/z16f/z16f2800100zcog/include/board.h +++ /dev/null @@ -1,114 +0,0 @@ -/**************************************************************************** - * boards/z16/z16f/z16f2800100zcog/include/board.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __BOARDS_Z16_Z16F2811_Z16F2800100ZCOG_INCLUDE_BOARD_H -#define __BOARDS_Z16_Z16F2811_Z16F2800100ZCOG_INCLUDE_BOARD_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* The Z16F2800100ZCOG board has a 20MHz crystal. The ZNEO clocking will be - * configured to use this crystal frequency directly as the clock source - */ - -#define BOARD_XTAL_FREQUENCY 20000000 /* 20MHz */ -#define BOARD_CLKSRC 1 /* Clock source = external crystal */ -#define BOARD_SYSTEM_FREQUENCY BOARD_XTAL_FREQUENCY - -/* Flash option bits - * - * "Each time the option bits are programmed or erased, the device must be - * Reset for the change to take place. During any reset operation .., the - * option bits are automatically read from the Program memory and written - * to Option Configuration registers. ... Option Bit Control Register are - * loaded before the device exits Reset and the ZNEO CPU begins code - * execution. The Option Configuration registers are not part of the - * Register file and are not accessible for read or write access." - */ - -#ifndef __ASSEMBLY__ -# define BOARD_FLOPTION0 (Z16F_FLOPTION0_MAXPWR | Z16F_FLOPTION0_WDTRES | \ - Z16F_FLOPTION0_WDTA0 | Z16F_FLOPTION0_VBOA0 | \ - Z16F_FLOPTION0_DBGUART | Z16F_FLOPTION0_FWP | \ - Z16F_FLOPTION0_RP) - -# define BOARD_FLOPTION1 (Z16F_FLOPTION1_RESVD | Z16F_FLOPTION1_MCEN | \ - Z16F_FLOPTION1_OFFH | Z16F_FLOPTION1_OFFL) - -# define BOARD_FLOPTION2 Z16F_FLOPTION2_RESVD - -# define BOARD_FLOPTION3 (Z16F_FLOPTION3_RESVD | Z16F_FLOPTION3_NORMAL | \ - Z16F_FLOPTION3_ROMLESS) - -/* The same settings, pre-digested for assembly language */ - -#else -# define BOARD_FLOPTION0 %ff -# define BOARD_FLOPTION1 %ff -# define BOARD_FLOPTION2 %ff -# define BOARD_FLOPTION3 %ff -#endif - -/* LED pattern definitions - * - * The z16f2800100zcog board has four LEDs: - * - * - Green LED D1 which illuminates in the presence of Vcc - * - Red LED D2 connected to chip port PA0_T0IN - * - Yellow LED D3 connected to chip port PA1_T0OUT - * - Green LED D4 connected to chip port PA2_DE0 - */ - -#define LED_STARTED 0 -#define LED_HEAPALLOCATE 1 -#define LED_IRQSENABLED 2 -#define LED_STACKCREATED 3 -#define LED_IDLE 4 -#define LED_INIRQ 5 -#define LED_SIGNAL 6 -#define LED_ASSERTION 7 -#define LED_PANIC 8 - -/**************************************************************************** - * Public Functions Definitions - ****************************************************************************/ - -#undef EXTERN -#if defined(__cplusplus) -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -#undef EXTERN -#if defined(__cplusplus) -} -#endif - -#endif /* __BOARDS_Z16_Z16F2811_Z16F2800100ZCOG_INCLUDE_BOARD_H */ diff --git a/boards/z16/z16f/z16f2800100zcog/scripts/Make.defs b/boards/z16/z16f/z16f2800100zcog/scripts/Make.defs deleted file mode 100644 index 9912a1caa5..0000000000 --- a/boards/z16/z16f/z16f2800100zcog/scripts/Make.defs +++ /dev/null @@ -1,71 +0,0 @@ -############################################################################ -# boards/z16/z16f/z16f2800100zcog/scripts/Make.defs -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -include $(TOPDIR)/.config -include $(TOPDIR)/tools/Config.mk -include $(TOPDIR)/arch/z16/src/z16f/Toolchain.defs -include $(TOPDIR)/tools/zds/Config.mk - -# CFLAGS - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) - ARCHASMINCLUDES = -include:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR) - EARCHASMINCLUDES = -include:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR) - ARCHSTDINCLUDES = -stdinc:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR) -else - ARCHASMINCLUDES = -include:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)' - EARCHASMINCLUDES = -include:'$(ETOPDIR)\include;$(EZDSSTDINCDIR);$(EZDSZILOGINCDIR)' - ARCHSTDINCLUDES = -stdinc:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)' -endif - -# Assembler definitions - -ARCHASMCPUFLAGS = -cpu:Z16F2811AL -NOigcase -ARCHASMLIST = -NOlistmac -name -pagelen:56 -pagewidth:80 -quiet -ARCHASMWARNINGS = -warn -ARCHASMDEFINES = -define:_Z16F2811AL=1 -define:_Z16K_SERIES=1 -define:_Z16F_SERIES=1 -define:__ASSEMBLY__ -AFLAGS := $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMLIST) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION) - -# Compiler definitions - -ARCHCPUFLAGS = -chartype:S -model:L -NOmodsect -cpu:Z16F2811AL -NOgenprint \ - -asmsw:" $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)" -ARCHLIST = -keeplst -NOlist -NOlistinc -NOkeepasm -ARCHWARNINGS = -warn -ARCHDEFINES = -define:_Z16F2811AL -define:_Z16K_SERIES -define:_Z16F_SERIES -ARCHINCLUDES = $(ARCHSTDINCLUDES) -CFLAGS := $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHLIST) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) - -CPPDEFINES = -D_Z16F2811AL -D_Z16K_SERIES -D_Z16F_SERIES -D__ASSEMBLY__ -CPPINCLUDES = -I$(TOPDIR)$(DELIM)include -CPPFLAGS := $(CPPDEFINES) $(CPPINCLUDES) - -# Librarian definitions - -ARFLAGS = -quiet -warn - -# Linker definitions - -LDSCRIPT = z16f2800100zcog.linkcmd -LINKCMDTEMPLATE = $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) - -MKDEP = $(TOPDIR)$(DELIM)tools$(DELIM)mknulldeps.sh diff --git a/boards/z16/z16f/z16f2800100zcog/scripts/z16f2800100zcog.linkcmd b/boards/z16/z16f/z16f2800100zcog/scripts/z16f2800100zcog.linkcmd deleted file mode 100644 index 751fd6301e..0000000000 --- a/boards/z16/z16f/z16f2800100zcog/scripts/z16f2800100zcog.linkcmd +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/z16/z16f/z16f2800100zcog/scripts/z16f2800100zcog.linkcmd - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - --FORMAT=OMF695,INTEL32 --map -maxhexlen=64 -quiet -sort NAME=ascending -unresolved=fatal --warnoverlap -NOxref -warn -debug -NOigcase - -RANGE ROM $000000 : $007FFF -RANGE RAM $FFB000 : $FFBFFF -RANGE IODATA $FFC000 : $FFFFFF -RANGE EROM $008000 : $01FFFF -RANGE ERAM $800000 : $87FFFF - -CHANGE NEAR_TEXT=NEAR_DATA -CHANGE FAR_TEXT=FAR_DATA - -ORDER FAR_BSS, FAR_DATA -ORDER NEAR_BSS, NEAR_DATA -COPY NEAR_DATA EROM -COPY FAR_DATA EROM - -define _0_exit = 0 -define _low_near_romdata = copy base of NEAR_DATA -define _low_neardata = base of NEAR_DATA -define _len_neardata = length of NEAR_DATA -define _low_far_romdata = copy base of FAR_DATA -define _low_fardata = base of FAR_DATA -define _len_fardata = length of FAR_DATA -define _low_nearbss = base of NEAR_BSS -define _len_nearbss = length of NEAR_BSS -define _low_farbss = base of FAR_BSS -define _len_farbss = length of FAR_BSS -define _near_heaptop = highaddr of RAM -define _far_heaptop = highaddr of ERAM -define _far_stack = highaddr of ERAM -define _near_stack = highaddr of RAM -define _near_heapbot = top of RAM -define _far_heapbot = top of ERAM - -define _SYS_CLK_SRC = 1 -define _SYS_CLK_FREQ = 20000000 - -define __EXTCT_INIT_PARAM = $80 -define __EXTCS0_INIT_PARAM = $8012 -define __EXTCS1_INIT_PARAM = $8001 -define __EXTCS2_INIT_PARAM = $0000 -define __EXTCS3_INIT_PARAM = $0000 -define __EXTCS4_INIT_PARAM = $0000 -define __EXTCS5_INIT_PARAM = $0000 - -define __PFAF_INIT_PARAM = $ff -define __PGAF_INIT_PARAM = $ff -define __PDAF_INIT_PARAM = $ff00 -define __PAAF_INIT_PARAM = $0000 -define __PCAF_INIT_PARAM = $0000 -define __PHAF_INIT_PARAM = $0300 -define __PKAF_INIT_PARAM = $0f - -/* arch/z16/src/Makefile will append target, object and library paths below */ diff --git a/boards/z16/z16f/z16f2800100zcog/src/Makefile b/boards/z16/z16f/z16f2800100zcog/src/Makefile deleted file mode 100644 index 9f244f1b0c..0000000000 --- a/boards/z16/z16f/z16f2800100zcog/src/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -############################################################################ -# boards/z16/z16f/z16f2800100zcog/src/Makefile -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -include $(TOPDIR)/Make.defs - -CSRCS = z16f_boot.c z16f_leds.c - -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += z16f_appinit.c -endif - -include $(TOPDIR)/boards/Board.mk diff --git a/boards/z16/z16f/z16f2800100zcog/src/z16f_appinit.c b/boards/z16/z16f/z16f2800100zcog/src/z16f_appinit.c deleted file mode 100644 index b641e0a455..0000000000 --- a/boards/z16/z16f/z16f2800100zcog/src/z16f_appinit.c +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** - * boards/z16/z16f/z16f2800100zcog/src/z16f_appinit.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include - -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: board_app_initialize - * - * Description: - * Perform application specific initialization. This function is never - * called directly from application code, but only indirectly via the - * (non-standard) boardctl() interface using the command BOARDIOC_INIT. - * - * Input Parameters: - * arg - The boardctl() argument is passed to the board_app_initialize() - * implementation without modification. The argument has no - * meaning to NuttX; the meaning of the argument is a contract - * between the board-specific initialization logic and the - * matching application logic. The value could be such things as a - * mode enumeration value, a set of DIP switch switch settings, a - * pointer to configuration data read from a file or serial FLASH, - * or whatever you would like to do with it. Every implementation - * should accept zero/NULL as a default configuration. - * - * Returned Value: - * Zero (OK) is returned on success; a negated errno value is returned on - * any failure to indicate the nature of the failure. - * - ****************************************************************************/ - -int board_app_initialize(uintptr_t arg) -{ - return OK; -} diff --git a/boards/z16/z16f/z16f2800100zcog/src/z16f_boot.c b/boards/z16/z16f/z16f2800100zcog/src/z16f_boot.c deleted file mode 100644 index 45836bbd40..0000000000 --- a/boards/z16/z16f/z16f2800100zcog/src/z16f_boot.c +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** - * boards/z16/z16f/z16f2800100zcog/src/z16f_boot.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include "chip.h" - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: z16f_gpioinit - * - * Description: - * Configure board-specific GPIO usage here. Driver pin configurations - * are set in the associated device drivers (such as UART, SPI, I2C, - * etc.) and must be preserved. - * - * Based upon sample code included with the Zilog ZDS-II toolchain. - * - ****************************************************************************/ - -static void z16f_gpioinit(void) -{ - /* Configure LEDs and Run/Stop switch port */ - - putreg8(getreg8(Z16F_GPIOA_DD) | 0x87, Z16F_GPIOA_DD); - putreg8(getreg8(Z16F_GPIOA_OUT) | 0x07, Z16F_GPIOA_OUT); - putreg8(getreg8(Z16F_GPIOA_DD) & 0xf8, Z16F_GPIOA_DD); - - /* Configure rate switch port */ - - putreg8(getreg8(Z16F_GPIOB_DD) | 0x20, Z16F_GPIOB_DD); - putreg8(getreg8(Z16F_GPIOB_AFL) | 0x20, Z16F_GPIOB_AFL); - -#if 0 /* Not yet */ - putreg8(0x05, Z16F_ADC0_MAX); - putreg8(0xf5, Z16F_ADC0_CTL); -#endif - - /* Configure Direction switch port */ - - putreg8(getreg8(Z16F_GPIOC_DD) | 0x01, Z16F_GPIOC_DD); -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: z16f_board_initialize - * - * Description: - * All Z16 architectures must provide the following entry point. This - * entry point is called early in the initialization -- after all memory - * has been configured but before any devices have been initialized. - * - ****************************************************************************/ - -void z16f_board_initialize(void) -{ - z16f_gpioinit(); -} - -/**************************************************************************** - * Name: board_late_initialize - * - * Description: - * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional - * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will - * be called immediately after up_initialize() is called and just before - * the initial application is started. This additional initialization - * phase may be used, for example, to initialize board-specific device - * drivers. - * - ****************************************************************************/ - -#ifdef CONFIG_BOARD_LATE_INITIALIZE -void board_late_initialize(void) -{ -} -#endif diff --git a/boards/z16/z16f/z16f2800100zcog/src/z16f_leds.c b/boards/z16/z16f/z16f2800100zcog/src/z16f_leds.c deleted file mode 100644 index d34caa0f16..0000000000 --- a/boards/z16/z16f/z16f2800100zcog/src/z16f_leds.c +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** - * boards/z16/z16f/z16f2800100zcog/src/z16f_leds.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* The z16f2800100zcog board has four LEDs: - * - * - Green LED D1 which illuminates in the presence of Vcc - * - Red LED D2 connected to chip port PA0_T0IN - * - Yellow LED D3 connected to chip port PA1_T0OUT - * - Green LED D4 connected to chip port PA2_DE0 - */ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include - -#include "z16_internal.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: board_autoled_initialize - ****************************************************************************/ - -#ifdef CONFIG_ARCH_LEDS -void board_autoled_initialize(void) -{ - /* The following is performed z16f_board_initialize() as well */ - - putreg8(getreg8(Z16F_GPIOA_OUT) | 0x07, Z16F_GPIOA_OUT); - putreg8(getreg8(Z16F_GPIOA_DD) & 0xf8, Z16F_GPIOA_DD); -} - -/**************************************************************************** - * Name: board_autoled_on - ****************************************************************************/ - -void board_autoled_on(int led) -{ - if ((unsigned)led <= 7) - { - putreg8(((getreg8(Z16F_GPIOA_OUT) & 0xf8) | led), Z16F_GPIOA_OUT); - } -} - -/**************************************************************************** - * Name: board_autoled_off - ****************************************************************************/ - -void board_autoled_off(int led) -{ - if (led >= 1) - { - board_autoled_on(led - 1); - } -} -#endif /* CONFIG_ARCH_LEDS */ diff --git a/boards/z16/z16f/z16f2800100zcog/tools/dopatch.sh b/boards/z16/z16f/z16f2800100zcog/tools/dopatch.sh deleted file mode 100755 index fab1511a6b..0000000000 --- a/boards/z16/z16f/z16f2800100zcog/tools/dopatch.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env bash -############################################################################ -# boards/z16/z16f/z16f2800100zcog/tools/dopatch.sh -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -USAGE="${0} [-R] \$PWD" -WD=`pwd` -TOOLDIR=${WD}/boards/z16f2800100zcog/tools -ME=${TOOLDIR}/dopatch.sh -PATCH=${TOOLDIR}/zneo-zdsii-5_0_1-variadic-func-fix.patch -ARGS=${1} - -if [ ! -x ${ME} ]; then - echo "ERROR: This script must be executed from the top-level NuttX directory" - echo ${USAGE} - exit 1 -fi - -if [ ! -r ${PATCH} ]; then - echo "ERROR: Readable patch not found at ${PATCH}" - echo ${USAGE} - exit 1 -fi - -cd .. || \ - { echo "ERROR: failed to CD to the parent directory"; exit 1; } - -cat ${PATCH} | patch ${ARGS} -p1 || \ - { echo "ERROR: patch failed" ; exit 1; } diff --git a/boards/z16/z16f/z16f2800100zcog/tools/zneo-zdsii-5_0_1-variadic-func-fix.patch b/boards/z16/z16f/z16f2800100zcog/tools/zneo-zdsii-5_0_1-variadic-func-fix.patch deleted file mode 100644 index 8f5953288a..0000000000 --- a/boards/z16/z16f/z16f2800100zcog/tools/zneo-zdsii-5_0_1-variadic-func-fix.patch +++ /dev/null @@ -1,135 +0,0 @@ -diff --git a/apps/nshlib/nsh_console.c b/apps/nshlib/nsh_console.c -index ba7dbe7..45e4ab1 100644 ---- a/apps/nshlib/nsh_console.c -+++ b/apps/nshlib/nsh_console.c -@@ -46,6 +46,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -79,7 +80,12 @@ static FAR struct nsh_vtbl_s *nsh_consoleclone(FAR struct nsh_vtbl_s *vtbl); - static void nsh_consolerelease(FAR struct nsh_vtbl_s *vtbl); - static ssize_t nsh_consolewrite(FAR struct nsh_vtbl_s *vtbl, - FAR const void *buffer, size_t nbytes); -+#if 0 - static int nsh_consoleoutput(FAR struct nsh_vtbl_s *vtbl, - FAR const char *fmt, ...); -+#else -+static int nsh_consolevoutput(FAR struct nsh_vtbl_s *vtbl, -+ FAR const char *fmt, va_list ap); -+#endif - static FAR char *nsh_consolelinebuffer(FAR struct nsh_vtbl_s *vtbl); - -@@ -213,6 +219,7 @@ static ssize_t nsh_consolewrite(FAR struct nsh_vtbl_s *vtbl, FAR const void *buf - * - ****************************************************************************/ - -+#if 0 - static int nsh_consoleoutput(FAR struct nsh_vtbl_s *vtbl, - FAR const char *fmt, ...) - { -@@ -263,6 +270,29 @@ static int nsh_consoleoutput(FAR struct nsh_vtbl_s *vtbl, - #endif - } - -+#else -+static int nsh_consolevoutput(FAR struct nsh_vtbl_s *vtbl, FAR const char *fmt, va_list ap) -+{ -+ FAR struct console_stdio_s *pstate = (FAR struct console_stdio_s *)vtbl; -+ int ret; -+ -+ /* The stream is open in a lazy fashion. This is done because the file -+ * descriptor may be opened on a different task than the stream. The -+ * actual open will then occur with the first output from the new task. -+ */ -+ -+ if (nsh_openifnotopen(pstate) != 0) -+ { -+ return ERROR; -+ } -+ -+ ret = vfprintf(pstate->cn_outstream, fmt, ap); -+ -+ return ret; -+#endif -+} -+#endif -+ - /**************************************************************************** - * Name: nsh_consolelinebuffer - * -@@ -452,7 +504,11 @@ FAR struct console_stdio_s *nsh_newconsole(void) - pstate->cn_vtbl.release = nsh_consolerelease; - #endif - pstate->cn_vtbl.write = nsh_consolewrite; -+#if 0 - pstate->cn_vtbl.output = nsh_consoleoutput; -+#else -+ pstate->cn_vtbl.voutput = nsh_consolevoutput; -+#endif - pstate->cn_vtbl.linebuffer = nsh_consolelinebuffer; - pstate->cn_vtbl.exit = nsh_consoleexit; - -@@ -489,3 +545,15 @@ FAR struct console_stdio_s *nsh_newconsole(void) - } - return pstate; - } -+ -+int nsh_output(FAR struct nsh_vtbl_s *vtbl, FAR const char *fmt, ...) -+{ -+ va_list ap; -+ int ret; -+ -+ va_start(ap, fmt); -+ ret = vtbl->voutput(vtbl, fmt, ap); -+ va_end(ap); -+ -+ return ret; -+} -diff --git a/apps/nshlib/nsh_console.h b/apps/nshlib/nsh_console.h -index c78362f..207f9b9 100644 ---- a/apps/nshlib/nsh_console.h -+++ b/apps/nshlib/nsh_console.h -@@ -47,6 +47,7 @@ - #include - #include - #include -+#include - #include - - /**************************************************************************** -@@ -62,11 +63,13 @@ - #define nsh_undirect(v,s) (v)->undirect(v,s) - #define nsh_exit(v,s) (v)->exit(v,s) - -+#if 0 - #ifdef CONFIG_CPP_HAVE_VARARGS - # define nsh_output(v, ...) (v)->output(v, ##__VA_ARGS__) - #else - # define nsh_output vtbl->output - #endif -+#endif - - /* Size of info to be saved in call to nsh_redirect */ - -@@ -107,6 +110,10 @@ struct nsh_vtbl_s - void (*release)(FAR struct nsh_vtbl_s *vtbl); - #endif - ssize_t (*write)(FAR struct nsh_vtbl_s *vtbl, FAR const void *buffer, size_t nbytes); -+#if 0 - int (*output)(FAR struct nsh_vtbl_s *vtbl, FAR const char *fmt, ...); -+#else -+ int (*voutput)(FAR struct nsh_vtbl_s *vtbl, FAR const char *fmt, va_list ap); -+#endif - FAR char *(*linebuffer)(FAR struct nsh_vtbl_s *vtbl); - void (*redirect)(FAR struct nsh_vtbl_s *vtbl, int fd, FAR uint8_t *save); -@@ -159,5 +166,6 @@ struct console_stdio_s - /* Defined in nsh_console.c *************************************************/ - - FAR struct console_stdio_s *nsh_newconsole(void); -+int nsh_output(FAR struct nsh_vtbl_s *vtbl, FAR const char *fmt, ...); - - #endif /* __APPS_NSHLIB_NSH_CONSOLE_H */ diff --git a/boards/z80/ez80/ez80f910200kitg/Kconfig b/boards/z80/ez80/ez80f910200kitg/Kconfig deleted file mode 100644 index f72f3c094c..0000000000 --- a/boards/z80/ez80/ez80f910200kitg/Kconfig +++ /dev/null @@ -1,4 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# diff --git a/boards/z80/ez80/ez80f910200kitg/configs/ostest/defconfig b/boards/z80/ez80/ez80f910200kitg/configs/ostest/defconfig deleted file mode 100644 index 5233e5150f..0000000000 --- a/boards/z80/ez80/ez80f910200kitg/configs/ostest/defconfig +++ /dev/null @@ -1,43 +0,0 @@ -# -# This file is autogenerated: PLEASE DO NOT EDIT IT. -# -# You can use "make menuconfig" to make any modifications to the installed .config file. -# You can then do "make savedefconfig" to generate a new defconfig file that includes your -# modifications. -# -# CONFIG_ARCH_LEDS is not set -CONFIG_ARCH="z80" -CONFIG_ARCH_BOARD="ez80f910200kitg" -CONFIG_ARCH_BOARD_EZ80F910200KITG=y -CONFIG_ARCH_CHIP="ez80" -CONFIG_ARCH_CHIP_EZ80=y -CONFIG_ARCH_CHIP_EZ80F91=y -CONFIG_ARCH_Z80=y -CONFIG_BOARD_LOOPSPERMSEC=1250 -CONFIG_CONSOLE_SYSLOG=y -CONFIG_DISABLE_ENVIRON=y -CONFIG_DISABLE_MOUNTPOINT=y -CONFIG_DISABLE_MQUEUE=y -CONFIG_DISABLE_POSIX_TIMERS=y -CONFIG_DISABLE_PTHREAD=y -CONFIG_EZ80_UART0=y -CONFIG_HOST_WINDOWS=y -CONFIG_INIT_ENTRYPOINT="ostest_main" -CONFIG_INIT_STACKSIZE=1024 -CONFIG_MMCSD=y -CONFIG_NUNGET_CHARS=0 -CONFIG_PTHREAD_STACK_DEFAULT=1024 -CONFIG_RAM_SIZE=65536 -CONFIG_RAM_START=0 -CONFIG_START_DAY=25 -CONFIG_START_MONTH=2 -CONFIG_START_YEAR=2009 -CONFIG_STDIO_DISABLE_BUFFERING=y -CONFIG_TASK_NAME_SIZE=0 -CONFIG_TESTING_OSTEST=y -CONFIG_TESTING_OSTEST_NBARRIER_THREADS=3 -CONFIG_TESTING_OSTEST_STACKSIZE=2048 -CONFIG_UART0_BAUD=57600 -CONFIG_UART0_RXBUFSIZE=32 -CONFIG_UART0_SERIAL_CONSOLE=y -CONFIG_UART0_TXBUFSIZE=32 diff --git a/boards/z80/ez80/ez80f910200kitg/configs/ostest/ostest.zdsproj b/boards/z80/ez80/ez80f910200kitg/configs/ostest/ostest.zdsproj deleted file mode 100644 index 08247148bd..0000000000 --- a/boards/z80/ez80/ez80f910200kitg/configs/ostest/ostest.zdsproj +++ /dev/null @@ -1,247 +0,0 @@ - -eZ80F91 - - - -..\..\..\nuttx.hex - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/boards/z80/ez80/ez80f910200kitg/include/board.h b/boards/z80/ez80/ez80f910200kitg/include/board.h deleted file mode 100644 index 6c56159047..0000000000 --- a/boards/z80/ez80/ez80f910200kitg/include/board.h +++ /dev/null @@ -1,68 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/ez80f910200kitg/include/board.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __BOARDS_Z80_EZ80_EZ80f910200KITG_INCLUDE_BOARD_H -#define __BOARDS_Z80_EZ80_EZ80f910200KITG_INCLUDE_BOARD_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Clocking */ - -#define EZ80_SYS_CLK_FREQ 50000000 - -/* LED pattern definitions */ - -#define LED_STARTED 0 -#define LED_HEAPALLOCATE 1 -#define LED_IRQSENABLED 2 -#define LED_STACKCREATED 3 -#define LED_IDLE 4 -#define LED_INIRQ 5 -#define LED_ASSERTION 6 -#define LED_SIGNAL 6 -#define LED_PANIC 7 - -/**************************************************************************** - * Public Functions Definitions - ****************************************************************************/ - -#undef EXTERN -#if defined(__cplusplus) -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -#undef EXTERN -#if defined(__cplusplus) -} -#endif - -#endif /* __BOARDS_Z80_EZ80_EZ80f910200KITG_INCLUDE_BOARD_H */ diff --git a/boards/z80/ez80/ez80f910200kitg/scripts/Make.defs b/boards/z80/ez80/ez80f910200kitg/scripts/Make.defs deleted file mode 100644 index 69febd1b7f..0000000000 --- a/boards/z80/ez80/ez80f910200kitg/scripts/Make.defs +++ /dev/null @@ -1,70 +0,0 @@ -############################################################################ -# boards/z80/ez80/ez80f910200kitg/scripts/Make.defs -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -include $(TOPDIR)/.config -include $(TOPDIR)/tools/Config.mk -include $(TOPDIR)/arch/z80/src/ez80/Toolchain.defs -include $(TOPDIR)/tools/zds/Config.mk - -# CFLAGS - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) - ARCHASMINCLUDES = -include:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR) - EARCHASMINCLUDES = -include:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR) - ARCHSTDINCLUDES = -stdinc:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR) -else - ARCHASMINCLUDES = -include:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)' - EARCHASMINCLUDES = -include:'$(ETOPDIR)\include;$(EZDSSTDINCDIR);$(EZDSZILOGINCDIR)' - ARCHSTDINCLUDES = -stdinc:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)' -endif - -# Assembler definitions - -ARCHASMCPUFLAGS = -cpu:$(ARCHCPU) -NOigcase -ARCHASMLIST = -list -NOlistmac -name -pagelen:56 -pagewidth:80 -quiet -ARCHASMWARNINGS = -warn -ARCHASMDEFINES = -define:$(ARCHCPUDEF)=1 -define:$(ARCHFAMILY)=1 -define:__ASSEMBLY__ -AFLAGS := $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMLIST) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION) - -# Compiler definitions - -ARCHCPUFLAGS = -chartype:S -promote -cpu:$(ARCHCPU) -NOgenprintf -NOmodsect \ - -asmsw:" $(ARCHASMCPUFLAGS) $(EARCHASMINCLUDES) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)" -ARCHLIST = -keeplst -NOlist -NOlistinc -keepasm -ARCHWARNINGS = -warn -ARCHDEFINES = -define:$(ARCHCPUDEF) -define:$(ARCHFAMILY) -ARCHINCLUDES = $(ARCHSTDINCLUDES) -CFLAGS := $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHLIST) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) - -CPPDEFINES = -D$(ARCHFAMILY) -D$(ARCHCPUDEF) -D__ASSEMBLY__ -CPPINCLUDES = -I$(TOPDIR)$(DELIM)include -CPPFLAGS := $(CPPDEFINES) $(CPPINCLUDES) - -# Librarian definitions - -ARFLAGS = -quiet -warn - -# Linker definitions - -LINKCMDTEMPLATE = $(BOARD_DIR)$(DELIM)scripts$(DELIM)ez80f910200kitg.linkcmd - -MKDEP = $(TOPDIR)$(DELIM)tools$(DELIM)mknulldeps.sh diff --git a/boards/z80/ez80/ez80f910200kitg/scripts/ez80f910200kitg.linkcmd b/boards/z80/ez80/ez80f910200kitg/scripts/ez80f910200kitg.linkcmd deleted file mode 100644 index 578868622a..0000000000 --- a/boards/z80/ez80/ez80f910200kitg/scripts/ez80f910200kitg.linkcmd +++ /dev/null @@ -1,80 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/ez80f910200kitg/scripts/ez80f910200kitg.linkcmd - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - --FORMAT=OMF695,INTEL32 --map -maxhexlen=64 -quiet -NOwarnoverlap -xref -unresolved=fatal --sort NAME=ascending -warn -NOdebug -NOigcase - -RANGE ROM $000000 : $03FFFF -RANGE RAM $B7E000 : $B7FFFF -RANGE EXTIO $000000 : $00FFFF -RANGE INTIO $000000 : $0000FF - -CHANGE STRSECT = ROM - -ORDER .RESET,.IVECTS,.STARTUP,CODE,DATA -COPY DATA ROM - -DEFINE __low_romdata = copy base of DATA -DEFINE __low_data = base of DATA -DEFINE __len_data = length of DATA -DEFINE __low_bss = base of BSS -DEFINE __len_bss = length of BSS -DEFINE __stack = highaddr of RAM + 1 -DEFINE __heaptop = highaddr of RAM -DEFINE __heapbot = top of RAM + 1 -DEFINE __low_romcode = copy base of CODE -DEFINE __low_code = base of CODE -DEFINE __len_code = length of CODE -DEFINE __copy_code_to_ram = 0 -DEFINE __crtl = 1 -DEFINE __CS0_LBR_INIT_PARAM = $10 -DEFINE __CS0_UBR_INIT_PARAM = $1f -DEFINE __CS0_CTL_INIT_PARAM = $a8 -DEFINE __CS0_BMC_INIT_PARAM = $02 -DEFINE __CS1_LBR_INIT_PARAM = $b8 -DEFINE __CS1_UBR_INIT_PARAM = $b9 -DEFINE __CS1_CTL_INIT_PARAM = $28 -DEFINE __CS1_BMC_INIT_PARAM = $02 -DEFINE __CS2_LBR_INIT_PARAM = $80 -DEFINE __CS2_UBR_INIT_PARAM = $bf -DEFINE __CS2_CTL_INIT_PARAM = $28 -DEFINE __CS2_BMC_INIT_PARAM = $02 -DEFINE __CS3_LBR_INIT_PARAM = $60 -DEFINE __CS3_UBR_INIT_PARAM = $7f -DEFINE __CS3_CTL_INIT_PARAM = $a8 -DEFINE __CS3_BMC_INIT_PARAM = $02 -DEFINE __RAM_CTL_INIT_PARAM = $C0 -DEFINE __RAM_ADDR_U_INIT_PARAM = $B7 -DEFINE __FLASH_CTL_INIT_PARAM = $68 -DEFINE __FLASH_ADDR_U_INIT_PARAM = $00 - -define _SYS_CLK_FREQ = 50000000 - -define _OSC_FREQ = 5000000 -define _SYS_CLK_SRC = 1 -define _OSC_FREQ_MULT = 10 -define __PLL_CTL0_INIT_PARAM = $41 - -define _zsl_g_clock_xdefine = 50000000 - -/* arch/z80/src/Makefile.zdsii will append target, object and library paths below */ diff --git a/boards/z80/ez80/ez80f910200kitg/src/Makefile b/boards/z80/ez80/ez80f910200kitg/src/Makefile deleted file mode 100644 index 320f6c1531..0000000000 --- a/boards/z80/ez80/ez80f910200kitg/src/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -############################################################################ -# boards/z80/ez80/ez80f910200kitg/src/Makefile -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -include $(TOPDIR)/Make.defs - -CSRCS = ez80_boot.c ez80_leds.c - -include $(TOPDIR)/boards/Board.mk diff --git a/boards/z80/ez80/ez80f910200kitg/src/ez80_boot.c b/boards/z80/ez80/ez80f910200kitg/src/ez80_boot.c deleted file mode 100644 index 77fe731edd..0000000000 --- a/boards/z80/ez80/ez80f910200kitg/src/ez80_boot.c +++ /dev/null @@ -1,50 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/ez80f910200kitg/src/ez80_boot.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include "chip.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -static void ez80_gpioinit(void) -{ -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -void ez80_board_initialize(void) -{ - ez80_gpioinit(); -} diff --git a/boards/z80/ez80/ez80f910200kitg/src/ez80_leds.c b/boards/z80/ez80/ez80f910200kitg/src/ez80_leds.c deleted file mode 100644 index 5445d6a063..0000000000 --- a/boards/z80/ez80/ez80f910200kitg/src/ez80_leds.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/ez80f910200kitg/src/ez80_leds.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include - -#include "z80_internal.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: board_autoled_initialize - ****************************************************************************/ - -#ifdef CONFIG_ARCH_LEDS -void board_autoled_initialize(void) -{ -} - -/**************************************************************************** - * Name: board_autoled_on - ****************************************************************************/ - -void board_autoled_on(int led) -{ -} - -/**************************************************************************** - * Name: board_autoled_off - ****************************************************************************/ - -void board_autoled_off(int led) -{ -} -#endif /* CONFIG_ARCH_LEDS */ diff --git a/boards/z80/ez80/ez80f910200zco/Kconfig b/boards/z80/ez80/ez80f910200zco/Kconfig deleted file mode 100644 index f72f3c094c..0000000000 --- a/boards/z80/ez80/ez80f910200zco/Kconfig +++ /dev/null @@ -1,4 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# diff --git a/boards/z80/ez80/ez80f910200zco/configs/dhcpd/defconfig b/boards/z80/ez80/ez80f910200zco/configs/dhcpd/defconfig deleted file mode 100644 index ec7e491745..0000000000 --- a/boards/z80/ez80/ez80f910200zco/configs/dhcpd/defconfig +++ /dev/null @@ -1,53 +0,0 @@ -# -# This file is autogenerated: PLEASE DO NOT EDIT IT. -# -# You can use "make menuconfig" to make any modifications to the installed .config file. -# You can then do "make savedefconfig" to generate a new defconfig file that includes your -# modifications. -# -# CONFIG_NETUTILS_DHCPD_IGNOREBROADCAST is not set -CONFIG_ARCH="z80" -CONFIG_ARCH_BOARD="ez80f910200zco" -CONFIG_ARCH_BOARD_EZ80F910200ZCO=y -CONFIG_ARCH_CHIP="ez80" -CONFIG_ARCH_CHIP_EZ80=y -CONFIG_ARCH_CHIP_EZ80F91=y -CONFIG_ARCH_TIMERHOOK=y -CONFIG_ARCH_Z80=y -CONFIG_BOARD_LOOPSPERMSEC=1250 -CONFIG_CONSOLE_SYSLOG=y -CONFIG_DISABLE_ENVIRON=y -CONFIG_DISABLE_MOUNTPOINT=y -CONFIG_DISABLE_MQUEUE=y -CONFIG_DISABLE_PTHREAD=y -CONFIG_ETH0_PHY_AM79C874=y -CONFIG_EXAMPLES_DHCPD=y -CONFIG_EXAMPLES_DHCPD_NOMAC=y -CONFIG_EZ80_EMAC=y -CONFIG_EZ80_PHYCONFIG=1 -CONFIG_EZ80_UART0=y -CONFIG_HOST_WINDOWS=y -CONFIG_INIT_ENTRYPOINT="dhcpd_main" -CONFIG_INIT_STACKSIZE=1024 -CONFIG_NET=y -CONFIG_NETUTILS_DHCPD=y -CONFIG_NETUTILS_NETLIB=y -CONFIG_NET_BROADCAST=y -CONFIG_NET_SOCKOPTS=y -CONFIG_NET_UDP=y -CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NUNGET_CHARS=0 -CONFIG_PTHREAD_STACK_DEFAULT=1024 -CONFIG_RAM_SIZE=65536 -CONFIG_RR_INTERVAL=200 -CONFIG_SCHED_HPWORK=y -CONFIG_START_DAY=14 -CONFIG_START_MONTH=3 -CONFIG_START_YEAR=2009 -CONFIG_STDIO_DISABLE_BUFFERING=y -CONFIG_TASK_NAME_SIZE=0 -CONFIG_UART0_BAUD=57600 -CONFIG_UART0_BITS=0 -CONFIG_UART0_RXBUFSIZE=32 -CONFIG_UART0_SERIAL_CONSOLE=y -CONFIG_UART0_TXBUFSIZE=32 diff --git a/boards/z80/ez80/ez80f910200zco/configs/dhcpd/dhcpd.zdsproj b/boards/z80/ez80/ez80f910200zco/configs/dhcpd/dhcpd.zdsproj deleted file mode 100644 index 7318260888..0000000000 --- a/boards/z80/ez80/ez80f910200zco/configs/dhcpd/dhcpd.zdsproj +++ /dev/null @@ -1,247 +0,0 @@ - -eZ80F91 - - - -..\..\..\nuttx.hex - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/boards/z80/ez80/ez80f910200zco/configs/httpd/defconfig b/boards/z80/ez80/ez80f910200zco/configs/httpd/defconfig deleted file mode 100644 index caa348dcd9..0000000000 --- a/boards/z80/ez80/ez80f910200zco/configs/httpd/defconfig +++ /dev/null @@ -1,50 +0,0 @@ -# -# This file is autogenerated: PLEASE DO NOT EDIT IT. -# -# You can use "make menuconfig" to make any modifications to the installed .config file. -# You can then do "make savedefconfig" to generate a new defconfig file that includes your -# modifications. -# -CONFIG_ARCH="z80" -CONFIG_ARCH_BOARD="ez80f910200zco" -CONFIG_ARCH_BOARD_EZ80F910200ZCO=y -CONFIG_ARCH_CHIP="ez80" -CONFIG_ARCH_CHIP_EZ80=y -CONFIG_ARCH_CHIP_EZ80F91=y -CONFIG_ARCH_TIMERHOOK=y -CONFIG_ARCH_Z80=y -CONFIG_BOARD_LOOPSPERMSEC=1250 -CONFIG_CONSOLE_SYSLOG=y -CONFIG_DISABLE_ENVIRON=y -CONFIG_DISABLE_MOUNTPOINT=y -CONFIG_DISABLE_MQUEUE=y -CONFIG_ETH0_PHY_AM79C874=y -CONFIG_EXAMPLES_WEBSERVER=y -CONFIG_EZ80_EMAC=y -CONFIG_EZ80_PHYCONFIG=1 -CONFIG_EZ80_UART0=y -CONFIG_HOST_WINDOWS=y -CONFIG_INIT_ENTRYPOINT="webserver_main" -CONFIG_INIT_STACKSIZE=1024 -CONFIG_NET=y -CONFIG_NETUTILS_NETLIB=y -CONFIG_NETUTILS_WEBSERVER=y -CONFIG_NET_MAX_LISTENPORTS=8 -CONFIG_NET_SOCKOPTS=y -CONFIG_NET_STATISTICS=y -CONFIG_NET_TCP=y -CONFIG_NET_TCP_PREALLOC_CONNS=16 -CONFIG_NUNGET_CHARS=0 -CONFIG_RAM_SIZE=65536 -CONFIG_RR_INTERVAL=200 -CONFIG_SCHED_HPWORK=y -CONFIG_START_DAY=14 -CONFIG_START_MONTH=3 -CONFIG_START_YEAR=2009 -CONFIG_STDIO_DISABLE_BUFFERING=y -CONFIG_TASK_NAME_SIZE=0 -CONFIG_UART0_BAUD=57600 -CONFIG_UART0_BITS=0 -CONFIG_UART0_RXBUFSIZE=32 -CONFIG_UART0_SERIAL_CONSOLE=y -CONFIG_UART0_TXBUFSIZE=32 diff --git a/boards/z80/ez80/ez80f910200zco/configs/httpd/httpd.zdsproj b/boards/z80/ez80/ez80f910200zco/configs/httpd/httpd.zdsproj deleted file mode 100644 index 8b15962b33..0000000000 --- a/boards/z80/ez80/ez80f910200zco/configs/httpd/httpd.zdsproj +++ /dev/null @@ -1,247 +0,0 @@ - -eZ80F91 - - - -..\..\..\nuttx.hex - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/boards/z80/ez80/ez80f910200zco/configs/nettest/defconfig b/boards/z80/ez80/ez80f910200zco/configs/nettest/defconfig deleted file mode 100644 index 1e126d0f15..0000000000 --- a/boards/z80/ez80/ez80f910200zco/configs/nettest/defconfig +++ /dev/null @@ -1,50 +0,0 @@ -# -# This file is autogenerated: PLEASE DO NOT EDIT IT. -# -# You can use "make menuconfig" to make any modifications to the installed .config file. -# You can then do "make savedefconfig" to generate a new defconfig file that includes your -# modifications. -# -CONFIG_ARCH="z80" -CONFIG_ARCH_BOARD="ez80f910200zco" -CONFIG_ARCH_BOARD_EZ80F910200ZCO=y -CONFIG_ARCH_CHIP="ez80" -CONFIG_ARCH_CHIP_EZ80=y -CONFIG_ARCH_CHIP_EZ80F91=y -CONFIG_ARCH_TIMERHOOK=y -CONFIG_ARCH_Z80=y -CONFIG_BOARD_LOOPSPERMSEC=1250 -CONFIG_CONSOLE_SYSLOG=y -CONFIG_DISABLE_ENVIRON=y -CONFIG_DISABLE_MOUNTPOINT=y -CONFIG_DISABLE_MQUEUE=y -CONFIG_DISABLE_PTHREAD=y -CONFIG_ETH0_PHY_AM79C874=y -CONFIG_EXAMPLES_NETTEST=y -CONFIG_EXAMPLES_NETTEST_NOMAC=y -CONFIG_EZ80_EMAC=y -CONFIG_EZ80_PHYCONFIG=1 -CONFIG_EZ80_UART0=y -CONFIG_HOST_WINDOWS=y -CONFIG_INIT_ENTRYPOINT="nettest_main" -CONFIG_INIT_STACKSIZE=1024 -CONFIG_NET=y -CONFIG_NETUTILS_NETLIB=y -CONFIG_NET_MAX_LISTENPORTS=8 -CONFIG_NET_SOCKOPTS=y -CONFIG_NET_TCP=y -CONFIG_NUNGET_CHARS=0 -CONFIG_PTHREAD_STACK_DEFAULT=1024 -CONFIG_RAM_SIZE=65536 -CONFIG_RR_INTERVAL=200 -CONFIG_SCHED_HPWORK=y -CONFIG_START_DAY=14 -CONFIG_START_MONTH=3 -CONFIG_START_YEAR=2009 -CONFIG_STDIO_DISABLE_BUFFERING=y -CONFIG_TASK_NAME_SIZE=0 -CONFIG_UART0_BAUD=57600 -CONFIG_UART0_BITS=0 -CONFIG_UART0_RXBUFSIZE=32 -CONFIG_UART0_SERIAL_CONSOLE=y -CONFIG_UART0_TXBUFSIZE=32 diff --git a/boards/z80/ez80/ez80f910200zco/configs/nettest/nettest.zdsproj b/boards/z80/ez80/ez80f910200zco/configs/nettest/nettest.zdsproj deleted file mode 100644 index 3758b7aadc..0000000000 --- a/boards/z80/ez80/ez80f910200zco/configs/nettest/nettest.zdsproj +++ /dev/null @@ -1,247 +0,0 @@ - -eZ80F91 - - - -..\..\..\nuttx.hex - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/boards/z80/ez80/ez80f910200zco/configs/nsh/defconfig b/boards/z80/ez80/ez80f910200zco/configs/nsh/defconfig deleted file mode 100644 index 7b4e643309..0000000000 --- a/boards/z80/ez80/ez80f910200zco/configs/nsh/defconfig +++ /dev/null @@ -1,59 +0,0 @@ -# -# This file is autogenerated: PLEASE DO NOT EDIT IT. -# -# You can use "make menuconfig" to make any modifications to the installed .config file. -# You can then do "make savedefconfig" to generate a new defconfig file that includes your -# modifications. -# -# CONFIG_NSH_DISABLE_IFCONFIG is not set -# CONFIG_NSH_DISABLE_PS is not set -CONFIG_ARCH="z80" -CONFIG_ARCH_BOARD="ez80f910200zco" -CONFIG_ARCH_BOARD_EZ80F910200ZCO=y -CONFIG_ARCH_CHIP="ez80" -CONFIG_ARCH_CHIP_EZ80=y -CONFIG_ARCH_CHIP_EZ80F91=y -CONFIG_ARCH_TIMERHOOK=y -CONFIG_ARCH_Z80=y -CONFIG_BOARD_LOOPSPERMSEC=1250 -CONFIG_DISABLE_MQUEUE=y -CONFIG_ETH0_PHY_AM79C874=y -CONFIG_EZ80_EMAC=y -CONFIG_EZ80_PHYCONFIG=1 -CONFIG_EZ80_UART0=y -CONFIG_HOST_WINDOWS=y -CONFIG_INIT_ENTRYPOINT="nsh_main" -CONFIG_LINE_MAX=64 -CONFIG_NET=y -CONFIG_NETDB_DNSCLIENT=y -CONFIG_NETDB_DNSCLIENT_ENTRIES=4 -CONFIG_NETDB_DNSSERVER_NOADDR=y -CONFIG_NETINIT_NOMAC=y -CONFIG_NETUTILS_TELNETD=y -CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_WEBCLIENT=y -CONFIG_NET_BROADCAST=y -CONFIG_NET_ICMP_SOCKET=y -CONFIG_NET_MAX_LISTENPORTS=8 -CONFIG_NET_STATISTICS=y -CONFIG_NET_TCP=y -CONFIG_NET_UDP=y -CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_FILEIOSIZE=512 -CONFIG_NSH_READLINE=y -CONFIG_PREALLOC_TIMERS=4 -CONFIG_PTHREAD_STACK_DEFAULT=1024 -CONFIG_RAM_SIZE=65536 -CONFIG_RR_INTERVAL=200 -CONFIG_SCHED_HPWORK=y -CONFIG_START_DAY=14 -CONFIG_START_MONTH=3 -CONFIG_START_YEAR=2009 -CONFIG_SYSTEM_NSH=y -CONFIG_SYSTEM_PING=y -CONFIG_TASK_NAME_SIZE=0 -CONFIG_UART0_BAUD=57600 -CONFIG_UART0_BITS=0 -CONFIG_UART0_RXBUFSIZE=192 -CONFIG_UART0_SERIAL_CONSOLE=y -CONFIG_UART0_TXBUFSIZE=64 diff --git a/boards/z80/ez80/ez80f910200zco/configs/nsh/nsh.zdsproj b/boards/z80/ez80/ez80f910200zco/configs/nsh/nsh.zdsproj deleted file mode 100644 index 605c8a0fce..0000000000 --- a/boards/z80/ez80/ez80f910200zco/configs/nsh/nsh.zdsproj +++ /dev/null @@ -1,247 +0,0 @@ - -eZ80F91 - - - -..\..\..\nuttx.hex - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/boards/z80/ez80/ez80f910200zco/configs/poll/defconfig b/boards/z80/ez80/ez80f910200zco/configs/poll/defconfig deleted file mode 100644 index 7e21228014..0000000000 --- a/boards/z80/ez80/ez80f910200zco/configs/poll/defconfig +++ /dev/null @@ -1,50 +0,0 @@ -# -# This file is autogenerated: PLEASE DO NOT EDIT IT. -# -# You can use "make menuconfig" to make any modifications to the installed .config file. -# You can then do "make savedefconfig" to generate a new defconfig file that includes your -# modifications. -# -CONFIG_ARCH="z80" -CONFIG_ARCH_BOARD="ez80f910200zco" -CONFIG_ARCH_BOARD_EZ80F910200ZCO=y -CONFIG_ARCH_CHIP="ez80" -CONFIG_ARCH_CHIP_EZ80=y -CONFIG_ARCH_CHIP_EZ80F91=y -CONFIG_ARCH_TIMERHOOK=y -CONFIG_ARCH_Z80=y -CONFIG_BOARD_LOOPSPERMSEC=1250 -CONFIG_CONSOLE_SYSLOG=y -CONFIG_DISABLE_ENVIRON=y -CONFIG_DISABLE_MOUNTPOINT=y -CONFIG_DISABLE_MQUEUE=y -CONFIG_ETH0_PHY_AM79C874=y -CONFIG_EXAMPLES_POLL=y -CONFIG_EXAMPLES_POLL_NOMAC=y -CONFIG_EZ80_EMAC=y -CONFIG_EZ80_PHYCONFIG=1 -CONFIG_EZ80_UART0=y -CONFIG_HOST_WINDOWS=y -CONFIG_INIT_ENTRYPOINT="poll_main" -CONFIG_INIT_STACKSIZE=1024 -CONFIG_NET=y -CONFIG_NETUTILS_NETLIB=y -CONFIG_NET_MAX_LISTENPORTS=8 -CONFIG_NET_SOCKOPTS=y -CONFIG_NET_TCP=y -CONFIG_NUNGET_CHARS=0 -CONFIG_PIPES=y -CONFIG_PTHREAD_STACK_DEFAULT=1024 -CONFIG_RAM_SIZE=65536 -CONFIG_RR_INTERVAL=200 -CONFIG_SCHED_HPWORK=y -CONFIG_START_DAY=14 -CONFIG_START_MONTH=3 -CONFIG_START_YEAR=2009 -CONFIG_STDIO_DISABLE_BUFFERING=y -CONFIG_TASK_NAME_SIZE=0 -CONFIG_UART0_BAUD=57600 -CONFIG_UART0_BITS=0 -CONFIG_UART0_RXBUFSIZE=32 -CONFIG_UART0_SERIAL_CONSOLE=y -CONFIG_UART0_TXBUFSIZE=32 diff --git a/boards/z80/ez80/ez80f910200zco/configs/poll/poll.zdsproj b/boards/z80/ez80/ez80f910200zco/configs/poll/poll.zdsproj deleted file mode 100644 index 1e73bb9aa1..0000000000 --- a/boards/z80/ez80/ez80f910200zco/configs/poll/poll.zdsproj +++ /dev/null @@ -1,247 +0,0 @@ - -eZ80F91 - - - -..\..\..\nuttx.hex - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/boards/z80/ez80/ez80f910200zco/include/board.h b/boards/z80/ez80/ez80f910200zco/include/board.h deleted file mode 100644 index 49bbfe07ff..0000000000 --- a/boards/z80/ez80/ez80f910200zco/include/board.h +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/ez80f910200zco/include/board.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __BOARDS_Z80_EZ80_EZ80F910200ZCO_INCLUDE_BOARD_H -#define __BOARDS_Z80_EZ80_EZ80F910200ZCO_INCLUDE_BOARD_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Clocking */ - -#define EZ80_SYS_CLK_FREQ 50000000 - -/* LED pattern definitions ON OFF */ - -#define LED_STARTED 0 /* '0' N/A */ -#define LED_HEAPALLOCATE 1 /* 'H' N/A */ -#define LED_IRQSENABLED 2 /* 'E' N/A */ -#define LED_STACKCREATED 3 /* 'C' N/A */ -#define LED_IDLE 4 /* 'R' N/A */ -#define LED_INIRQ 5 /* (ignored) (ignored) */ -#define LED_ASSERTION 6 /* 'A' (previous) */ -#define LED_SIGNAL 7 /* 'S' (previous) */ -#define LED_PANIC 8 /* '*' (previous) */ - -/* Button definitions */ - -#define BUTTON_PB0 0x01 /* PB0: SW1 Bit 0 of GPIO Port B */ -#define BUTTON_PB1 0x02 /* PB1: SW2 Bit 1 of GPIO Port B */ -#define BUTTON_PB2 0x04 /* PB2: SW3 Bit 2 of GPIO Port B */ - -/**************************************************************************** - * Public Functions Definitions - ****************************************************************************/ - -#undef EXTERN -#if defined(__cplusplus) -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -#undef EXTERN -#if defined(__cplusplus) -} -#endif - -#endif /* __BOARDS_Z80_EZ80_EZ80F910200ZCO_INCLUDE__BOARD_H */ diff --git a/boards/z80/ez80/ez80f910200zco/scripts/Make.defs b/boards/z80/ez80/ez80f910200zco/scripts/Make.defs deleted file mode 100644 index d9b1239fbf..0000000000 --- a/boards/z80/ez80/ez80f910200zco/scripts/Make.defs +++ /dev/null @@ -1,70 +0,0 @@ -############################################################################ -# boards/z80/ez80/ez80f910200zco/scripts/Make.defs -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -include $(TOPDIR)/.config -include $(TOPDIR)/tools/Config.mk -include $(TOPDIR)/arch/z80/src/ez80/Toolchain.defs -include $(TOPDIR)/tools/zds/Config.mk - -# CFLAGS - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) - ARCHASMINCLUDES = -include:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR) - EARCHASMINCLUDES = -include:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR) - ARCHSTDINCLUDES = -stdinc:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR) -else - ARCHASMINCLUDES = -include:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)' - EARCHASMINCLUDES = -include:'$(ETOPDIR)\include;$(EZDSSTDINCDIR);$(EZDSZILOGINCDIR)' - ARCHSTDINCLUDES = -stdinc:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)' -endif - -# Assembler definitions - -ARCHASMCPUFLAGS = -cpu:$(ARCHCPU) -NOigcase -ARCHASMLIST = -list -NOlistmac -name -pagelen:56 -pagewidth:80 -quiet -ARCHASMWARNINGS = -warn -ARCHASMDEFINES = -define:$(ARCHCPUDEF)=1 -define:$(ARCHFAMILY)=1 -define:__ASSEMBLY__ -AFLAGS := $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMLIST) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION) - -# Compiler definitions - -ARCHCPUFLAGS = -chartype:S -promote -cpu:$(ARCHCPU) -NOgenprintf -NOmodsect \ - -asmsw:" $(ARCHASMCPUFLAGS) $(EARCHASMINCLUDES) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)" -ARCHLIST = -keeplst -NOlist -NOlistinc -keepasm -ARCHWARNINGS = -warn -ARCHDEFINES = -define:$(ARCHCPUDEF) -define:$(ARCHFAMILY) -ARCHINCLUDES = $(ARCHSTDINCLUDES) -CFLAGS := $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHLIST) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) - -CPPDEFINES = -D$(ARCHFAMILY) -D$(ARCHCPUDEF) -D__ASSEMBLY__ -CPPINCLUDES = -I$(TOPDIR)$(DELIM)include -CPPFLAGS := $(CPPDEFINES) $(CPPINCLUDES) - -# Librarian definitions - -ARFLAGS = -quiet -warn - -# Linker definitions - -LINKCMDTEMPLATE = $(BOARD_DIR)$(DELIM)scripts$(DELIM)ez80f910200zco.linkcmd - -MKDEP = $(TOPDIR)$(DELIM)tools$(DELIM)mknulldeps.sh diff --git a/boards/z80/ez80/ez80f910200zco/scripts/ez80f910200zco.linkcmd b/boards/z80/ez80/ez80f910200zco/scripts/ez80f910200zco.linkcmd deleted file mode 100644 index bc7f0a3631..0000000000 --- a/boards/z80/ez80/ez80f910200zco/scripts/ez80f910200zco.linkcmd +++ /dev/null @@ -1,80 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/ez80f910200zco/scripts/ez80f910200zco.linkcmd - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - --FORMAT=OMF695,INTEL32 --map -maxhexlen=64 -quiet -NOwarnoverlap -xref -unresolved=fatal --sort ADDRESS=ascending -warn -NOdebug -NOigcase - -RANGE ROM $000000 : $03FFFF -RANGE RAM $B80000 : $BFFFFF -RANGE EXTIO $000000 : $00FFFF -RANGE INTIO $000000 : $0000FF - -CHANGE STRSECT is ROM - -ORDER .RESET,.IVECTS,.STARTUP,CODE,DATA -COPY DATA ROM - -DEFINE __low_romdata = copy base of DATA -DEFINE __low_data = base of DATA -DEFINE __len_data = length of DATA -DEFINE __low_bss = base of BSS -DEFINE __len_bss = length of BSS -DEFINE __stack = highaddr of RAM + 1 -DEFINE __heaptop = highaddr of RAM -DEFINE __heapbot = top of RAM + 1 -DEFINE __low_romcode = copy base of CODE -DEFINE __low_code = base of CODE -DEFINE __len_code = length of CODE -DEFINE __copy_code_to_ram = 0 -DEFINE __crtl = 1 -DEFINE __CS0_LBR_INIT_PARAM = $10 -DEFINE __CS0_UBR_INIT_PARAM = $1f -DEFINE __CS0_CTL_INIT_PARAM = $a8 -DEFINE __CS0_BMC_INIT_PARAM = $02 -DEFINE __CS1_LBR_INIT_PARAM = $c0 -DEFINE __CS1_UBR_INIT_PARAM = $c7 -DEFINE __CS1_CTL_INIT_PARAM = $28 -DEFINE __CS1_BMC_INIT_PARAM = $02 -DEFINE __CS2_LBR_INIT_PARAM = $80 -DEFINE __CS2_UBR_INIT_PARAM = $bf -DEFINE __CS2_CTL_INIT_PARAM = $28 -DEFINE __CS2_BMC_INIT_PARAM = $81 -DEFINE __CS3_LBR_INIT_PARAM = $00 -DEFINE __CS3_UBR_INIT_PARAM = $00 -DEFINE __CS3_CTL_INIT_PARAM = $00 -DEFINE __CS3_BMC_INIT_PARAM = $02 -DEFINE __RAM_CTL_INIT_PARAM = $C0 -DEFINE __RAM_ADDR_U_INIT_PARAM = $B7 -DEFINE __FLASH_CTL_INIT_PARAM = $68 -DEFINE __FLASH_ADDR_U_INIT_PARAM = $00 - -define _SYS_CLK_FREQ = 50000000 - -define _OSC_FREQ = 50000000 -define _SYS_CLK_SRC = 0 -define _OSC_FREQ_MULT = 1 -define __PLL_CTL0_INIT_PARAM = $40 - -define _zsl_g_clock_xdefine = 50000000 - -/* arch/z80/src/Makefile.zdsii will append target, object and library paths below */ diff --git a/boards/z80/ez80/ez80f910200zco/src/Makefile b/boards/z80/ez80/ez80f910200zco/src/Makefile deleted file mode 100644 index 3b3cca367b..0000000000 --- a/boards/z80/ez80/ez80f910200zco/src/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -############################################################################ -# boards/z80/ez80/ez80f910200zco/src/Makefile -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -include $(TOPDIR)/Make.defs - -CSRCS = ez80_boot.c -ifeq ($(CONFIG_ARCH_LEDS),y) -CSRCS += ez80_leds.c -endif -ifeq ($(CONFIG_ARCH_BUTTONS),y) -CSRCS += ez80_buttons.c -endif - -include $(TOPDIR)/boards/Board.mk diff --git a/boards/z80/ez80/ez80f910200zco/src/ez80_boot.c b/boards/z80/ez80/ez80f910200zco/src/ez80_boot.c deleted file mode 100644 index a71adb123c..0000000000 --- a/boards/z80/ez80/ez80f910200zco/src/ez80_boot.c +++ /dev/null @@ -1,50 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/ez80f910200zco/src/ez80_boot.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include "chip.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -static void ez80_gpioinit(void) -{ -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -void ez80_board_initialize(void) -{ - ez80_gpioinit(); -} diff --git a/boards/z80/ez80/ez80f910200zco/src/ez80_buttons.c b/boards/z80/ez80/ez80f910200zco/src/ez80_buttons.c deleted file mode 100644 index 2b2f9d513e..0000000000 --- a/boards/z80/ez80/ez80f910200zco/src/ez80_buttons.c +++ /dev/null @@ -1,165 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/ez80f910200zco/src/ez80_buttons.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include -#include - -#include "chip.h" -#include "z80_internal.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_PB/1/2interrupt - * - * Description: - * These could be extended to provide interrupt driven button input - * - ****************************************************************************/ - -#if 0 -void ez80_pbinterrupt(void) -{ - uint8_t regval; - - regval = inp(EZ80_PB_DR); /* Clear interrupt flag for eZ80F91 date codes before 0611 */ - regval |= 7; - outp(EZ80_PB_DR, regval); - - regval = inp(EZ80_PB_ALT0); /* Clear interrupt flag for eZ80F91 date codes 0611 and after */ - regval |= 1; - outp(EZ80_PB_ALT0, regval); -} - -void ez80_pb1interrupt(void) -{ - uint8_t regval; - - regval = inp(EZ80_PB_DR); /* Clear interrupt flag for eZ80F91 date codes before 0611 */ - regval |= 7; - outp(EZ80_PB_DR, regval); - - regval = inp(EZ80_PB_ALT0); /* Clear interrupt flag for eZ80F91 date codes 0611 and after */ - regval |= 2; - outp(EZ80_PB_ALT0, regval); -} - -void ez80_pb2interrupt(void) -{ - uint8_t regval; - - regval = inp(EZ80_PB_DR); /* Clear interrupt flag for eZ80F91 date codes - * before 0611 */ - regval |= 7; - outp(EZ80_PB_DR, regval); - - regval = inp(EZ80_PB_ALT0); - regval |= 4; - outp(EZ80_PB_ALT0, regval); /* Clear interrupt flag for eZ80F91 date codes - * 0611 and after */ -} -#endif - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: board_button_initialize - ****************************************************************************/ - -#ifdef CONFIG_ARCH_BUTTONS -uint32_t board_button_initialize(void) -{ - uint8_t regval; - -#if 0 /* Interrupts are not used */ - - /* Attach GIO interrupts */ - - irq_attach(EZ80_PB_IRQ, ez80_pbinterrupt, NULL); - irq_attach(EZ80_PB1_IRQ, ez80_pb1interrupt, NULL); - irq_attach(EZ80_PB2_IRQ, ez80_pb2interrupt, NULL); - - /* Configure PB0,1,2 as interrupt, rising edge */ - - regval = inp(EZ80_PB_DR); - regval |= 7; - outp(EZ80_PB_DR, regval); - - regval = inp(EZ80_PB_DDR); - regval |= 7; - outp(EZ80_PB_DDR, regval); - - regval = inp(EZ80_PB_ALT1); - regval |= 7; - outp(EZ80_PB_ALT1, regval); - - regval = inp(EZ80_PB_ALT2); - regval |= 7; - outp(EZ80_PB_ALT2, regval); -#else - /* Configure PB0,1,2 as inputs */ - - regval = inp(EZ80_PB_DDR); - regval |= 7; - outp(EZ80_PB_DDR, regval); - - regval = inp(EZ80_PB_ALT1); - regval &= ~7; - outp(EZ80_PB_ALT1, regval); - - regval = inp(EZ80_PB_ALT2); - regval &= ~7; - outp(EZ80_PB_ALT2, regval); -#endif - - return 3; -} - -/**************************************************************************** - * Name: board_buttons - ****************************************************************************/ - -uint32_t board_buttons(void) -{ - return inp(EZ80_PB_DDR) & 7; -} -#endif /* CONFIG_ARCH_BUTTONS */ diff --git a/boards/z80/ez80/ez80f910200zco/src/ez80_leds.c b/boards/z80/ez80/ez80f910200zco/src/ez80_leds.c deleted file mode 100644 index 60dc96d05b..0000000000 --- a/boards/z80/ez80/ez80f910200zco/src/ez80_leds.c +++ /dev/null @@ -1,674 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/ez80f910200zco/src/ez80_leds.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include -#include - -#include "ez80f910200zco.h" -#include "z80_internal.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/* 5x7 LED matrix character glyphs. Each glyph consists of 7 bytes, one - * each row and each containing 5 bits of data, one for each column - */ - -#if 0 /* Not used */ -static const uint8_t g_chblock[7] = -{ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -}; /* block */ -#endif - -static const uint8_t g_chspace[7] = -{ - 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f -}; /* space */ - -#if 0 /* Not used */ -static const uint8_t g_chexclam[7] = -{ - 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1f, 0x1b -}; /* ! */ - -static const uint8_t g_chquote[7] = -{ - 0x15, 0x15, 0x15, 0x1f, 0x1f, 0x1f, 0x1f -}; /* " */ - -static const uint8_t g_chnum[7] = -{ - 0x1f, 0x15, 0x00, 0x15, 0x00, 0x15, 0x1f -}; /* # */ - -static const uint8_t g_chdollar[7] = -{ - 0x1b, 0x11, 0x0a, 0x11, 0x0a, 0x11, 0x1b -}; /* $ */ - -static const uint8_t g_chpct[7] = -{ - 0x1f, 0x1e, 0x15, 0x1b, 0x15, 0x0f, 0x1f -}; /* % */ - -static const uint8_t g_champ[7] = -{ - 0x11, 0x0e, 0x0e, 0x11, 0x15, 0x0e, 0x10 -}; /* & */ - -static const uint8_t g_chsquote[7] = -{ - 0x1b, 0x1b, 0x1b, 0x1f, 0x1f, 0x1f, 0x1f -}; /* ' */ - -static const uint8_t g_chlparen[7] = -{ - 0x1d, 0x1b, 0x17, 0x17, 0x17, 0x1b, 0x1d -}; /* ( */ - -static const uint8_t g_chrparen[7] = -{ - 0x17, 0x1b, 0x1d, 0x1d, 0x1d, 0x1b, 0x17 -}; /* ) */ -#endif - -static const uint8_t g_chast[7] = -{ - 0x1f, 0x0a, 0x11, 0x00, 0x11, 0x0a, 0x1f -}; /* * */ - -#if 0 /* Not used */ -static const uint8_t g_chplus[7] = -{ - 0x1f, 0x1b, 0x1b, 0x00, 0x1b, 0x1b, 0x1f -}; /* + */ - -static const uint8_t g_chcomma[7] = -{ - 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1b, 0x17 -}; /* , */ - -static const uint8_t g_chhyphen[7] = -{ - 0x1f, 0x1f, 0x1f, 0x00, 0x1f, 0x1f, 0x1f -}; /* - */ - -static const uint8_t g_chperiod[7] = -{ - 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1b -}; /* . */ - -static const uint8_t g_chslash[7] = -{ - 0x1f, 0x1e, 0x1d, 0x1b, 0x17, 0x0f, 0x1f -}; /* / */ -#endif - -static const uint8_t g_ch0[7] = -{ - 0x11, 0x0e, 0x0c, 0x0a, 0x06, 0x0e, 0x11 -}; /* 0 */ - -#if 0 /* Not used */ -static const uint8_t g_ch1[7] = -{ - 0x1b, 0x13, 0x1b, 0x1b, 0x1b, 0x1b, 0x11 -}; /* 1 */ - -static const uint8_t g_ch2[7] = -{ - 0x11, 0x0e, 0x1d, 0x1b, 0x17, 0x0f, 0x00 -}; /* 2 */ - -static const uint8_t g_ch3[7] = -{ - 0x11, 0x0e, 0x1e, 0x19, 0x1e, 0x0e, 0x11 -}; /* 3 */ - -static const uint8_t g_ch4[7] = -{ - 0x0e, 0x0e, 0x0e, 0x10, 0x1e, 0x1e, 0x1e -}; /* 4 */ - -static const uint8_t g_ch5[7] = -{ - 0x00, 0x0f, 0x0f, 0x01, 0x1e, 0x0e, 0x11 -}; /* 5 */ - -static const uint8_t g_ch6[7] = -{ - 0x11, 0x0f, 0x0f, 0x01, 0x0e, 0x0e, 0x11 -}; /* 6 */ - -static const uint8_t g_ch7[7] = -{ - 0x00, 0x1e, 0x1e, 0x1d, 0x1b, 0x1b, 0x1b -}; /* 7 */ - -static const uint8_t g_ch8[7] = -{ - 0x11, 0x0e, 0x0e, 0x11, 0x0e, 0x0e, 0x11 -}; /* 8 */ - -static const uint8_t g_ch9[7] = -{ - 0x11, 0x0e, 0x0e, 0x10, 0x1e, 0x1d, 0x1b -}; /* 9 */ - -static const uint8_t g_chcolon[7] = -{ - 0x1f, 0x1f, 0x1b, 0x1f, 0x1b, 0x1f, 0x1f -}; /* : */ - -static const uint8_t g_shsemi[7] = -{ - 0x1f, 0x1f, 0x1b, 0x1f, 0x1b, 0x17, 0x1f -}; /* ; */ - -static const uint8_t g_chlt[7] = -{ - 0x1d, 0x1b, 0x17, 0x0f, 0x17, 0x1b, 0x1d -}; /* < */ - -static const uint8_t g_cheq[7] = -{ - 0x1f, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x1f -}; /* = */ - -static const uint8_t g_chgt[7] = -{ - 0x17, 0x1b, 0x1d, 0x1e, 0x1d, 0x1b, 0x17 -}; /* > */ - -static const uint8_t g_chquest[7] = -{ - 0x11, 0x0e, 0x0d, 0x1b, 0x1b, 0x1f, 0x1b -}; /* ? */ - -static const uint8_t g_chat[7] = -{ - 0x11, 0x0a, 0x04, 0x04, 0x05, 0x0a, 0x11 -}; /* @ */ -#endif - -static const uint8_t g_ch_up_a[7] = -{ - 0x11, 0x0e, 0x0e, 0x0e, 0x00, 0x0e, 0x0e -}; /* A */ - -#if 0 /* Not used */ -static const uint8_t g_ch_up_b[7] = -{ - 0x01, 0x0e, 0x0e, 0x01, 0x0e, 0x0e, 0x01 -}; /* B */ -#endif - -static const uint8_t g_ch_up_c[7] = -{ - 0x11, 0x0e, 0x0f, 0x0f, 0x0f, 0x0e, 0x11 -}; /* C */ - -#if 0 /* Not used */ -static const uint8_t g_ch_up_d[7] = -{ - 0x01, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x01 -}; /* D */ -#endif - -static const uint8_t g_ch_up_e[7] = -{ - 0x00, 0x0f, 0x0f, 0x01, 0x0f, 0x0f, 0x00 -}; /* E */ - -#if 0 /* Not used */ -static const uint8_t g_ch_up_f[7] = -{ - 0x00, 0x0f, 0x0f, 0x01, 0x0f, 0x0f, 0x0f -}; /* F */ - -static const uint8_t g_ch_up_g[7] = -{ - 0x11, 0x0e, 0x0f, 0x08, 0x0e, 0x0e, 0x11 -}; /* G */ -#endif - -static const uint8_t g_ch_up_h[7] = -{ - 0x0e, 0x0e, 0x0e, 0x00, 0x0e, 0x0e, 0x0e -}; /* H */ - -static const uint8_t g_ch_up_i[7] = -{ - 0x00, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x00 -}; /* I */ - -#if 0 /* Not used */ -static const uint8_t g_ch_up_j[7] = -{ - 0x00, 0x1d, 0x1d, 0x1d, 0x0d, 0x0d, 0x13 -}; /* J */ - -static const uint8_t g_ch_up_k[7] = -{ - 0x0e, 0x0d, 0x0b, 0x07, 0x0b, 0x0d, 0x0e -}; /* K */ - -static const uint8_t g_ch_up_l[7] = -{ - 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x00 -}; /* L */ - -static const uint8_t g_ch_up_m[7] = -{ - 0x0e, 0x04, 0x0a, 0x0a, 0x0e, 0x0e, 0x0e -}; /* M */ - -static const uint8_t g_ch_up_n[7] = -{ - 0x0e, 0x0e, 0x06, 0x0a, 0x0c, 0x0e, 0x0e -}; /* N */ - -static const uint8_t g_ch_up_o[7] = -{ - 0x11, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x11 -}; /* O */ - -static const uint8_t g_ch_up_p[7] = -{ - 0x01, 0x0e, 0x0e, 0x01, 0x0f, 0x0f, 0x0f -}; /* P */ - -static const uint8_t g_ch_up_q[7] = -{ - 0x11, 0x0e, 0x0e, 0x0e, 0x0a, 0x0c, 0x10 -}; /* Q */ -#endif - -static const uint8_t g_ch_up_r[7] = -{ - 0x01, 0x0e, 0x0e, 0x01, 0x0b, 0x0d, 0x0e -}; /* R */ - -static const uint8_t g_ch_up_s[7] = -{ - 0x11, 0x0e, 0x0f, 0x11, 0x1e, 0x0e, 0x11 -}; /* S */ - -#if 0 /* Not used */ -static const uint8_t g_ch_up_t[7] = -{ - 0x00, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b -}; /* T */ - -static const uint8_t g_ch_up_u[7] = -{ - 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x11 -}; /* U */ - -static const uint8_t g_ch_up_v[7] = -{ - 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x15, 0x1b -}; /* V */ - -static const uint8_t g_ch_up_w[7] = -{ - 0x0e, 0x0e, 0x0a, 0x0a, 0x0a, 0x0a, 0x15 -}; /* W */ - -static const uint8_t g_ch_up_x[7] = -{ - 0x0e, 0x0e, 0x15, 0x1b, 0x15, 0x0e, 0x0e -}; /* X */ - -static const uint8_t g_ch_up_y[7] = -{ - 0x0e, 0x0e, 0x15, 0x1b, 0x1b, 0x1b, 0x1b -}; /* Y */ - -static const uint8_t g_ch_up_z[7] = -{ - 0x00, 0x1e, 0x1d, 0x1b, 0x17, 0x0f, 0x00 -}; /* Z */ - -static const uint8_t g_chlbrack[7] = -{ - 0x03, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x03 -}; /* [ */ - -static const uint8_t g_chbslash[7] = -{ - 0x1f, 0x0f, 0x17, 0x1b, 0x1d, 0x1e, 0x1f -}; /* backslash */ - -static const uint8_t g_chrbrack[7] = -{ - 0x1c, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1c -}; /* ] */ - -static const uint8_t g_chcaret[7] = -{ - 0x1b, 0x15, 0x0e, 0x1f, 0x1f, 0x1f, 0x1f -}; /* ^ */ - -static const uint8_t g_chunder[7] = -{ - 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x00 -}; /* _ */ - -static const uint8_t g_chgrave[7] = -{ - 0x1b, 0x1b, 0x1b, 0x1f, 0x1f, 0x1f, 0x1f -}; /* ' */ - -static const uint8_t g_cha[7] = -{ - 0x1f, 0x1f, 0x19, 0x16, 0x16, 0x16, 0x18 -}; /* a */ - -static const uint8_t g_chb[7] = -{ - 0x17, 0x17, 0x11, 0x16, 0x16, 0x16, 0x11 -}; /* b */ - -static const uint8_t g_chc[7] = -{ - 0x1f, 0x1f, 0x19, 0x16, 0x17, 0x16, 0x19 -}; /* c */ - -static const uint8_t g_chd[7] = -{ - 0x1e, 0x1e, 0x18, 0x16, 0x16, 0x16, 0x18 -}; /* d */ - -static const uint8_t g_che[7] = -{ - 0x1f, 0x1f, 0x19, 0x10, 0x17, 0x16, 0x19 -}; /* e */ - -static const uint8_t g_chf[7] = -{ - 0x1d, 0x1a, 0x1b, 0x11, 0x1b, 0x1b, 0x1b -}; /* f */ - -static const uint8_t g_chg[7] = -{ - 0x1f, 0x19, 0x16, 0x16, 0x18, 0x16, 0x19 -}; /* g */ - -static const uint8_t g_chh[7] = -{ - 0x17, 0x17, 0x11, 0x16, 0x16, 0x16, 0x16 -}; /* h */ - -static const uint8_t g_chi[7] = -{ - 0x1f, 0x1f, 0x1b, 0x1f, 0x1b, 0x1b, 0x1b -}; /* i */ - -static const uint8_t g_chj[7] = -{ - 0x1f, 0x1d, 0x1f, 0x1d, 0x1d, 0x1d, 0x13 -}; /* j */ - -static const uint8_t g_chk[7] = -{ - 0x17, 0x17, 0x15, 0x13, 0x13, 0x15, 0x16 -}; /* k */ - -static const uint8_t g_chl[7] = -{ - 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b -}; /* l */ - -static const uint8_t g_chm[7] = -{ - 0x1f, 0x1f, 0x05, 0x0a, 0x0a, 0x0a, 0x0a -}; /* m */ - -static const uint8_t g_chn[7] = -{ - 0x1f, 0x1f, 0x11, 0x16, 0x16, 0x16, 0x16 -}; /* n */ - -static const uint8_t g_cho[7] = -{ - 0x1f, 0x1f, 0x19, 0x16, 0x16, 0x16, 0x19 -}; /* o */ - -static const uint8_t g_chp[7] = -{ - 0x1f, 0x11, 0x16, 0x16, 0x11, 0x17, 0x17 -}; /* p */ - -static const uint8_t g_chq[7] = -{ - 0x1f, 0x18, 0x16, 0x16, 0x18, 0x1e, 0x1e -}; /* q */ - -static const uint8_t g_chr[7] = -{ - 0x1f, 0x1f, 0x11, 0x16, 0x17, 0x17, 0x17 -}; /* r */ - -static const uint8_t g_chs[7] = -{ - 0x1f, 0x1f, 0x18, 0x17, 0x19, 0x1e, 0x11 -}; /* s */ - -static const uint8_t g_cht[7] = -{ - 0x1f, 0x1f, 0x1b, 0x11, 0x1b, 0x1b, 0x1b -}; /* t */ - -static const uint8_t g_chu[7] = -{ - 0x1f, 0x1f, 0x16, 0x16, 0x16, 0x16, 0x18 -}; /* u */ - -static const uint8_t g_chv[7] = -{ - 0x1f, 0x1f, 0x16, 0x16, 0x16, 0x16, 0x19 -}; /* v */ - -static const uint8_t g_chw[7] = -{ - 0x1f, 0x1f, 0x0a, 0x0a, 0x0a, 0x0a, 0x15 -}; /* w */ - -static const uint8_t g_chx[7] = -{ - 0x1f, 0x1f, 0x0e, 0x15, 0x1b, 0x15, 0x0e -}; /* x */ - -static const uint8_t g_chy[7] = -{ - 0x1f, 0x1a, 0x1a, 0x1a, 0x1d, 0x1b, 0x17 -}; /* y */ - -static const uint8_t g_cha[7] = -{ - 0x1f, 0x1f, 0x10, 0x1d, 0x1b, 0x17, 0x10 -}; /* z */ - -static const uint8_t g_chlbrace[7] = -{ - 0x1d, 0x1b, 0x1b, 0x17, 0x1b, 0x1b, 0x1d -}; /* { */ - -static const uint8_t g_chvbar[7] = -{ - 0x1b, 0x1b, 0x1b, 0x1f, 0x1b, 0x1b, 0x1b -}; /* | */ - -static const uint8_t g_chrbrace[7] = -{ - 0x17, 0x1b, 0x1b, 0x1d, 0x1b, 0x1b, 0x17 -}; /* } */ - -static const uint8_t g_chtilde[7] = -{ - 0x1f, 0x1a, 0x15, 0x1f, 0x1f, 0x1f, 0x1f -}; /* ~ */ -#endif - -/* The current and previously selected glyph */ - -static const uint8_t *g_currglyph = g_chspace; -static const uint8_t *g_prevglyph = g_chspace; - -/* Current row and column */ - -static uint8_t g_anodecol = 1; -static uint8_t g_cathoderow = 0; -static int8_t g_intcount = 0; - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: board_autoled_initialize - ****************************************************************************/ - -#ifdef CONFIG_ARCH_LEDS -void board_autoled_initialize(void) -{ - g_currglyph = g_chspace; - g_prevglyph = g_chspace; - g_anodecol = 1; - g_cathoderow = 0; -} - -/**************************************************************************** - * Name: board_autoled_on - ****************************************************************************/ - -void board_autoled_on(int led) -{ - FAR const uint8_t *tmp = g_currglyph; - switch (led) - { - case LED_STARTED: - g_currglyph = g_ch0; - break; - - case LED_HEAPALLOCATE: - g_currglyph = g_ch_up_h; - break; - - case LED_IRQSENABLED: - g_currglyph = g_ch_up_e; - break; - - case LED_STACKCREATED: - g_currglyph = g_ch_up_s; - break; - - case LED_IDLE: - g_currglyph = g_ch_up_r; - break; - - case LED_INIRQ: - g_intcount++; - return; - - case LED_ASSERTION: - g_currglyph = g_ch_up_a; - break; - - case LED_SIGNAL: - g_currglyph = g_ch_up_s; - break; - - case LED_PANIC: - g_currglyph = g_chast; - break; - - default: - return; - } - - g_prevglyph = tmp; -} - -/**************************************************************************** - * Name: board_autoled_off - ****************************************************************************/ - -void board_autoled_off(int led) -{ - if (led == LED_INIRQ) - { - g_intcount--; - } - else if (led == LED_PANIC && g_intcount > 0) - { - g_currglyph = g_ch_up_i; - } - else - { - g_currglyph = g_prevglyph; - } -} - -/**************************************************************************** - * Name: up_timerhook - ****************************************************************************/ - -void up_timerhook(void) -{ - if (g_cathoderow > 6) - { - g_anodecol = 1; - g_cathoderow = 0; - } - - ez80_putmmreg8(g_anodecol, EZ80_LEDANODE); - ez80_putmmreg8(g_currglyph[g_cathoderow], EZ80_LEDCATHODE); - - g_cathoderow++; - g_anodecol = g_anodecol << 1; -} - -#endif /* CONFIG_ARCH_LEDS */ diff --git a/boards/z80/ez80/ez80f910200zco/src/ez80f910200zco.h b/boards/z80/ez80/ez80f910200zco/src/ez80f910200zco.h deleted file mode 100644 index 02906666d1..0000000000 --- a/boards/z80/ez80/ez80f910200zco/src/ez80f910200zco.h +++ /dev/null @@ -1,139 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/ez80f910200zco/src/ez80f910200zco.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __BOARDS_Z80_EZ80_EZ80F910200ZCO_SRC_EZ80F910200ZCO_H -#define __BOARDS_Z80_EZ80_EZ80F910200ZCO_SRC_EZ80F910200ZCO_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -# include -#endif - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Memory map. Board-specific extensions to the basic ez80f91 memory map - * (see arch/z80/src/ez80/ez80f91.h - */ - - /* CS0: 0x000000 256Kb of on-chip flash */ -#define EZ80_OFFCHIPFLASH 0x400000 /* CS0: Off chip flash (Up to 4Mb-256Kb) */ -#define EZ80_LEDGPIOCNTRL 0x800000 /* CS2: (See below) */ -#define EZ80_PLTFMSRAM 0xb80000 /* CS2: Platform SRAM (512Kb) */ -#define EZ80_MODULESRAM 0xc00000 /* CS1: Module SRAM (up to 2Mb) */ - /* 0xffc000 On-chip EMAC SRAM (8Kb) */ - /* 0xffe000 On-chip SRAM (8Kb) */ - -/* LED and port emulation memory register addresses */ - -#define EZ80_LEDANODE 0x800000 /* WR: LED anode/GPIO port output control */ -#define EZ80_GPIOCNTRL EZ80_LEDANODE -#define EZ80_LEDCATHODE 0x800001 /* WR: LED cathode/Modem/Trig */ -#define EZ80_MODEM EZ80_LEDCATHODE -#define EZ80_TRIGGERS EZ80_LEDCATHODE -#define EZ80_GPIODATA 0x800002 /* RD/WR: GPIO data */ - -#define ez80_getmmreg8(a) (*(uint8_t*)(a)) -#define ez80_putmmreg8(v,a) (*(uint8_t*)(a) = (v)) - -/* LED anode/GPIO port output control bit definitions */ - -#define EZ80_ANODECOL1 0x01 -#define EZ80_ANODECOL2 0x02 -#define EZ80_ANODECOL3 0x04 -#define EZ80_ANODECOL4 0x08 -#define EZ80_ANODECOL5 0x10 -#define EZ80_ANODECOL6 0x20 -#define EZ80_ANODECOL7 0x40 -#define EZ80_GPIOOUTPUT 0x80 - -/* LED cathode/Modem/Trig bit definitions */ - -#define EZ80_CATHODEROW5 0x01 -#define EZ80_CATHODEROW4 0x02 -#define EZ80_CATHODEROW3 0x04 -#define EZ80_CATHODEROW2 0x08 -#define EZ80_CATHODEROW1 0x10 -#define EZ80_MODEMRESET 0x20 -#define EZ80_TRIG1 0x40 -#define EZ80_TRIG2 0x80 - -/* GPIO data bit definitions */ - -#define EZ80_GPIOD0 0x01 -#define EZ80_GPIOD1 0x02 -#define EZ80_GPIOD2 0x04 -#define EZ80_GPIOD3 0x08 -#define EZ80_GPIOD4 0x10 -#define EZ80_GPIOD5 0x20 -#define EZ80_GPIOD6 0x40 -#define EZ80_GPIOD7 0x80 - -/* Modem Signals: - * - * DCD: - * The Data Carrier Detect (DCD) signal at D1 indicates that a good carrier - * signal is being received from the remove mode. - * RX: - * The RX signal at D2 indicates that data is received from the modem. - * DTR: - * The Data Terminal Ready (DTR) signal at D3 informs the modem that the PC - * is ready. - * TX: - * The TX signal at D4 indicates that data is transmitted to the modem. - */ - -/* Push buttons: - * - * PB0 SW1 Bit 0 of GPIO Port B - * PB1 SW2 Bit 1 of GPIO Port B - * PB2 SW3 Bit 2 of GPIO Port B - * RESET SW4 - */ - -#define EZ80_PB0_IRQ EZ80_PORTB0_IRQ /* Vector Oxa0 */ -#define EZ80_PB1_IRQ EZ80_PORTB1_IRQ /* Vector Oxa4 */ -#define EZ80_PB2_IRQ EZ80_PORTB2_IRQ /* Vector Oxa8 */ - -/**************************************************************************** - * Public Functions Definitions - ****************************************************************************/ - -#undef EXTERN -#if defined(__cplusplus) -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -#undef EXTERN -#if defined(__cplusplus) -} -#endif - -#endif /* __BOARDS_Z80_EZ80_EZ80F910200ZCO_SRC_EZ80F910200ZCO_H */ diff --git a/boards/z80/ez80/makerlisp/Kconfig b/boards/z80/ez80/makerlisp/Kconfig deleted file mode 100644 index d1790008aa..0000000000 --- a/boards/z80/ez80/makerlisp/Kconfig +++ /dev/null @@ -1,36 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_MAKERLISP - -config MAKERLISP_VGA - bool "VGA Controller attached?" - default n - ---help--- - Select this option if you have an I/O Controller and a VGA vide card - connected. - -config MAKERLISP_COPYTORAM - bool "Copy to RAM" - default n - depends on BOOT_RUNFROMEXTSRAM - ---help--- - This option is available only when running from external SRAM - (CONFIG_BOOT_RUNFROMEXTSRAM). In that case there are two possible - options: (1) The configuration runs entirely out of SRAM and must - be copied into SRAM by a boot loader. Or (2) The configuration - boots out of FLASH, copies itself to SRAM, and runs from SRAM. This - configuration setting selects that latter option. - -config MAKERLISP_SDBOOT - bool "Build SD boot loader" - default n - select EZ80_BOOTLOADER - ---help--- - Select this option only with the boards/makerlisp/sdboot - configuration. This will enable the components needed only by the - boot loader. - -endif # ARCH_BOARD_MAKERLISP diff --git a/boards/z80/ez80/makerlisp/configs/nsh_flash/defconfig b/boards/z80/ez80/makerlisp/configs/nsh_flash/defconfig deleted file mode 100644 index b187d17980..0000000000 --- a/boards/z80/ez80/makerlisp/configs/nsh_flash/defconfig +++ /dev/null @@ -1,52 +0,0 @@ -# -# This file is autogenerated: PLEASE DO NOT EDIT IT. -# -# You can use "make menuconfig" to make any modifications to the installed .config file. -# You can then do "make savedefconfig" to generate a new defconfig file that includes your -# modifications. -# -# CONFIG_MMCSD_HAVE_CARDDETECT is not set -# CONFIG_MMCSD_HAVE_WRITEPROTECT is not set -# CONFIG_MMCSD_MMCSUPPORT is not set -# CONFIG_SPI_CALLBACK is not set -CONFIG_ARCH="z80" -CONFIG_ARCH_BOARD="makerlisp" -CONFIG_ARCH_BOARD_MAKERLISP=y -CONFIG_ARCH_CHIP="ez80" -CONFIG_ARCH_CHIP_EZ80=y -CONFIG_ARCH_CHIP_EZ80F91=y -CONFIG_ARCH_STACKDUMP=y -CONFIG_ARCH_Z80=y -CONFIG_BOARD_LOOPSPERMSEC=1250 -CONFIG_DISABLE_MQUEUE=y -CONFIG_EZ80_RTC=y -CONFIG_EZ80_SPI=y -CONFIG_EZ80_UART0=y -CONFIG_FAT_LCNAMES=y -CONFIG_FAT_LFN=y -CONFIG_FS_FAT=y -CONFIG_FS_PROCFS=y -CONFIG_HOST_WINDOWS=y -CONFIG_INIT_ENTRYPOINT="nsh_main" -CONFIG_LINE_MAX=64 -CONFIG_MMCSD=y -CONFIG_MMCSD_MULTIBLOCK_LIMIT=1 -CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_DISABLE_IFUPDOWN=y -CONFIG_NSH_FILEIOSIZE=512 -CONFIG_NSH_READLINE=y -CONFIG_PREALLOC_TIMERS=4 -CONFIG_PTHREAD_STACK_DEFAULT=1024 -CONFIG_RAM_SIZE=65536 -CONFIG_RR_INTERVAL=200 -CONFIG_RTC_ALARM=y -CONFIG_SCHED_HPWORK=y -CONFIG_SPI=y -CONFIG_START_DAY=16 -CONFIG_START_MONTH=6 -CONFIG_START_YEAR=2019 -CONFIG_SYSTEM_NSH=y -CONFIG_UART0_BITS=0 -CONFIG_UART0_RXBUFSIZE=192 -CONFIG_UART0_SERIAL_CONSOLE=y -CONFIG_UART0_TXBUFSIZE=64 diff --git a/boards/z80/ez80/makerlisp/configs/nsh_flash/nsh.zdsproj b/boards/z80/ez80/makerlisp/configs/nsh_flash/nsh.zdsproj deleted file mode 100644 index 91f7d44b94..0000000000 --- a/boards/z80/ez80/makerlisp/configs/nsh_flash/nsh.zdsproj +++ /dev/null @@ -1,261 +0,0 @@ - -eZ80F91 - - - -..\..\..\nuttx.hex - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/boards/z80/ez80/makerlisp/configs/nsh_flash/nsh.zfpproj b/boards/z80/ez80/makerlisp/configs/nsh_flash/nsh.zfpproj deleted file mode 100644 index b1c0718719..0000000000 --- a/boards/z80/ez80/makerlisp/configs/nsh_flash/nsh.zfpproj +++ /dev/null @@ -1,315 +0,0 @@ - -eZ80F91 - - - -..\..\..\nuttx.hex - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/boards/z80/ez80/makerlisp/configs/nsh_flash/nsh_flash.ztgt b/boards/z80/ez80/makerlisp/configs/nsh_flash/nsh_flash.ztgt deleted file mode 100644 index d314f59bff..0000000000 --- a/boards/z80/ez80/makerlisp/configs/nsh_flash/nsh_flash.ztgt +++ /dev/null @@ -1,69 +0,0 @@ - - - - - true - 1f4 - 8 - 5000000 - - PLL - 50000000 - - - 0 - 140000 - FFFF - true - - - - 200000 - false - 40000 - 13FFFF - - 1 - false - true - - - - - 0 - 8 - 4 - B - - - 0 - 8 - C - 13 - - - 0 - 88 - 20 - 9F - - - 0 - 0 - 0 - 0 - - - - 0 - AF - true - true - false - - 4 - - EZ80F91 - 1.0.1 - 1.00 - diff --git a/boards/z80/ez80/makerlisp/configs/nsh_flash/nsh_ram.ztgt b/boards/z80/ez80/makerlisp/configs/nsh_flash/nsh_ram.ztgt deleted file mode 100644 index 478b8a26d4..0000000000 --- a/boards/z80/ez80/makerlisp/configs/nsh_flash/nsh_ram.ztgt +++ /dev/null @@ -1,69 +0,0 @@ - - - - - true - 1f4 - 8 - 5000000 - - PLL - 50000000 - - - 0 - 100000 - ffff - true - - - - 200000 - false - 000000 - FFFFF - - 1 - false - true - - - - - 0 - 8 - 0 - 7 - - - 0 - 8 - 8 - F - - - 0 - 28 - 20 - 9F - - - 0 - 0 - 0 - 0 - - - - 0 - AF - false - true - false - - 4 - - EZ80F91 - 1.0.1 - 1.00 - diff --git a/boards/z80/ez80/makerlisp/configs/nsh_ram/defconfig b/boards/z80/ez80/makerlisp/configs/nsh_ram/defconfig deleted file mode 100644 index 2bd4be5b45..0000000000 --- a/boards/z80/ez80/makerlisp/configs/nsh_ram/defconfig +++ /dev/null @@ -1,53 +0,0 @@ -# -# This file is autogenerated: PLEASE DO NOT EDIT IT. -# -# You can use "make menuconfig" to make any modifications to the installed .config file. -# You can then do "make savedefconfig" to generate a new defconfig file that includes your -# modifications. -# -# CONFIG_MMCSD_HAVE_CARDDETECT is not set -# CONFIG_MMCSD_HAVE_WRITEPROTECT is not set -# CONFIG_MMCSD_MMCSUPPORT is not set -# CONFIG_SPI_CALLBACK is not set -CONFIG_ARCH="z80" -CONFIG_ARCH_BOARD="makerlisp" -CONFIG_ARCH_BOARD_MAKERLISP=y -CONFIG_ARCH_CHIP="ez80" -CONFIG_ARCH_CHIP_EZ80=y -CONFIG_ARCH_CHIP_EZ80F91=y -CONFIG_ARCH_STACKDUMP=y -CONFIG_ARCH_Z80=y -CONFIG_BOARD_LOOPSPERMSEC=1250 -CONFIG_BOOT_RUNFROMEXTSRAM=y -CONFIG_DISABLE_MQUEUE=y -CONFIG_EZ80_RTC=y -CONFIG_EZ80_SPI=y -CONFIG_EZ80_UART0=y -CONFIG_FAT_LCNAMES=y -CONFIG_FAT_LFN=y -CONFIG_FS_FAT=y -CONFIG_FS_PROCFS=y -CONFIG_HOST_WINDOWS=y -CONFIG_INIT_ENTRYPOINT="nsh_main" -CONFIG_LINE_MAX=64 -CONFIG_MMCSD=y -CONFIG_MMCSD_MULTIBLOCK_LIMIT=1 -CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_DISABLE_IFUPDOWN=y -CONFIG_NSH_FILEIOSIZE=512 -CONFIG_NSH_READLINE=y -CONFIG_PREALLOC_TIMERS=4 -CONFIG_PTHREAD_STACK_DEFAULT=1024 -CONFIG_RAM_SIZE=65536 -CONFIG_RR_INTERVAL=200 -CONFIG_RTC_ALARM=y -CONFIG_SCHED_HPWORK=y -CONFIG_SPI=y -CONFIG_START_DAY=16 -CONFIG_START_MONTH=6 -CONFIG_START_YEAR=2019 -CONFIG_SYSTEM_NSH=y -CONFIG_UART0_BITS=0 -CONFIG_UART0_RXBUFSIZE=192 -CONFIG_UART0_SERIAL_CONSOLE=y -CONFIG_UART0_TXBUFSIZE=64 diff --git a/boards/z80/ez80/makerlisp/configs/nsh_ram/nsh.zdsproj b/boards/z80/ez80/makerlisp/configs/nsh_ram/nsh.zdsproj deleted file mode 100644 index 91f7d44b94..0000000000 --- a/boards/z80/ez80/makerlisp/configs/nsh_ram/nsh.zdsproj +++ /dev/null @@ -1,261 +0,0 @@ - -eZ80F91 - - - -..\..\..\nuttx.hex - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/boards/z80/ez80/makerlisp/configs/nsh_ram/nsh.zfpproj b/boards/z80/ez80/makerlisp/configs/nsh_ram/nsh.zfpproj deleted file mode 100644 index b1c0718719..0000000000 --- a/boards/z80/ez80/makerlisp/configs/nsh_ram/nsh.zfpproj +++ /dev/null @@ -1,315 +0,0 @@ - -eZ80F91 - - - -..\..\..\nuttx.hex - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/boards/z80/ez80/makerlisp/configs/nsh_ram/nsh_flash.ztgt b/boards/z80/ez80/makerlisp/configs/nsh_ram/nsh_flash.ztgt deleted file mode 100644 index d314f59bff..0000000000 --- a/boards/z80/ez80/makerlisp/configs/nsh_ram/nsh_flash.ztgt +++ /dev/null @@ -1,69 +0,0 @@ - - - - - true - 1f4 - 8 - 5000000 - - PLL - 50000000 - - - 0 - 140000 - FFFF - true - - - - 200000 - false - 40000 - 13FFFF - - 1 - false - true - - - - - 0 - 8 - 4 - B - - - 0 - 8 - C - 13 - - - 0 - 88 - 20 - 9F - - - 0 - 0 - 0 - 0 - - - - 0 - AF - true - true - false - - 4 - - EZ80F91 - 1.0.1 - 1.00 - diff --git a/boards/z80/ez80/makerlisp/configs/nsh_ram/nsh_ram.ztgt b/boards/z80/ez80/makerlisp/configs/nsh_ram/nsh_ram.ztgt deleted file mode 100644 index 478b8a26d4..0000000000 --- a/boards/z80/ez80/makerlisp/configs/nsh_ram/nsh_ram.ztgt +++ /dev/null @@ -1,69 +0,0 @@ - - - - - true - 1f4 - 8 - 5000000 - - PLL - 50000000 - - - 0 - 100000 - ffff - true - - - - 200000 - false - 000000 - FFFFF - - 1 - false - true - - - - - 0 - 8 - 0 - 7 - - - 0 - 8 - 8 - F - - - 0 - 28 - 20 - 9F - - - 0 - 0 - 0 - 0 - - - - 0 - AF - false - true - false - - 4 - - EZ80F91 - 1.0.1 - 1.00 - diff --git a/boards/z80/ez80/makerlisp/configs/sdboot/defconfig b/boards/z80/ez80/makerlisp/configs/sdboot/defconfig deleted file mode 100644 index 3fed3c0a73..0000000000 --- a/boards/z80/ez80/makerlisp/configs/sdboot/defconfig +++ /dev/null @@ -1,46 +0,0 @@ -# -# This file is autogenerated: PLEASE DO NOT EDIT IT. -# -# You can use "make menuconfig" to make any modifications to the installed .config file. -# You can then do "make savedefconfig" to generate a new defconfig file that includes your -# modifications. -# -# CONFIG_MMCSD_HAVE_CARDDETECT is not set -# CONFIG_MMCSD_HAVE_WRITEPROTECT is not set -# CONFIG_MMCSD_MMCSUPPORT is not set -# CONFIG_SPI_CALLBACK is not set -CONFIG_ARCH="z80" -CONFIG_ARCH_BOARD="makerlisp" -CONFIG_ARCH_BOARD_MAKERLISP=y -CONFIG_ARCH_CHIP="ez80" -CONFIG_ARCH_CHIP_EZ80=y -CONFIG_ARCH_CHIP_EZ80F91=y -CONFIG_ARCH_STACKDUMP=y -CONFIG_ARCH_Z80=y -CONFIG_BOARD_LOOPSPERMSEC=1250 -CONFIG_DISABLE_MQUEUE=y -CONFIG_EZ80_SPI=y -CONFIG_EZ80_UART0=y -CONFIG_FAT_LCNAMES=y -CONFIG_FAT_LFN=y -CONFIG_FS_FAT=y -CONFIG_HOST_WINDOWS=y -CONFIG_INIT_ENTRYPOINT="sd_main" -CONFIG_LIBC_HEX2BIN=y -CONFIG_MAKERLISP_SDBOOT=y -CONFIG_MMCSD=y -CONFIG_MMCSD_MULTIBLOCK_LIMIT=1 -CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_PREALLOC_TIMERS=4 -CONFIG_PTHREAD_STACK_DEFAULT=1024 -CONFIG_RAM_SIZE=65536 -CONFIG_RR_INTERVAL=200 -CONFIG_SCHED_HPWORK=y -CONFIG_SPI=y -CONFIG_START_DAY=26 -CONFIG_START_MONTH=6 -CONFIG_START_YEAR=2019 -CONFIG_UART0_BITS=0 -CONFIG_UART0_RXBUFSIZE=192 -CONFIG_UART0_SERIAL_CONSOLE=y -CONFIG_UART0_TXBUFSIZE=64 diff --git a/boards/z80/ez80/makerlisp/configs/sdboot/sdboot.zdsproj b/boards/z80/ez80/makerlisp/configs/sdboot/sdboot.zdsproj deleted file mode 100644 index e5129f1e3d..0000000000 --- a/boards/z80/ez80/makerlisp/configs/sdboot/sdboot.zdsproj +++ /dev/null @@ -1,261 +0,0 @@ - -eZ80F91 - - - -..\..\..\nuttx.hex - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/boards/z80/ez80/makerlisp/configs/sdboot/sdboot.zfpproj b/boards/z80/ez80/makerlisp/configs/sdboot/sdboot.zfpproj deleted file mode 100644 index 3a82e2c409..0000000000 --- a/boards/z80/ez80/makerlisp/configs/sdboot/sdboot.zfpproj +++ /dev/null @@ -1,315 +0,0 @@ - -eZ80F91 - - - -..\..\..\nuttx.hex - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/boards/z80/ez80/makerlisp/configs/sdboot/sdboot_flash.ztgt b/boards/z80/ez80/makerlisp/configs/sdboot/sdboot_flash.ztgt deleted file mode 100644 index d314f59bff..0000000000 --- a/boards/z80/ez80/makerlisp/configs/sdboot/sdboot_flash.ztgt +++ /dev/null @@ -1,69 +0,0 @@ - - - - - true - 1f4 - 8 - 5000000 - - PLL - 50000000 - - - 0 - 140000 - FFFF - true - - - - 200000 - false - 40000 - 13FFFF - - 1 - false - true - - - - - 0 - 8 - 4 - B - - - 0 - 8 - C - 13 - - - 0 - 88 - 20 - 9F - - - 0 - 0 - 0 - 0 - - - - 0 - AF - true - true - false - - 4 - - EZ80F91 - 1.0.1 - 1.00 - diff --git a/boards/z80/ez80/makerlisp/configs/sdboot/sdboot_ram.ztgt b/boards/z80/ez80/makerlisp/configs/sdboot/sdboot_ram.ztgt deleted file mode 100644 index 478b8a26d4..0000000000 --- a/boards/z80/ez80/makerlisp/configs/sdboot/sdboot_ram.ztgt +++ /dev/null @@ -1,69 +0,0 @@ - - - - - true - 1f4 - 8 - 5000000 - - PLL - 50000000 - - - 0 - 100000 - ffff - true - - - - 200000 - false - 000000 - FFFFF - - 1 - false - true - - - - - 0 - 8 - 0 - 7 - - - 0 - 8 - 8 - F - - - 0 - 28 - 20 - 9F - - - 0 - 0 - 0 - 0 - - - - 0 - AF - false - true - false - - 4 - - EZ80F91 - 1.0.1 - 1.00 - diff --git a/boards/z80/ez80/makerlisp/include/board.h b/boards/z80/ez80/makerlisp/include/board.h deleted file mode 100644 index e1ffdd7dad..0000000000 --- a/boards/z80/ez80/makerlisp/include/board.h +++ /dev/null @@ -1,93 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/makerlisp/include/board.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __BOARDS_Z80_EZ80_MAKERLISP_INCLUDE_BOARD_H -#define __BOARDS_Z80_EZ80_MAKERLISP_INCLUDE_BOARD_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Clocking - * - * The MakerLisp CPU board has a 5Mhz crystal. This is multiplied by 10 by - * the PLL to obtain a system clock frequency of 50MHz. See the PLL setup - * in scripts/makerlisp.linkcmd. - */ - -#define EZ80_SYS_CLK_FREQ 50000000 - -/* LEDs */ - -/* The D3 GREEN LED is driven by an eZ80 GPI/O pin. However, it has some - * additional properties: - * - * 1. On input, it will be '1' if the I/O expansion board is present. - * 2. Setting it to an output of '0' will generate a system reset. - * 3. Setting it to an output of '1' will not only illuminate the LED - * take the card out of reset and enable power to the SD card slot. - * - * As a consequence, the GREEN LED will not be illuminated if SD card - * support or SPI is disabled. The only effect of CONFIG_ARCH_LEDS is that - * the GREEN LED will turned off in the event of a crash. - */ - -#define LED_STARTED 0 -#define LED_HEAPALLOCATE 0 -#define LED_IRQSENABLED 0 -#define LED_STACKCREATED 0 -#define LED_IDLE 0 -#define LED_INIRQ 0 -#define LED_ASSERTION 0 -#define LED_SIGNAL 0 -#define LED_PANIC 1 - -/* Button definitions - * The MakerLisp CPU board has no on-board buttons that can be sensed by the - * eZ80. - */ - -/**************************************************************************** - * Public Functions Definitions - ****************************************************************************/ - -#undef EXTERN -#if defined(__cplusplus) -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -#undef EXTERN -#if defined(__cplusplus) -} -#endif - -#endif /* __BOARDS_Z80_EZ80_MAKERLISP_INCLUDE_BOARD_H */ diff --git a/boards/z80/ez80/makerlisp/scripts/Make.defs b/boards/z80/ez80/makerlisp/scripts/Make.defs deleted file mode 100644 index a61982f5c1..0000000000 --- a/boards/z80/ez80/makerlisp/scripts/Make.defs +++ /dev/null @@ -1,78 +0,0 @@ -############################################################################ -# boards/z80/ez80/makerlisp/scripts/Make.defs -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -include $(TOPDIR)/.config -include $(TOPDIR)/tools/Config.mk -include $(TOPDIR)/arch/z80/src/ez80/Toolchain.defs -include $(TOPDIR)/tools/zds/Config.mk - -# CFLAGS - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) - ARCHASMINCLUDES = -include:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR) - EARCHASMINCLUDES = -include:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR) - ARCHSTDINCLUDES = -stdinc:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR) -else - ARCHASMINCLUDES = -include:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)' - EARCHASMINCLUDES = -include:'$(ETOPDIR)\include;$(EZDSSTDINCDIR);$(EZDSZILOGINCDIR)' - ARCHSTDINCLUDES = -stdinc:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)' -endif - -# Assembler definitions - -ARCHASMCPUFLAGS = -cpu:$(ARCHCPU) -NOigcase -ARCHASMLIST = -list -NOlistmac -name -pagelen:56 -pagewidth:80 -quiet -ARCHASMWARNINGS = -warn -ARCHASMDEFINES = -define:$(ARCHCPUDEF)=1 -define:$(ARCHFAMILY)=1 -define:__ASSEMBLY__ -AFLAGS := $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMLIST) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION) - -# Compiler definitions - -ARCHCPUFLAGS = -chartype:S -promote -cpu:$(ARCHCPU) -NOgenprintf -NOmodsect \ - -asmsw:" $(ARCHASMCPUFLAGS) $(EARCHASMINCLUDES) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)" -ARCHLIST = -keeplst -NOlist -NOlistinc -keepasm -ARCHWARNINGS = -warn -ARCHDEFINES = -define:$(ARCHCPUDEF) -define:$(ARCHFAMILY) -ARCHINCLUDES = $(ARCHSTDINCLUDES) -CFLAGS := $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHLIST) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) - -CPPDEFINES = -D$(ARCHFAMILY) -D$(ARCHCPUDEF) -D__ASSEMBLY__ -CPPINCLUDES = -I$(TOPDIR)$(DELIM)include -CPPFLAGS := $(CPPDEFINES) $(CPPINCLUDES) - -# Librarian definitions - -ARFLAGS = -quiet -warn - -# Linker definitions - -ifeq ($(CONFIG_BOOT_RUNFROMFLASH),y) - LDSCRIPT = makerlisp_flash.linkcmd -else ifeq ($(CONFIG_MAKERLISP_COPYTORAM),y) - LDSCRIPT = makerlisp_copytoram.linkcmd -else # ifeq ($(CONFIG_BOOT_RUNFROMEXTSRAM),y) - LDSCRIPT = makerlisp_ram.linkcmd -endif - -LINKCMDTEMPLATE = $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) - -MKDEP = $(TOPDIR)$(DELIM)tools$(DELIM)mknulldeps.sh diff --git a/boards/z80/ez80/makerlisp/scripts/makerlisp_copytoram.linkcmd b/boards/z80/ez80/makerlisp/scripts/makerlisp_copytoram.linkcmd deleted file mode 100644 index 07bfab1fa8..0000000000 --- a/boards/z80/ez80/makerlisp/scripts/makerlisp_copytoram.linkcmd +++ /dev/null @@ -1,85 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/makerlisp/scripts/makerlisp_copytoram.linkcmd - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* For configurations booting from flash but otherwise running out of RAM */ - --FORMAT=OMF695,INTEL32 --map -maxhexlen=64 -quiet -warnoverlap -xref -unresolved=fatal --sort NAME=ascending -warn -debug -NOigcase - -RANGE ROM $000000 : $03FFFF -RANGE RAM $040000 : $13FFFF -RANGE EXTIO $000000 : $00FFFF -RANGE INTIO $000000 : $0000FF - -CHANGE TEXT is CODE -CHANGE CODE is RAM -CHANGE STRSECT is CODE -ORDER .RESET,.IVECTS,.STARTUP,CODE,DATA -COPY CODE ROM -COPY DATA ROM - -DEFINE __low_romdata = copy base of DATA -DEFINE __low_data = base of DATA -DEFINE __len_data = length of DATA -DEFINE __low_bss = base of BSS -DEFINE __len_bss = length of BSS -DEFINE __stack = highaddr of RAM + 1 -DEFINE __heaptop = highaddr of RAM -DEFINE __heapbot = top of RAM + 1 -DEFINE __low_romcode = copy base of CODE -DEFINE __low_code = base of CODE -DEFINE __len_code = length of CODE -DEFINE __copy_code_to_ram = 1 -DEFINE __crtl = 1 - -DEFINE __CS0_LBR_INIT_PARAM = $04 -DEFINE __CS0_UBR_INIT_PARAM = $0b -DEFINE __CS0_CTL_INIT_PARAM = $08 -DEFINE __CS0_BMC_INIT_PARAM = $00 -DEFINE __CS1_LBR_INIT_PARAM = $0c -DEFINE __CS1_UBR_INIT_PARAM = $13 -DEFINE __CS1_CTL_INIT_PARAM = $08 -DEFINE __CS1_BMC_INIT_PARAM = $00 -DEFINE __CS2_LBR_INIT_PARAM = $20 -DEFINE __CS2_UBR_INIT_PARAM = $9f -DEFINE __CS2_CTL_INIT_PARAM = $88 -DEFINE __CS2_BMC_INIT_PARAM = $00 -DEFINE __CS3_LBR_INIT_PARAM = $00 -DEFINE __CS3_UBR_INIT_PARAM = $00 -DEFINE __CS3_CTL_INIT_PARAM = $00 -DEFINE __CS3_BMC_INIT_PARAM = $00 -DEFINE __RAM_CTL_INIT_PARAM = $80 -DEFINE __RAM_ADDR_U_INIT_PARAM = $AF -DEFINE __FLASH_CTL_INIT_PARAM = $88 -DEFINE __FLASH_ADDR_U_INIT_PARAM = $00 - -define _SYS_CLK_FREQ = 50000000 - -define _OSC_FREQ = 5000000 -define _SYS_CLK_SRC = 1 -define _OSC_FREQ_MULT = 10 -define __PLL_CTL0_INIT_PARAM = $41 - -define _zsl_g_clock_xdefine = 50000000 - -/* arch/z80/src/Makefile.zdsii will append target, object and library paths below */ diff --git a/boards/z80/ez80/makerlisp/scripts/makerlisp_flash.linkcmd b/boards/z80/ez80/makerlisp/scripts/makerlisp_flash.linkcmd deleted file mode 100644 index 027190430d..0000000000 --- a/boards/z80/ez80/makerlisp/scripts/makerlisp_flash.linkcmd +++ /dev/null @@ -1,84 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/makerlisp/scripts/makerlisp_flash.linkcmd - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* For configurations running entirely out of FLASH */ - --FORMAT=OMF695,INTEL32 --map -maxhexlen=64 -quiet -warnoverlap -xref -unresolved=fatal --sort NAME=ascending -warn -debug -NOigcase - -RANGE ROM $000000 : $03FFFF -RANGE RAM $040000 : $13FFFF -RANGE EXTIO $000000 : $00FFFF -RANGE INTIO $000000 : $0000FF - -CHANGE TEXT is CODE -CHANGE STRSECT is ROM - -ORDER .RESET,.IVECTS,.STARTUP,CODE,DATA -COPY DATA ROM - -DEFINE __low_romdata = copy base of DATA -DEFINE __low_data = base of DATA -DEFINE __len_data = length of DATA -DEFINE __low_bss = base of BSS -DEFINE __len_bss = length of BSS -DEFINE __stack = highaddr of RAM + 1 -DEFINE __heaptop = highaddr of RAM -DEFINE __heapbot = top of RAM + 1 -DEFINE __low_romcode = copy base of CODE -DEFINE __low_code = base of CODE -DEFINE __len_code = length of CODE -DEFINE __copy_code_to_ram = 0 -DEFINE __crtl = 1 - -DEFINE __CS0_LBR_INIT_PARAM = $04 -DEFINE __CS0_UBR_INIT_PARAM = $0b -DEFINE __CS0_CTL_INIT_PARAM = $08 -DEFINE __CS0_BMC_INIT_PARAM = $00 -DEFINE __CS1_LBR_INIT_PARAM = $0c -DEFINE __CS1_UBR_INIT_PARAM = $13 -DEFINE __CS1_CTL_INIT_PARAM = $08 -DEFINE __CS1_BMC_INIT_PARAM = $00 -DEFINE __CS2_LBR_INIT_PARAM = $20 -DEFINE __CS2_UBR_INIT_PARAM = $9f -DEFINE __CS2_CTL_INIT_PARAM = $88 -DEFINE __CS2_BMC_INIT_PARAM = $00 -DEFINE __CS3_LBR_INIT_PARAM = $00 -DEFINE __CS3_UBR_INIT_PARAM = $00 -DEFINE __CS3_CTL_INIT_PARAM = $00 -DEFINE __CS3_BMC_INIT_PARAM = $00 -DEFINE __RAM_CTL_INIT_PARAM = $80 -DEFINE __RAM_ADDR_U_INIT_PARAM = $AF -DEFINE __FLASH_CTL_INIT_PARAM = $88 -DEFINE __FLASH_ADDR_U_INIT_PARAM = $00 - -define _SYS_CLK_FREQ = 50000000 - -define _OSC_FREQ = 5000000 -define _SYS_CLK_SRC = 1 -define _OSC_FREQ_MULT = 10 -define __PLL_CTL0_INIT_PARAM = $41 - -define _zsl_g_clock_xdefine = 50000000 - -/* arch/z80/src/Makefile.zdsii will append target, object and library paths below */ diff --git a/boards/z80/ez80/makerlisp/scripts/makerlisp_flash.ztgt b/boards/z80/ez80/makerlisp/scripts/makerlisp_flash.ztgt deleted file mode 100644 index d314f59bff..0000000000 --- a/boards/z80/ez80/makerlisp/scripts/makerlisp_flash.ztgt +++ /dev/null @@ -1,69 +0,0 @@ - - - - - true - 1f4 - 8 - 5000000 - - PLL - 50000000 - - - 0 - 140000 - FFFF - true - - - - 200000 - false - 40000 - 13FFFF - - 1 - false - true - - - - - 0 - 8 - 4 - B - - - 0 - 8 - C - 13 - - - 0 - 88 - 20 - 9F - - - 0 - 0 - 0 - 0 - - - - 0 - AF - true - true - false - - 4 - - EZ80F91 - 1.0.1 - 1.00 - diff --git a/boards/z80/ez80/makerlisp/scripts/makerlisp_ram.linkcmd b/boards/z80/ez80/makerlisp/scripts/makerlisp_ram.linkcmd deleted file mode 100644 index 0d27c3510a..0000000000 --- a/boards/z80/ez80/makerlisp/scripts/makerlisp_ram.linkcmd +++ /dev/null @@ -1,85 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/makerlisp/scripts/makerlisp_ram.linkcmd - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* For configurations running entirely out of RAM with nothing in FLASH */ - --FORMAT=OMF695,INTEL32 --map -maxhexlen=64 -quiet -warnoverlap -xref -unresolved=fatal --sort NAME=ascending -warn -debug -NOigcase - -RANGE ROM $000000 : $03FFFF -RANGE RAM $040000 : $13FFFF -RANGE EXTIO $000000 : $00FFFF -RANGE INTIO $000000 : $0000FF - -CHANGE .RESET is RAM -CHANGE .STARTUP is RAM -CHANGE TEXT is CODE -CHANGE CODE is RAM -CHANGE STRSECT is CODE -ORDER .RESET,.IVECTS,.STARTUP,CODE,DATA - -DEFINE __low_romdata = copy base of DATA -DEFINE __low_data = base of DATA -DEFINE __len_data = length of DATA -DEFINE __low_bss = base of BSS -DEFINE __len_bss = length of BSS -DEFINE __stack = highaddr of RAM + 1 -DEFINE __heaptop = highaddr of RAM -DEFINE __heapbot = top of RAM + 1 -DEFINE __low_romcode = copy base of CODE -DEFINE __low_code = base of CODE -DEFINE __len_code = length of CODE -DEFINE __copy_code_to_ram = 0 -DEFINE __crtl = 1 - -DEFINE __CS0_LBR_INIT_PARAM = $04 -DEFINE __CS0_UBR_INIT_PARAM = $0b -DEFINE __CS0_CTL_INIT_PARAM = $08 -DEFINE __CS0_BMC_INIT_PARAM = $00 -DEFINE __CS1_LBR_INIT_PARAM = $0c -DEFINE __CS1_UBR_INIT_PARAM = $13 -DEFINE __CS1_CTL_INIT_PARAM = $08 -DEFINE __CS1_BMC_INIT_PARAM = $00 -DEFINE __CS2_LBR_INIT_PARAM = $20 -DEFINE __CS2_UBR_INIT_PARAM = $9f -DEFINE __CS2_CTL_INIT_PARAM = $88 -DEFINE __CS2_BMC_INIT_PARAM = $00 -DEFINE __CS3_LBR_INIT_PARAM = $00 -DEFINE __CS3_UBR_INIT_PARAM = $00 -DEFINE __CS3_CTL_INIT_PARAM = $00 -DEFINE __CS3_BMC_INIT_PARAM = $00 -DEFINE __RAM_CTL_INIT_PARAM = $80 -DEFINE __RAM_ADDR_U_INIT_PARAM = $AF -DEFINE __FLASH_CTL_INIT_PARAM = $88 -DEFINE __FLASH_ADDR_U_INIT_PARAM = $00 - -define _SYS_CLK_FREQ = 50000000 - -define _OSC_FREQ = 5000000 -define _SYS_CLK_SRC = 1 -define _OSC_FREQ_MULT = 10 -define __PLL_CTL0_INIT_PARAM = $41 - -define _zsl_g_clock_xdefine = 50000000 - -/* arch/z80/src/Makefile.zdsii will append target, object and library paths below */ diff --git a/boards/z80/ez80/makerlisp/scripts/makerlisp_ram.ztgt b/boards/z80/ez80/makerlisp/scripts/makerlisp_ram.ztgt deleted file mode 100644 index 478b8a26d4..0000000000 --- a/boards/z80/ez80/makerlisp/scripts/makerlisp_ram.ztgt +++ /dev/null @@ -1,69 +0,0 @@ - - - - - true - 1f4 - 8 - 5000000 - - PLL - 50000000 - - - 0 - 100000 - ffff - true - - - - 200000 - false - 000000 - FFFFF - - 1 - false - true - - - - - 0 - 8 - 0 - 7 - - - 0 - 8 - 8 - F - - - 0 - 28 - 20 - 9F - - - 0 - 0 - 0 - 0 - - - - 0 - AF - false - true - false - - 4 - - EZ80F91 - 1.0.1 - 1.00 - diff --git a/boards/z80/ez80/makerlisp/src/Makefile b/boards/z80/ez80/makerlisp/src/Makefile deleted file mode 100644 index 79a870e8ca..0000000000 --- a/boards/z80/ez80/makerlisp/src/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -############################################################################ -# boards/z80/ez80/makerlisp/src/Makefile -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -include $(TOPDIR)/Make.defs - -CSRCS = ez80_boot.c ez80_bringup.c - -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += ez80_appinit.c -endif - -ifeq ($(CONFIG_ARCH_LEDS),y) -CSRCS += ez80_leds.c -endif - -ifeq ($(CONFIG_EZ80_SPI),y) -CSRCS += ez80_spi.c -ifeq ($(CONFIG_MMCSD_SPI),y) -CSRCS += ez80_spimmcsd.c -endif -endif - -ifeq ($(CONFIG_MAKERLISP_SDBOOT),y) -CSRCS += sd_main.c -endif - -include $(TOPDIR)/boards/Board.mk diff --git a/boards/z80/ez80/makerlisp/src/ez80_appinit.c b/boards/z80/ez80/makerlisp/src/ez80_appinit.c deleted file mode 100644 index 52d1f2ca7c..0000000000 --- a/boards/z80/ez80/makerlisp/src/ez80_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/makerlisp/src/ez80_appinit.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include - -#include "makerlisp.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: board_app_initialize - * - * Description: - * Perform application specific initialization. This function is never - * called directly from application code, but only indirectly via the - * (non-standard) boardctl() interface using the command BOARDIOC_INIT. - * - * Input Parameters: - * arg - The boardctl() argument is passed to the board_app_initialize() - * implementation without modification. The argument has no - * meaning to NuttX; the meaning of the argument is a contract - * between the board-specific initialization logic and the - * matching application logic. The value could be such things as a - * mode enumeration value, a set of DIP switch switch settings, a - * pointer to configuration data read from a file or serial FLASH, - * or whatever you would like to do with it. Every implementation - * should accept zero/NULL as a default configuration. - * - * Returned Value: - * Zero (OK) is returned on success; a negated errno value is returned on - * any failure to indicate the nature of the failure. - * - ****************************************************************************/ - -int board_app_initialize(uintptr_t arg) -{ -#ifdef CONFIG_BOARD_LATE_INITIALIZE - /* Board initialization already performed by board_late_initialize() */ - - return OK; -#else - /* Perform board-specific initialization */ - - return ez80_bringup(); -#endif -} diff --git a/boards/z80/ez80/makerlisp/src/ez80_boot.c b/boards/z80/ez80/makerlisp/src/ez80_boot.c deleted file mode 100644 index 6642dc8ace..0000000000 --- a/boards/z80/ez80/makerlisp/src/ez80_boot.c +++ /dev/null @@ -1,201 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/makerlisp/src/ez80_boot.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include -#include - -#include "chip.h" -#include "z80_internal.h" -#include "makerlisp.h" - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -bool g_ebpresent = false; /* True: I/O Expansion board is present */ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#define VGA_MAX_DELAY 2000000 - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: ez80_vga_initialize - * - * Description: - * If CONFIG_MAKERLISP_VGA is defined and the I/O controller is attached, - * then initialize the VGA interface. - * - ****************************************************************************/ - -#ifdef CONFIG_MAKERLISP_VGA -static void ez80_vga_initialize(void) -{ - /* I/O Expansion board attached? */ - - if (g_ebpresent) - { - bool vgapresent = false; - int delay; - - /* Wait for VGA ready */ - - for (delay = 0; delay < VGA_MAX_DELAY; delay++) - { - if ((inp(EZ80_PB_DR) & EZ80_GPIOD1) != 0) - { - vgapresent = true; - break; - } - } - - /* Is VGA ready (and, hence, present)? */ - - if (vgapresent) - { - /* Yes.. set newline mode, graphic attributes: - * - * \e = ESCAPE character - * Assumption: VGA is on the console UART. - */ - - up_puts("\e[20h\e[0m"); - - /* Clear, home cursor, beep */ - - up_puts("\e[2J\e[H\a"); - - /* The VGA display controller and keyboard controller come up by - * default emulating a terminal with "newline mode" on. The - * following turns off that mode. - */ - - up_puts("\e[20l"); - } - } -} -#endif - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: ez80_board_initialize - * - * Description: - * All eZ80 architectures must provide the following entry point. This - * entry point is called early in the initialization -- after basic CPU - * configuration is complete but before any devices have been initialized. - * - ****************************************************************************/ - -void ez80_board_initialize(void) -{ - register uint8_t regval; - - /* Port B pin 5 is set if the I/O expansion board is present */ - - regval = inp(EZ80_PB_DR); - g_ebpresent = (regval & EZ80_GPIOD5 != 0); - - /* Set Port B pin 5 as output, assert /sysreset, SD card power off */ - - regval &= ~EZ80_GPIOD5; - outp(EZ80_PB_DR, regval); - - regval = inp(EZ80_PB_ALT1); - regval &= ~EZ80_GPIOD5; - outp(EZ80_PB_ALT1, regval); - - regval = inp(EZ80_PB_ALT2); - regval &= ~EZ80_GPIOD5; - outp(EZ80_PB_ALT2, regval); - - regval = inp(EZ80_PB_DDR); - regval &= ~EZ80_GPIOD5; - outp(EZ80_PB_DDR, regval); - -#ifdef CONFIG_EZ80_SPI - /* Initialize SPI chip selects */ - - ez80_spidev_initialize(); -#endif - - /* Leave /sysreset asserted for awhile longer */ - - up_udelay(150); - - /* Take the system out of reset and and turn on SD card power */ - - regval = inp(EZ80_PB_DR); - regval |= EZ80_GPIOD5; - outp(EZ80_PB_DR, regval); - - /* Wait for the SD card to power up */ - - up_udelay(750); - -#ifdef CONFIG_MAKERLISP_VGA - /* Initialize the VGA interface. We want to do this as early as possible - * in the boot-up sequence. Debug output prior initializing VGA will be - * lost. - */ - - ez80_vga_initialize(); -#endif -} - -/**************************************************************************** - * Name: board_late_initialize - * - * Description: - * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional - * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be - * called immediately after up_initialize() is called and just before the - * initial application is started. This additional initialization phase - * may be used, for example, to initialize board-specific device drivers. - * - ****************************************************************************/ - -#ifdef CONFIG_BOARD_LATE_INITIALIZE -void board_late_initialize(void) -{ - /* Perform board-specific initialization */ - - ez80_bringup(); -} -#endif diff --git a/boards/z80/ez80/makerlisp/src/ez80_bringup.c b/boards/z80/ez80/makerlisp/src/ez80_bringup.c deleted file mode 100644 index 46ea929d18..0000000000 --- a/boards/z80/ez80/makerlisp/src/ez80_bringup.c +++ /dev/null @@ -1,80 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/makerlisp/src/ez80_bringup.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include - -#include - -#include "makerlisp.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: ez80_bringup - * - * Description: - * Perform architecture-specific initialization - * - * CONFIG_BOARD_LATE_INITIALIZE=y : - * Called from board_late_initialize(). - * - * CONFIG_BOARD_LATE_INITIALIZE=n && CONFIG_BOARDCTL=y : - * Called from the NSH library - * - ****************************************************************************/ - -int ez80_bringup(void) -{ - int ret = OK; - -#ifdef CONFIG_FS_PROCFS - /* Mount the procfs file system */ - - ret = nx_mount(NULL, "/proc", "procfs", 0, NULL); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret); - } -#endif - -#ifdef HAVE_MMCSD - /* Initialize SPI-based SD card slot */ - - ret = ez80_mmcsd_initialize(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: Failed to initialize SD card: %d\n", ret); - } -#endif - - UNUSED(ret); - return ret; -} diff --git a/boards/z80/ez80/makerlisp/src/ez80_leds.c b/boards/z80/ez80/makerlisp/src/ez80_leds.c deleted file mode 100644 index 34edbd986e..0000000000 --- a/boards/z80/ez80/makerlisp/src/ez80_leds.c +++ /dev/null @@ -1,85 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/makerlisp/src/ez80_leds.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* The D3 GREEN LED is driven by an eZ80 GPI/O pin. However, it has some - * additional properties: - * - * 1. On input, it will be '1' if the I/O expansion board is present. - * 2. Setting it to an output of '0' will generate a system reset. - * 3. Setting it to an output of '1' will not only illuminate the LED - * take the card out of reset and enable power to the SD card slot. - * - * As a consequence, the GREEN LED will not be illuminated if SD card - * support or SPI is disabled. The only effect of CONFIG_ARCH_LEDS is that - * the GREEN LED will turned off in the event of a crash. - */ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include -#include - -#include "z80_internal.h" -#include "makerlisp.h" - -#ifdef CONFIG_ARCH_LEDS - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: board_autoled_initialize - ****************************************************************************/ - -void board_autoled_initialize(void) -{ -} - -/**************************************************************************** - * Name: board_autoled_on - ****************************************************************************/ - -void board_autoled_on(int led) -{ - if (led != 0) /* LED_ASSERTION or LED_PANIC */ - { - /* To be provided */ - } -} - -/**************************************************************************** - * Name: board_autoled_off - ****************************************************************************/ - -void board_autoled_off(int led) -{ - /* Ignored */ -} - -#endif /* CONFIG_ARCH_LEDS */ diff --git a/boards/z80/ez80/makerlisp/src/ez80_spi.c b/boards/z80/ez80/makerlisp/src/ez80_spi.c deleted file mode 100644 index 8146400f0a..0000000000 --- a/boards/z80/ez80/makerlisp/src/ez80_spi.c +++ /dev/null @@ -1,153 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/makerlisp/src/ez80_spi.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#include "chip.h" -#include "z80_internal.h" -#include "ez80_spi.h" -#include "makerlisp.h" - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/* NOTE: We are using a SDCard adapter/module without Card Detect pin! - * Then we don't need to Card Detect callback here. - */ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: ez80_spidev_initialize - * - * Description: - * Called to configure SPI chip select GPIO pins for the MakerLisp board. - * - ****************************************************************************/ - -void ez80_spidev_initialize(void) -{ -#ifdef HAVE_MMCSD - uint8_t regval; - - /* MMC/SD CS: Port B pin 4 as output */ - - regval = inp(EZ80_PB_DR); - regval |= EZ80_GPIOD4; - outp(EZ80_PB_DR, regval); - - regval = inp(EZ80_PB_ALT1); - regval &= ~EZ80_GPIOD4; - outp(EZ80_PB_ALT1, regval); - - regval = inp(EZ80_PB_ALT2); - regval &= ~EZ80_GPIOD4; - outp(EZ80_PB_ALT2, regval); - - regval = inp(EZ80_PB_DDR); - regval &= ~EZ80_GPIOD4; - outp(EZ80_PB_DDR, regval); -#endif -} - -/**************************************************************************** - * The external functions, ez80_spiselect, ez80_spistatus, and - * ez80_spicmddata must be provided by board-specific logic. These are - * implementations of the select, status, and cmddata methods of the SPI - * interface defined by struct spi_ops_s (see include/nuttx/spi/spi.h). All - * other methods (including ez80_spibus_initialize()) are provided by common - * logic. To use this common SPI logic on your board: - * - * 1. Provide ez80_spiselect() and ez80_spistatus() functions in your - * board-specific logic. This function will perform chip selection and - * status operations using GPIOs in the way your board is configured. - * 2. If CONFIG_SPI_CMDDATA is defined in your NuttX configuration, provide - * the ez80_spiscmddata() function in your board-specific logic. This - * function will perform cmd/data selection operations using GPIOs in - * the way your board is configured. - * 3. Add a call to ez80_spibus_initialize() in your low level - * initialization logic - * 4. The handle returned by ez80_spibus_initialize() may then be used to - * bind the SPI driver to higher level logic (e.g., calling - * mmcsd_spislotinitialize(), for example, will bind the SPI driver to - * the SPI MMC/SD driver). - * - ****************************************************************************/ - -void ez80_spiselect(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) -{ -#ifdef HAVE_MMCSD - if (devid == SPIDEV_MMCSD(0)) - { - uint8_t regval; - - /* Set port B pin 4 output */ - - regval = inp(EZ80_PB_DR); - - if (selected) - { - regval &= ~EZ80_GPIOD4; - } - else - { - regval |= EZ80_GPIOD4; - } - - outp(EZ80_PB_DR, regval); - } -#endif -} - -uint8_t ez80_spistatus(FAR struct spi_dev_s *dev, uint32_t devid) -{ - uint8_t status = 0; - -#ifdef HAVE_MMCSD - if (devid == SPIDEV_MMCSD(0)) - { - /* No card detect pin.. Always claim that the card is present in - * slot 0 - */ - - status |= SPI_STATUS_PRESENT; - } -#endif - - return status; -} - -int ez80_spicmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) -{ - return -ENODEV; -} diff --git a/boards/z80/ez80/makerlisp/src/ez80_spimmcsd.c b/boards/z80/ez80/makerlisp/src/ez80_spimmcsd.c deleted file mode 100644 index df1d39e134..0000000000 --- a/boards/z80/ez80/makerlisp/src/ez80_spimmcsd.c +++ /dev/null @@ -1,98 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/makerlisp/src/ez80_spimmcsd.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include -#include -#include - -#include -#include - -#include "chip.h" -#include "ez80_spi.h" -#include "makerlisp.h" - -#ifdef HAVE_MMCSD - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/* NOTES: - * - * 1. We are using a SDCard adapter/module without Card Detect pin! - * Then we don't need to Card Detect callback here. - * 2. Media Change callbacks are not yet implemented in the SPI driver. - */ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: ez80_mmcsd_initialize - * - * Description: - * Initialize SPI-based SD card. - * - ****************************************************************************/ - -int ez80_mmcsd_initialize(void) -{ - struct spi_dev_s *spi; - int ret; - - mcinfo("INFO: Initializing mmcsd card\n"); - - /* Get/initialize the SPI interface */ - - spi = ez80_spibus_initialize(1); - if (spi == NULL) - { - mcerr("ERROR: Failed to initialize SPI\n"); - return -ENODEV; - } - - /* Register the MMC/SD block driver for slot 0 with device minor - * number 0. - */ - - ret = mmcsd_spislotinitialize(0, 0, spi); - if (ret < 0) - { - mcerr("ERROR: Failed to bind SPI to SD slot 0\n"); - return ret; - } - - mcinfo("INFO: mmcsd card has been initialized successfully\n"); - return OK; -} - -#endif /* HAVE_MMCSD */ diff --git a/boards/z80/ez80/makerlisp/src/makerlisp.h b/boards/z80/ez80/makerlisp/src/makerlisp.h deleted file mode 100644 index ae3fe045c5..0000000000 --- a/boards/z80/ez80/makerlisp/src/makerlisp.h +++ /dev/null @@ -1,137 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/makerlisp/src/makerlisp.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __BOARDS_Z80_EZ80_MAKERLISP_SRC_MAKERLISP_H -#define __BOARDS_Z80_EZ80_MAKERLISP_SRC_MAKERLISP_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -# include -#endif - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration */ - -#define HAVE_MMCSD 1 -#if !defined(CONFIG_MMCSD_SPI) || !defined(CONFIG_EZ80_SPI) -# undef HAVE_MMCSD -#endif - -/* Helpers for accessing memory mapped registers */ - -#define ez80_getreg8(a) (*(uint8_t*)(a)) -#define ez80_putreg8(v,a) (*(uint8_t*)(a) = (v)) - -/* Memory map. Board-specific extensions to the basic ez80f91 memory map - * (see arch/z80/src/ez80/ez80f91.h) - * - * - Chip select 0 is for RAM 0 to (512k - 1), starting at address 0x40000 - * (after the flash). - * - Chip select 1 is for 512k to (1M - 1), at address 0xc0000. - * - * All RAM has zero wait states. - */ - -/* LED and port emulation memory register addresses */ - -/* GPIO data bit definitions */ - -#define EZ80_GPIOD0 (1 << 0) -#define EZ80_GPIOD1 (1 << 1) -#define EZ80_GPIOD2 (1 << 2) -#define EZ80_GPIOD3 (1 << 3) -#define EZ80_GPIOD4 (1 << 4) -#define EZ80_GPIOD5 (1 << 5) -#define EZ80_GPIOD6 (1 << 6) -#define EZ80_GPIOD7 (1 << 7) - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -extern bool g_ebpresent; /* True: I/O Expansion board is present */ - -/**************************************************************************** - * Public Functions Definitions - ****************************************************************************/ - -#undef EXTERN -#if defined(__cplusplus) -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -/**************************************************************************** - * Name: ez80_bringup - * - * Description: - * Perform architecture-specific initialization - * - * CONFIG_BOARD_LATE_INITIALIZE=y : - * Called from board_late_initialize(). - * - * CONFIG_BOARD_LATE_INITIALIZE=y && CONFIG_BOARDCTL=y : - * Called from the NSH library - * - ****************************************************************************/ - -int ez80_bringup(void); - -/**************************************************************************** - * Name: ez80_mmcsd_initialize - * - * Description: - * Initialize SPI-based SD card. - * - ****************************************************************************/ - -#ifdef HAVE_MMCSD -int ez80_mmcsd_initialize(void); -#endif - -/**************************************************************************** - * Name: ez80_spidev_initialize - * - * Description: - * Called to configure SPI chip select GPIO pins for the MakerLisp board. - * - ****************************************************************************/ - -#ifdef CONFIG_EZ80_SPI -void ez80_spidev_initialize(void); -#endif - -#undef EXTERN -#if defined(__cplusplus) -} -#endif - -#endif /* __BOARDS_Z80_EZ80_MAKERLISP_SRC_MAKERLISP_H */ diff --git a/boards/z80/ez80/makerlisp/src/sd_main.c b/boards/z80/ez80/makerlisp/src/sd_main.c deleted file mode 100644 index 478201b898..0000000000 --- a/boards/z80/ez80/makerlisp/src/sd_main.c +++ /dev/null @@ -1,155 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/makerlisp/src/sd_main.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "makerlisp.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#define MMCSD_BLOCKDEV "/dev/mmcsd0" -#define MMCSD_MOUNTPT "/mnt/sdcard" -#define MMCSD_HEXFILE "/mnt/sdcard/nuttx.hex" - -#define SRAM_START 0x040000 -#define SRAM_SIZE 0x100000 -#define SRAM_END (SRAM_START + SRAM_SIZE) - -#define SRAM_RESET SRAM_START -#define SRAM_ENTRY ((sram_entry_t)SRAM_START) - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -typedef CODE void (*sram_entry_t)(void); - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: sd_main - * - * Description: - * sd_main is a tiny program that runs in FLASH. sd_main will - * configure SRAM and load an Intel HEX file into SRAM, - * and either start that program or wait for you to break in with the - * debugger. - * - ****************************************************************************/ - -int sd_main(int argc, char *argv[]) -{ - int fd; - int ret; - - /* SRAM was already initialized at boot time, so we are ready to load the - * Intel HEX stream into SRAM. - */ - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board-level initialization. This should include registering - * the MMC/SD block driver at /dev/mmcsd0. - */ - - DEBUGVERIFY(ez80_bringup()); -#endif - - syslog(LOG_INFO, "Loading %s\n", MMCSD_HEXFILE); - - /* Mount the MMC/SD block drivers at /mnt/sdcard */ - - ret = mount(MMCSD_BLOCKDEV, MMCSD_MOUNTPT, "vfat", 0, NULL); - if (ret < 0) - { - int errcode = errno; - syslog(LOG_ERR, "ERROR: Failed to mount filesystem at %s: %d\n", - MMCSD_MOUNTPT, errcode); - goto halt; - } - - /* Open the file /mnt/sdcard/nuttx.hex */ - - fd = open(MMCSD_HEXFILE, O_RDONLY); - if (fd < 0) - { - int errcode = errno; - syslog(LOG_ERR, "ERROR: Failed to mount filesystem at %s: %d\n", - MMCSD_MOUNTPT, errcode); - goto halt_with_mount; - } - - /* Load the HEX image into memory */ - - ret = hex2mem(fd, (uint32_t)SRAM_START, (uint32_t)SRAM_END, 0); - if (ret < 0) - { - /* We failed to load the HEX image */ - - syslog(LOG_ERR, "ERROR: Intel HEX file load failed: %d\n", ret); - goto halt_with_hexfile; - } - - close(fd); - umount(MMCSD_MOUNTPT); - - /* The reset vector should now be present at the beginning of SRAM. - * This assumes that the image was loaded at 0x040000 and that the reset - * vector is the first thing in memory. - */ - - syslog(LOG_INFO, "Starting at %p\n", SRAM_ENTRY); - - /* Interrupts must be disabled through the following. */ - - up_irq_save(); - - /* Then jump into SRAM via the reset vector at 0x040000 */ - - SRAM_ENTRY(); - goto halt; - -halt_with_hexfile: - close(fd); -halt_with_mount: - umount(MMCSD_MOUNTPT); -halt: - for (; ; ); - return 0; /* Will not get here */ -} diff --git a/boards/z80/ez80/z20x/Kconfig b/boards/z80/ez80/z20x/Kconfig deleted file mode 100644 index 9cff492059..0000000000 --- a/boards/z80/ez80/z20x/Kconfig +++ /dev/null @@ -1,83 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_Z20X - -choice - prompt "Build selection" - default Z20X_PROGRAM - -config Z20X_SDBOOT - bool "SD boot loader" - select LIBC_HEX2BIN - select EZ80_BOOTLOADER - depends on EZ80_SPI && MMCSD_SPI - ---help--- - Select this option only with the boards/z20x/sdboot - configuration. This will enable the components needed only by the - boot loader. - -config Z20X_W25BOOT - bool "W25 boot loader" - depends on Z20X_W25_CHARDEV - select LIBC_HEX2BIN - select EZ80_BOOTLOADER - depends on EZ80_SPI && MTD_W25 - ---help--- - Select this option only with the boards/z20x/w25boot - configuration. This will enable the components needed only by the - boot loader. - -config Z20X_PROGRAM - bool "Loadable program" - select EZ80_PROGRAM - ---help--- - Normal program that resides on SD card or in W25 FLASH and is - loaded into RAM by a bootloader. - -config Z20X_STANDALONE - bool "Standalone FLASH progroam" - depends on BOOT_RUNFROMFLASH - ---help--- - Select this option only to build a small program that executes - from z20x FLASH memory. - -config Z20X_COPYTORAM - bool "Copy to RAM" - depends on BOOT_RUNFROMEXTSRAM - ---help--- - This option is available only when running from external SRAM - (CONFIG_BOOT_RUNFROMEXTSRAM). In that case there are two possible - options: (1) The configuration runs entirely out of SRAM and must - be copied into SRAM by a boot loader. Or (2) The configuration - boots out of FLASH, copies itself to SRAM, and runs from SRAM. This - configuration setting selects that latter option. - -endchoice - -config Z20X_W25_PROGSIZE - int "W25 partition size" - default 262144 - range 131072 524288 - depends on Z20X_W25BOOT - ---help--- - This is the size of the partition at the beginning to the W25 - serial FLASH that will be used to hold the boot program. Since - this program must run from SRAM, there would be no purpose int - making this size any larger than the size of the internal SRAM. - -config Z20X_W25_CHARDEV - bool "Character device" - depends on EZ80_SPI && MTD_W25 - select BCH - default y - -config Z20X_W25_MINOR - int "W25 device minor number" - default 0 - range 0 255 - depends on Z20X_W25_CHARDEV - -endif # ARCH_BOARD_Z20X diff --git a/boards/z80/ez80/z20x/configs/hello/defconfig b/boards/z80/ez80/z20x/configs/hello/defconfig deleted file mode 100644 index 1264fd1ee7..0000000000 --- a/boards/z80/ez80/z20x/configs/hello/defconfig +++ /dev/null @@ -1,35 +0,0 @@ -# -# This file is autogenerated: PLEASE DO NOT EDIT IT. -# -# You can use "make menuconfig" to make any modifications to the installed .config file. -# You can then do "make savedefconfig" to generate a new defconfig file that includes your -# modifications. -# -CONFIG_ARCH="z80" -CONFIG_ARCH_BOARD="z20x" -CONFIG_ARCH_BOARD_Z20X=y -CONFIG_ARCH_CHIP="ez80" -CONFIG_ARCH_CHIP_EZ80=y -CONFIG_ARCH_CHIP_EZ80F92=y -CONFIG_ARCH_STACKDUMP=y -CONFIG_ARCH_Z80=y -CONFIG_BOARD_LOOPSPERMSEC=1250 -CONFIG_BOOT_RUNFROMEXTSRAM=y -CONFIG_DISABLE_ENVIRON=y -CONFIG_DISABLE_MQUEUE=y -CONFIG_DISABLE_PTHREAD=y -CONFIG_EXAMPLES_HELLO=y -CONFIG_EZ80_UART1=y -CONFIG_HOST_WINDOWS=y -CONFIG_INIT_ENTRYPOINT="hello_main" -CONFIG_PREALLOC_TIMERS=4 -CONFIG_PTHREAD_STACK_DEFAULT=1024 -CONFIG_RAM_SIZE=65536 -CONFIG_START_DAY=12 -CONFIG_START_MONTH=3 -CONFIG_START_YEAR=2020 -CONFIG_UART1_BAUD=2400 -CONFIG_UART1_BITS=0 -CONFIG_UART1_RXBUFSIZE=64 -CONFIG_UART1_SERIAL_CONSOLE=y -CONFIG_UART1_TXBUFSIZE=64 diff --git a/boards/z80/ez80/z20x/configs/hello/hello.zdsproj b/boards/z80/ez80/z20x/configs/hello/hello.zdsproj deleted file mode 100644 index d0d7c3ce46..0000000000 --- a/boards/z80/ez80/z20x/configs/hello/hello.zdsproj +++ /dev/null @@ -1,260 +0,0 @@ - -eZ80F91 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/boards/z80/ez80/z20x/configs/hello/hello.zfpproj b/boards/z80/ez80/z20x/configs/hello/hello.zfpproj deleted file mode 100644 index 8049fd9332..0000000000 --- a/boards/z80/ez80/z20x/configs/hello/hello.zfpproj +++ /dev/null @@ -1,315 +0,0 @@ - -eZ80F92 - - - -..\..\..\nuttx.hex - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/boards/z80/ez80/z20x/configs/hello/hello_flash.ztgt b/boards/z80/ez80/z20x/configs/hello/hello_flash.ztgt deleted file mode 100644 index b691cd5102..0000000000 --- a/boards/z80/ez80/z20x/configs/hello/hello_flash.ztgt +++ /dev/null @@ -1,69 +0,0 @@ - - - - - true - 1f4 - 8 - 20000000 - - PLL - 20000000 - - - 0 - 140000 - FFFF - true - - - - 200000 - false - 040000 - 0BFFFF - - 1 - false - true - - - - - 0 - 8 - 4 - B - - - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - - - - 0 - AF - true - true - false - - 4 - - EZ80F92 - 1.0.1 - 1.00 - diff --git a/boards/z80/ez80/z20x/configs/hello/hello_ram.ztgt b/boards/z80/ez80/z20x/configs/hello/hello_ram.ztgt deleted file mode 100644 index 8f78f6b941..0000000000 --- a/boards/z80/ez80/z20x/configs/hello/hello_ram.ztgt +++ /dev/null @@ -1,69 +0,0 @@ - - - - - true - 1f4 - 8 - 20000000 - - PLL - 20000000 - - - 0 - 100000 - ffff - true - - - - 200000 - false - 000000 - FFFFF - - 1 - false - true - - - - - 0 - 8 - 0 - 7 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - - - - 0 - AF - false - true - false - - 4 - - EZ80F92 - 1.0.1 - 1.00 - diff --git a/boards/z80/ez80/z20x/configs/nsh/defconfig b/boards/z80/ez80/z20x/configs/nsh/defconfig deleted file mode 100644 index 6d9e70792c..0000000000 --- a/boards/z80/ez80/z20x/configs/nsh/defconfig +++ /dev/null @@ -1,53 +0,0 @@ -# -# This file is autogenerated: PLEASE DO NOT EDIT IT. -# -# You can use "make menuconfig" to make any modifications to the installed .config file. -# You can then do "make savedefconfig" to generate a new defconfig file that includes your -# modifications. -# -# CONFIG_MMCSD_HAVE_CARDDETECT is not set -# CONFIG_MMCSD_HAVE_WRITEPROTECT is not set -# CONFIG_MMCSD_MMCSUPPORT is not set -# CONFIG_SPI_CALLBACK is not set -CONFIG_ARCH="z80" -CONFIG_ARCH_BOARD="z20x" -CONFIG_ARCH_BOARD_Z20X=y -CONFIG_ARCH_CHIP="ez80" -CONFIG_ARCH_CHIP_EZ80=y -CONFIG_ARCH_CHIP_EZ80F92=y -CONFIG_ARCH_STACKDUMP=y -CONFIG_ARCH_Z80=y -CONFIG_BOARD_LOOPSPERMSEC=1250 -CONFIG_BOOT_RUNFROMEXTSRAM=y -CONFIG_DISABLE_MQUEUE=y -CONFIG_EZ80_RTC=y -CONFIG_EZ80_SPI=y -CONFIG_EZ80_UART1=y -CONFIG_FAT_LCNAMES=y -CONFIG_FAT_LFN=y -CONFIG_FS_FAT=y -CONFIG_FS_PROCFS=y -CONFIG_HOST_WINDOWS=y -CONFIG_INIT_ENTRYPOINT="nsh_main" -CONFIG_LINE_MAX=64 -CONFIG_MMCSD=y -CONFIG_MMCSD_MULTIBLOCK_LIMIT=1 -CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_DISABLE_IFUPDOWN=y -CONFIG_NSH_FILEIOSIZE=512 -CONFIG_NSH_READLINE=y -CONFIG_PREALLOC_TIMERS=4 -CONFIG_PTHREAD_STACK_DEFAULT=1024 -CONFIG_RAM_SIZE=65536 -CONFIG_RR_INTERVAL=200 -CONFIG_RTC_ALARM=y -CONFIG_SCHED_HPWORK=y -CONFIG_SPI=y -CONFIG_START_DAY=20 -CONFIG_START_MONTH=2 -CONFIG_START_YEAR=2020 -CONFIG_SYSTEM_NSH=y -CONFIG_UART1_BITS=0 -CONFIG_UART1_RXBUFSIZE=192 -CONFIG_UART1_SERIAL_CONSOLE=y -CONFIG_UART1_TXBUFSIZE=64 diff --git a/boards/z80/ez80/z20x/configs/nsh/nsh.zdsproj b/boards/z80/ez80/z20x/configs/nsh/nsh.zdsproj deleted file mode 100644 index 6e62a160d1..0000000000 --- a/boards/z80/ez80/z20x/configs/nsh/nsh.zdsproj +++ /dev/null @@ -1,261 +0,0 @@ - -eZ80F92 - - - -..\..\..\nuttx.hex - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/boards/z80/ez80/z20x/configs/nsh/nsh.zfpproj b/boards/z80/ez80/z20x/configs/nsh/nsh.zfpproj deleted file mode 100644 index 1340f9599e..0000000000 --- a/boards/z80/ez80/z20x/configs/nsh/nsh.zfpproj +++ /dev/null @@ -1,315 +0,0 @@ - -eZ80F92 - - - -..\..\..\nuttx.hex - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/boards/z80/ez80/z20x/configs/nsh/nsh_flash.ztgt b/boards/z80/ez80/z20x/configs/nsh/nsh_flash.ztgt deleted file mode 100644 index b691cd5102..0000000000 --- a/boards/z80/ez80/z20x/configs/nsh/nsh_flash.ztgt +++ /dev/null @@ -1,69 +0,0 @@ - - - - - true - 1f4 - 8 - 20000000 - - PLL - 20000000 - - - 0 - 140000 - FFFF - true - - - - 200000 - false - 040000 - 0BFFFF - - 1 - false - true - - - - - 0 - 8 - 4 - B - - - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - - - - 0 - AF - true - true - false - - 4 - - EZ80F92 - 1.0.1 - 1.00 - diff --git a/boards/z80/ez80/z20x/configs/nsh/nsh_ram.ztgt b/boards/z80/ez80/z20x/configs/nsh/nsh_ram.ztgt deleted file mode 100644 index 8f78f6b941..0000000000 --- a/boards/z80/ez80/z20x/configs/nsh/nsh_ram.ztgt +++ /dev/null @@ -1,69 +0,0 @@ - - - - - true - 1f4 - 8 - 20000000 - - PLL - 20000000 - - - 0 - 100000 - ffff - true - - - - 200000 - false - 000000 - FFFFF - - 1 - false - true - - - - - 0 - 8 - 0 - 7 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - - - - 0 - AF - false - true - false - - 4 - - EZ80F92 - 1.0.1 - 1.00 - diff --git a/boards/z80/ez80/z20x/configs/sdboot/defconfig b/boards/z80/ez80/z20x/configs/sdboot/defconfig deleted file mode 100644 index 66b7f48a19..0000000000 --- a/boards/z80/ez80/z20x/configs/sdboot/defconfig +++ /dev/null @@ -1,43 +0,0 @@ -# -# This file is autogenerated: PLEASE DO NOT EDIT IT. -# -# You can use "make menuconfig" to make any modifications to the installed .config file. -# You can then do "make savedefconfig" to generate a new defconfig file that includes your -# modifications. -# -# CONFIG_MMCSD_HAVE_CARDDETECT is not set -# CONFIG_MMCSD_HAVE_WRITEPROTECT is not set -# CONFIG_MMCSD_MMCSUPPORT is not set -# CONFIG_SPI_CALLBACK is not set -CONFIG_ARCH="z80" -CONFIG_ARCH_BOARD="z20x" -CONFIG_ARCH_BOARD_Z20X=y -CONFIG_ARCH_CHIP="ez80" -CONFIG_ARCH_CHIP_EZ80=y -CONFIG_ARCH_CHIP_EZ80F92=y -CONFIG_ARCH_STACKDUMP=y -CONFIG_ARCH_Z80=y -CONFIG_BOARD_LOOPSPERMSEC=1250 -CONFIG_DISABLE_MQUEUE=y -CONFIG_EZ80_SPI=y -CONFIG_EZ80_UART1=y -CONFIG_FAT_LCNAMES=y -CONFIG_FAT_LFN=y -CONFIG_FS_FAT=y -CONFIG_HOST_WINDOWS=y -CONFIG_INIT_ENTRYPOINT="sd_main" -CONFIG_MMCSD=y -CONFIG_MMCSD_MULTIBLOCK_LIMIT=1 -CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_PREALLOC_TIMERS=4 -CONFIG_PTHREAD_STACK_DEFAULT=1024 -CONFIG_RAM_SIZE=65536 -CONFIG_SPI=y -CONFIG_START_DAY=20 -CONFIG_START_MONTH=2 -CONFIG_START_YEAR=2020 -CONFIG_UART1_BITS=0 -CONFIG_UART1_RXBUFSIZE=64 -CONFIG_UART1_SERIAL_CONSOLE=y -CONFIG_UART1_TXBUFSIZE=64 -CONFIG_Z20X_SDBOOT=y diff --git a/boards/z80/ez80/z20x/configs/sdboot/sdboot.zdsproj b/boards/z80/ez80/z20x/configs/sdboot/sdboot.zdsproj deleted file mode 100644 index 6013f26ed1..0000000000 --- a/boards/z80/ez80/z20x/configs/sdboot/sdboot.zdsproj +++ /dev/null @@ -1,261 +0,0 @@ - -eZ80F92 - - - -..\..\..\nuttx.hex - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/boards/z80/ez80/z20x/configs/sdboot/sdboot.zfpproj b/boards/z80/ez80/z20x/configs/sdboot/sdboot.zfpproj deleted file mode 100644 index a4f18a4dc1..0000000000 --- a/boards/z80/ez80/z20x/configs/sdboot/sdboot.zfpproj +++ /dev/null @@ -1,315 +0,0 @@ - -eZ80F92 - - - -..\..\..\nuttx.hex - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/boards/z80/ez80/z20x/configs/sdboot/sdboot_flash.ztgt b/boards/z80/ez80/z20x/configs/sdboot/sdboot_flash.ztgt deleted file mode 100644 index b691cd5102..0000000000 --- a/boards/z80/ez80/z20x/configs/sdboot/sdboot_flash.ztgt +++ /dev/null @@ -1,69 +0,0 @@ - - - - - true - 1f4 - 8 - 20000000 - - PLL - 20000000 - - - 0 - 140000 - FFFF - true - - - - 200000 - false - 040000 - 0BFFFF - - 1 - false - true - - - - - 0 - 8 - 4 - B - - - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - - - - 0 - AF - true - true - false - - 4 - - EZ80F92 - 1.0.1 - 1.00 - diff --git a/boards/z80/ez80/z20x/configs/sdboot/sdboot_ram.ztgt b/boards/z80/ez80/z20x/configs/sdboot/sdboot_ram.ztgt deleted file mode 100644 index 8f78f6b941..0000000000 --- a/boards/z80/ez80/z20x/configs/sdboot/sdboot_ram.ztgt +++ /dev/null @@ -1,69 +0,0 @@ - - - - - true - 1f4 - 8 - 20000000 - - PLL - 20000000 - - - 0 - 100000 - ffff - true - - - - 200000 - false - 000000 - FFFFF - - 1 - false - true - - - - - 0 - 8 - 0 - 7 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - - - - 0 - AF - false - true - false - - 4 - - EZ80F92 - 1.0.1 - 1.00 - diff --git a/boards/z80/ez80/z20x/configs/w25boot/defconfig b/boards/z80/ez80/z20x/configs/w25boot/defconfig deleted file mode 100644 index 61be14a398..0000000000 --- a/boards/z80/ez80/z20x/configs/w25boot/defconfig +++ /dev/null @@ -1,36 +0,0 @@ -# -# This file is autogenerated: PLEASE DO NOT EDIT IT. -# -# You can use "make menuconfig" to make any modifications to the installed .config file. -# You can then do "make savedefconfig" to generate a new defconfig file that includes your -# modifications. -# -CONFIG_ARCH="z80" -CONFIG_ARCH_BOARD="z20x" -CONFIG_ARCH_BOARD_Z20X=y -CONFIG_ARCH_CHIP="ez80" -CONFIG_ARCH_CHIP_EZ80=y -CONFIG_ARCH_CHIP_EZ80F92=y -CONFIG_ARCH_STACKDUMP=y -CONFIG_ARCH_Z80=y -CONFIG_BOARD_LOOPSPERMSEC=1250 -CONFIG_DISABLE_ENVIRON=y -CONFIG_DISABLE_MQUEUE=y -CONFIG_DISABLE_PTHREAD=y -CONFIG_EZ80_SPI=y -CONFIG_EZ80_UART1=y -CONFIG_HOST_WINDOWS=y -CONFIG_INIT_ENTRYPOINT="w25_main" -CONFIG_MTD=y -CONFIG_MTD_W25=y -CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_PREALLOC_TIMERS=4 -CONFIG_PTHREAD_STACK_DEFAULT=1024 -CONFIG_RAM_SIZE=65536 -CONFIG_START_MONTH=3 -CONFIG_START_YEAR=2020 -CONFIG_UART1_BAUD=2400 -CONFIG_UART1_BITS=0 -CONFIG_UART1_RXBUFSIZE=4096 -CONFIG_UART1_SERIAL_CONSOLE=y -CONFIG_Z20X_W25BOOT=y diff --git a/boards/z80/ez80/z20x/configs/w25boot/w25boot.zdsproj b/boards/z80/ez80/z20x/configs/w25boot/w25boot.zdsproj deleted file mode 100644 index b649632e45..0000000000 --- a/boards/z80/ez80/z20x/configs/w25boot/w25boot.zdsproj +++ /dev/null @@ -1,261 +0,0 @@ - -eZ80F92 - - - -..\..\..\nuttx.hex - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/boards/z80/ez80/z20x/configs/w25boot/w25boot.zfpproj b/boards/z80/ez80/z20x/configs/w25boot/w25boot.zfpproj deleted file mode 100644 index 602c81cc7e..0000000000 --- a/boards/z80/ez80/z20x/configs/w25boot/w25boot.zfpproj +++ /dev/null @@ -1,315 +0,0 @@ - -eZ80F92 - - - -..\..\..\nuttx.hex - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/boards/z80/ez80/z20x/configs/w25boot/w25boot_flash.ztgt b/boards/z80/ez80/z20x/configs/w25boot/w25boot_flash.ztgt deleted file mode 100644 index b691cd5102..0000000000 --- a/boards/z80/ez80/z20x/configs/w25boot/w25boot_flash.ztgt +++ /dev/null @@ -1,69 +0,0 @@ - - - - - true - 1f4 - 8 - 20000000 - - PLL - 20000000 - - - 0 - 140000 - FFFF - true - - - - 200000 - false - 040000 - 0BFFFF - - 1 - false - true - - - - - 0 - 8 - 4 - B - - - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - - - - 0 - AF - true - true - false - - 4 - - EZ80F92 - 1.0.1 - 1.00 - diff --git a/boards/z80/ez80/z20x/configs/w25boot/w25boot_ram.ztgt b/boards/z80/ez80/z20x/configs/w25boot/w25boot_ram.ztgt deleted file mode 100644 index 8f78f6b941..0000000000 --- a/boards/z80/ez80/z20x/configs/w25boot/w25boot_ram.ztgt +++ /dev/null @@ -1,69 +0,0 @@ - - - - - true - 1f4 - 8 - 20000000 - - PLL - 20000000 - - - 0 - 100000 - ffff - true - - - - 200000 - false - 000000 - FFFFF - - 1 - false - true - - - - - 0 - 8 - 0 - 7 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - - - - 0 - AF - false - true - false - - 4 - - EZ80F92 - 1.0.1 - 1.00 - diff --git a/boards/z80/ez80/z20x/include/board.h b/boards/z80/ez80/z20x/include/board.h deleted file mode 100644 index ba040fb671..0000000000 --- a/boards/z80/ez80/z20x/include/board.h +++ /dev/null @@ -1,93 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/z20x/include/board.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __BOARDS_Z80_EZ80_Z20X_INCLUDE_BOARD_H -#define __BOARDS_Z80_EZ80_Z20X_INCLUDE_BOARD_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Clocking - * - * The z20x CPU board has a 20Mhz crystal. The eZ80F92 has no PLL; the - * system clock frequency is equal to the crystal frequency of 20MHz, the - * maximum for the eZ80F92 part. - */ - -#define EZ80_SYS_CLK_FREQ 20000000 - -/* LEDs */ - -/* The D3 GREEN LED is driven by an eZ80 GPI/O pin. However, it has some - * additional properties: - * - * 1. On input, it will be '1' if the I/O expansion board is present. - * 2. Setting it to an output of '0' will generate a system reset. - * 3. Setting it to an output of '1' will not only illuminate the LED - * take the card out of reset and enable power to the SD card slot. - * - * As a consequence, the GREEN LED will not be illuminated if SD card - * support or SPI is disabled. The only effect of CONFIG_ARCH_LEDS is that - * the GREEN LED will turned off in the event of a crash. - */ - -#define LED_STARTED 0 -#define LED_HEAPALLOCATE 0 -#define LED_IRQSENABLED 0 -#define LED_STACKCREATED 0 -#define LED_IDLE 0 -#define LED_INIRQ 0 -#define LED_ASSERTION 0 -#define LED_SIGNAL 0 -#define LED_PANIC 1 - -/* Button definitions - * The z20x CPU board has no on-board buttons that can be sensed by the - * eZ80. - */ - -/**************************************************************************** - * Public Functions Definitions - ****************************************************************************/ - -#undef EXTERN -#if defined(__cplusplus) -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -#undef EXTERN -#if defined(__cplusplus) -} -#endif - -#endif /* __BOARDS_Z80_EZ80_Z20X_INCLUDE_BOARD_H */ diff --git a/boards/z80/ez80/z20x/scripts/Make.defs b/boards/z80/ez80/z20x/scripts/Make.defs deleted file mode 100644 index 139a4207a0..0000000000 --- a/boards/z80/ez80/z20x/scripts/Make.defs +++ /dev/null @@ -1,87 +0,0 @@ -############################################################################ -# boards/z80/ez80/z20x/scripts/Make.defs -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -include $(TOPDIR)/.config -include $(TOPDIR)/tools/Config.mk -include $(TOPDIR)/arch/z80/src/ez80/Toolchain.defs -include $(TOPDIR)/tools/zds/Config.mk - -# CFLAGS - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) - ARCHASMINCLUDES = -include:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR) - EARCHASMINCLUDES = -include:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR) - ARCHSTDINCLUDES = -stdinc:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR) -else - ARCHASMINCLUDES = -include:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)' - EARCHASMINCLUDES = -include:'$(ETOPDIR)\include;$(EZDSSTDINCDIR);$(EZDSZILOGINCDIR)' - ARCHSTDINCLUDES = -stdinc:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)' -endif - -# Assembler definitions - -ARCHASMCPUFLAGS = -cpu:$(ARCHCPU) -NOigcase -ARCHASMLIST = -list -NOlistmac -name -pagelen:56 -pagewidth:80 -quiet -ARCHASMWARNINGS = -warn -ARCHASMDEFINES = -define:$(ARCHCPUDEF)=1 -define:$(ARCHFAMILY)=1 -define:__ASSEMBLY__ -AFLAGS := $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMLIST) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION) - -# Compiler definitions - -ARCHCPUFLAGS = -chartype:S -promote -cpu:$(ARCHCPU) -NOgenprintf -NOmodsect \ - -asmsw:" $(ARCHASMCPUFLAGS) $(EARCHASMINCLUDES) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)" -ARCHLIST = -keeplst -NOlist -NOlistinc -keepasm -ARCHWARNINGS = -warn -ARCHDEFINES = -define:$(ARCHCPUDEF) -define:$(ARCHFAMILY) -ARCHINCLUDES = $(ARCHSTDINCLUDES) -CFLAGS := $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHLIST) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) - -CPPDEFINES = -D$(ARCHFAMILY) -D$(ARCHCPUDEF) -D__ASSEMBLY__ -CPPINCLUDES = -I$(TOPDIR)$(DELIM)include -CPPFLAGS := $(CPPDEFINES) $(CPPINCLUDES) - -# Librarian definitions - -ARFLAGS = -quiet -warn - -# Linker definitions -# -# Possible configurations -# -# 1. FLASH-resident bootloader (CONFIG_EZ80_BOOTLOADER) -# 2. RAM-resident applications loaded by bootloader (CONFIG_Z20X_PROGRAM) -# 3. FLASH-resident, standalone program (CONFIG_Z20X_STANDALONE) -# 4. FLASH-resident, standalone copy-to-RAM program (CONFIG_Z20X_COPYTORAM) - -ifeq ($(CONFIG_EZ80_BOOTLOADER),y) - LDSCRIPT = z20x_loader.linkcmd -else ifeq ($(CONFIG_Z20X_PROGRAM),y) - LDSCRIPT = z20x_program.linkcmd -else ifeq ($(CONFIG_Z20X_STANDALONE),y) - LDSCRIPT = z20x_flash.linkcmd -else ifeq ($(CONFIG_Z20X_COPYTORAM),y) - LDSCRIPT = z20x_copytoram.linkcmd -endif - -LINKCMDTEMPLATE = $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) - -MKDEP = $(TOPDIR)$(DELIM)tools$(DELIM)mknulldeps.sh diff --git a/boards/z80/ez80/z20x/scripts/z20x_copytoram.linkcmd b/boards/z80/ez80/z20x/scripts/z20x_copytoram.linkcmd deleted file mode 100644 index 439a6865b6..0000000000 --- a/boards/z80/ez80/z20x/scripts/z20x_copytoram.linkcmd +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/z20x/scripts/z20x_copytoram.linkcmd - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* For configurations booting from flash but otherwise running out of RAM */ - --FORMAT=OMF695,INTEL32 --map -maxhexlen=64 -quiet -warnoverlap -xref -unresolved=fatal --sort NAME=ascending -warn -debug -NOigcase - -RANGE ROM $000000 : $01FFFF -RANGE RAM $040000 : $0BFFFF -RANGE EXTIO $000000 : $00FFFF -RANGE INTIO $000000 : $0000FF - -CHANGE CODE is RAM -CHANGE TEXT is CODE -CHANGE STRSECT is CODE - -ORDER .RESET,.IVECTS,.STARTUP,CODE,DATA -COPY CODE ROM -COPY DATA ROM - -DEFINE __low_romdata = copy base of DATA -DEFINE __low_data = base of DATA -DEFINE __len_data = length of DATA -DEFINE __low_bss = base of BSS -DEFINE __len_bss = length of BSS -DEFINE __stack = highaddr of RAM + 1 -DEFINE __heaptop = highaddr of RAM -DEFINE __heapbot = top of RAM + 1 -DEFINE __low_romcode = copy base of CODE -DEFINE __low_code = base of CODE -DEFINE __len_code = length of CODE -DEFINE __copy_code_to_ram = 1 -DEFINE __crtl = 1 - -DEFINE __CS0_LBR_INIT_PARAM = $04 -DEFINE __CS0_UBR_INIT_PARAM = $0b -DEFINE __CS0_CTL_INIT_PARAM = $28 -DEFINE __CS0_BMC_INIT_PARAM = $00 -DEFINE __CS1_LBR_INIT_PARAM = $00 -DEFINE __CS1_UBR_INIT_PARAM = $00 -DEFINE __CS1_CTL_INIT_PARAM = $00 -DEFINE __CS1_BMC_INIT_PARAM = $00 -DEFINE __CS2_LBR_INIT_PARAM = $00 -DEFINE __CS2_UBR_INIT_PARAM = $00 -DEFINE __CS2_CTL_INIT_PARAM = $00 -DEFINE __CS2_BMC_INIT_PARAM = $00 -DEFINE __CS3_LBR_INIT_PARAM = $00 -DEFINE __CS3_UBR_INIT_PARAM = $00 -DEFINE __CS3_CTL_INIT_PARAM = $00 -DEFINE __CS3_BMC_INIT_PARAM = $00 -DEFINE __RAM_CTL_INIT_PARAM = $80 -DEFINE __RAM_ADDR_U_INIT_PARAM = $AF -DEFINE __FLASH_CTL_INIT_PARAM = $28 -DEFINE __FLASH_ADDR_U_INIT_PARAM = $00 - -define _SYS_CLK_FREQ = 20000000 - -/* arch/z80/src/Makefile.zdsii will append target, object and library paths below */ diff --git a/boards/z80/ez80/z20x/scripts/z20x_flash.linkcmd b/boards/z80/ez80/z20x/scripts/z20x_flash.linkcmd deleted file mode 100644 index 1423de8819..0000000000 --- a/boards/z80/ez80/z20x/scripts/z20x_flash.linkcmd +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/z20x/scripts/z20x_flash.linkcmd - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* For configurations running entirely out of FLASH */ - --FORMAT=OMF695,INTEL32 --map -maxhexlen=64 -quiet -warnoverlap -xref -unresolved=fatal --sort NAME=ascending -warn -debug -NOigcase - -RANGE ROM $000000 : $01FFFF -RANGE RAM $040000 : $0BFFFF -RANGE EXTIO $000000 : $00FFFF -RANGE INTIO $000000 : $0000FF - -CHANGE STRSECT is ROM - -ORDER .RESET,.IVECTS,.STARTUP,CODE,DATA -COPY DATA ROM - -DEFINE __low_romdata = copy base of DATA -DEFINE __low_data = base of DATA -DEFINE __len_data = length of DATA -DEFINE __low_bss = base of BSS -DEFINE __len_bss = length of BSS -DEFINE __stack = highaddr of RAM + 1 -DEFINE __heaptop = highaddr of RAM -DEFINE __heapbot = top of RAM + 1 -DEFINE __low_romcode = copy base of CODE -DEFINE __low_code = base of CODE -DEFINE __len_code = length of CODE -DEFINE __copy_code_to_ram = 0 -DEFINE __crtl = 1 - -DEFINE __CS0_LBR_INIT_PARAM = $04 -DEFINE __CS0_UBR_INIT_PARAM = $0b -DEFINE __CS0_CTL_INIT_PARAM = $28 -DEFINE __CS0_BMC_INIT_PARAM = $00 -DEFINE __CS1_LBR_INIT_PARAM = $00 -DEFINE __CS1_UBR_INIT_PARAM = $00 -DEFINE __CS1_CTL_INIT_PARAM = $00 -DEFINE __CS1_BMC_INIT_PARAM = $00 -DEFINE __CS2_LBR_INIT_PARAM = $00 -DEFINE __CS2_UBR_INIT_PARAM = $00 -DEFINE __CS2_CTL_INIT_PARAM = $00 -DEFINE __CS2_BMC_INIT_PARAM = $00 -DEFINE __CS3_LBR_INIT_PARAM = $00 -DEFINE __CS3_UBR_INIT_PARAM = $00 -DEFINE __CS3_CTL_INIT_PARAM = $00 -DEFINE __CS3_BMC_INIT_PARAM = $00 -DEFINE __RAM_CTL_INIT_PARAM = $80 -DEFINE __RAM_ADDR_U_INIT_PARAM = $AF -DEFINE __FLASH_CTL_INIT_PARAM = $28 -DEFINE __FLASH_ADDR_U_INIT_PARAM = $00 - -define _SYS_CLK_FREQ = 20000000 - -/* arch/z80/src/Makefile.zdsii will append target, object and library paths below */ diff --git a/boards/z80/ez80/z20x/scripts/z20x_flash.ztgt b/boards/z80/ez80/z20x/scripts/z20x_flash.ztgt deleted file mode 100644 index b691cd5102..0000000000 --- a/boards/z80/ez80/z20x/scripts/z20x_flash.ztgt +++ /dev/null @@ -1,69 +0,0 @@ - - - - - true - 1f4 - 8 - 20000000 - - PLL - 20000000 - - - 0 - 140000 - FFFF - true - - - - 200000 - false - 040000 - 0BFFFF - - 1 - false - true - - - - - 0 - 8 - 4 - B - - - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - - - - 0 - AF - true - true - false - - 4 - - EZ80F92 - 1.0.1 - 1.00 - diff --git a/boards/z80/ez80/z20x/scripts/z20x_loader.linkcmd b/boards/z80/ez80/z20x/scripts/z20x_loader.linkcmd deleted file mode 100644 index 5554b23578..0000000000 --- a/boards/z80/ez80/z20x/scripts/z20x_loader.linkcmd +++ /dev/null @@ -1,83 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/z20x/scripts/z20x_loader.linkcmd - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* For bootloader configurations running entirely out of FLASH */ - --FORMAT=OMF695,INTEL32 --map -maxhexlen=64 -quiet -warnoverlap -xref -unresolved=fatal --sort NAME=ascending -warn -debug -NOigcase - -RANGE ROM $000000 : $01ffff -RANGE RAM $040200 : $04ffff -RANGE EXTIO $000000 : $00ffff -RANGE INTIO $000000 : $0000ff - -CHANGE STRSECT is ROM - -ORDER .RESET,.IVECTS,.STARTUP,CODE,DATA -COPY DATA ROM - -DEFINE __low_romdata = copy base of DATA -DEFINE __low_data = base of DATA -DEFINE __len_data = length of DATA -DEFINE __low_bss = base of BSS -DEFINE __len_bss = length of BSS -DEFINE __stack = highaddr of RAM + 1 -DEFINE __heaptop = highaddr of RAM -DEFINE __heapbot = top of RAM + 1 -DEFINE __low_romcode = copy base of CODE -DEFINE __low_code = base of CODE -DEFINE __len_code = length of CODE -DEFINE __copy_code_to_ram = 0 -DEFINE __crtl = 1 - -DEFINE __vecstart = $040000 -DEFINE __vecend = $0401ff -DEFINE __loaderstart = $040200 -DEFINE __loaderend = $04ffff -DEFINE __progstart = $050000 -DEFINE __progend = $0bffff - -DEFINE __CS0_LBR_INIT_PARAM = $04 -DEFINE __CS0_UBR_INIT_PARAM = $0b -DEFINE __CS0_CTL_INIT_PARAM = $28 -DEFINE __CS0_BMC_INIT_PARAM = $00 -DEFINE __CS1_LBR_INIT_PARAM = $00 -DEFINE __CS1_UBR_INIT_PARAM = $00 -DEFINE __CS1_CTL_INIT_PARAM = $00 -DEFINE __CS1_BMC_INIT_PARAM = $00 -DEFINE __CS2_LBR_INIT_PARAM = $00 -DEFINE __CS2_UBR_INIT_PARAM = $00 -DEFINE __CS2_CTL_INIT_PARAM = $00 -DEFINE __CS2_BMC_INIT_PARAM = $00 -DEFINE __CS3_LBR_INIT_PARAM = $00 -DEFINE __CS3_UBR_INIT_PARAM = $00 -DEFINE __CS3_CTL_INIT_PARAM = $00 -DEFINE __CS3_BMC_INIT_PARAM = $00 -DEFINE __RAM_CTL_INIT_PARAM = $80 -DEFINE __RAM_ADDR_U_INIT_PARAM = $AF -DEFINE __FLASH_CTL_INIT_PARAM = $28 -DEFINE __FLASH_ADDR_U_INIT_PARAM = $00 - -define _SYS_CLK_FREQ = 20000000 - -/* arch/z80/src/Makefile.zdsii will append target, object and library paths below */ diff --git a/boards/z80/ez80/z20x/scripts/z20x_program.linkcmd b/boards/z80/ez80/z20x/scripts/z20x_program.linkcmd deleted file mode 100644 index 1854460bba..0000000000 --- a/boards/z80/ez80/z20x/scripts/z20x_program.linkcmd +++ /dev/null @@ -1,86 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/z20x/scripts/z20x_program.linkcmd - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* For configurations running entirely out of RAM with nothing in FLASH */ - --FORMAT=OMF695,INTEL32 --map -maxhexlen=64 -quiet -warnoverlap -xref -unresolved=fatal --sort NAME=ascending -warn -debug -NOigcase - -RANGE ROM $000000 : $01ffff -RANGE RAM $050000 : $0bffff -RANGE EXTIO $000000 : $00ffff -RANGE INTIO $000000 : $0000ff - -CHANGE .RESET is RAM -CHANGE .STARTUP is RAM -CHANGE TEXT is CODE -CHANGE CODE is RAM -CHANGE STRSECT is CODE - -ORDER .RESET,.STARTUP,CODE,DATA - -DEFINE __low_romdata = copy base of DATA -DEFINE __low_data = base of DATA -DEFINE __len_data = length of DATA -DEFINE __low_bss = base of BSS -DEFINE __len_bss = length of BSS -DEFINE __stack = highaddr of RAM + 1 -DEFINE __heaptop = highaddr of RAM -DEFINE __heapbot = top of RAM + 1 -DEFINE __low_romcode = copy base of CODE -DEFINE __low_code = base of CODE -DEFINE __len_code = length of CODE -DEFINE __copy_code_to_ram = 0 -DEFINE __crtl = 1 - -DEFINE __vecstart = $040000 -DEFINE __vecend = $0401ff -DEFINE __loaderstart = $040200 -DEFINE __loaderend = $04ffff -DEFINE __progstart = $050000 -DEFINE __progend = $0bffff - -DEFINE __CS0_LBR_INIT_PARAM = $04 -DEFINE __CS0_UBR_INIT_PARAM = $0b -DEFINE __CS0_CTL_INIT_PARAM = $28 -DEFINE __CS0_BMC_INIT_PARAM = $00 -DEFINE __CS1_LBR_INIT_PARAM = $00 -DEFINE __CS1_UBR_INIT_PARAM = $00 -DEFINE __CS1_CTL_INIT_PARAM = $00 -DEFINE __CS1_BMC_INIT_PARAM = $00 -DEFINE __CS2_LBR_INIT_PARAM = $00 -DEFINE __CS2_UBR_INIT_PARAM = $00 -DEFINE __CS2_CTL_INIT_PARAM = $00 -DEFINE __CS2_BMC_INIT_PARAM = $00 -DEFINE __CS3_LBR_INIT_PARAM = $00 -DEFINE __CS3_UBR_INIT_PARAM = $00 -DEFINE __CS3_CTL_INIT_PARAM = $00 -DEFINE __CS3_BMC_INIT_PARAM = $00 -DEFINE __RAM_CTL_INIT_PARAM = $80 -DEFINE __RAM_ADDR_U_INIT_PARAM = $AF -DEFINE __FLASH_CTL_INIT_PARAM = $28 -DEFINE __FLASH_ADDR_U_INIT_PARAM = $00 - -define _SYS_CLK_FREQ = 20000000 - -/* arch/z80/src/Makefile.zdsii will append target, object and library paths below */ diff --git a/boards/z80/ez80/z20x/scripts/z20x_ram.ztgt b/boards/z80/ez80/z20x/scripts/z20x_ram.ztgt deleted file mode 100644 index 8f78f6b941..0000000000 --- a/boards/z80/ez80/z20x/scripts/z20x_ram.ztgt +++ /dev/null @@ -1,69 +0,0 @@ - - - - - true - 1f4 - 8 - 20000000 - - PLL - 20000000 - - - 0 - 100000 - ffff - true - - - - 200000 - false - 000000 - FFFFF - - 1 - false - true - - - - - 0 - 8 - 0 - 7 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - - - - 0 - AF - false - true - false - - 4 - - EZ80F92 - 1.0.1 - 1.00 - diff --git a/boards/z80/ez80/z20x/src/Makefile b/boards/z80/ez80/z20x/src/Makefile deleted file mode 100644 index 8463ef5a75..0000000000 --- a/boards/z80/ez80/z20x/src/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -############################################################################ -# boards/z80/ez80/z20x/src/Makefile -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -include $(TOPDIR)/Make.defs - -CSRCS = ez80_boot.c ez80_bringup.c - -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += ez80_appinit.c -endif - -ifeq ($(CONFIG_EZ80_SPI),y) -CSRCS += ez80_spi.c -ifeq ($(CONFIG_MMCSD_SPI),y) -CSRCS += ez80_spimmcsd.c -endif -endif - -ifeq ($(CONFIG_Z20X_SDBOOT),y) -CSRCS += sd_main.c -else ifeq ($(CONFIG_Z20X_W25BOOT),y) -CSRCS += w25_main.c -endif - -ifeq ($(CONFIG_MTD_W25),y) -CSRCS += ez80_w25.c -endif - -include $(TOPDIR)/boards/Board.mk diff --git a/boards/z80/ez80/z20x/src/ez80_appinit.c b/boards/z80/ez80/z20x/src/ez80_appinit.c deleted file mode 100644 index fb6f7d7da9..0000000000 --- a/boards/z80/ez80/z20x/src/ez80_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/z20x/src/ez80_appinit.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include - -#include "z20x.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: board_app_initialize - * - * Description: - * Perform application specific initialization. This function is never - * called directly from application code, but only indirectly via the - * (non-standard) boardctl() interface using the command BOARDIOC_INIT. - * - * Input Parameters: - * arg - The boardctl() argument is passed to the board_app_initialize() - * implementation without modification. The argument has no - * meaning to NuttX; the meaning of the argument is a contract - * between the board-specific initialization logic and the - * matching application logic. The value could be such things as a - * mode enumeration value, a set of DIP switch switch settings, a - * pointer to configuration data read from a file or serial FLASH, - * or whatever you would like to do with it. Every implementation - * should accept zero/NULL as a default configuration. - * - * Returned Value: - * Zero (OK) is returned on success; a negated errno value is returned on - * any failure to indicate the nature of the failure. - * - ****************************************************************************/ - -int board_app_initialize(uintptr_t arg) -{ -#ifdef CONFIG_BOARD_LATE_INITIALIZE - /* Board initialization already performed by board_late_initialize() */ - - return OK; -#else - /* Perform board-specific initialization */ - - return ez80_bringup(); -#endif -} diff --git a/boards/z80/ez80/z20x/src/ez80_boot.c b/boards/z80/ez80/z20x/src/ez80_boot.c deleted file mode 100644 index f87aab13e9..0000000000 --- a/boards/z80/ez80/z20x/src/ez80_boot.c +++ /dev/null @@ -1,90 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/z20x/src/ez80_boot.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include -#include -#include -#include - -#include "chip.h" -#include "z80_internal.h" -#include "z20x.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: ez80_board_initialize - * - * Description: - * All eZ80 architectures must provide the following entry point. This - * entry point is called early in the initialization -- after basic CPU - * configuration is complete but before any devices have been initialized. - * - ****************************************************************************/ - -void ez80_board_initialize(void) -{ -#ifdef CONFIG_Z20X_PROGRAM - /* Recover memory used by the bootloader */ - - kmm_addregion((FAR void *)PROGSTART, PROGSIZE); -#endif - -#ifdef CONFIG_EZ80_SPI - /* Initialize SPI chip selects */ - - ez80_spidev_initialize(); -#endif -} - -/**************************************************************************** - * Name: board_late_initialize - * - * Description: - * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional - * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will - * be called immediately after up_initialize() is called and just before - * the initial application is started. This additional initialization - * phase may be used, for example, to initialize board-specific device - * drivers. - * - ****************************************************************************/ - -#ifdef CONFIG_BOARD_LATE_INITIALIZE -void board_late_initialize(void) -{ - /* Perform board-specific initialization */ - - ez80_bringup(); -} -#endif diff --git a/boards/z80/ez80/z20x/src/ez80_bringup.c b/boards/z80/ez80/z20x/src/ez80_bringup.c deleted file mode 100644 index 1c87a22db4..0000000000 --- a/boards/z80/ez80/z20x/src/ez80_bringup.c +++ /dev/null @@ -1,93 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/z20x/src/ez80_bringup.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include - -#include - -#include "z20x.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: ez80_bringup - * - * Description: - * Perform architecture-specific initialization - * - * CONFIG_BOARD_LATE_INITIALIZE=y : - * Called from board_late_initialize(). - * - * CONFIG_BOARD_LATE_INITIALIZE=n && CONFIG_BOARDCTL=y : - * Called from the NSH library - * - ****************************************************************************/ - -int ez80_bringup(void) -{ - int ret = OK; - -#ifdef CONFIG_FS_PROCFS - /* Mount the procfs file system */ - - ret = nx_mount(NULL, "/proc", "procfs", 0, NULL); - if (ret < 0) - { - ferr("ERROR: Failed to mount procfs at /proc: %d\n", ret); - return ret; - } -#endif - -#ifdef HAVE_SPIFLASH - /* Initialize and register the W25 FLASH file system. */ - - ret = ez80_w25_initialize(CONFIG_Z20X_W25_MINOR); - if (ret < 0) - { - ferr("ERROR: Failed to initialize W25 minor %d: %d\n", 0, ret); - return ret; - } -#endif - -#ifdef HAVE_MMCSD - /* Initialize SPI-based SD card slot */ - - ret = ez80_mmcsd_initialize(); - if (ret < 0) - { - mcerr("ERROR: Failed to initialize SD card: %d\n", ret); - return ret; - } -#endif - - UNUSED(ret); - return OK; -} diff --git a/boards/z80/ez80/z20x/src/ez80_spi.c b/boards/z80/ez80/z20x/src/ez80_spi.c deleted file mode 100644 index 3579655bde..0000000000 --- a/boards/z80/ez80/z20x/src/ez80_spi.c +++ /dev/null @@ -1,221 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/z20x/src/ez80_spi.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#include "chip.h" -#include "z80_internal.h" -#include "ez80_spi.h" -#include "z20x.h" - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/* NOTE: We are using a SDCard adapter/module without Card Detect pin! - * Then we don't need to Card Detect callback here. - */ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: ez80_spidev_initialize - * - * Description: - * Called to configure SPI chip select GPIO pins for the z20x board. - * - ****************************************************************************/ - -void ez80_spidev_initialize(void) -{ -#if defined(HAVE_SPIFLASH) || defined(HAVE_MMCSD) || defined(HAVE_XPT2046) - uint8_t regval; - uint8_t pins; - - /* SPI Devices on the z20x main board: - * - * W25Q32JV CS: Port PB5 as output - * - * SPI Devices on LCD card: - * - * MMC/SD CS: Port PB2/nSS as output - * XPT2046 CS: PB1/T1_IN as output - * SST25VF016 CS: Pulled high - */ - - pins = 0; -#ifdef HAVE_SPIFLASH - pins |= EZ80_GPIOD5; -#endif -#ifdef HAVE_XPT2046 - pins |= EZ80_GPIOD1; -#endif -#ifdef HAVE_MMCSD - pins |= EZ80_GPIOD2; -#endif - - regval = inp(EZ80_PB_DR); - regval |= pins; - outp(EZ80_PB_DR, regval); - - regval = inp(EZ80_PB_ALT1); - regval &= ~pins; - outp(EZ80_PB_ALT1, regval); - - regval = inp(EZ80_PB_ALT2); - regval &= ~pins; - outp(EZ80_PB_ALT2, regval); - - regval = inp(EZ80_PB_DDR); - regval &= ~pins; - outp(EZ80_PB_DDR, regval); -#endif -} - -/**************************************************************************** - * The external functions, ez80_spiselect, ez80_spistatus, and - * ez80_spicmddata must be provided by board-specific logic. These are - * implementations of the select, status, and cmddata methods of the SPI - * interface defined by struct spi_ops_s (see include/nuttx/spi/spi.h). All - * other methods (including ez80_spibus_initialize()) are provided by common - * logic. To use this common SPI logic on your board: - * - * 1. Provide ez80_spiselect() and ez80_spistatus() functions in your - * board-specific logic. This function will perform chip selection and - * status operations using GPIOs in the way your board is configured. - * 2. If CONFIG_SPI_CMDDATA is defined in your NuttX configuration, provide - * the ez80_spiscmddata() function in your board-specific logic. This - * function will perform cmd/data selection operations using GPIOs in - * the way your board is configured. - * 3. Add a call to ez80_spibus_initialize() in your low level - * initialization logic - * 4. The handle returned by ez80_spibus_initialize() may then be used to - * bind the SPI driver to higher level logic (e.g., calling - * mmcsd_spislotinitialize(), for example, will bind the SPI driver to - * the SPI MMC/SD driver). - * - ****************************************************************************/ - -void ez80_spiselect(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) -{ -#ifdef HAVE_SPIFLASH - if (devid == SPIDEV_FLASH(0)) - { - uint8_t regval; - - /* Set PB5 output */ - - regval = inp(EZ80_PB_DR); - - if (selected) - { - regval &= ~EZ80_GPIOD5; - } - else - { - regval |= EZ80_GPIOD5; - } - - outp(EZ80_PB_DR, regval); - return; - } -#endif - -#ifdef HAVE_XPT2046 - if (devid == SPIDEV_TOUCHSCREEN(0)) - { - uint8_t regval; - - /* Set PB1/T1_IN output */ - - regval = inp(EZ80_PB_DR); - - if (selected) - { - regval &= ~EZ80_GPIOD1; - } - else - { - regval |= EZ80_GPIOD1; - } - - outp(EZ80_PB_DR, regval); - return; - } -#endif - -#ifdef HAVE_MMCSD - if (devid == SPIDEV_MMCSD(0)) - { - uint8_t regval; - - /* Set PB2/nSS output */ - - regval = inp(EZ80_PB_DR); - - if (selected) - { - regval &= ~EZ80_GPIOD2; - } - else - { - regval |= EZ80_GPIOD2; - } - - outp(EZ80_PB_DR, regval); - return; - } -#endif -} - -uint8_t ez80_spistatus(FAR struct spi_dev_s *dev, uint32_t devid) -{ - uint8_t status = 0; - -#ifdef HAVE_MMCSD - if (devid == SPIDEV_MMCSD(0)) - { - /* No card detect pin.. Always claim that the card is present in - * slot 0 - */ - - status |= SPI_STATUS_PRESENT; - } -#endif - - return status; -} - -int ez80_spicmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) -{ - return -ENODEV; -} diff --git a/boards/z80/ez80/z20x/src/ez80_spimmcsd.c b/boards/z80/ez80/z20x/src/ez80_spimmcsd.c deleted file mode 100644 index 79842a80cb..0000000000 --- a/boards/z80/ez80/z20x/src/ez80_spimmcsd.c +++ /dev/null @@ -1,98 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/z20x/src/ez80_spimmcsd.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include -#include -#include - -#include -#include - -#include "chip.h" -#include "ez80_spi.h" -#include "z20x.h" - -#ifdef HAVE_MMCSD - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/* NOTES: - * - * 1. We are using a SDCard adapter/module without Card Detect pin! - * Then we don't need to Card Detect callback here. - * 2. Media Change callbacks are not yet implemented in the SPI driver. - */ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: ez80_mmcsd_initialize - * - * Description: - * Initialize SPI-based SD card. - * - ****************************************************************************/ - -int ez80_mmcsd_initialize(void) -{ - struct spi_dev_s *spi; - int ret; - - mcinfo("INFO: Initializing mmcsd card\n"); - - /* Get/initialize the SPI interface */ - - spi = ez80_spibus_initialize(1); - if (spi == NULL) - { - mcerr("ERROR: Failed to initialize SPI\n"); - return -ENODEV; - } - - /* Register the MMC/SD block driver for - * slot 0 with device minor number 0. - */ - - ret = mmcsd_spislotinitialize(0, 0, spi); - if (ret < 0) - { - mcerr("ERROR: Failed to bind SPI to SD slot 0\n"); - return ret; - } - - mcinfo("INFO: mmcsd card has been initialized successfully\n"); - return OK; -} - -#endif /* HAVE_MMCSD */ diff --git a/boards/z80/ez80/z20x/src/ez80_w25.c b/boards/z80/ez80/z20x/src/ez80_w25.c deleted file mode 100644 index fa01f1da49..0000000000 --- a/boards/z80/ez80/z20x/src/ez80_w25.c +++ /dev/null @@ -1,87 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/z20x/src/ez80_w25.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include "ez80_spi.h" -#include "z20x.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: ez80_w25_initialize - * - * Description: - * Initialize and register the W25 FLASH file system. - * - ****************************************************************************/ - -int ez80_w25_initialize(int minor) -{ - FAR struct spi_dev_s *spi; - FAR struct mtd_dev_s *mtd; - int ret; - - /* Get the SPI port */ - - spi = ez80_spibus_initialize(1); - if (!spi) - { - ferr("ERROR: Failed to initialize SPI port %d\n", 0); - return -ENODEV; - } - - /* Now bind the SPI interface to the W25 SPI FLASH driver */ - - mtd = w25_initialize(spi); - if (!mtd) - { - ferr("ERROR: Failed to bind SPI port %d to the W25 FLASH driver\n", 0); - return -ENODEV; - } - - /* Register the MTD driver */ - - ret = register_mtddriver(W25_DEV, mtd, 0755, NULL); - if (ret < 0) - { - ferr("ERROR: register_mtddriver %s failed: %d\n", W25_DEV, ret); - return ret; - } - - return OK; -} diff --git a/boards/z80/ez80/z20x/src/sd_main.c b/boards/z80/ez80/z20x/src/sd_main.c deleted file mode 100644 index 8cdd02bcb5..0000000000 --- a/boards/z80/ez80/z20x/src/sd_main.c +++ /dev/null @@ -1,150 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/z20x/src/sd_main.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "z20x.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#define MMCSD_BLOCKDEV "/dev/mmcsd0" -#define MMCSD_MOUNTPT "/mnt/sdcard" -#define MMCSD_HEXFILE "/mnt/sdcard/nuttx.hex" - -#define SRAM_ENTRY ((sram_entry_t)PROGSTART) - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -typedef CODE void (*sram_entry_t)(void); - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: sd_main - * - * Description: - * sd_main is a tiny program that runs in FLASH. sd_main will - * configure SRAM and load an Intel HEX file into SRAM, - * and either start that program or wait for you to break in with the - * debugger. - * - ****************************************************************************/ - -int sd_main(int argc, char *argv[]) -{ - int fd; - int ret; - - /* SRAM was already initialized at boot time, so we are ready to load the - * Intel HEX stream into SRAM. - */ - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board-level initialization. This should include registering - * the MMC/SD block driver at /dev/mmcsd0. - */ - - DEBUGVERIFY(ez80_bringup()); -#endif - - syslog(LOG_INFO, "Loading %s\n", MMCSD_HEXFILE); - - /* Mount the MMC/SD block drivers at /mnt/sdcard */ - - ret = mount(MMCSD_BLOCKDEV, MMCSD_MOUNTPT, "vfat", 0, NULL); - if (ret < 0) - { - int errcode = errno; - syslog(LOG_ERR, "ERROR: Failed to mount filesystem at %s: %d\n", - MMCSD_MOUNTPT, errcode); - goto halt; - } - - /* Open the file /mnt/sdcard/nuttx.hex */ - - fd = open(MMCSD_HEXFILE, O_RDONLY); - if (fd < 0) - { - int errcode = errno; - syslog(LOG_ERR, "ERROR: Failed to mount filesystem at %s: %d\n", - MMCSD_MOUNTPT, errcode); - goto halt_with_mount; - } - - /* Load the HEX image into memory */ - - ret = hex2mem(fd, (uint32_t)PROGSTART, (uint32_t)PROGEND, 0); - if (ret < 0) - { - /* We failed to load the HEX image */ - - syslog(LOG_ERR, "ERROR: Intel HEX file load failed: %d\n", ret); - goto halt_with_hexfile; - } - - close(fd); - umount(MMCSD_MOUNTPT); - - /* The reset vector should now be present at the beginning of SRAM. - * This assumes that the image was loaded at 0x040000 and that the reset - * vector is the first thing in memory. - */ - - syslog(LOG_INFO, "Starting at %p\n", SRAM_ENTRY); - - /* Interrupts must be disabled through the following. */ - - up_irq_save(); - - /* Then jump into SRAM via the reset vector at 0x040000 */ - - SRAM_ENTRY(); - goto halt; - -halt_with_hexfile: - close(fd); -halt_with_mount: - umount(MMCSD_MOUNTPT); -halt: - for (; ; ); - return 0; /* Will not get here */ -} diff --git a/boards/z80/ez80/z20x/src/w25_main.c b/boards/z80/ez80/z20x/src/w25_main.c deleted file mode 100644 index e54565c55d..0000000000 --- a/boards/z80/ez80/z20x/src/w25_main.c +++ /dev/null @@ -1,832 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/z20x/src/w25_main.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "z20x.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -#ifndef HAVE_SPIFLASH -# error The W25 Serial FLASH is not available -#endif - -#ifndef CONFIG_Z20X_W25_CHARDEV -# error CONFIG_Z20X_W25_CHARDEV must be selected -#endif - -#if !defined(CONFIG_Z20X_W25_PROGSIZE) || CONFIG_Z20X_W25_PROGSIZE < 128 -# error Large CONFIG_Z20X_W25_PROGSIZE must be selected -#endif - -#define IOBUFFER_SIZE 512 -#define PROG_MAGIC 0xfedbad - -#define SRAM_ENTRY ((sram_entry_t)PROGSTART) - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -typedef CODE void (*sram_entry_t)(void); - -/* This is the header places at the beginning of the binary data in FLASH */ - -struct prog_header_s -{ - uint24_t magic; /* Valid if PROG_MAGIC */ - uint24_t crc; /* Last 24-bits of CRC32 */ - uint24_t len; /* Binary length */ -}; - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: w25_read_hex - * - * Description: - * Read and parse a HEX data stream into RAM. HEX data will be read from - * stdin and written to the program area reserved in RAM, that is, the - * address range from PROGSTART to PROGREND. - * - ****************************************************************************/ - -static int w25_read_hex(FAR uint24_t *len) -{ - struct lib_rawinstream_s rawinstream; - struct lib_memsostream_s memoutstream; - int fd; - int ret; - - /* Open the W25 device for writing */ - - fd = open(W25_DEV, O_WRONLY); - if (fd < 0) - { - ret = -errno; - fprintf(stderr, "ERROR: Failed to open %s: %d\n", W25_DEV, ret); - return ret; - } - - /* Wrap stdin as an IN stream that can get the HEX data over the serial - * port. - */ - - lib_rawinstream(&rawinstream, 0); - - /* Wrap the memory area used to hold the program as a seek-able OUT stream - * in which we can buffer the binary data. - */ - - lib_memsostream(&memoutstream, (FAR char *)PROGSTART, PROGSIZE); - - /* We are ready to load the Intel HEX stream into external SRAM. - * - * Hmm.. With no hardware handshake, there is a possibility of data loss - * to overrunning incoming data buffer. So far I have not seen this at - * 115200 8N1, but still it is a possibility. - */ - - printf("Send Intel HEX file now\n"); - fflush(stdout); - - ret = hex2bin(&rawinstream.common, &memoutstream.common, - (uint32_t)PROGSTART, (uint32_t)(PROGSTART + PROGSIZE), - 0); - - close(fd); - if (ret < 0) - { - /* We failed the load */ - - fprintf(stderr, "ERROR: Intel HEX file load failed: %d\n", ret); - return ret; - } - - printf("Intel HEX file into memory loaded into RAM...\n"); - fflush(stdout); - - *len = memoutstream.common.nput; - return OK; -} - -/**************************************************************************** - * Name: w25_write - * - * Description: - * Write to the open file descriptor, handling failures and repeated - * write operations as necessary. - * - ****************************************************************************/ - -static int w25_write(int fd, FAR const void *src, size_t len) -{ - ssize_t remaining = len; - ssize_t nwritten; - - do - { - nwritten = write(fd, src, remaining); - if (nwritten <= 0) - { - int errcode = errno; - if (errno != EINTR) - { - fprintf(stderr, "ERROR: Write failed: %d\n", errcode); - return -errcode; - } - } - else - { - remaining -= nwritten; - src += nwritten; - } - } - while (remaining > 0); - - return OK; -} - -/**************************************************************************** - * Name: w25_write_binary - * - * Description: - * Write a program header followed by the binary data beginning at address - * PROGSTART into the first partition of the w25 FLASH memory. - * - ****************************************************************************/ - -static int w25_write_binary(FAR const struct prog_header_s *hdr) -{ - int fd; - int ret; - - /* Open the W25 device for writing */ - - fd = open(W25_DEV, O_WRONLY); - if (fd < 0) - { - ret = -errno; - fprintf(stderr, "ERROR: Failed to open %s: %d\n", W25_DEV, ret); - return ret; - } - - /* Write the header to the W25 */ - - ret = w25_write(fd, hdr, sizeof(struct prog_header_s)); - if (ret < 0) - { - fprintf(stderr, "ERROR: Failed write program header: %d\n", ret); - goto errout; - } - - printf("Writing %lu bytes to the W25 Serial FLASH\n", - (unsigned long)hdr->len); - fflush(stdout); - - ret = w25_write(fd, (FAR const void *)PROGSTART, hdr->len); - if (ret < 0) - { - fprintf(stderr, "ERROR: Failed write program header: %d\n", ret); - } - -errout: - close(fd); - return ret; -} - -/**************************************************************************** - * Name: w25_read - * - * Description: - * Read from the open file descriptor, handling errors as retries as - * necessary. - * - ****************************************************************************/ - -static int w25_read(int fd, FAR void *dest, size_t len) -{ - ssize_t remaining = len; - ssize_t nread; - - do - { - nread = read(fd, dest, remaining); - if (nread <= 0) - { - int errcode = errno; - if (errno != EINTR) - { - fprintf(stderr, "ERROR: Read failed: %d\n", errcode); - close(fd); - return -errcode; - } - } - - remaining -= nread; - dest += nread; - } - while (remaining > 0); - - return OK; -} - -/**************************************************************************** - * Name: w25_read_binary - * - * Description: - * Read the program in the first partition of the W25 part into memory - * at PROGSTART. - * - ****************************************************************************/ - -static int w25_read_binary(FAR struct prog_header_s *hdr) -{ - int fd; - int ret; - - /* Open the W25 device for reading */ - - fd = open(W25_DEV, O_RDONLY); - if (fd < 0) - { - ret = -errno; - return ret; - } - - /* Read the header at the beginning of the partition */ - - ret = w25_read(fd, hdr, sizeof(struct prog_header_s)); - if (ret < 0) - { - fprintf(stderr, "ERROR: Failed read program header: %d\n", ret); - goto errout; - } - - /* Check for a valid program header */ - - /* A valid program should have a MAGIC number */ - - if (hdr->magic != PROG_MAGIC) - { - ret = -ENOENT; - goto errout; - } - - /* A valid program should fit in RAM */ - - if (hdr->len >= PROGSIZE) - { - fprintf(stderr, "ERROR: Program too big\n"); - ret = -E2BIG; - goto errout; - } - - /* Read the program binary. A valid program should also have a matching - * CRC after loaded to memory. - */ - - printf("Reading %lu bytes from the W25 Serial FLASH\n", - (unsigned long)hdr->len); - fflush(stdout); - - ret = w25_read(fd, (FAR void *)PROGSTART, hdr->len); - if (ret < 0) - { - fprintf(stderr, "ERROR: Failed read program header: %d\n", ret); - } - -errout: - close(fd); - return ret; -} - -/**************************************************************************** - * Name: w25_crc24 - * - * Description: - * Calculate a CRC24 checksum on the data loaded into memory starting at - * PROGSTART. - * - ****************************************************************************/ - -static uint24_t w25_crc24(uint24_t len) -{ -#if 0 /* Very slow */ - FAR const uint8_t *src = (FAR const uint8_t *)PROGSTART; - uint32_t crc = 0; - uint24_t i; - int j; - - /* Loop for each byte in the binary image */ - - for (i = 0; i < len; i++) - { - uint8_t val = *src++; - crc ^= (uint32_t)val << 16; - - /* Loop for each bit in each byte */ - - for (j = 0; j < 8; j++) - { - crc <<= 1; - if ((crc & 0x1000000) != 0) - { - crc ^= 0x1864cfb; - } - } - } - - return (uint24_t)crc; -#else - FAR const uint24_t *src = (FAR const uint24_t *)PROGSTART; - uint24_t chksum = 0; - uint24_t remaining; - - /* Loop for each uint24_t in the binary image */ - - for (remaining = len; - remaining >= sizeof(uint24_t); - remaining -= sizeof(uint24_t)) - { - uint24_t val = *src++; - - /* Simple checksum */ - - chksum += val; - } - - /* Handle trailing partial uint24_t's (assumes little endian) */ - - if (remaining > 0) - { - uint24_t val = *src; - - switch (remaining) - { - case 1: - val &= 0x0000ff; - break; - - case 2: - val &= 0x00ffff; - break; - - default: /* Shouldn't happen */ - val = 0; - break; - } - - /* Simple checksum */ - - chksum += val; - } - - return chksum; -#endif -} - -/**************************************************************************** - * Name: w25_read_verify - * - * Description: - * Verify that the program in the first partition of the W25 part matches - * the program in memory at address PROGSTART. - * - ****************************************************************************/ - -static int w25_read_verify(void) -{ - struct prog_header_s hdr; - uint24_t crc; - int fd; - int ret; - - /* Read the program image into memory */ - - ret = w25_read_binary(&hdr); - if (ret < 0) - { - return ret; - } - - printf("Verifying %lu bytes in RAM\n", (unsigned long)hdr.len); - fflush(stdout); - - /* Compare CRCs */ - - crc = w25_crc24(hdr.len); - if (crc == hdr.crc) - { - printf("Successfully verified %lu bytes\n", (unsigned long)hdr.len); - } - else - { - fprintf(stderr, "ERROR: CRC check failed\n"); - return -EINVAL; - } - - return OK; -} - -/**************************************************************************** - * Name: w25_write_program - * - * Description: - * Read the HEX program from serial and write to FLASH. - * - ****************************************************************************/ - -static int w25_write_program(void) -{ - struct prog_header_s hdr; - int ret; - - /* Read the HEX data into RAM */ - - memset(&hdr, 0, sizeof(struct prog_header_s)); - hdr.magic = PROG_MAGIC; - - ret = w25_read_hex(&hdr.len); - if (ret < 0) - { - fprintf(stderr, "ERROR: Failed to load HEX: %d\n", ret); - return ret; - } - - /* Calculate a CRC24 checksum */ - - hdr.crc = w25_crc24(hdr.len); - - /* The HEX file load was successful, write the data to FLASH */ - - ret = w25_write_binary(&hdr); - if (ret < 0) - { - fprintf(stderr, "ERROR: Failed to write to W25: %d\n", ret); - return ret; - } - - /* Now verify that the image in memory and the image in FLASH are - * truly the same. - */ - - ret = w25_read_verify(); - if (ret < 0) - { - fprintf(stderr, "ERROR: Failed to verify program: %d\n", ret); - } - - return ret; -} - -/**************************************************************************** - * Name: w25_boot_program - * - * Description: - * Load the program binary from FLASH and execute it - * - ****************************************************************************/ - -static int w25_boot_program(void) -{ - int ret; - - printf("Booting...\n"); - fflush(stdout); - - /* Load the program into memory and verify it. */ - - ret = w25_read_verify(); - if (ret < 0) - { - fprintf(stderr, "ERROR: Failed to verify program: %d\n", ret); - return ret; - } - - /* Drain all pending Tx output in stdout. "Booting..." message will be - * lost if the outgoing Tx bytes are not drained. - */ - - ret = tcdrain(1); - if (ret < 0) - { - ret = -errno; - fprintf(stderr, "ERROR: tcdrain() failed: %d\n", ret); - return ret; - } - - /* Start the successfully loaded program */ - - SRAM_ENTRY(); - return ret; /* Should not get here */ -} - -/**************************************************************************** - * Name: w25_wait_keypress - * - * Description: - * Wait the specified number of seconds on or until one of the specified - * keys is pressed. - * - ****************************************************************************/ - -static int w25_wait_keypress(FAR char *keyset, int nseconds) -{ - char ch = '\0'; - ssize_t nread; - int count = 0; - int oflags; - int ret; - int fd; - int i; - int j; - - /* Duplicate the file descriptor associated with stdin. */ - - fd = dup(0); - if (fd < 0) - { - ret = -errno; - fprintf(stderr, "ERROR: Failed to dup stdin: %d\n", ret); - return ret; - } - - /* Make the duplicated file descriptor non-blocking. */ - - ret = fcntl(fd, F_GETFL, 0); - if (ret >= 0) - { - ret = fcntl(fd, F_SETFL, ret | O_NONBLOCK); - } - - if (ret < 0) - { - ret = -errno; - fprintf(stderr, "ERROR: fcnt() failed: %d\n", ret); - close(fd) ; - return ret; - } - - /* Loop for the requested number of seconds */ - - for (i = 0; i < nseconds; i++) - { - /* Check for input every 50 milliseconds */ - - for (j = 0; j < 20; j++) - { - char tmpch; - - /* Read handling retries. - * We get out of this loop if a key is press. - */ - - for (; ; ) - { - /* Read one character */ - - nread = read(fd, &tmpch, 1); - - /* Check for errors */ - - if (nread < 0) - { - int errcode = errno; - - /* If is not an error if a signal occurred or if there is - * no key pressed. - */ - - if (errcode == EAGAIN) - { - /* If no key is pressed, then break out of this inner - * loop, delay, and read again. - */ - - break; - } - - /* If we were awakened by a signal, then loop and read - * again immediately. - */ - - if (errcode != EINTR) - { - /* Punt on all other errors */ - - fprintf(stderr, "ERROR: Read from stdin failed: %d\n", - errcode); - return -errcode; - } - } - else if (nread != 1) - { - /* This should never happen */ - - fprintf(stderr, "ERROR: Bad read size: %d\n", (int)nread); - return -EIO; - } - - /* A key was pressed. Is it one we care about? */ - - else if (strchr(keyset, tmpch) != NULL) - { - /* Yes, return the key */ - - ch = tmpch; - goto errout; - } - else - { - /* No... delay and try again */ - - break; - } - } - - /* Delay 50 Milliseconds */ - - nxsig_usleep(50 * 1000); - - /* Output a dot to stdout every 10 * 50 = 500 milliseconds */ - - if (++count == 10) - { - putchar('.'); - fflush(stdout); - count = 0; - } - } - } - -errout: - close(fd); - putchar('\n'); - return ch; -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: w25_main - * - * Description: - * w25_main is a tiny program that runs in ISRAM. w25_main will - * configure DRAM and the W25 serial FLASH, present a prompt, and load - * an Intel HEX file into the W25 serial FLASH (after first buffering - * the binary data into memory). On re-boot, the program loaded into - * the W25 FLASH should then execute. - * - * On entry: - * - SDRAM has already been initialized (we are using it for .bss!) - * - SPI0 chip select has already been configured. - * - ****************************************************************************/ - -int w25_main(int argc, char *argv[]) -{ - bool disable = false; - int ret; - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Initialize the board. We can do this with a direct call because we are - * a kernel thread. - */ - - ret = ez80_bringup(); - if (ret < 0) - { - fprintf(stderr, "ERROR: Failed initialize system: %d\n", ret); - return EXIT_FAILURE; - } -#endif - - /* Verify the program in FLASH. */ - - ret = w25_read_verify(); - if (ret < 0) - { - printf("No valid program in FLASH: %d\n", ret); - disable = true; - } - - /* Now loop, providing the user with options to load a new program into - * FLASH or to boot from an existing program in FLASH. - */ - - for (; ; ) - { - /* Disable booting if there is nothing valid in the FLASH */ - - if (disable) - { - ret = w25_write_program(); - if (ret >= 0) - { - /* There is now a valid program in FLASH */ - - disable = false; - } - } - - /* Both booting from FLASH and loading to flash are possible */ - - else - { - /* Wait up to 5 seconds for (L)oad or (B) keys. */ - - printf("[L]oad [B]oot\n"); - fflush(stdout); - - ret = w25_wait_keypress("LlBb", 5); - if (ret < 0) - { - return EXIT_FAILURE; - } - - /* Load HEX command */ - - else if (ret == 'L' || ret == 'l') - { - ret = w25_write_program(); - if (ret < 0) - { - /* Assume that the program in FLASH has been corrupted. */ - - disable = true; - } - } - - /* Boot from FLASH or timeout */ - - else /* if (ret == 'B' || ret == 'b' || ret == 0) */ - { - /* REVISIT: The program is probably already in RAM. We may - * not have to reload and verify it. - */ - - ret = w25_boot_program(); - - /* Shouldn't get here unless the FLASH content is bad */ - - UNUSED(ret); - disable = true; - } - } - - /* Check for a failure */ - - if (ret < 0) - { - fprintf(stderr, "ERROR: Operation failed: %d\n", ret); - } - } - - return EXIT_SUCCESS; -} diff --git a/boards/z80/ez80/z20x/src/z20x.h b/boards/z80/ez80/z20x/src/z20x.h deleted file mode 100644 index 8c7c1ae83e..0000000000 --- a/boards/z80/ez80/z20x/src/z20x.h +++ /dev/null @@ -1,229 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/z20x/src/z20x.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __BOARDS_Z80_EZ80_Z20X_SRC_Z20X_H -#define __BOARDS_Z80_EZ80_Z20X_SRC_Z20X_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -# include -#endif - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration */ - -#define HAVE_SPIFLASH 1 -#define HAVE_MMCSD 1 -#define HAVE_XPT2046 1 - -#if !defined(CONFIG_MTD_W25) || !defined(CONFIG_EZ80_SPI) -# undef HAVE_SPIFLASH -#endif - -#if !defined(CONFIG_MMCSD_SPI) || !defined(CONFIG_EZ80_SPI) -# undef HAVE_MMCSD -#endif - -#if !defined(CONFIG_INPUT_ADS7843E) || !defined(CONFIG_EZ80_SPI) -# undef HAVE_XPT2046 -#endif - -/* Helpers for accessing memory mapped registers */ - -#define ez80_getreg8(a) (*(volatile uint8_t *)(a)) -#define ez80_putreg8(v,a) (*(volatile uint8_t *)(a) = (v)) - -/* Memory map. Board-specific extensions to the basic ez80f91 memory map - * (see arch/z80/src/ez80/ez80f91.h) - * - * 00 0000 - 01 ffff - 128Kb FLASH - * 02 0000 - 03 ffff - (Reserved for parts with 256Kb FLASH) - * 04 0000 - 0b ffff - 512Kb External SRAM - * SSD1963 LCD frame buffer interface - * YM2413B Sound Generator - * af e000 - af ffff - 8Kb on-chip SRAM - * af e000 - af e3ff - IDLE stack - * - * Chip select 0 is for the 512Kb AS6C4008 SRAM starting at address 0x40000 - * (after the flash). - * - * __CS0_LBR_INIT_PARAM = 0x04 Lower address 04 0000 - * __CS0_UBR_INIT_PARAM = 0x0b Upper address 0b ffff - * __CS0_CTL_INIT_PARAM = 0x08 CTL[5-7] = Zero wait states - * CTL[4] = Memory (vs I/O) - * CTL[3] = Enable - * CTL[0-2] = Unused - * __CS0_BMC_INIT_PARAM = 0x00 BMC[6-7] = eZ80 bus mode - * BMC[5] = Separate address and data - * BMC[4] = Unused - * BMC[0-3] = Ignored in eZ80 mode - * - * Chip select 1 is for the SSD1963 LCD frame buffer interface - * Chip select 2 is for the YM2413B Sound Generator - * Chip select 3 is not used - */ - -/* RAM Memory map - * - * 040000 Beginning of RAM - * 040000 _vecstart Beginning of Interrupt Redirection information. This - * is used to hand off to RAM-based handlers for - * interrupts caught by FLASH interrupt vectors. 512b is - * set aside for RAM-based interrupt handling - * information. - * 0401ff _vecend End of the Interrupt Redirection information. - * 040200 _loaderstart Start of RAM used exclusively by the bootloader. - * This memory region an be recovered by the RAM-based - * program. - * 04ffff _loaderend - * 050000 _progstart Start of CODE for the RAM-based program. The - * program can freely use the memory region from - * 050000-0bffff and can recover the memory for - * 40400-04ffff for heap usage. - * 0bffff _progend End of RAM - */ - -extern uint8_t _vecstart[]; -#define VECSTART ((uintptr_t)_vecstart) - -extern uint8_t _vecend[]; -#define VECEND ((uintptr_t)_vecend) - -#define VECSIZE (VECEND - VECSTART + 1) - -extern uint8_t _loaderstart[]; -#define LOADERSTART ((uintptr_t)_loaderstart) - -extern uint8_t _loaderend[]; -#define LOADEREND ((uintptr_t)_loaderend) - -#define LOADERSIZE (LOADEREND - LOADERSTART + 1) - -extern uint8_t _progstart[]; -#define PROGSTART ((uintptr_t)_progstart) - -extern uint8_t _progend[]; -#define PROGEND ((uintptr_t)_progend) - -#define PROGSIZE (PROGEND - PROGSTART + 1) - -/* LED and port emulation memory register addresses */ - -/* GPIO data bit definitions */ - -#define EZ80_GPIOD0 (1 << 0) -#define EZ80_GPIOD1 (1 << 1) -#define EZ80_GPIOD2 (1 << 2) -#define EZ80_GPIOD3 (1 << 3) -#define EZ80_GPIOD4 (1 << 4) -#define EZ80_GPIOD5 (1 << 5) -#define EZ80_GPIOD6 (1 << 6) -#define EZ80_GPIOD7 (1 << 7) - -/* Winbond W25 SPI FLASH */ - -#ifndef CONFIG_Z20X_W25_MINOR -# define CONFIG_Z20X_W25_MINOR 0 -#endif - -#define __STR(s) #s -#define __XSTR(s) __STR(s) - -#define W25_DEV "/dev/mtd" __XSTR(CONFIG_Z20X_W25_MINOR) - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#undef EXTERN -#if defined(__cplusplus) -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -/**************************************************************************** - * Name: ez80_bringup - * - * Description: - * Perform architecture-specific initialization - * - * CONFIG_BOARD_LATE_INITIALIZE=y : - * Called from board_late_initialize(). - * - * CONFIG_BOARD_LATE_INITIALIZE=y && CONFIG_BOARDCTL=y : - * Called from the NSH library - * - ****************************************************************************/ - -int ez80_bringup(void); - -/**************************************************************************** - * Name: ez80_mmcsd_initialize - * - * Description: - * Initialize SPI-based SD card. - * - ****************************************************************************/ - -#ifdef HAVE_MMCSD -int ez80_mmcsd_initialize(void); -#endif - -/**************************************************************************** - * Name: ez80_spidev_initialize - * - * Description: - * Called to configure SPI chip select GPIO pins for the z20x board. - * - ****************************************************************************/ - -#ifdef CONFIG_EZ80_SPI -void ez80_spidev_initialize(void); -#endif - -/**************************************************************************** - * Name: ez80_w25_initialize - * - * Description: - * Called to initialize Winbond W25 memory - * - ****************************************************************************/ - -#ifdef HAVE_SPIFLASH -int ez80_w25_initialize(int minor); -#endif - -#undef EXTERN -#if defined(__cplusplus) -} -#endif - -#endif /* __BOARDS_Z80_EZ80_Z20X_SRC_Z20X_H */ diff --git a/boards/z80/z180/p112/Kconfig b/boards/z80/z180/p112/Kconfig deleted file mode 100644 index f72f3c094c..0000000000 --- a/boards/z80/z180/p112/Kconfig +++ /dev/null @@ -1,4 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# diff --git a/boards/z80/z180/p112/configs/ostest/defconfig b/boards/z80/z180/p112/configs/ostest/defconfig deleted file mode 100644 index 6c23002b97..0000000000 --- a/boards/z80/z180/p112/configs/ostest/defconfig +++ /dev/null @@ -1,34 +0,0 @@ -# -# This file is autogenerated: PLEASE DO NOT EDIT IT. -# -# You can use "make menuconfig" to make any modifications to the installed .config file. -# You can then do "make savedefconfig" to generate a new defconfig file that includes your -# modifications. -# -# CONFIG_DEV_CONSOLE is not set -CONFIG_ARCH="z80" -CONFIG_ARCH_BOARD="z80sim" -CONFIG_ARCH_BOARD_Z80SIM=y -CONFIG_ARCH_CHIP="z80" -CONFIG_ARCH_CHIP_Z80=y -CONFIG_ARCH_Z80=y -CONFIG_BOARD_LOOPSPERMSEC=100 -CONFIG_DEFAULT_SMALL=y -CONFIG_DISABLE_MOUNTPOINT=y -CONFIG_INIT_ENTRYPOINT="ostest_main" -CONFIG_INIT_STACKSIZE=1024 -CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=3 -CONFIG_NUNGET_CHARS=0 -CONFIG_PTHREAD_STACK_DEFAULT=1024 -CONFIG_RAM_SIZE=65536 -CONFIG_RAM_START=0x0000 -CONFIG_START_DAY=21 -CONFIG_START_MONTH=2 -CONFIG_START_YEAR=2007 -CONFIG_TASK_NAME_SIZE=0 -CONFIG_TESTING_OSTEST=y -CONFIG_TESTING_OSTEST_NBARRIER_THREADS=4 -CONFIG_TESTING_OSTEST_STACKSIZE=1024 -CONFIG_UART_RXBUFSIZE=64 -CONFIG_UART_SERIAL_CONSOLE=y -CONFIG_UART_TXBUFSIZE=64 diff --git a/boards/z80/z180/p112/include/board.h b/boards/z80/z180/p112/include/board.h deleted file mode 100644 index 652eabefdd..0000000000 --- a/boards/z80/z180/p112/include/board.h +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** - * boards/z80/z180/p112/include/board.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __BOARDS_Z80_Z180_P112_INCLUDE_BOARD_H -#define __BOARDS_Z80_Z180_P112_INCLUDE_BOARD_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* The Z180 is driven by a 16MHz crystal. The system clock - * is equal to the crystal frequency. - */ - -#define Z180_BOARD_XTAL 16000000 /* 16 MHz */ -#define Z180_SYSCLOCK Z180_BOARD_XTAL /* 16 MHz */ - -/**************************************************************************** - * Public Functions Definitions - ****************************************************************************/ - -#if defined(__cplusplus) -extern "C" -{ -#endif - -#if defined(__cplusplus) -} -#endif - -#endif /* __BOARDS_Z80_Z180_P112_INCLUDE_BOARD_H */ diff --git a/boards/z80/z180/p112/scripts/Make.defs b/boards/z80/z180/p112/scripts/Make.defs deleted file mode 100644 index b14e65740d..0000000000 --- a/boards/z80/z180/p112/scripts/Make.defs +++ /dev/null @@ -1,29 +0,0 @@ -############################################################################ -# boards/z80/z180/p112/scripts/Make.defs -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -include $(TOPDIR)/.config -include $(TOPDIR)/tools/Config.mk -include $(TOPDIR)/arch/z80/src/z180/Toolchain.defs - -CFLAGS := $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -AFLAGS := -x -a -l -o -s -g diff --git a/boards/z80/z180/p112/src/.gitignore b/boards/z80/z180/p112/src/.gitignore deleted file mode 100644 index 23664e7dab..0000000000 --- a/boards/z80/z180/p112/src/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/z80_mem.h -/*.rst -/*.lnk -/*.mem diff --git a/boards/z80/z180/p112/src/Makefile b/boards/z80/z180/p112/src/Makefile deleted file mode 100644 index 6ecf7aaaf8..0000000000 --- a/boards/z80/z180/p112/src/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -############################################################################ -# boards/z80/z180/p112/src/Makefile -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -include $(TOPDIR)/Make.defs -include $(TOPDIR)/boards/Board.mk diff --git a/boards/z80/z8/z8encore000zco/Kconfig b/boards/z80/z8/z8encore000zco/Kconfig deleted file mode 100644 index f72f3c094c..0000000000 --- a/boards/z80/z8/z8encore000zco/Kconfig +++ /dev/null @@ -1,4 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# diff --git a/boards/z80/z8/z8encore000zco/configs/ostest/defconfig b/boards/z80/z8/z8encore000zco/configs/ostest/defconfig deleted file mode 100644 index f7a9bd14f9..0000000000 --- a/boards/z80/z8/z8encore000zco/configs/ostest/defconfig +++ /dev/null @@ -1,42 +0,0 @@ -# -# This file is autogenerated: PLEASE DO NOT EDIT IT. -# -# You can use "make menuconfig" to make any modifications to the installed .config file. -# You can then do "make savedefconfig" to generate a new defconfig file that includes your -# modifications. -# -# CONFIG_ARCH_LEDS is not set -CONFIG_ARCH="z80" -CONFIG_ARCH_BOARD="z8encore000zco" -CONFIG_ARCH_BOARD_Z8ENCORE000ZCO=y -CONFIG_ARCH_CHIP="z8" -CONFIG_ARCH_CHIP_Z8=y -CONFIG_ARCH_CHIP_Z8F6403=y -CONFIG_ARCH_CHIP_Z8F640X=y -CONFIG_ARCH_Z80=y -CONFIG_BOARD_LOOPSPERMSEC=1250 -CONFIG_CONSOLE_SYSLOG=y -CONFIG_DEFAULT_SMALL=y -CONFIG_DISABLE_MOUNTPOINT=y -CONFIG_HOST_WINDOWS=y -CONFIG_IDLETHREAD_STACKSIZE=256 -CONFIG_INIT_ENTRYPOINT="ostest_main" -CONFIG_INIT_STACKSIZE=256 -CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=3 -CONFIG_NUNGET_CHARS=0 -CONFIG_PTHREAD_STACK_DEFAULT=256 -CONFIG_PTHREAD_STACK_MIN=128 -CONFIG_RAM_SIZE=65536 -CONFIG_START_DAY=28 -CONFIG_START_MONTH=11 -CONFIG_START_YEAR=2012 -CONFIG_TASK_NAME_SIZE=0 -CONFIG_TESTING_OSTEST=y -CONFIG_TESTING_OSTEST_STACKSIZE=256 -CONFIG_UART0_BAUD=57600 -CONFIG_UART0_RXBUFSIZE=0 -CONFIG_UART0_SERIAL_CONSOLE=y -CONFIG_UART0_TXBUFSIZE=0 -CONFIG_UART1_BAUD=57600 -CONFIG_UART1_RXBUFSIZE=0 -CONFIG_UART1_TXBUFSIZE=0 diff --git a/boards/z80/z8/z8encore000zco/configs/ostest/ostest.linkcmd b/boards/z80/z8/z8encore000zco/configs/ostest/ostest.linkcmd deleted file mode 100644 index 0f0dae2382..0000000000 --- a/boards/z80/z8/z8encore000zco/configs/ostest/ostest.linkcmd +++ /dev/null @@ -1,64 +0,0 @@ -/****************************************************************************/ -/* boards/z80/z8encore000zco/ostest/ostest.linkcmd */ -/* */ -/* Licensed to the Apache Software Foundation (ASF) under one or more */ -/* contributor license agreements. See the NOTICE file distributed with */ -/* this work for additional information regarding copyright ownership. The */ -/* ASF licenses this file to you under the Apache License, Version 2.0 (the */ -/* "License"); you may not use this file except in compliance with the */ -/* License. You may obtain a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT*/ -/* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the*/ -/* License for the specific language governing permissions and limitations */ -/* under the License. */ -/* */ -/****************************************************************************/ - --FORMAT=OMF695,INTEL32 --map -maxhexlen=64 -quiet -sort NAME=ascending -unresolved=fatal --NOwarnoverlap -NOxref -warn -debug -NOigcase -quiet - -RANGE ROM $0 : $FFFF -RANGE RDATA $20 : $FF -RANGE EDATA $100 : $EFF -RANGE PRAM FORBIDDEN - -CHANGE TEXT=EDATA -CHANGE TEXT=FAR_DATA -change NEAR_TXT=NEAR_DATA -change FAR_TXT=FAR_DATA -ORDER FAR_BSS, FAR_DATA -ORDER NEAR_BSS,NEAR_DATA -COPY NEAR_DATA ROM -COPY FAR_DATA ROM - -define _low_near_romdata = copy base of NEAR_DATA -define _low_neardata = base of NEAR_DATA -define _len_neardata = length of NEAR_DATA -define _low_far_romdata = copy base of FAR_DATA -define _low_fardata = base of FAR_DATA -define _len_fardata = length of FAR_DATA -define _low_nearbss = base of NEAR_BSS -define _len_nearbss = length of NEAR_BSS -define _low_farbss = base of FAR_BSS -define _len_farbss = length of FAR_BSS -define _far_stacktop = highaddr of EDATA -define _near_stack = highaddr of RDATA -define _far_heapbot = top of EDATA -define _near_heaptop = highaddr of RDATA -define _near_heapbot = top of RDATA -define _low_pramseg = base of PRAMSEG -define _len_pramseg = length of PRAMSEG -define _low_pram_romdata = copy base of PRAMSEG -define _READ_NVDS=$1000 -define _WRITE_NVDS=$10B3 -define _READ_NVDS_GET_STATUS=$1000 -define _WRITE_NVDS_GET_STATUS=$10B3 -/* Set frequency to 18432000 Hz */ -define __user_frequency = 18432000 - -/* arch/z80/src/Makefile.zdsii will append target, object and library paths below */ diff --git a/boards/z80/z8/z8encore000zco/configs/ostest/ostest.zdsproj b/boards/z80/z8/z8encore000zco/configs/ostest/ostest.zdsproj deleted file mode 100644 index 752a7b0ad2..0000000000 --- a/boards/z80/z8/z8encore000zco/configs/ostest/ostest.zdsproj +++ /dev/null @@ -1,291 +0,0 @@ - -Z8F6403 - - - -.\zsldevinit.asm -..\..\..\nuttx.hex - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -000000000000 -000000000000 -0 - - -000000000000 -000000000000 -0 - - -000000000000 -000000000000 -0 - - -000000000000 -000000000000 -0 - - - - diff --git a/boards/z80/z8/z8encore000zco/include/board.h b/boards/z80/z8/z8encore000zco/include/board.h deleted file mode 100644 index 9fd02bdb68..0000000000 --- a/boards/z80/z8/z8encore000zco/include/board.h +++ /dev/null @@ -1,64 +0,0 @@ -/**************************************************************************** - * boards/z80/z8/z8encore000zco/include/board.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __BOARDS_Z80_Z8_Z8ENCORE000ZCO_INCLUDE_BOARD_H -#define __BOARDS_Z80_Z8_Z8ENCORE000ZCO_INCLUDE_BOARD_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* LED pattern definitions */ - -#define LED_STARTED 0 -#define LED_HEAPALLOCATE 1 -#define LED_IRQSENABLED 2 -#define LED_STACKCREATED 3 -#define LED_IDLE 4 -#define LED_INIRQ 5 -#define LED_ASSERTION 6 -#define LED_SIGNAL 6 -#define LED_PANIC 7 - -/**************************************************************************** - * Public Functions Definitions - ****************************************************************************/ - -#undef EXTERN -#if defined(__cplusplus) -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -#undef EXTERN -#if defined(__cplusplus) -} -#endif - -#endif /* __BOARDS_Z80_Z8_Z8ENCORE000ZCO__BOARD_H */ diff --git a/boards/z80/z8/z8encore000zco/scripts/Make.defs b/boards/z80/z8/z8encore000zco/scripts/Make.defs deleted file mode 100644 index 2b892058b3..0000000000 --- a/boards/z80/z8/z8encore000zco/scripts/Make.defs +++ /dev/null @@ -1,68 +0,0 @@ -############################################################################ -# boards/z80/z8/z8encore000zco/scripts/Make.defs -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -include $(TOPDIR)/.config -include $(TOPDIR)/tools/Config.mk -include $(TOPDIR)/arch/z80/src/z8/Toolchain.defs -include $(TOPDIR)/tools/zds/Config.mk - -# CFLAGS - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) - ARCHASMINCLUDES = -include:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR) - EARCHASMINCLUDES = -include:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR) - ARCHSTDINCLUDES = -stdinc:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR);$(ZDSDEVINCDIR) -else - ARCHASMINCLUDES = -include:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)' - EARCHASMINCLUDES = -include:'$(ETOPDIR)\include;$(EZDSSTDINCDIR);$(EZDSZILOGINCDIR)' - ARCHSTDINCLUDES = -stdinc:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR);$(WZDSDEVINCDIR)' -endif - -# Assembler definitions - -ARCHASMCPUFLAGS = -cpu:$(ARCHCPU) -NOigcase $(ARCHREVAA) -ARCHASMLIST = -list -NOlistmac -name -pagelen:56 -pagewidth:80 -quiet -ARCHASMWARNINGS = -warn -ARCHASMDEFINES = -define:$(ARCHCPUDEF)=1 -define:$(ARCHSERIESDEF)=1 -define:$(ARCHFAMILYDEF)=1 -define:__ASSEMBLY__ -AFLAGS := $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMLIST) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION) - -# Compiler definitions - -ARCHCPUFLAGS = -chartype:S -model:L -const:RAM -NOoptlink -promote -cpu:$(ARCHCPU) $(ARCHREVAA) -NOgenprintf \ - -asmsw:" $(ARCHASMCPUFLAGS) $(EARCHASMINCLUDES) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)" -ARCHLIST = -keeplst -NOlist -NOlistinc -keepasm -ARCHWARNINGS = -warn -ARCHDEFINES = -define:$(ARCHFAMILYDEF) -define:$(ARCHCPUDEF) -define:$(ARCHSERIESDEF) -ARCHINCLUDES = $(ARCHSTDINCLUDES) -CFLAGS := $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHLIST) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) - -CPPDEFINES = -D$(ARCHFAMILYDEF) -D$(ARCHCPUDEF) -D$(ARCHSERIESDEF) -D__ASSEMBLY__ -CPPINCLUDES = -I$(TOPDIR)$(DELIM)include -CPPFLAGS := $(CPPDEFINES) $(CPPINCLUDES) - -# Librarian definitions - -ARFLAGS = -quiet -warn - -# Linker definitions - -LINKCMDTEMPLATE = $(BOARD_DIR)$(DELIM)configs$(DELIM)ostest$(DELIM)ostest.linkcmd diff --git a/boards/z80/z8/z8encore000zco/src/Makefile b/boards/z80/z8/z8encore000zco/src/Makefile deleted file mode 100644 index a96e32b1bd..0000000000 --- a/boards/z80/z8/z8encore000zco/src/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -############################################################################ -# boards/z80/z8/z8encore000zco/src/Makefile -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -include $(TOPDIR)/Make.defs - -CSRCS = z8_boot.c z8_leds.c - -include $(TOPDIR)/boards/Board.mk diff --git a/boards/z80/z8/z8encore000zco/src/z8_boot.c b/boards/z80/z8/z8encore000zco/src/z8_boot.c deleted file mode 100644 index 3297257712..0000000000 --- a/boards/z80/z8/z8encore000zco/src/z8_boot.c +++ /dev/null @@ -1,50 +0,0 @@ -/**************************************************************************** - * boards/z80/z8/z8encore000zco/src/z8_boot.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include "chip.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -static void z8_gpioinit(void) -{ -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -void z8_board_initialize(void) -{ - z8_gpioinit(); -} diff --git a/boards/z80/z8/z8encore000zco/src/z8_leds.c b/boards/z80/z8/z8encore000zco/src/z8_leds.c deleted file mode 100644 index ea609bfc32..0000000000 --- a/boards/z80/z8/z8encore000zco/src/z8_leds.c +++ /dev/null @@ -1,237 +0,0 @@ -/**************************************************************************** - * boards/z80/z8/z8encore000zco/src/z8_leds.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* The z16f2800100zcog board has four LEDs: - * - * - Green LED D1 which illuminates in the presence of Vcc - * - Red LED D2 connected to chip port PA0_T0IN - * - Yellow LED D3 connected to chip port PA1_T0OUT - * - Green LED D4 connected to chip port PA2_DE0 - */ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include -#include - -#include "z80_internal.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Port G: Anode Bit Assignments (1 enables) */ - -#define Z8_PORTG_ANODE_MASK 0x7f -#define Z8_PORTG_ANODE_ROW0 0x01 -#define Z8_PORTG_ANODE_ROW1 0x02 -#define Z8_PORTG_ANODE_ROW2 0x04 -#define Z8_PORTG_ANODE_ROW3 0x08 -#define Z8_PORTG_ANODE_ROW4 0x10 -#define Z8_PORTG_ANODE_ROW5 0x20 -#define Z8_PORTG_ANODE_ROW6 0x40 - -/* Port E: Cathode Bit Assignments (0 enables) */ - -#define Z8_PORTE_CATHODE_MASK 0x1f -#define Z8_PORTE_CATHODE_COLUMN0 0x01 -#define Z8_PORTE_CATHODE_COLUMN1 0x02 -#define Z8_PORTE_CATHODE_COLUMN2 0x04 -#define Z8_PORTE_CATHODE_COLUMN3 0x08 -#define Z8_PORTE_CATHODE_COLUMN4 0x10 - -/* Port E: LED Addressing */ - -#define Z8_PORTE_LED_MASK 0xe0 -#define Z8_PORTE_LED_D3 0x20 -#define Z8_PORTE_LED_D4 0x40 -#define Z8_PORTE_LED_D1 0x80 - -/* Port G: LED Addressing */ - -#define Z8_PORTG_LED_MASK 0x80 -#define Z8_PORTG_LED_D2 0x80 - -/* Special values for display */ - -#define LED_ALLON { Z8_PORTG_ANODE_MASK, 0x00 } -#define LED_ALLOFF { 0x00, Z8_PORTE_CATHODE_MASK } -#define LED_LEVEL1 { 0x10, 0x00 } -#define LED_LEVEL2 { 0x08, 0x00 } -#define LED_LEVEL3 { 0x04, 0x00 } -#define LED_LEVEL4 { 0x02, 0x00 } -#define LED_LEVEL1I { 0x14, 0x00 } -#define LED_LEVEL2I { 0x0c, 0x00 } -#define LED_LEVEL3I { 0x04, 0x00 } -#define LED_LEVEL4I { 0x06, 0x00 } -#define LED_LEVEL1S { 0x11, 0x00 } -#define LED_LEVEL2S { 0x09, 0x00 } -#define LED_LEVEL3S { 0x05, 0x00 } -#define LED_LEVEL4S { 0x03, 0x00 } -#define LED_LEVEL1A { 0x10, 0x11 } -#define LED_LEVEL2A { 0x08, 0x11 } -#define LED_LEVEL3A { 0x04, 0x11 } -#define LED_LEVEL4A { 0x02, 0x11 } -#define LED_SNAKEEYES { 0x06, 0x11 } - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -struct z8_ledbits_s -{ - uint8_t anode; - uint8_t cathode; -}; - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -static const struct z8_ledbits_s g_ledarray[10][4] = -{ - { LED_ALLON, LED_ALLON, LED_ALLON, LED_ALLON }, - { LED_ALLOFF, LED_ALLOFF, LED_ALLOFF, LED_ALLOFF }, - { LED_LEVEL1, LED_ALLOFF, LED_ALLOFF, LED_ALLOFF }, - { LED_LEVEL1, LED_LEVEL2, LED_ALLOFF, LED_ALLOFF }, - { LED_LEVEL1, LED_LEVEL2, LED_LEVEL3, LED_ALLOFF }, - { LED_LEVEL1, LED_LEVEL2, LED_LEVEL3, LED_LEVEL4 }, - { LED_LEVEL1I, LED_LEVEL2I, LED_LEVEL3I, LED_LEVEL4I }, - { LED_LEVEL1S, LED_LEVEL2S, LED_LEVEL3S, LED_LEVEL4S }, - { LED_LEVEL1A, LED_LEVEL2A, LED_LEVEL3A, LED_LEVEL4A }, - { LED_SNAKEEYES, LED_SNAKEEYES, LED_SNAKEEYES, LED_SNAKEEYES } -}; - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: z8_putled134 - ****************************************************************************/ - -#ifdef CONFIG_ARCH_LEDS -static void z8_putled134(FAR const struct z8_ledbits_s *bits, uint8_t addr) -{ - uint8_t porte; - - porte = bits->cathode; - putreg8(porte, PEOD); /* Load porte data */ - putreg8(bits->anode, PGOD); /* Load portg data */ - - porte |= addr; - putreg8(porte, PEOD); /* Latch data */ -} -#endif - -/**************************************************************************** - * Name: z8_lputed2 - ****************************************************************************/ - -#ifdef CONFIG_ARCH_LEDS -static void z8_putled2(FAR const struct z8_ledbits_s *bits, uint8_t addr) -{ - uint8_t portg; - - putreg8(bits->cathode, PEOD); /* Load porte data */ - portg = bits->anode; - putreg8(porte, PGOD); /* Load portg data */ - - portg |= addr; - putreg8(portg, PGOD); /* Latch data */ -} -#endif - -/**************************************************************************** - * Name: z8_putarray - ****************************************************************************/ - -#ifdef CONFIG_ARCH_LEDS -static void z8_putarray(FAR const struct z8_ledarray_s *array) -{ - z8_putled134(&array->led[0], Z8_PORTE_LED_D1); - z8_putled2(&array->led[1], Z8_PORTG_LED_D2); - z8_putled134(&array->led[2], Z8_PORTE_LED_D3); - z8_putled134(&array->led[3], Z8_PORTE_LED_D4); -} -#endif - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: board_autoled_initialize - ****************************************************************************/ - -#ifdef CONFIG_ARCH_LEDS -void board_autoled_initialize(void) -{ - putreg8(0x00, PEAF); /* PE Alt func = Port */ - putreg8(0x00, PGAF); /* PG Alt func = Port */ - - putreg8(0x00, PEOC); /* PE Out Ctrl = push-pull */ - putreg8(0x00, PGOC); /* PG Out Ctrl = push-pull */ - - /* putreg8(0x00, PEDD); * PA Data Dir = output */ - - putreg8(0x01, PEADDR); /* PA Data Dir = output */ - putreg8(0x00, PECTL); /* OUTPUT */ - - /* putreg8(0x00, PGDD); * PA Data Dir = output */ - - putreg8(0x01, PGADDR); /* PA Data Dir = output */ - putreg8(0x00, PGCTL); /* OUTPUT */ - - z8_putarray(&g_ledarray[0][0]); -} - -/**************************************************************************** - * Name: board_autoled_on - ****************************************************************************/ - -void board_autoled_on(int led) -{ - if ((unsigned)led <= 8) - { - z8_putarray(&g_ledarray[led + 1][0]); - } -} - -/**************************************************************************** - * Name: board_autoled_off - ****************************************************************************/ - -void board_autoled_off(int led) -{ - if (led >= 1) - { - board_autoled_on(led - 1); - } -} -#endif /* CONFIG_ARCH_LEDS */ diff --git a/boards/z80/z8/z8f64200100kit/Kconfig b/boards/z80/z8/z8f64200100kit/Kconfig deleted file mode 100644 index f72f3c094c..0000000000 --- a/boards/z80/z8/z8f64200100kit/Kconfig +++ /dev/null @@ -1,4 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# diff --git a/boards/z80/z8/z8f64200100kit/configs/ostest/defconfig b/boards/z80/z8/z8f64200100kit/configs/ostest/defconfig deleted file mode 100644 index b1047fb591..0000000000 --- a/boards/z80/z8/z8f64200100kit/configs/ostest/defconfig +++ /dev/null @@ -1,41 +0,0 @@ -# -# This file is autogenerated: PLEASE DO NOT EDIT IT. -# -# You can use "make menuconfig" to make any modifications to the installed .config file. -# You can then do "make savedefconfig" to generate a new defconfig file that includes your -# modifications. -# -# CONFIG_ARCH_LEDS is not set -CONFIG_ARCH="z80" -CONFIG_ARCH_BOARD="z8f64200100kit" -CONFIG_ARCH_BOARD_Z8F64200100KIT=y -CONFIG_ARCH_CHIP="z8" -CONFIG_ARCH_CHIP_Z8=y -CONFIG_ARCH_CHIP_Z8F6423=y -CONFIG_ARCH_CHIP_Z8F642X=y -CONFIG_ARCH_Z80=y -CONFIG_BOARD_LOOPSPERMSEC=1250 -CONFIG_DEFAULT_SMALL=y -CONFIG_DISABLE_MOUNTPOINT=y -CONFIG_HOST_WINDOWS=y -CONFIG_IDLETHREAD_STACKSIZE=256 -CONFIG_INIT_ENTRYPOINT="ostest_main" -CONFIG_INIT_STACKSIZE=256 -CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=3 -CONFIG_NUNGET_CHARS=0 -CONFIG_PTHREAD_STACK_DEFAULT=256 -CONFIG_PTHREAD_STACK_MIN=128 -CONFIG_RAM_SIZE=65536 -CONFIG_START_DAY=17 -CONFIG_START_MONTH=2 -CONFIG_START_YEAR=2008 -CONFIG_TASK_NAME_SIZE=0 -CONFIG_TESTING_OSTEST=y -CONFIG_TESTING_OSTEST_STACKSIZE=256 -CONFIG_UART0_BAUD=57600 -CONFIG_UART0_RXBUFSIZE=0 -CONFIG_UART0_SERIAL_CONSOLE=y -CONFIG_UART0_TXBUFSIZE=0 -CONFIG_UART1_BAUD=57600 -CONFIG_UART1_RXBUFSIZE=0 -CONFIG_UART1_TXBUFSIZE=0 diff --git a/boards/z80/z8/z8f64200100kit/configs/ostest/ostest.linkcmd b/boards/z80/z8/z8f64200100kit/configs/ostest/ostest.linkcmd deleted file mode 100644 index 1c18b3f5e6..0000000000 --- a/boards/z80/z8/z8f64200100kit/configs/ostest/ostest.linkcmd +++ /dev/null @@ -1,64 +0,0 @@ -/****************************************************************************/ -/* boards/z80/z8f64200100kit/ostest/ostest.linkcmd */ -/* */ -/* Licensed to the Apache Software Foundation (ASF) under one or more */ -/* contributor license agreements. See the NOTICE file distributed with */ -/* this work for additional information regarding copyright ownership. The */ -/* ASF licenses this file to you under the Apache License, Version 2.0 (the */ -/* "License"); you may not use this file except in compliance with the */ -/* License. You may obtain a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT*/ -/* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the*/ -/* License for the specific language governing permissions and limitations */ -/* under the License. */ -/* */ -/****************************************************************************/ - --FORMAT=OMF695,INTEL32 --map -maxhexlen=64 -quiet -sort NAME=ascending -unresolved=fatal --NOwarnoverlap -NOxref -warn -debug -NOigcase -quiet - -RANGE ROM $0 : $FFFF -RANGE RDATA $20 : $FF -RANGE EDATA $100 : $EFF -RANGE PRAM FORBIDDEN - -CHANGE TEXT=EDATA -CHANGE TEXT=FAR_DATA -change NEAR_TXT=NEAR_DATA -change FAR_TXT=FAR_DATA -ORDER FAR_BSS, FAR_DATA -ORDER NEAR_BSS,NEAR_DATA -COPY NEAR_DATA ROM -COPY FAR_DATA ROM - -define _low_near_romdata = copy base of NEAR_DATA -define _low_neardata = base of NEAR_DATA -define _len_neardata = length of NEAR_DATA -define _low_far_romdata = copy base of FAR_DATA -define _low_fardata = base of FAR_DATA -define _len_fardata = length of FAR_DATA -define _low_nearbss = base of NEAR_BSS -define _len_nearbss = length of NEAR_BSS -define _low_farbss = base of FAR_BSS -define _len_farbss = length of FAR_BSS -define _far_stacktop = highaddr of EDATA -define _near_stack = highaddr of RDATA -define _far_heapbot = top of EDATA -define _near_heaptop = highaddr of RDATA -define _near_heapbot = top of RDATA -define _low_pramseg = base of PRAMSEG -define _len_pramseg = length of PRAMSEG -define _low_pram_romdata = copy base of PRAMSEG -define _READ_NVDS=$1000 -define _WRITE_NVDS=$10B3 -define _READ_NVDS_GET_STATUS=$1000 -define _WRITE_NVDS_GET_STATUS=$10B3 -/* Set frequency to 18432000 Hz */ -define __user_frequency = 18432000 - -/* arch/z80/src/Makefile.zdsii will append target, object and library paths below */ diff --git a/boards/z80/z8/z8f64200100kit/configs/ostest/ostest.zdsproj b/boards/z80/z8/z8f64200100kit/configs/ostest/ostest.zdsproj deleted file mode 100644 index 752a7b0ad2..0000000000 --- a/boards/z80/z8/z8f64200100kit/configs/ostest/ostest.zdsproj +++ /dev/null @@ -1,291 +0,0 @@ - -Z8F6403 - - - -.\zsldevinit.asm -..\..\..\nuttx.hex - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -000000000000 -000000000000 -0 - - -000000000000 -000000000000 -0 - - -000000000000 -000000000000 -0 - - -000000000000 -000000000000 -0 - - - - diff --git a/boards/z80/z8/z8f64200100kit/include/board.h b/boards/z80/z8/z8f64200100kit/include/board.h deleted file mode 100644 index 7011b1c997..0000000000 --- a/boards/z80/z8/z8f64200100kit/include/board.h +++ /dev/null @@ -1,64 +0,0 @@ -/**************************************************************************** - * boards/z80/z8/z8f64200100kit/include/board.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __BOARDS_Z80_Z8_Z8F64200100KIT_INCLUDE_BOARD_H -#define __BOARDS_Z80_Z8_Z8F64200100KIT_INCLUDE_BOARD_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* LED pattern definitions */ - -#define LED_STARTED 0 -#define LED_HEAPALLOCATE 1 -#define LED_IRQSENABLED 2 -#define LED_STACKCREATED 3 -#define LED_IDLE 4 -#define LED_INIRQ 5 -#define LED_ASSERTION 6 -#define LED_SIGNAL 6 -#define LED_PANIC 7 - -/**************************************************************************** - * Public Functions Definitions - ****************************************************************************/ - -#undef EXTERN -#if defined(__cplusplus) -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -#undef EXTERN -#if defined(__cplusplus) -} -#endif - -#endif /* __BOARDS_Z80_Z8_Z8F64200100KIT_INCLUDE_BOARD_H */ diff --git a/boards/z80/z8/z8f64200100kit/scripts/Make.defs b/boards/z80/z8/z8f64200100kit/scripts/Make.defs deleted file mode 100644 index 5bd597f25a..0000000000 --- a/boards/z80/z8/z8f64200100kit/scripts/Make.defs +++ /dev/null @@ -1,67 +0,0 @@ -############################################################################ -# boards/z80/z8/z8f64200100kit/scripts/Make.defs -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -include $(TOPDIR)/.config -include $(TOPDIR)/tools/Config.mk -include $(TOPDIR)/arch/z80/src/z8/Toolchain.defs -include $(TOPDIR)/tools/zds/Config.mk - -# CFLAGS -ifeq ($(CONFIG_WINDOWS_NATIVE),y) - ARCHASMINCLUDES = -include:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR) - EARCHASMINCLUDES = -include:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR) - ARCHSTDINCLUDES = -stdinc:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR);$(ZDSDEVINCDIR) -else - ARCHASMINCLUDES = -include:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)' - EARCHASMINCLUDES = -include:'$(ETOPDIR)\include;$(EZDSSTDINCDIR);$(EZDSZILOGINCDIR)' - ARCHSTDINCLUDES = -stdinc:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR);$(WZDSDEVINCDIR)' -endif - -# Assembler definitions - -ARCHASMCPUFLAGS = -cpu:$(ARCHCPU) -NOigcase $(ARCHREVAA) -ARCHASMLIST = -list -NOlistmac -name -pagelen:56 -pagewidth:80 -quiet -ARCHASMWARNINGS = -warn -ARCHASMDEFINES = -define:$(ARCHCPUDEF)=1 -define:$(ARCHSERIESDEF)=1 -define:$(ARCHFAMILYDEF)=1 -define:__ASSEMBLY__ -AFLAGS := $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMLIST) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION) - -# Compiler definitions - -ARCHCPUFLAGS = -chartype:S -model:L -const:RAM -NOoptlink -promote -cpu:$(ARCHCPU) $(ARCHREVAA) -NOgenprintf \ - -asmsw:" $(ARCHASMCPUFLAGS) $(EARCHASMINCLUDES) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)" -ARCHLIST = -keeplst -NOlist -NOlistinc -keepasm -ARCHWARNINGS = -warn -ARCHDEFINES = -define:$(ARCHFAMILYDEF) -define:$(ARCHCPUDEF) -define:$(ARCHSERIESDEF) -ARCHINCLUDES = $(ARCHSTDINCLUDES) -CFLAGS := $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHLIST) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) - -CPPDEFINES = -D$(ARCHFAMILYDEF) -D$(ARCHCPUDEF) -D$(ARCHSERIESDEF) -D__ASSEMBLY__ -CPPINCLUDES = -I$(TOPDIR)$(DELIM)include -CPPFLAGS := $(CPPDEFINES) $(CPPINCLUDES) - -# Librarian definitions - -ARFLAGS = -quiet -warn - -# Linker definitions - -LINKCMDTEMPLATE = $(BOARD_DIR)$(DELIM)configs$(DELIM)ostest$(DELIM)ostest.linkcmd diff --git a/boards/z80/z8/z8f64200100kit/src/Makefile b/boards/z80/z8/z8f64200100kit/src/Makefile deleted file mode 100644 index fd14b1fee1..0000000000 --- a/boards/z80/z8/z8f64200100kit/src/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -############################################################################ -# boards/z80/z8/z8f64200100kit/src/Makefile -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -include $(TOPDIR)/Make.defs - -CSRCS = z8_boot.c z8_leds.c - -include $(TOPDIR)/boards/Board.mk diff --git a/boards/z80/z8/z8f64200100kit/src/z8_boot.c b/boards/z80/z8/z8f64200100kit/src/z8_boot.c deleted file mode 100644 index ffb53fed70..0000000000 --- a/boards/z80/z8/z8f64200100kit/src/z8_boot.c +++ /dev/null @@ -1,50 +0,0 @@ -/**************************************************************************** - * boards/z80/z8/z8f64200100kit/src/z8_boot.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include "chip.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -static void z8_gpioinit(void) -{ -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -void z8_board_initialize(void) -{ - z8_gpioinit(); -} diff --git a/boards/z80/z8/z8f64200100kit/src/z8_leds.c b/boards/z80/z8/z8f64200100kit/src/z8_leds.c deleted file mode 100644 index c82ae70f9a..0000000000 --- a/boards/z80/z8/z8f64200100kit/src/z8_leds.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/z80/z8/z8f64200100kit/src/z8_leds.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include - -#include "z80_internal.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: board_autoled_initialize - ****************************************************************************/ - -#ifdef CONFIG_ARCH_LEDS -void board_autoled_initialize(void) -{ -} - -/**************************************************************************** - * Name: board_autoled_on - ****************************************************************************/ - -void board_autoled_on(int led) -{ -} - -/**************************************************************************** - * Name: board_autoled_off - ****************************************************************************/ - -void board_autoled_off(int led) -{ -} -#endif /* CONFIG_ARCH_LEDS */ diff --git a/boards/z80/z80/z80sim/Kconfig b/boards/z80/z80/z80sim/Kconfig deleted file mode 100644 index f72f3c094c..0000000000 --- a/boards/z80/z80/z80sim/Kconfig +++ /dev/null @@ -1,4 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# diff --git a/boards/z80/z80/z80sim/configs/nsh/defconfig b/boards/z80/z80/z80sim/configs/nsh/defconfig deleted file mode 100644 index d5d54066a3..0000000000 --- a/boards/z80/z80/z80sim/configs/nsh/defconfig +++ /dev/null @@ -1,45 +0,0 @@ -# -# This file is autogenerated: PLEASE DO NOT EDIT IT. -# -# You can use "make menuconfig" to make any modifications to the installed .config file. -# You can then do "make savedefconfig" to generate a new defconfig file that includes your -# modifications. -# -# CONFIG_NSH_DISABLEBG is not set -# CONFIG_NSH_DISABLESCRIPT is not set -# CONFIG_NSH_DISABLE_EXEC is not set -# CONFIG_NSH_DISABLE_EXIT is not set -# CONFIG_NSH_DISABLE_GET is not set -# CONFIG_NSH_DISABLE_HEXDUMP is not set -# CONFIG_NSH_DISABLE_IFCONFIG is not set -# CONFIG_NSH_DISABLE_LOSETUP is not set -# CONFIG_NSH_DISABLE_MKRD is not set -# CONFIG_NSH_DISABLE_PS is not set -# CONFIG_NSH_DISABLE_PUT is not set -# CONFIG_NSH_DISABLE_WGET is not set -# CONFIG_NSH_DISABLE_XD is not set -CONFIG_ARCH="z80" -CONFIG_ARCH_BOARD="z80sim" -CONFIG_ARCH_BOARD_Z80SIM=y -CONFIG_ARCH_CHIP="z80" -CONFIG_ARCH_CHIP_Z80=y -CONFIG_ARCH_Z80=y -CONFIG_BOARD_LOOPSPERMSEC=100 -CONFIG_DEFAULT_SMALL=y -CONFIG_DISABLE_MOUNTPOINT=y -CONFIG_INIT_ENTRYPOINT="nsh_main" -CONFIG_INIT_STACKSIZE=1024 -CONFIG_LINE_MAX=40 -CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_FILEIOSIZE=1024 -CONFIG_NUNGET_CHARS=0 -CONFIG_PTHREAD_STACK_DEFAULT=1024 -CONFIG_RAM_SIZE=65536 -CONFIG_RAM_START=0x0000 -CONFIG_START_DAY=7 -CONFIG_START_MONTH=12 -CONFIG_START_YEAR=2012 -CONFIG_SYSTEM_NSH=y -CONFIG_TASK_NAME_SIZE=0 -CONFIG_UART_RXBUFSIZE=64 -CONFIG_UART_TXBUFSIZE=64 diff --git a/boards/z80/z80/z80sim/configs/ostest/defconfig b/boards/z80/z80/z80sim/configs/ostest/defconfig deleted file mode 100644 index 6c23002b97..0000000000 --- a/boards/z80/z80/z80sim/configs/ostest/defconfig +++ /dev/null @@ -1,34 +0,0 @@ -# -# This file is autogenerated: PLEASE DO NOT EDIT IT. -# -# You can use "make menuconfig" to make any modifications to the installed .config file. -# You can then do "make savedefconfig" to generate a new defconfig file that includes your -# modifications. -# -# CONFIG_DEV_CONSOLE is not set -CONFIG_ARCH="z80" -CONFIG_ARCH_BOARD="z80sim" -CONFIG_ARCH_BOARD_Z80SIM=y -CONFIG_ARCH_CHIP="z80" -CONFIG_ARCH_CHIP_Z80=y -CONFIG_ARCH_Z80=y -CONFIG_BOARD_LOOPSPERMSEC=100 -CONFIG_DEFAULT_SMALL=y -CONFIG_DISABLE_MOUNTPOINT=y -CONFIG_INIT_ENTRYPOINT="ostest_main" -CONFIG_INIT_STACKSIZE=1024 -CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=3 -CONFIG_NUNGET_CHARS=0 -CONFIG_PTHREAD_STACK_DEFAULT=1024 -CONFIG_RAM_SIZE=65536 -CONFIG_RAM_START=0x0000 -CONFIG_START_DAY=21 -CONFIG_START_MONTH=2 -CONFIG_START_YEAR=2007 -CONFIG_TASK_NAME_SIZE=0 -CONFIG_TESTING_OSTEST=y -CONFIG_TESTING_OSTEST_NBARRIER_THREADS=4 -CONFIG_TESTING_OSTEST_STACKSIZE=1024 -CONFIG_UART_RXBUFSIZE=64 -CONFIG_UART_SERIAL_CONSOLE=y -CONFIG_UART_TXBUFSIZE=64 diff --git a/boards/z80/z80/z80sim/include/board.h b/boards/z80/z80/z80sim/include/board.h deleted file mode 100644 index 7dd51c8916..0000000000 --- a/boards/z80/z80/z80sim/include/board.h +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** - * boards/z80/z80/z80sim/include/board.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __BOARDS_Z80_Z80_Z80SIM_INCLUDE_BOARD_H -#define __BOARDS_Z80_Z80_Z80SIM_INCLUDE_BOARD_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Functions Definitions - ****************************************************************************/ -#undef EXTERN -#if defined(__cplusplus) -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -EXTERN void z80_lowputc(char ch) __naked; -EXTERN char z80_lowgetc(void) __naked; - -#undef EXTERN -#if defined(__cplusplus) -} -#endif - -#endif /* __BOARDS_Z80_Z80_Z80SIM_INCLUDE_BOARD_H */ diff --git a/boards/z80/z80/z80sim/scripts/Make.defs b/boards/z80/z80/z80sim/scripts/Make.defs deleted file mode 100644 index 8725f73e54..0000000000 --- a/boards/z80/z80/z80sim/scripts/Make.defs +++ /dev/null @@ -1,29 +0,0 @@ -############################################################################ -# boards/z80/z80/z80sim/scripts/Make.defs -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -include $(TOPDIR)/.config -include $(TOPDIR)/tools/Config.mk -include $(TOPDIR)/arch/z80/src/z80/Toolchain.defs - -CFLAGS := $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -AFLAGS := -x -a -l -o -s -g diff --git a/boards/z80/z80/z80sim/src/.gitignore b/boards/z80/z80/z80sim/src/.gitignore deleted file mode 100644 index 23664e7dab..0000000000 --- a/boards/z80/z80/z80sim/src/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/z80_mem.h -/*.rst -/*.lnk -/*.mem diff --git a/boards/z80/z80/z80sim/src/Makefile b/boards/z80/z80/z80sim/src/Makefile deleted file mode 100644 index 0d9eb5545f..0000000000 --- a/boards/z80/z80/z80sim/src/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -############################################################################ -# boards/z80/z80/z80sim/src/Makefile -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -include $(TOPDIR)/Make.defs - -CSRCS = z80_irq.c z80_timerisr.c z80_lowputc.c z80_serial.c - -include $(TOPDIR)/boards/Board.mk diff --git a/boards/z80/z80/z80sim/src/z80_irq.c b/boards/z80/z80/z80sim/src/z80_irq.c deleted file mode 100644 index 30e3c76f77..0000000000 --- a/boards/z80/z80/z80sim/src/z80_irq.c +++ /dev/null @@ -1,66 +0,0 @@ -/**************************************************************************** - * boards/z80/z80/z80sim/src/z80_irq.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include "z80_internal.h" - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -int z80sim_timerisr(int irq, FAR chipreg_t *regs); - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_irqinitialize - ****************************************************************************/ - -void up_irqinitialize(void) -{ - /* Attach the timer interrupt -- There is not special timer interrupt - * enable in the simulation so it must be enabled here before interrupts - * are enabled. - * - * NOTE: Normally, there are separate enables for "global" interrupts - * and specific device interrupts. In such a "normal" case, the timer - * interrupt should be attached and enabled in the function - * up_timer_initialize() - */ - - irq_attach(Z80_IRQ_SYSTIMER, (xcpt_t)z80sim_timerisr, NULL); - -#ifndef CONFIG_SUPPRESS_INTERRUPTS - /* And finally, enable interrupts (including the timer) */ - - up_irq_restore(Z80_C_FLAG); -#endif -} diff --git a/boards/z80/z80/z80sim/src/z80_lowputc.c b/boards/z80/z80/z80sim/src/z80_lowputc.c deleted file mode 100644 index 2fe2545707..0000000000 --- a/boards/z80/z80/z80sim/src/z80_lowputc.c +++ /dev/null @@ -1,89 +0,0 @@ -/**************************************************************************** - * boards/z80/z80/z80sim/src/z80_lowputc.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include -#include - -#include "z80_internal.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: z80_lowputc - * - * Data sent to port 0xbe are echoed on stdout by the simulation - * - ****************************************************************************/ - -void z80_lowputc(char ch) __naked -{ - __asm__ ( - "\tld hl, #2\n" - "\tadd hl, sp\n" - "\tld a, (hl)\n" - "\tout (0xbe), a\n" - "\tret\n" - ); -} - -/**************************************************************************** - * Name: z80_lowgetc - * - * Data from stdin can be received on port 0xbe in the simulation - * - ****************************************************************************/ - -char z80_lowgetc(void) __naked -{ - __asm__ ( - "\tin a, (0xbe)\n" - "\tld l, a\n" - "\tld h, #0\n" - "\tret\n" - ); -} diff --git a/boards/z80/z80/z80sim/src/z80_serial.c b/boards/z80/z80/z80sim/src/z80_serial.c deleted file mode 100644 index c44b840a6f..0000000000 --- a/boards/z80/z80/z80sim/src/z80_serial.c +++ /dev/null @@ -1,327 +0,0 @@ -/**************************************************************************** - * boards/z80/z80/z80sim/src/z80_serial.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "z80_internal.h" - -#ifdef USE_SERIALDRIVER - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -static int up_setup(FAR struct uart_dev_s *dev); -static void up_shutdown(FAR struct uart_dev_s *dev); -static int up_attach(FAR struct uart_dev_s *dev); -static void up_detach(FAR struct uart_dev_s *dev); -static int up_ioctl(FAR struct file *filep, int cmd, unsigned long arg); -static int up_receive(FAR struct uart_dev_s *dev, unsigned int *status); -static void up_rxint(FAR struct uart_dev_s *dev, bool enable); -static bool up_rxavailable(FAR struct uart_dev_s *dev); -static void up_send(FAR struct uart_dev_s *dev, int ch); -static void up_txint(FAR struct uart_dev_s *dev, bool enable); -static bool up_txready(FAR struct uart_dev_s *dev); -static bool up_txempty(FAR struct uart_dev_s *dev); - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -static const struct uart_ops_s g_uart_ops = -{ - up_setup, /* setup */ - up_shutdown, /* shutdown */ - up_attach, /* attach */ - up_detach, /* detach */ - up_ioctl, /* ioctl */ - up_receive, /* receive */ - up_rxint, /* rxint */ - up_rxavailable, /* rxavailable */ -#ifdef CONFIG_SERIAL_IFLOWCONTROL - NULL, /* rxflowcontrol */ -#endif - up_send, /* send */ - up_txint, /* txint */ - up_txready, /* txready */ - up_txempty, /* txempty */ -}; - -/* I/O buffers */ - -static char g_uartrxbuffer[CONFIG_UART_RXBUFSIZE]; -static char g_uarttxbuffer[CONFIG_UART_TXBUFSIZE]; - -/* This describes the state of the fake UART port. */ - -static uart_dev_t g_uartport = -{ - 0, /* open_count */ - true, /* isconsole */ - { 1 }, /* closesem */ - { 0 }, /* xmitsem */ - { 0 }, /* recvsem */ - { 0 }, /* pollsem */ - { /* xmit */ - { 1 }, /* sem */ - 0, /* head */ - 0, /* tail */ - CONFIG_UART_TXBUFSIZE, /* size */ - g_uarttxbuffer /* buffer */ - }, - { /* recv */ - { 1 }, /* sem */ - 0, /* head */ - 0, /* tail */ - CONFIG_UART_RXBUFSIZE, /* size */ - g_uartrxbuffer /* buffer */ - }, - &g_uart_ops, /* ops */ - NULL, /* priv */ - { /* pollfds */ - NULL - } -}; - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_setup - * - * Description: - * Configure the UART baud, bits, parity, fifos, etc. This - * method is called the first time that the serial port is - * opened. - * - ****************************************************************************/ - -static int up_setup(FAR struct uart_dev_s *dev) -{ - return OK; -} - -/**************************************************************************** - * Name: up_shutdown - * - * Description: - * Disable the UART. This method is called when the serial - * port is closed - * - ****************************************************************************/ - -static void up_shutdown(FAR struct uart_dev_s *dev) -{ -} - -/**************************************************************************** - * Name: up_attach - * - * Description: - * Configure the UART to operation in interrupt driven mode. This method - * is called when the serial port is opened. Normally, this is just after - * the setup() method is called, however, the serial console may operate - * in a non-interrupt driven mode during the boot phase. - * - * RX and TX interrupts are not enabled by the attach method (unless the - * hardware supports multiple levels of interrupt enabling). - * The RX and TX interrupts are not enabled until the txint() and rxint() - * methods are called. - * - ****************************************************************************/ - -static int up_attach(FAR struct uart_dev_s *dev) -{ - return OK; -} - -/**************************************************************************** - * Name: up_detach - * - * Description: - * Detach UART interrupts. This method is called when the serial port is - * closed normally just before the shutdown method is called. - * The exception is the serial console which is never shutdown. - * - ****************************************************************************/ - -static void up_detach(FAR struct uart_dev_s *dev) -{ -} - -/**************************************************************************** - * Name: up_ioctl - * - * Description: - * All ioctl calls will be routed through this method - * - ****************************************************************************/ - -static int up_ioctl(FAR struct file *filep, int cmd, unsigned long arg) -{ - return -ENOTTY; -} - -/**************************************************************************** - * Name: up_receive - * - * Description: - * Called (usually) from the interrupt level to receive one - * character from the UART. Error bits associated with the - * receipt are provided in the return 'status'. - * - ****************************************************************************/ - -static int up_receive(FAR struct uart_dev_s *dev, unsigned int *status) -{ - uint8_t ch = z80_lowgetc(); - *status = 0; - return ch; -} - -/**************************************************************************** - * Name: up_rxint - * - * Description: - * Call to enable or disable RX interrupts - * - ****************************************************************************/ - -static void up_rxint(FAR struct uart_dev_s *dev, bool enable) -{ -} - -/**************************************************************************** - * Name: up_rxavailable - * - * Description: - * Return true if the receive fifo is not empty - * - ****************************************************************************/ - -static bool up_rxavailable(FAR struct uart_dev_s *dev) -{ - return true; -} - -/**************************************************************************** - * Name: up_send - * - * Description: - * This method will send one byte on the UART - * - ****************************************************************************/ - -static void up_send(FAR struct uart_dev_s *dev, int ch) -{ - z80_lowputc(ch); -} - -/**************************************************************************** - * Name: up_txint - * - * Description: - * Call to enable or disable TX interrupts - * - ****************************************************************************/ - -static void up_txint(FAR struct uart_dev_s *dev, bool enable) -{ -} - -/**************************************************************************** - * Name: up_txready - * - * Description: - * Return true if the tranmsit fifo is not full - * - ****************************************************************************/ - -static bool up_txready(FAR struct uart_dev_s *dev) -{ - return true; -} - -/**************************************************************************** - * Name: up_txempty - * - * Description: - * Return true if the transmit fifo is empty - * - ****************************************************************************/ - -static bool up_txempty(FAR struct uart_dev_s *dev) -{ - return true; -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: z80_serial_initialize - * - * Description: - * Register serial console and serial ports. - * - ****************************************************************************/ - -void z80_serial_initialize(void) -{ - uart_register("/dev/console", &g_uartport); - uart_register("/dev/ttyS0", &g_uartport); -} - -#endif /* USE_SERIALDRIVER */ - -/**************************************************************************** - * Name: up_putc - * - * Description: - * Provide priority, low-level access to support OS debug - * writes - * - ****************************************************************************/ - -void up_putc(int ch) -{ - z80_lowputc(ch); - return 0; -} diff --git a/boards/z80/z80/z80sim/src/z80_timerisr.c b/boards/z80/z80/z80sim/src/z80_timerisr.c deleted file mode 100644 index ed34198a7b..0000000000 --- a/boards/z80/z80/z80sim/src/z80_timerisr.c +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************************** - * boards/z80/z80/z80sim/src/z80_timerisr.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#include "clock/clock.h" -#include "z80_internal.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Function: z80sim_timerisr - * - * Description: - * The timer ISR will perform a variety of services for various portions of - * the system. - * - ****************************************************************************/ - -int z80sim_timerisr(int irq, FAR chipreg_t *regs, void *arg) -{ - /* Process timer interrupt */ - - nxsched_process_timer(); - return 0; -} - -/**************************************************************************** - * Function: up_timer_initialize - * - * Description: - * This function is called during start-up to initialize the timer - * interrupt. - * - ****************************************************************************/ - -void up_timer_initialize(void) -{ - /* The timer interrupt was attached in up_irqinitialize -- see comments - * there. - */ -} diff --git a/crypto/Kconfig b/crypto/Kconfig index 7ce0ebf33b..7a289e3608 100644 --- a/crypto/Kconfig +++ b/crypto/Kconfig @@ -3,7 +3,7 @@ # see the file kconfig-language.txt in the NuttX tools repository. # -config CRYPTO +menuconfig CRYPTO bool "Crypto API support" default n ---help--- @@ -85,5 +85,4 @@ config CRYPTO_RANDOM_POOL_COLLECT_IRQ_RANDOMNESS for every interrupt handled. endif # CRYPTO_RANDOM_POOL - -endif # CRYPTO +endif # CRYPTO \ No newline at end of file diff --git a/crypto/Makefile b/crypto/Makefile index f315dd81f5..7e79244e32 100644 --- a/crypto/Makefile +++ b/crypto/Makefile @@ -20,103 +20,87 @@ # ############################################################################ -include $(TOPDIR)/Make.defs - -ifeq ($(CONFIG_CRYPTO),y) - # Basic -CRYPTO_CSRCS += crypto.c testmngr.c +CSRCS += crypto.c testmngr.c # cryptodev support ifeq ($(CONFIG_CRYPTO_CRYPTODEV),y) - CRYPTO_CSRCS += cryptodev.c -ifeq ($(CONFIG_CRYPTO_CRYPTODEV_SOFTWARE),y) - CRYPTO_CSRCS += cryptosoft.c - CRYPTO_CSRCS += xform.c -endif + CSRCS += cryptodev.c + ifeq ($(CONFIG_CRYPTO_CRYPTODEV_SOFTWARE),y) + CSRCS += cryptosoft.c + CSRCS += xform.c + endif endif # Software crypto algorithm ifeq ($(CONFIG_CRYPTO_SW_AES),y) - CRYPTO_CSRCS += aes.c + CSRCS += aes.c endif -CRYPTO_CSRCS += blake2s.c -CRYPTO_CSRCS += blf.c -CRYPTO_CSRCS += cast.c -CRYPTO_CSRCS += chachapoly.c -CRYPTO_CSRCS += ecb_enc.c -CRYPTO_CSRCS += ecb3_enc.c -CRYPTO_CSRCS += set_key.c -CRYPTO_CSRCS += md5.c -CRYPTO_CSRCS += poly1305.c -CRYPTO_CSRCS += rijndael.c -CRYPTO_CSRCS += rmd160.c -CRYPTO_CSRCS += sha1.c -CRYPTO_CSRCS += sha2.c -CRYPTO_CSRCS += gmac.c -CRYPTO_CSRCS += cmac.c -CRYPTO_CSRCS += hmac.c + +CSRCS += blake2s.c +CSRCS += blf.c +CSRCS += cast.c +CSRCS += chachapoly.c +CSRCS += ecb_enc.c +CSRCS += ecb3_enc.c +CSRCS += set_key.c +CSRCS += md5.c +CSRCS += poly1305.c +CSRCS += rijndael.c +CSRCS += rmd160.c +CSRCS += sha1.c +CSRCS += sha2.c +CSRCS += gmac.c +CSRCS += cmac.c +CSRCS += hmac.c ifeq ($(CONFIG_CRYPTO_RANDOM_POOL),y) - CRYPTO_CSRCS += idgen.c - CRYPTO_CSRCS += curve25519.c + CSRCS += idgen.c + CSRCS += curve25519.c endif -CRYPTO_CSRCS += key_wrap.c -CRYPTO_CSRCS += siphash.c -CRYPTO_CSRCS += hmac_buff.c -CRYPTO_CSRCS += bn.c +CSRCS += key_wrap.c +CSRCS += siphash.c +CSRCS += hmac_buff.c +CSRCS += bn.c # Entropy pool random number generator ifeq ($(CONFIG_CRYPTO_RANDOM_POOL),y) - CRYPTO_CSRCS += random_pool.c + CSRCS += random_pool.c endif -endif # CONFIG_CRYPTO +AOBJS = $(ASRCS:.S=.o) +ABJS := $(addprefix ${NXOUT}/, $(AOBJS)) -ASRCS = $(CRYPTO_ASRCS) -AOBJS = $(ASRCS:.S=$(OBJEXT)) - -CSRCS = $(CRYPTO_CSRCS) -COBJS = $(CSRCS:.c=$(OBJEXT)) +COBJS = $(CSRCS:.c=.o) +COBJS := $(addprefix ${NXOUT}/, $(COBJS)) SRCS = $(ASRCS) $(CSRCS) OBJS = $(AOBJS) $(COBJS) -BIN = libcrypto$(LIBEXT) +BIN = libcrypto.a -all: $(BIN) -.PHONY: depend clean distclean - -$(AOBJS): %$(OBJEXT): %.S +$(AOBJS): ${NXOUT}/%.o: %.S $(call ASSEMBLE, $<, $@) -$(COBJS): %$(OBJEXT): %.c +$(COBJS): ${NXOUT}/%.o: %.c $(call COMPILE, $<, $@) -$(BIN): $(OBJS) - $(call ARCHIVE, $@, $(OBJS)) +symlink: + $(call LINK, ${ARCH_DIR}/include, ${NXBASE}/include/arch) + $(call LINK, ${NXBASE}/soc/arm/include/${ARCH_CHIP}, ${NXBASE}/include/chip) + $(call LINK, ${NXOUT}/config.h, ${NXBASE}/include/nuttx/config.h) -makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds) - $(call CATFILE, Make.dep, $^) - $(call DELFILE, $^) +unlink: + $(call UNLINK, ${NXBASE}/include/arch) + $(call UNLINK, ${NXBASE}/include/chip) + $(call UNLINK, ${NXBASE}/include/nuttx/config.h) -.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config -ifeq ($(CONFIG_CRYPTO),y) - $(Q) $(MAKE) makedepfile -endif - $(Q) touch $@ +${BIN} : ${OBJS} + $(call ARCHIVE, ${NXOUT}/$@, $^) -depend: .depend - -clean: - $(call DELFILE, $(BIN)) - $(call CLEAN) - -distclean: clean - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - --include Make.dep +.PHONY: symlink unlink all +.IGNORE: $(BIN) +all: symlink $(BIN) unlink \ No newline at end of file diff --git a/drivers/Kconfig b/drivers/Kconfig index 7f4cdacba3..6848bc5a60 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -3,10 +3,6 @@ # see the file kconfig-language.txt in the NuttX tools repository. # -config SPECIFIC_DRIVERS - bool "Board Specific drivers" - default n - source "drivers/crypto/Kconfig" source "drivers/loop/Kconfig" source "drivers/can/Kconfig" @@ -53,7 +49,6 @@ source "drivers/wireless/Kconfig" source "drivers/contactless/Kconfig" source "drivers/1wire/Kconfig" source "drivers/syslog/Kconfig" -source "$BINDIR/drivers/platform/Kconfig" source "drivers/rf/Kconfig" source "drivers/rc/Kconfig" source "drivers/motor/Kconfig" diff --git a/drivers/Makefile b/drivers/Makefile index 4bc9fd6f13..2ccf579326 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -20,8 +20,6 @@ # ############################################################################ -include $(TOPDIR)/Make.defs - CSRCS = drivers_initialize.c # Include support for various drivers. Each Make.defs file will add its @@ -29,7 +27,11 @@ CSRCS = drivers_initialize.c # the appropriate paths to the VPATH variable include analog/Make.defs -include audio/Make.defs + +ifeq ($(CONFIG_DRIVERS_AUDIO),y) + include audio/Make.defs +endif + include bch/Make.defs include can/Make.defs include clk/Make.defs @@ -88,28 +90,28 @@ include coresight/Make.defs include aie/Make.defs ifeq ($(CONFIG_SPECIFIC_DRIVERS),y) --include platform/Make.defs + -include platform/Make.defs endif -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=.o) +COBJS = $(CSRCS:.c=.o) SRCS = $(ASRCS) $(CSRCS) OBJS = $(AOBJS) $(COBJS) -BIN = libdrivers$(LIBEXT) +BIN = libdrivers.o all: $(BIN) .PHONY: context depend clean distclean -$(AOBJS): %$(OBJEXT): %.S +$(AOBJS): %.o: %.S $(call ASSEMBLE, $<, $@) -$(COBJS): %$(OBJEXT): %.c +$(COBJS): %.o: %.c $(call COMPILE, $<, $@) $(BIN): $(OBJS) - $(call ARCHIVE, $@, $(OBJS)) + $(call ARCHIVE, $@, $^) context:: @@ -117,18 +119,10 @@ makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds) $(call CATFILE, Make.dep, $^) $(call DELFILE, $^) -.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config +.depend: Makefile $(SRCS) $(TOPDIR)/.config $(Q) $(MAKE) makedepfile $(Q) touch $@ depend: .depend -clean: - $(call DELFILE, $(BIN)) - $(call CLEAN) - -distclean:: clean - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - -include Make.dep diff --git a/drivers/analog/Make.defs b/drivers/analog/Make.defs index 02a420cdbf..8cdbb16f1c 100644 --- a/drivers/analog/Make.defs +++ b/drivers/analog/Make.defs @@ -136,22 +136,22 @@ endif ifeq ($(CONFIG_DAC),y) DEPPATH += --dep-path analog VPATH += :analog - CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)analog + CFLAGS += -I${NXBASE}/drivers/analog else ifeq ($(CONFIG_ADC),y) DEPPATH += --dep-path analog VPATH += :analog - CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)analog + CFLAGS += -I${NXBASE}/drivers/analog else ifeq ($(CONFIG_COMP),y) DEPPATH += --dep-path analog VPATH += :analog - CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)analog + CFLAGS += -I${NXBASE}/drivers/analog else ifeq ($(CONFIG_OPAMP),y) DEPPATH += --dep-path analog VPATH += :analog - CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)analog + CFLAGS += -I${NXBASE}/drivers/analog endif endif endif diff --git a/drivers/audio/Make.defs b/drivers/audio/Make.defs index c7a23928dd..101eb2b826 100644 --- a/drivers/audio/Make.defs +++ b/drivers/audio/Make.defs @@ -22,90 +22,81 @@ # Include Audio drivers -ifeq ($(CONFIG_DRIVERS_AUDIO),y) ifeq ($(CONFIG_AUDIO_VS1053),y) -CSRCS += vs1053.c + CSRCS += vs1053.c endif ifeq ($(CONFIG_AUDIO_CS43L22),y) -CSRCS += cs43l22.c -ifeq ($(CONFIG_CS43L22_REGDUMP),y) -CSRCS += cs43l22_debug.c -else -ifeq ($(CONFIG_CS43L22_CLKDEBUG),y) -CSRCS += cs43l22_debug.c -endif -endif + CSRCS += cs43l22.c + ifeq ($(CONFIG_CS43L22_REGDUMP),y) + CSRCS += cs43l22_debug.c + else ifeq ($(CONFIG_CS43L22_CLKDEBUG),y) + CSRCS += cs43l22_debug.c + endif endif ifeq ($(CONFIG_AUDIO_CS4344),y) -CSRCS += cs4344.c + CSRCS += cs4344.c endif ifeq ($(CONFIG_AUDIO_ES8311),y) -CSRCS += es8311.c -ifeq ($(CONFIG_ES8311_REGDUMP),y) -CSRCS += es8311_debug.c -endif + CSRCS += es8311.c + ifeq ($(CONFIG_ES8311_REGDUMP),y) + CSRCS += es8311_debug.c + endif endif ifeq ($(CONFIG_AUDIO_ES8388),y) -CSRCS += es8388.c -ifeq ($(CONFIG_ES8388_REGDUMP),y) -CSRCS += es8388_debug.c -endif + CSRCS += es8388.c + ifeq ($(CONFIG_ES8388_REGDUMP),y) + CSRCS += es8388_debug.c + endif endif ifeq ($(CONFIG_AUDIO_WM8994),y) -CSRCS += wm8994.c -ifeq ($(CONFIG_WM8994_REGDUMP),y) -CSRCS += wm8994_debug.c -else -ifeq ($(CONFIG_WM8994_CLKDEBUG),y) -CSRCS += wm8994_debug.c -endif -endif + CSRCS += wm8994.c + ifeq ($(CONFIG_WM8994_REGDUMP),y) + CSRCS += wm8994_debug.c + else ifeq ($(CONFIG_WM8994_CLKDEBUG),y) + CSRCS += wm8994_debug.c + endif endif ifeq ($(CONFIG_AUDIO_WM8904),y) -CSRCS += wm8904.c -ifeq ($(CONFIG_WM8904_REGDUMP),y) -CSRCS += wm8904_debug.c -else -ifeq ($(CONFIG_WM8904_CLKDEBUG),y) -CSRCS += wm8904_debug.c -endif -endif + CSRCS += wm8904.c + ifeq ($(CONFIG_WM8904_REGDUMP),y) + CSRCS += wm8904_debug.c + else ifeq ($(CONFIG_WM8904_CLKDEBUG),y) + CSRCS += wm8904_debug.c + endif endif ifeq ($(CONFIG_AUDIO_WM8776),y) -CSRCS += wm8776.c + CSRCS += wm8776.c endif ifeq ($(CONFIG_AUDIO_NULL),y) -CSRCS += audio_null.c + CSRCS += audio_null.c endif ifeq ($(CONFIG_AUDIO_FAKE),y) -CSRCS += audio_fake.c + CSRCS += audio_fake.c endif ifeq ($(CONFIG_AUDIO_TONE),y) -CSRCS += tone.c + CSRCS += tone.c endif ifeq ($(CONFIG_AUDIO_I2S),y) -CSRCS += audio_i2s.c + CSRCS += audio_i2s.c endif ifeq ($(CONFIG_AUDIO_DMA),y) -CSRCS += audio_dma.c + CSRCS += audio_dma.c endif # Include Audio driver support DEPPATH += --dep-path audio VPATH += :audio - -endif diff --git a/drivers/dummy/CMakeLists.txt b/drivers/dummy/CMakeLists.txt deleted file mode 100644 index 9916304c81..0000000000 --- a/drivers/dummy/CMakeLists.txt +++ /dev/null @@ -1,23 +0,0 @@ -############################################################################ -# drivers/dummy/CMakeLists.txt -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - - diff --git a/drivers/dummy/Kconfig b/drivers/dummy/Kconfig deleted file mode 100644 index f72f3c094c..0000000000 --- a/drivers/dummy/Kconfig +++ /dev/null @@ -1,4 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# diff --git a/drivers/loop/Make.defs b/drivers/loop/Make.defs index 88924c13ed..3a6ba163ed 100644 --- a/drivers/loop/Make.defs +++ b/drivers/loop/Make.defs @@ -24,18 +24,18 @@ ifneq ($(CONFIG_DISABLE_MOUNTPOINT),y) -# Include loop device support + # Include loop device support -ifeq ($(CONFIG_DEV_LOOP),y) - CSRCS += loop.c -endif + ifeq ($(CONFIG_DEV_LOOP),y) + CSRCS += loop.c + endif -CSRCS += losetup.c + CSRCS += losetup.c -# Add loop devicer build support + # Add loop devicer build support -DEPPATH += --dep-path loop -VPATH += :loop -CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)loop + DEPPATH += --dep-path loop + VPATH += :loop + CFLAGS += -I${NXBASE}/drivers/loop endif diff --git a/drivers/sensors/Make.defs b/drivers/sensors/Make.defs index 870afeb40d..46f5f46998 100644 --- a/drivers/sensors/Make.defs +++ b/drivers/sensors/Make.defs @@ -476,6 +476,6 @@ endif DEPPATH += --dep-path sensors VPATH += :sensors -CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)sensors +CFLAGS += -I${NXBASE}/drivers/sensors endif # CONFIG_SENSORS diff --git a/drivers/sensors/ak09912.c b/drivers/sensors/ak09912.c index ea94a8f003..290ecfacb0 100644 --- a/drivers/sensors/ak09912.c +++ b/drivers/sensors/ak09912.c @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/dummy/Kconfig b/dummy/Kconfig deleted file mode 100644 index 8e28fe6a4b..0000000000 --- a/dummy/Kconfig +++ /dev/null @@ -1 +0,0 @@ -# This is supposed to be empty diff --git a/dummy/README.md b/dummy/README.md deleted file mode 100644 index 150147a124..0000000000 --- a/dummy/README.md +++ /dev/null @@ -1,2 +0,0 @@ -This directory exists to hold an empty Kconfig which is used -when no nuttx/external is present. diff --git a/graphics/Makefile b/graphics/Makefile index f987e68df3..7e03a1bdcf 100644 --- a/graphics/Makefile +++ b/graphics/Makefile @@ -20,22 +20,23 @@ # ############################################################################ -include $(TOPDIR)/Make.defs +# TODO: This needs rework... include nxglib/Make.defs include nxbe/Make.defs include nxmu/Make.defs include nxterm/Make.defs -CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)graphics +CFLAGS += -I ${NXBASE}/graphics -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=.o) +COBJS = $(CSRCS:.c=.o) SRCS = $(ASRCS) $(CSRCS) -OBJS = $(AOBJS) $(COBJS) -BIN = libgraphics$(LIBEXT) +OBJS := $(addprefix ${OUT}/, $(AOBJS) $(COBJS)) + +BIN = ${OUT}/libgraphics.a all: mklibgraphics .PHONY : context depend clean distclean mklibgraphics gensources gen1bppsources \ @@ -98,10 +99,10 @@ endif gensources: gen1bppsources gen2bppsource gen4bppsource gen8bppsource gen16bppsource gen24bppsource gen32bppsources -$(AOBJS): %$(OBJEXT): %.S +$(AOBJS): ${OUT}/%.o: %.S $(call ASSEMBLE, $<, $@) -$(COBJS): %$(OBJEXT): %.c +$(COBJS): ${OUT}/%.o: %.c $(call COMPILE, $<, $@) $(BIN): $(OBJS) diff --git a/include/inttypes.h b/include/inttypes.h index 6111de0f8f..189a96ac12 100644 --- a/include/inttypes.h +++ b/include/inttypes.h @@ -36,7 +36,7 @@ #include -#include +#include /**************************************************************************** * Pre-processor Definitions diff --git a/include/limits.h b/include/limits.h index 4d9a65d07c..9fc0226325 100644 --- a/include/limits.h +++ b/include/limits.h @@ -30,7 +30,6 @@ #include /* Architecture specific limits */ - #include /**************************************************************************** diff --git a/include/sys/types.h b/include/sys/types.h index e059ef20ab..73e828fe5b 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -336,10 +336,7 @@ extern "C" #endif /* This entry point must be supplied by the application */ - -#ifdef CONFIG_INIT_ENTRYPOINT -int CONFIG_INIT_ENTRYPOINT(int argc, FAR char *argv[]); -#endif +int app_init(int argc, FAR char *argv[]); #undef EXTERN #if defined(__cplusplus) diff --git a/libs/libc/Makefile b/libs/libc/Makefile index 33bcba86d0..090b2fb756 100644 --- a/libs/libc/Makefile +++ b/libs/libc/Makefile @@ -20,8 +20,6 @@ # ########################################################################### -include $(TOPDIR)/Make.defs - include aio/Make.defs include assert/Make.defs include audio/Make.defs @@ -73,43 +71,29 @@ include wctype/Make.defs include wqueue/Make.defs include fdt/Make.defs -# Use double delim to fix windows native build and give an error: -# makefile:132: *** target mode do not include“%”. stop. -# -# In Windows environment DELIM := $(strip \) but \ has two role: -# first: \ as directory, and second \ as Escape character, Reference: -# -# https://github.com/apache/nuttx/pull/7572#discussion_r1028219229 - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) - DELIMS = $(DELIM)$(DELIM) -else - DELIMS = $(DELIM) -endif - -CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)libs$(DELIM)libc -AFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)libs$(DELIM)libc +CFLAGS += -I ${NXBASE}/libs/libc +AFLAGS += -I ${NXBASE}/libs/libc # Rule for the symbol table generation -MKSYMTAB = $(TOPDIR)$(DELIM)tools$(DELIM)mksymtab$(HOSTEXEEXT) +MKSYMTAB = ${NXBASE}/tools/mksymtab -$(MKSYMTAB): - $(Q) $(MAKE) -C $(TOPDIR)$(DELIM)tools -f Makefile.host mksymtab +${MKSYMTAB}: + $(Q) $(MAKE) -C ${NXBASE}/tools -f Makefile.host mksymtab # C library and math library symbols should be available in the FLAT # and PROTECTED builds. KERNEL builds are separately linked and so should # not need symbol tables. -CSVFILES = $(TOPDIR)$(DELIM)libs$(DELIM)libc$(DELIM)libc.csv -CSVFILES += $(TOPDIR)$(DELIM)libs$(DELIM)libm$(DELIM)libm.csv +CSVFILES = ${NXBASE}/libs/libc/libc.csv +CSVFILES += ${NXBASE}/libs/libm/libm.csv # In the PROTECTED and KERNEL builds, the applications could link with # libproxy which will provide symbol-compatible access to OS functions # via a call gate, but the applications which link with these functions # directly could remove the repeat proxy code to save the space. -CSVFILES += $(TOPDIR)$(DELIM)syscall$(DELIM)syscall.csv +CSVFILES += ${NXBASE}/syscall/syscall.csv ifeq ($(CONFIG_EXECFUNCS_SYSTEM_SYMTAB),y) @@ -141,8 +125,8 @@ COBJS = $(patsubst %.c, $(BINDIR)$(DELIMS)%$(OBJEXT), $(CSRCS)) SRCS = $(ASRCS) $(CSRCS) OBJS = $(AOBJS) $(COBJS) -KBIN = libkc$(LIBEXT) -BIN ?= libc$(LIBEXT) +KBIN = libkc.o +BIN ?= libc.o all: $(BIN) .PHONY: clean distclean diff --git a/libs/libxx/Makefile b/libs/libxx/Makefile index 86a9f0b7f7..4791ccc543 100644 --- a/libs/libxx/Makefile +++ b/libs/libxx/Makefile @@ -19,8 +19,6 @@ # ########################################################################### -include $(TOPDIR)/Make.defs - # Include the uClibc++ Make.defs file if selected. If it is included, # the uClibc++/Make.defs file will add its files to the source file list, # add its DEPPATH info, and will add the appropriate paths to the VPATH @@ -49,18 +47,18 @@ endif # Object Files -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) -CXXOBJS = $(CXXSRCS:.cxx=$(OBJEXT)) -CPPOBJS = $(CPPSRCS:.cpp=$(OBJEXT)) +AOBJS = $(ASRCS:.S=.o) +COBJS = $(CSRCS:.c=.o) +CXXOBJS = $(CXXSRCS:.cxx=.o) +CPPOBJS = $(CPPSRCS:.cpp=.o) SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS) $(CPPSRCS) -OBJS = $(AOBJS) $(COBJS) $(CXXOBJS) $(CPPOBJS) +OBJS := $(addprefix ${OUT}/, $(AOBJS) $(COBJS) $(CXXOBJS) $(CPPOBJS)) -BIN = libxx$(LIBEXT) +BIN = ${OUT}/libxx.o all: $(BIN) -.PHONY: depend clean distclean context +.PHONY: depend context $(AOBJS): %$(OBJEXT): %.S $(call ASSEMBLE, $<, $@) @@ -89,12 +87,4 @@ makedepfile: $(CXXSRCS:.cxx=.ddx) $(CPPSRCS:.cpp=.ddp) depend: .depend -clean: - $(call DELFILE, $(BIN)) - $(call CLEAN) - -distclean:: clean - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - -include Make.dep diff --git a/mm/mm_gran/mm_gran.h b/mm/mm_gran/mm_gran.h index 4257cd7885..e0a1a53606 100644 --- a/mm/mm_gran/mm_gran.h +++ b/mm/mm_gran/mm_gran.h @@ -31,7 +31,7 @@ #include -#include +#include #include #include #include diff --git a/net/Kconfig b/net/Kconfig index 10ce0b2301..46066fccda 100644 --- a/net/Kconfig +++ b/net/Kconfig @@ -3,6 +3,15 @@ # see the file kconfig-language.txt in the NuttX tools repository. # +menuconfig NET + bool "Networking support" + default n + select ARCH_HAVE_NET + ---help--- + Enable or disable all network features + +if NET + config ARCH_HAVE_NET bool default n @@ -41,15 +50,6 @@ config NET_MCASTGROUP bool default n -config NET - bool "Networking support" - default n - select ARCH_HAVE_NET - ---help--- - Enable or disable all network features - -if NET - config NET_PROMISCUOUS bool "Promiscuous mode" default n diff --git a/net/Makefile b/net/Makefile index 5263eb1e62..f7b01efd3f 100644 --- a/net/Makefile +++ b/net/Makefile @@ -59,21 +59,22 @@ include usrsock/Make.defs include utils/Make.defs endif -CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)net +CFLAGS += -I ${NXBASE}/net ASRCS = $(SOCK_ASRCS) $(NETDEV_ASRCS) $(NET_ASRCS) -AOBJS = $(ASRCS:.S=$(OBJEXT)) +AOBJS = $(ASRCS:.S=.o) CSRCS = $(SOCK_CSRCS) $(NETDEV_CSRCS) $(NET_CSRCS) -COBJS = $(CSRCS:.c=$(OBJEXT)) +COBJS = $(CSRCS:.c=.o) SRCS = $(ASRCS) $(CSRCS) -OBJS = $(AOBJS) $(COBJS) -BIN = libnet$(LIBEXT) +OBJS := $(addprefix ${OUT}/, $(AOBJS) $(COBJS)) + +BIN = libnet.a all: $(BIN) -.PHONY: depend clean distclean +.PHONY: depend $(AOBJS): %$(OBJEXT): %.S $(call ASSEMBLE, $<, $@) @@ -96,12 +97,4 @@ endif depend: .depend -clean: - $(call DELFILE, $(BIN)) - $(call CLEAN) - -distclean: clean - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - -include Make.dep diff --git a/sched/Makefile b/sched/Makefile index 92989e8125..a34abb6380 100644 --- a/sched/Makefile +++ b/sched/Makefile @@ -20,8 +20,6 @@ # ############################################################################ -include $(TOPDIR)/Make.defs - include addrenv/Make.defs include clock/Make.defs include environ/Make.defs @@ -44,23 +42,24 @@ include tls/Make.defs include wdog/Make.defs include wqueue/Make.defs -CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)sched +CFLAGS += -I ${NXBASE}/sched -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=.o) +COBJS = $(CSRCS:.c=.o) SRCS = $(ASRCS) $(CSRCS) -OBJS = $(AOBJS) $(COBJS) -BIN = libsched$(LIBEXT) +OBJS := $(addprefix ${OUT}/, $(AOBJS) $(COBJS)) + +BIN = ${OUT}/libsched.a all: $(BIN) .PHONY: context depend clean distclean -$(AOBJS): %$(OBJEXT): %.S +$(AOBJS): ${OUT}/%.o: %.S $(call ASSEMBLE, $<, $@) -$(COBJS): %$(OBJEXT): %.c +$(COBJS): ${OUT}/%.o: %.c $(call COMPILE, $<, $@) $(BIN): $(OBJS) @@ -76,12 +75,4 @@ makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds) depend: .depend -clean: - $(call DELFILE, $(BIN)) - $(call CLEAN) - -distclean: clean - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - -include Make.dep diff --git a/dummy/CMakeLists.txt b/soc/Kconfig similarity index 100% rename from dummy/CMakeLists.txt rename to soc/Kconfig diff --git a/soc/arm/Kconfig b/soc/arm/Kconfig new file mode 100644 index 0000000000..206131b677 --- /dev/null +++ b/soc/arm/Kconfig @@ -0,0 +1,980 @@ + +choice + prompt "ARM MCU selection" + default ARCH_CHIP_STM32 + +config ARCH_CHIP_A1X + bool "Allwinner A1X" + select ARCH_CORTEXA8 + select ARM_HAVE_NEON + select ARCH_HAVE_IRQPRIO + select ARCH_HAVE_LOWVECTORS + select ARCH_HAVE_FETCHADD + select ARCH_HAVE_SDRAM + depends on BOOT_RUNFROMSDRAM + select ARCH_HAVE_ADDRENV + select ARCH_NEED_ADDRENV_MAPPING + ---help--- + Allwinner A1X family: A10, A10S (A12), A13 (ARM Cortex-A8) + +config ARCH_CHIP_AM335X + bool "TI AM335X" + select ARCH_CORTEXA8 + select ARM_HAVE_NEON + select ARCH_HAVE_IRQPRIO + select ARCH_HAVE_LOWVECTORS + select ARCH_HAVE_FETCHADD + select ARCH_HAVE_SDRAM + depends on BOOT_RUNFROMSDRAM + select ARCH_HAVE_ADDRENV + select ARCH_NEED_ADDRENV_MAPPING + ---help--- + TI AM335X family: AM3356, AM3357, AM3358, AM3359 (ARM Cortex-A8) + +config ARCH_CHIP_FVP_ARMV8R_AARCH32 + bool "ARM FVP virt platform (ARMv8r AARCH32)" + select ARCH_CORTEXR52 + select ARCH_HAVE_LOWVECTORS + select ARCH_HAVE_FETCHADD + select ARCH_HAVE_IRQPRIO + select ARCH_HAVE_HIPRI_INTERRUPT + select ARCH_HAVE_FPU + ---help--- + ARM FVP virt platform (ARMv8r) + +config ARCH_CHIP_C5471 + bool "TMS320 C5471" + select ARCH_ARM7TDMI + select ARCH_HAVE_LOWVECTORS + select OTHER_UART_SERIALDRIVER + ---help--- + TI TMS320 C5471, A180, or DA180 (ARM7TDMI) + +config ARCH_CHIP_CSK6 + bool "LISTEANAI CSK6 6001A/6011B/6012" + select ARCH_HAVE_MPU + select ARCH_HAVE_FETCHADD + select ARCH_HAVE_I2CRESET + select ARCH_HAVE_HEAPCHECK + select ARCH_HAVE_PROGMEM + select ARCH_HAVE_SPI_BITORDER + select ARCH_HAVE_TICKLESS + select ARCH_HAVE_TIMEKEEPING + select ARM_HAVE_MPU_UNIFIED + select ARMV8M_HAVE_STACKCHECK + select ARCH_HAVE_ADJTIME + select ARCH_CORTEXM33 + ---help--- + LISTEANAI CSK6 architectures (ARM Cortex-M33). + +config ARCH_CHIP_DM320 + bool "TMS320 DM320" + select ARCH_ARM926EJS + select ARCH_HAVE_LOWVECTORS + ---help--- + TI DMS320 DM320 (ARM926EJS) + +config ARCH_CHIP_EFM32 + bool "Energy Micro EFM32" + select ARCH_HAVE_SPI_BITORDER + select ARCH_HAVE_FETCHADD + ---help--- + Energy Micro EFM32 microcontrollers (ARM Cortex-M). + +config ARCH_CHIP_EOSS3 + bool "QuickLogic EOS S3" + select ARCH_CORTEXM4 + select ARCH_HAVE_MPU + select ARM_HAVE_MPU_UNIFIED + select ARCH_HAVE_FPU + ---help--- + QuickLogic EOS S3 (ARM Cortex-M4) + +config ARCH_CHIP_GD32F4 + bool "GD32MCU GD32 F4" + select ARCH_CORTEXM4 + select ARCH_HAVE_MPU + select ARCH_HAVE_FETCHADD + select ARCH_HAVE_I2CRESET + select ARCH_HAVE_HEAPCHECK + select ARCH_HAVE_PROGMEM + select ARCH_HAVE_SPI_BITORDER + select ARCH_HAVE_TICKLESS + select ARM_HAVE_MPU_UNIFIED + select ARMV7M_HAVE_STACKCHECK + ---help--- + GD32MCU GD32 architectures (ARM Cortex-M4). + +config ARCH_CHIP_IMX1 + bool "NXP/Freescale iMX.1" + select ARCH_ARM920T + select ARCH_HAVE_HEAP2 + select ARCH_HAVE_LOWVECTORS + ---help--- + Freescale iMX.1 architectures (ARM920T) + +config ARCH_CHIP_IMX6 + bool "NXP/Freescale iMX.6" + select ARCH_CORTEXA9 + select ARM_THUMB + select ARMV7A_HAVE_L2CC_PL310 + select ARM_HAVE_NEON + select ARCH_HAVE_TRUSTZONE + select ARCH_HAVE_LOWVECTORS + select ARCH_HAVE_FETCHADD + select ARCH_HAVE_SDRAM + depends on BOOT_RUNFROMSDRAM + select ARCH_HAVE_ADDRENV + select ARCH_NEED_ADDRENV_MAPPING + ---help--- + Freescale iMX.6 architectures (Cortex-A9) + +config ARCH_CHIP_IMX9_CORTEX_M + bool "NXP iMX.9 Cortex-M7" + select ARCH_CORTEXM7 + select ARCH_HAVE_MPU + select ARCH_HAVE_FETCHADD + select ARCH_HAVE_RAMFUNCS + select ARCH_HAVE_TICKLESS + select ARCH_HAVE_I2CRESET + select ARCH_HAVE_SPI_CS_CONTROL + select ARM_HAVE_MPU_UNIFIED + select ARMV7M_HAVE_STACKCHECK + ---help--- + iMX.9 architectures (Cortex-M7) + +config ARCH_CHIP_IMXRT + bool "NXP/Freescale iMX.RT" + select ARCH_CORTEXM7 + select ARCH_HAVE_MPU + select ARCH_HAVE_FETCHADD + select ARCH_HAVE_RAMFUNCS + select ARCH_HAVE_TICKLESS + select ARCH_HAVE_I2CRESET + select ARCH_HAVE_SPI_CS_CONTROL + select ARM_HAVE_MPU_UNIFIED + select ARMV7M_HAVE_STACKCHECK + ---help--- + NXP i.MX RT (ARM Cortex-M7) architectures + +config ARCH_CHIP_KINETIS + bool "NXP/Freescale Kinetis" + select ARCH_CORTEXM4 + select ARCH_HAVE_MPU + select ARM_HAVE_MPU_UNIFIED + select ARCH_HAVE_FPU + select ARCH_HAVE_FETCHADD + select ARCH_HAVE_RAMFUNCS + select ARCH_HAVE_I2CRESET + ---help--- + Freescale Kinetis Architectures (ARM Cortex-M4) + +config ARCH_CHIP_KL + bool "NXP/Freescale Kinetis L" + select ARCH_CORTEXM0 + ---help--- + Freescale Kinetis L Architectures (ARM Cortex-M0+) + +config ARCH_CHIP_LC823450 + bool "ON Semiconductor LC823450" + select ARCH_CORTEXM3 + select ARCH_HAVE_MPU + select ARCH_HAVE_HEAPCHECK + select ARCH_HAVE_MULTICPU + select ARCH_HAVE_I2CRESET + select ARCH_HAVE_CUSTOM_TESTSET + ---help--- + ON Semiconductor LC823450 architectures (ARM dual Cortex-M3) + +config ARCH_CHIP_LM + bool "TI/Luminary Stellaris" + select ARCH_HAVE_MPU + select ARM_HAVE_MPU_UNIFIED + ---help--- + TI/Luminary Stellaris LMS3 and LM4F architectures (ARM Cortex-M3/4) + +config ARCH_CHIP_LPC17XX_40XX + bool "NXP LPC17xx/LPC40xx" + select ARCH_HAVE_MPU + select ARM_HAVE_MPU_UNIFIED + select ARCH_HAVE_FETCHADD + select ARMV7M_HAVE_STACKCHECK + ---help--- + NXP LPC17xx & LPC40xx architectures (ARM Cortex-M3/4) + +config ARCH_CHIP_LPC214X + bool "NXP LPC214x" + select ARCH_ARM7TDMI + select ARCH_HAVE_LOWVECTORS + ---help--- + NXP LPC2145x architectures (ARM7TDMI) + +config ARCH_CHIP_LPC2378 + bool "NXP LPC2378" + select ARCH_ARM7TDMI + select ARCH_HAVE_LOWVECTORS + ---help--- + NXP LPC2145x architectures (ARM7TDMI) + +config ARCH_CHIP_LPC31XX + bool "NXP LPC31XX" + select ARCH_ARM926EJS + select ARCH_HAVE_LOWVECTORS + ---help--- + NPX LPC31XX architectures (ARM926EJS). + +config ARCH_CHIP_LPC43XX + bool "NXP LPC43XX" + select ARCH_CORTEXM4 + select ARCH_HAVE_MPU + select ARM_HAVE_MPU_UNIFIED + select ARCH_HAVE_FPU + select ARCH_HAVE_FETCHADD + ---help--- + NPX LPC43XX architectures (ARM Cortex-M4). + +config ARCH_CHIP_LPC54XX + bool "NXP LPC54XX" + select ARCH_CORTEXM4 + select ARCH_HAVE_MPU + select ARM_HAVE_MPU_UNIFIED + select ARCH_HAVE_FPU + select ARCH_HAVE_FETCHADD + ---help--- + NPX LPC54XX architectures (ARM Cortex-M4). + +config ARCH_CHIP_MAX326XX + bool "Maxim Integrated MAX326XX" + select ARCH_HAVE_FETCHADD + ---help--- + Maxim Integrated MAX326XX microcontrollers (ARM Cortex-M4F). + +config ARCH_CHIP_MOXART + bool "MoxART" + select ARCH_ARM7TDMI + select ARCH_HAVE_RESET + select ARCH_HAVE_SERIAL_TERMIOS + ---help--- + MoxART family + +config ARCH_CHIP_NRF52 + bool "Nordic nRF52" + select ARCH_CORTEXM4 + select ARCH_HAVE_TICKLESS + select ARMV7M_HAVE_STACKCHECK + #select ARCH_HAVE_MPU + #select ARM_HAVE_MPU_UNIFIED + select ARCH_HAVE_SPI_BITORDER + select ARCH_HAVE_FPU + select ARCH_HAVE_PWM_MULTICHAN + select ARCH_HAVE_SERIAL_TERMIOS + select ARCH_DMA_NO_FLASH_TRANSFER + ---help--- + Nordic nRF52 architectures (ARM Cortex-M4). + +config ARCH_CHIP_NRF53 + bool "Nordic nRF53" + select ARCH_CORTEXM33 + select ARCH_HAVE_PWM_MULTICHAN + select ARCH_DMA_NO_FLASH_TRANSFER + depends on EXPERIMENTAL + ---help--- + Nordic nRF53 architectures (ARM dual Cortex-M33). + +config ARCH_CHIP_NRF91 + bool "Nordic nRF91" + select ARCH_CORTEXM33 + select ARCH_HAVE_PWM_MULTICHAN + select ARCH_HAVE_TRUSTZONE + select ARCH_HAVE_TICKLESS + select ARCH_DMA_NO_FLASH_TRANSFER + select ARCH_HAVE_FPU + depends on EXPERIMENTAL + ---help--- + Nordic nRF91 architectures (ARM Cortex-M33 with integrated + LTE-M/NB-IoT modem and GNSS). + +config ARCH_CHIP_NUC1XX + bool "Nuvoton NUC100/120" + select ARCH_CORTEXM0 + ---help--- + Nuvoton NUC100/120 architectures (ARM Cortex-M0). + +config ARCH_CHIP_MCX_NXXX + bool "NXP MCX NXXx Cortex-M33" + select ARCH_CORTEXM33 + select ARCH_HAVE_FPU + select ARCH_HAVE_DFPU + ---help--- + NXXx architectures (Cortex-M33) + +config ARCH_CHIP_RA4 + bool "Renesas RA4" + ---help--- + Renesas RA4 Architecture (ARM Cortex-M4F/M33). + +config ARCH_CHIP_RP2040 + bool "Raspberry Pi RP2040" + select ARCH_CORTEXM0 + select ARCH_HAVE_RAMVECTORS + select ARCH_HAVE_MULTICPU + select ARCH_HAVE_I2CRESET + select ARM_HAVE_WFE_SEV + select ARCH_HAVE_PWM_MULTICHAN + select ARCH_BOARD_COMMON + select ARCH_HAVE_CUSTOM_TESTSET + ---help--- + Raspberry Pi RP2040 architectures (ARM dual Cortex-M0+). + +config ARCH_CHIP_RP23XX + bool "Raspberry Pi RP23XX" + select ARCH_CORTEXM33 + select ARCH_HAVE_RAMVECTORS + select ARCH_HAVE_MULTICPU + select ARCH_HAVE_I2CRESET + select ARM_HAVE_WFE_SEV + select ARM_HAVE_DSP + select ARCH_HAVE_FPU + select ARCH_HAVE_CUSTOM_TESTSET + select ARCH_HAVE_PWM_MULTICHAN + select ARCH_BOARD_COMMON + ---help--- + Raspberry Pi RP23XX architectures (ARM dual Cortex-M33 or RISC-V). + +config ARCH_CHIP_S32K1XX + bool "NXP S32K1XX" + select ARCH_HAVE_MPU + select ARM_HAVE_MPU_UNIFIED + select ARCH_HAVE_RAMFUNCS + select ARCH_HAVE_I2CRESET + ---help--- + NPX S32K1XX architectures (ARM Cortex-M0+ and Cortex-M4F). + +config ARCH_CHIP_S32K3XX + bool "NXP S32K3XX" + select ARCH_HAVE_MPU + select ARCH_HAVE_RAMFUNCS + select ARM_HAVE_MPU_UNIFIED + select ARCH_HAVE_I2CRESET + ---help--- + NPX S32K3XX architectures (ARM Cortex-M7). + +config ARCH_CHIP_SAMA5 + bool "Atmel SAMA5" + select ARCH_CORTEXA5 + select ARCH_HAVE_IRQPRIO + select ARCH_HAVE_LOWVECTORS + select ARCH_HAVE_FETCHADD + select ARCH_HAVE_I2CRESET + select ARCH_HAVE_TICKLESS + select ARCH_HAVE_ADDRENV + select ARCH_NEED_ADDRENV_MAPPING + ---help--- + Atmel SAMA5 (ARM Cortex-A5) + +config ARCH_CHIP_SAMD2X + bool "Microchip/Atmel SAMD2x" + select ARCH_CORTEXM0 + ---help--- + Microchip (formerly Atmel) SAMD2X (ARM Cortex-M0+) + +config ARCH_CHIP_SAML2X + bool "Microchip/Atmel SAML2x" + select ARCH_CORTEXM0 + ---help--- + Microchip (formerly Atmel) SAML2X (ARM Cortex-M0+) + +config ARCH_CHIP_SAMD5X + bool "Microchip SAMD5x" + select ARCH_CORTEXM4 + select ARCH_HAVE_TICKLESS + ---help--- + Microchip SAMD5X (ARM Cortex-M4) + +config ARCH_CHIP_SAME5X + bool "Microchip SAME5x" + select ARCH_CORTEXM4 + ---help--- + Microchip SAME5x (ARM Cortex-M4) + +config ARCH_CHIP_SAM34 + bool "Atmel SAM3/SAM4" + select ARCH_HAVE_MPU + select ARM_HAVE_MPU_UNIFIED + select ARCH_HAVE_FETCHADD + select ARCH_HAVE_RAMFUNCS + select ARMV7M_HAVE_STACKCHECK + ---help--- + Atmel SAM3 (ARM Cortex-M3) and SAM4 (ARM Cortex-M4) architectures + +config ARCH_CHIP_SAMV7 + bool "Atmel SAMV7" + select ARCH_CORTEXM7 + select ARCH_HAVE_MPU + select ARCH_HAVE_FETCHADD + select ARCH_HAVE_PROGMEM + select ARCH_HAVE_RAMFUNCS + select ARCH_HAVE_TICKLESS + select ARCH_HAVE_I2CRESET + select ARCH_HAVE_SPI_CS_CONTROL + select ARM_HAVE_MPU_UNIFIED + select ARMV7M_HAVE_STACKCHECK + select ARCH_HAVE_ADJTIME + ---help--- + Atmel SAMV7 (ARM Cortex-M7) architectures + +config ARCH_CHIP_SIMPLELINK + bool "TI SimpleLink" + select ARCH_HAVE_MPU + select ARM_HAVE_MPU_UNIFIED + select ARCH_HAVE_FETCHADD + depends on EXPERIMENTAL + ---help--- + TI SimpleLink CCxxx architectures (ARM Cortex-M3 or M4) + +config ARCH_CHIP_STM32 + bool "STMicro STM32 F1/F2/F3/F4/G4/L1" + select ARCH_HAVE_MPU + select ARCH_HAVE_FETCHADD + select ARCH_HAVE_I2CRESET + select ARCH_HAVE_HEAPCHECK + select ARCH_HAVE_PROGMEM + select ARCH_HAVE_SPI_BITORDER + select ARCH_HAVE_TICKLESS + select ARCH_HAVE_TIMEKEEPING + select ARM_HAVE_MPU_UNIFIED + select ARMV7M_HAVE_STACKCHECK + select ARCH_HAVE_ADJTIME + ---help--- + STMicro STM32 architectures (ARM Cortex-M3/4). + +config ARCH_CHIP_STM32F0 + bool "STMicro STM32 F0" + select ARCH_CORTEXM0 + ---help--- + STMicro STM32F0 architectures (ARM Cortex-M0). + +config ARCH_CHIP_STM32L0 + bool "STMicro STM32 L0" + select ARCH_CORTEXM0 + ---help--- + STMicro STM32L0 architectures (ARM Cortex-M0+). + +config ARCH_CHIP_STM32G0 + bool "STMicro STM32 G0" + select ARCH_CORTEXM0 + select ARCH_HAVE_PROGMEM + ---help--- + STMicro STM32G0 architectures (ARM Cortex-M0+). + +config ARCH_CHIP_STM32C0 + bool "STMicro STM32 C0" + select ARCH_CORTEXM0 + ---help--- + STMicro STM32C0 architectures (ARM Cortex-M0+). + +config ARCH_CHIP_STM32F7 + bool "STMicro STM32 F7" + select ARCH_CORTEXM7 + select ARCH_HAVE_MPU + select ARCH_HAVE_FETCHADD + select ARCH_HAVE_I2CRESET + select ARCH_HAVE_HEAPCHECK + select ARCH_HAVE_PROGMEM + select ARCH_HAVE_SPI_BITORDER + select ARM_HAVE_MPU_UNIFIED + select ARMV7M_HAVE_STACKCHECK + select ARCH_HAVE_TICKLESS + select ARCH_HAVE_TIMEKEEPING + ---help--- + STMicro STM32 architectures (ARM Cortex-M7). + +config ARCH_CHIP_STM32H7 + bool "STMicro STM32 H7" + select ARCH_HAVE_MPU + select ARCH_HAVE_I2CRESET + select ARCH_HAVE_PROGMEM + select ARCH_HAVE_SPI_BITORDER + select ARM_HAVE_MPU_UNIFIED + select ARMV7M_HAVE_STACKCHECK + select ARCH_HAVE_TICKLESS + select ARCH_HAVE_TIMEKEEPING + ---help--- + STMicro STM32H7 architectures (ARM Cortex-M7 or + dual ARM Cortex-M7 Cortex-M4). + +config ARCH_CHIP_STM32L4 + bool "STMicro STM32 L4" + select ARCH_CORTEXM4 + select ARCH_HAVE_MPU + select ARCH_HAVE_FETCHADD + select ARCH_HAVE_I2CRESET + select ARCH_HAVE_HEAPCHECK + select ARCH_HAVE_PROGMEM + select ARCH_HAVE_SPI_BITORDER + select ARCH_HAVE_TICKLESS + select ARM_HAVE_MPU_UNIFIED + select ARMV7M_HAVE_STACKCHECK + ---help--- + STMicro STM32 architectures (ARM Cortex-M4). + +config ARCH_CHIP_STM32H5 + bool "STMicro STM32 H5" + select ARCH_CORTEXM33 + select ARCH_HAVE_MPU + select ARM_HAVE_DSP + select ARCH_HAVE_FETCHADD + select ARCH_HAVE_HEAPCHECK + select ARCH_HAVE_PROGMEM + select ARCH_HAVE_SPI_BITORDER + select ARCH_HAVE_TICKLESS + select ARCH_HAVE_TRUSTZONE + select ARM_HAVE_MPU_UNIFIED + select ARMV8M_HAVE_STACKCHECK + ---help--- + STMicro STM32 H5 architectures (ARM Cortex-M33). + +config ARCH_CHIP_STM32L5 + bool "STMicro STM32 L5" + select ARCH_CORTEXM33 + select ARCH_HAVE_MPU + select ARM_HAVE_DSP + select ARCH_HAVE_FETCHADD + select ARCH_HAVE_HEAPCHECK + select ARCH_HAVE_PROGMEM + select ARCH_HAVE_SPI_BITORDER + select ARCH_HAVE_TICKLESS + select ARCH_HAVE_TRUSTZONE + select ARM_HAVE_MPU_UNIFIED + select ARMV8M_HAVE_STACKCHECK + ---help--- + STMicro STM32 L5 architectures (ARM Cortex-M33). + +config ARCH_CHIP_STM32U5 + bool "STMicro STM32 U5" + select ARCH_CORTEXM33 + select ARCH_HAVE_MPU + select ARM_HAVE_DSP + select ARCH_HAVE_FETCHADD + select ARCH_HAVE_HEAPCHECK + select ARCH_HAVE_HEAP2 + select ARCH_HAVE_PROGMEM + select ARCH_HAVE_SPI_BITORDER + select ARCH_HAVE_TICKLESS + select ARM_HAVE_MPU_UNIFIED + select ARMV8M_HAVE_STACKCHECK + select ARCH_HAVE_TRUSTZONE + ---help--- + STMicro STM32 U5 architectures (ARM Cortex-M33). + +config ARCH_CHIP_STM32WB + bool "STMicro STM32 WB" + select ARCH_CORTEXM4 + select ARCH_HAVE_FPU + select ARCH_HAVE_MPU + select ARCH_HAVE_FETCHADD + select ARCH_HAVE_I2CRESET + select ARCH_HAVE_HEAPCHECK + select ARCH_HAVE_PROGMEM + select ARCH_HAVE_SPI_BITORDER + select ARCH_HAVE_TICKLESS + select ARM_HAVE_MPU_UNIFIED + select ARMV7M_HAVE_STACKCHECK + ---help--- + STMicro STM32WB architectures (ARM Cortex-M4). + +config ARCH_CHIP_STM32WL5 + bool "STMicro STM32 WL5" + select ARCH_CORTEXM4 + select ARCH_HAVE_MPU + select ARCH_HAVE_FETCHADD + select ARCH_HAVE_I2CRESET + select ARCH_HAVE_HEAPCHECK + select ARCH_HAVE_PROGMEM + select ARCH_HAVE_SPI_BITORDER + select ARCH_HAVE_TICKLESS + select ARM_HAVE_MPU_UNIFIED + select ARMV7M_HAVE_STACKCHECK + ---help--- + STMicro STM32WL5 architectures (dual CPU ARM Cortex-M4 Cortex-M0). + +config ARCH_CHIP_STR71X + bool "STMicro STR71x" + select ARCH_ARM7TDMI + select ARCH_HAVE_LOWVECTORS + ---help--- + STMicro STR71x architectures (ARM7TDMI). + +config ARCH_CHIP_TMS570 + bool "TI TMS570" + select ENDIAN_BIG + select ARCH_HAVE_LOWVECTORS + select ARCH_HAVE_FETCHADD + select ARCH_HAVE_RAMFUNCS + select ARMV7R_MEMINIT + select ARMV7R_HAVE_DECODEFIQ + ---help--- + TI TMS570 family + +config ARCH_CHIP_TIVA + bool "TI Tiva" + select ARCH_HAVE_MPU + select ARM_HAVE_MPU_UNIFIED + select ARCH_HAVE_FETCHADD + ---help--- + TI Tiva TM4C architectures (ARM Cortex-M4) + +config ARCH_CHIP_XMC4 + bool "Infineon XMC4xxx" + select ARCH_CORTEXM4 + select ARCH_HAVE_MPU + select ARCH_HAVE_FETCHADD + select ARCH_HAVE_RAMFUNCS + select ARCH_HAVE_I2CRESET + select ARM_HAVE_MPU_UNIFIED + select ARMV7M_HAVE_STACKCHECK + select ARCH_HAVE_TICKLESS + ---help--- + Infineon XMC4xxx(ARM Cortex-M4) architectures + +config ARCH_CHIP_MX8MP + bool "NXP i.MX8MP" + select ARCH_CORTEXM7 + select ARCH_HAVE_MPU + select ARCH_HAVE_FETCHADD + select ARCH_HAVE_RAMFUNCS + select ARCH_HAVE_I2CRESET + select ARM_HAVE_MPU_UNIFIED + select ARMV7M_HAVE_ICACHE + select ARMV7M_HAVE_DCACHE + select ARMV7M_HAVE_ITCM + select ARMV7M_HAVE_DTCM + select ARMV7M_HAVE_STACKCHECK + ---help--- + NXP i.MX8MP (ARM Cortex-M7) architectures + +config ARCH_CHIP_CXD56XX + bool "Sony CXD56xx" + select ARCH_CORTEXM4 + select ARCH_HAVE_MPU + select ARM_HAVE_MPU_UNIFIED + select ARCH_HAVE_FPU + select ARCH_HAVE_HEAPCHECK + select ARCH_HAVE_MULTICPU + select ARCH_HAVE_TEXT_HEAP + select ARCH_HAVE_SDIO if MMCSD + select ARCH_HAVE_MATH_H + select ARCH_HAVE_I2CRESET + select ARCH_HAVE_CUSTOM_TESTSET + select LIBC_ARCH_ATOMIC if SMP + ---help--- + Sony CXD56XX (ARM Cortex-M4) architectures + +config ARCH_CHIP_PHY62XX + bool "Phyplus PHY62XX BLE" + select ARCH_CORTEXM0 + ---help--- + Phyplus PHY62XX architectures (ARM Cortex-M0). + +config ARCH_CHIP_TLSR82 + bool "Telink TLSR82XX" + select ARCH_ARMV6M + select ARCH_HAVE_RESET + ---help--- + Telink tlsr82xx architectures (Customed armv6m) + +config ARCH_CHIP_MPS + bool "MPS ARM Series" + ---help--- + MPS platform (MPS2 MPS3) + +config ARCH_CHIP_QEMU_ARM + bool "QEMU virt platform (ARMv7a)" + select ARCH_HAVE_POWEROFF + select ARCH_HAVE_RESET + select ARCH_IDLE_CUSTOM + ---help--- + QEMU virt platform (ARMv7a) + +config ARCH_CHIP_GOLDFISH_ARM + bool "GOLDFISH virt platform (ARMv7a)" + select ARCH_HAVE_POWEROFF + select ARCH_HAVE_RESET + select ARM_HAVE_PSCI + select ARM_HAVE_NEON + ---help--- + GOLDFISH virt platform (ARMv7a) + +config ARCH_CHIP_AT32 + bool "Artery AT32 F4" + select ARCH_HAVE_MPU + select ARCH_HAVE_FETCHADD + select ARCH_HAVE_I2CRESET + select ARCH_HAVE_HEAPCHECK + select ARCH_HAVE_PROGMEM + select ARCH_HAVE_SPI_BITORDER + select ARCH_HAVE_TICKLESS + select ARCH_HAVE_TIMEKEEPING + select ARM_HAVE_MPU_UNIFIED + select ARMV7M_HAVE_STACKCHECK + ---help--- + Artery AT32 architectures (ARM Cortex-M4) + +config ARCH_CHIP_CXD32XX + bool "Sony CXD32xx" + select ARCH_CORTEXM4 + select ARCH_HAVE_FPU + select LIBC_ARCH_ATOMIC + ---help--- + Sony CXD32XX (ARM Cortex-M4) architectures + +endchoice # ARM MCU selection + +config ARCH_CHIP + string + default "a1x" if ARCH_CHIP_A1X + default "am335x" if ARCH_CHIP_AM335X + default "fvp-v8r-aarch32" if ARCH_CHIP_FVP_ARMV8R_AARCH32 + default "c5471" if ARCH_CHIP_C5471 + default "dm320" if ARCH_CHIP_DM320 + default "efm32" if ARCH_CHIP_EFM32 + default "eoss3" if ARCH_CHIP_EOSS3 + default "gd32f4" if ARCH_CHIP_GD32F4 + default "imx1" if ARCH_CHIP_IMX1 + default "imx6" if ARCH_CHIP_IMX6 + default "imx9" if ARCH_CHIP_IMX9_CORTEX_M + default "imxrt" if ARCH_CHIP_IMXRT + default "kinetis" if ARCH_CHIP_KINETIS + default "kl" if ARCH_CHIP_KL + default "lc823450" if ARCH_CHIP_LC823450 + default "tiva" if ARCH_CHIP_LM || ARCH_CHIP_TIVA || ARCH_CHIP_SIMPLELINK + default "lpc17xx_40xx" if ARCH_CHIP_LPC17XX_40XX + default "lpc214x" if ARCH_CHIP_LPC214X + default "lpc2378" if ARCH_CHIP_LPC2378 + default "lpc31xx" if ARCH_CHIP_LPC31XX + default "lpc43xx" if ARCH_CHIP_LPC43XX + default "lpc54xx" if ARCH_CHIP_LPC54XX + default "max326xx" if ARCH_CHIP_MAX326XX + default "moxart" if ARCH_CHIP_MOXART + default "nrf52" if ARCH_CHIP_NRF52 + default "nrf53" if ARCH_CHIP_NRF53 + default "nrf91" if ARCH_CHIP_NRF91 + default "nuc1xx" if ARCH_CHIP_NUC1XX + default "ra4" if ARCH_CHIP_RA4 + default "rp2040" if ARCH_CHIP_RP2040 + default "rp23xx" if ARCH_CHIP_RP23XX + default "s32k1xx" if ARCH_CHIP_S32K1XX + default "s32k3xx" if ARCH_CHIP_S32K3XX + default "sama5" if ARCH_CHIP_SAMA5 + default "samd2l2" if ARCH_CHIP_SAMD2X || ARCH_CHIP_SAML2X + default "samd5e5" if ARCH_CHIP_SAMD5X || ARCH_CHIP_SAME5X + default "sam34" if ARCH_CHIP_SAM34 + default "samv7" if ARCH_CHIP_SAMV7 + default "stm32" if ARCH_CHIP_STM32 + default "stm32f0l0g0" if ARCH_CHIP_STM32F0 || ARCH_CHIP_STM32L0 || ARCH_CHIP_STM32G0 || ARCH_CHIP_STM32C0 + default "stm32f7" if ARCH_CHIP_STM32F7 + default "stm32h7" if ARCH_CHIP_STM32H7 + default "stm32l4" if ARCH_CHIP_STM32L4 + default "stm32h5" if ARCH_CHIP_STM32H5 + default "stm32l5" if ARCH_CHIP_STM32L5 + default "stm32u5" if ARCH_CHIP_STM32U5 + default "stm32wb" if ARCH_CHIP_STM32WB + default "stm32wl5" if ARCH_CHIP_STM32WL5 + default "str71x" if ARCH_CHIP_STR71X + default "tms570" if ARCH_CHIP_TMS570 + default "xmc4" if ARCH_CHIP_XMC4 + default "mx8mp" if ARCH_CHIP_MX8MP + default "cxd56xx" if ARCH_CHIP_CXD56XX + default "phy62xx" if ARCH_CHIP_PHY62XX + default "tlsr82" if ARCH_CHIP_TLSR82 + default "qemu" if ARCH_CHIP_QEMU_ARM + default "mps" if ARCH_CHIP_MPS + default "goldfish" if ARCH_CHIP_GOLDFISH_ARM + default "at32" if ARCH_CHIP_AT32 + default "cxd32xx" if ARCH_CHIP_CXD32XX + default "csk6" if ARCH_CHIP_CSK6 + default "mcx-nxxx" if ARCH_CHIP_MCX_NXXX + +if ARCH_CHIP_A1X +source "soc/arm/a1x/Kconfig" +endif +if ARCH_CHIP_AM335X +source "soc/arm/am335x/Kconfig" +endif +if ARCH_CHIP_FVP_ARMV8R_AARCH32 +source "soc/arm/fvp-v8r-aarch32/Kconfig" +endif +if ARCH_CHIP_C5471 +source "soc/arm/c5471/Kconfig" +endif +if ARCH_CHIP_DM320 +source "soc/arm/dm320/Kconfig" +endif +if ARCH_CHIP_EFM32 +source "soc/arm/efm32/Kconfig" +endif +if ARCH_CHIP_EOSS3 +source "soc/arm/eoss3/Kconfig" +endif +if ARCH_CHIP_GD32F4 +source "soc/arm/gd32f4/Kconfig" +endif +if ARCH_CHIP_IMX1 +source "soc/arm/imx1/Kconfig" +endif +if ARCH_CHIP_IMX6 +source "soc/arm/imx6/Kconfig" +endif +if ARCH_CHIP_IMX9_CORTEX_M +source "soc/arm/imx9/Kconfig" +endif +if ARCH_CHIP_IMXRT +source "soc/arm/imxrt/Kconfig" +endif +if ARCH_CHIP_KINETIS +source "soc/arm/kinetis/Kconfig" +endif +if ARCH_CHIP_KL +source "soc/arm/kl/Kconfig" +endif +if ARCH_CHIP_LC823450 +source "soc/arm/lc823450/Kconfig" +endif +if ARCH_CHIP_LM || ARCH_CHIP_TIVA || ARCH_CHIP_SIMPLELINK +source "soc/arm/tiva/Kconfig" +endif +if ARCH_CHIP_LPC17XX_40XX +source "soc/arm/lpc17xx_40xx/Kconfig" +endif +if ARCH_CHIP_LPC214X +source "soc/arm/lpc214x/Kconfig" +endif +if ARCH_CHIP_LPC2378 +source "soc/arm/lpc2378/Kconfig" +endif +if ARCH_CHIP_LPC31XX +source "soc/arm/lpc31xx/Kconfig" +endif +if ARCH_CHIP_LPC43XX +source "soc/arm/lpc43xx/Kconfig" +endif +if ARCH_CHIP_LPC54XX +source "soc/arm/lpc54xx/Kconfig" +endif +if ARCH_CHIP_S32K1XX +source "soc/arm/s32k1xx/Kconfig" +endif +if ARCH_CHIP_S32K3XX +source "soc/arm/s32k3xx/Kconfig" +endif +if ARCH_CHIP_MAX326XX +source "soc/arm/max326xx/Kconfig" +endif +if ARCH_CHIP_MOXART +source "soc/arm/moxart/Kconfig" +endif +if ARCH_CHIP_NRF52 +source "soc/arm/nrf52/Kconfig" +endif +if ARCH_CHIP_NRF53 +source "soc/arm/nrf53/Kconfig" +endif +if ARCH_CHIP_NRF91 +source "soc/arm/nrf91/Kconfig" +endif +if ARCH_CHIP_NUC1XX +source "soc/arm/nuc1xx/Kconfig" +endif +if ARCH_CHIP_RA4 +source "soc/arm/ra4/Kconfig" +endif +if ARCH_CHIP_RP2040 +source "soc/arm/rp2040/Kconfig" +endif +if ARCH_CHIP_RP23XX +source "soc/arm/rp23xx/Kconfig" +endif +if ARCH_CHIP_SAMA5 +source "soc/arm/sama5/Kconfig" +endif +if ARCH_CHIP_SAMD2X || ARCH_CHIP_SAML2X +source "soc/arm/samd2l2/Kconfig" +endif +if ARCH_CHIP_SAMD5X || ARCH_CHIP_SAME5X +source "soc/arm/samd5e5/Kconfig" +endif +if ARCH_CHIP_SAM34 +source "soc/arm/sam34/Kconfig" +endif +if ARCH_CHIP_SAMV7 +source "soc/arm/samv7/Kconfig" +endif +if ARCH_CHIP_STM32 +source "soc/arm/stm32/Kconfig" +endif +if ARCH_CHIP_STM32F0 || ARCH_CHIP_STM32L0 || ARCH_CHIP_STM32G0 || ARCH_CHIP_STM32C0 +source "soc/arm/stm32f0l0g0/Kconfig" +endif +if ARCH_CHIP_STM32F7 +source "soc/arm/stm32f7/Kconfig" +endif +if ARCH_CHIP_STM32H7 +source "soc/arm/stm32h7/Kconfig" +endif +if ARCH_CHIP_STM32L4 +source "soc/arm/stm32l4/Kconfig" +endif +if ARCH_CHIP_STM32H5 +source "soc/arm/stm32h5/Kconfig" +endif +if ARCH_CHIP_STM32L5 +source "soc/arm/stm32l5/Kconfig" +endif +if ARCH_CHIP_STM32U5 +source "soc/arm/stm32u5/Kconfig" +endif +if ARCH_CHIP_STM32WB +source "soc/arm/stm32wb/Kconfig" +endif +if ARCH_CHIP_STM32WL5 +source "soc/arm/stm32wl5/Kconfig" +endif +if ARCH_CHIP_STR71X +source "soc/arm/str71x/Kconfig" +endif +if ARCH_CHIP_TMS570 +source "soc/arm/tms570/Kconfig" +endif +if ARCH_CHIP_XMC4 +source "soc/arm/xmc4/Kconfig" +endif +if ARCH_CHIP_MX8MP +source "soc/arm/mx8mp/Kconfig" +endif +if ARCH_CHIP_PHY62XX +source "soc/arm/phy62xx/Kconfig" +endif +if ARCH_CHIP_CXD56XX +source "soc/arm/cxd56xx/Kconfig" +endif +if ARCH_CHIP_TLSR82 +source "soc/arm/tlsr82/Kconfig" +endif +if ARCH_CHIP_QEMU_ARM +source "soc/arm/qemu/Kconfig" +endif +if ARCH_CHIP_MPS +source "soc/arm/mps/Kconfig" +endif +if ARCH_CHIP_GOLDFISH_ARM +source "soc/arm/goldfish/Kconfig" +endif +if ARCH_CHIP_AT32 +source "soc/arm/at32/Kconfig" +endif +if ARCH_CHIP_CXD32XX +source "soc/arm/cxd32xx/Kconfig" +endif +if ARCH_CHIP_MCX_NXXX +source "soc/arm/mcx-nxxx/Kconfig" +endif \ No newline at end of file diff --git a/arch/arm/src/a1x/Kconfig b/soc/arm/a1x/Kconfig similarity index 100% rename from arch/arm/src/a1x/Kconfig rename to soc/arm/a1x/Kconfig diff --git a/arch/arm/src/a1x/Make.defs b/soc/arm/a1x/Make.defs similarity index 100% rename from arch/arm/src/a1x/Make.defs rename to soc/arm/a1x/Make.defs diff --git a/arch/arm/src/a1x/a1x_boot.c b/soc/arm/a1x/a1x_boot.c similarity index 100% rename from arch/arm/src/a1x/a1x_boot.c rename to soc/arm/a1x/a1x_boot.c diff --git a/arch/arm/src/a1x/a1x_boot.h b/soc/arm/a1x/a1x_boot.h similarity index 100% rename from arch/arm/src/a1x/a1x_boot.h rename to soc/arm/a1x/a1x_boot.h diff --git a/arch/arm/src/a1x/a1x_config.h b/soc/arm/a1x/a1x_config.h similarity index 100% rename from arch/arm/src/a1x/a1x_config.h rename to soc/arm/a1x/a1x_config.h diff --git a/arch/arm/src/a1x/a1x_irq.c b/soc/arm/a1x/a1x_irq.c similarity index 100% rename from arch/arm/src/a1x/a1x_irq.c rename to soc/arm/a1x/a1x_irq.c diff --git a/arch/arm/src/a1x/a1x_irq.h b/soc/arm/a1x/a1x_irq.h similarity index 100% rename from arch/arm/src/a1x/a1x_irq.h rename to soc/arm/a1x/a1x_irq.h diff --git a/arch/arm/src/a1x/a1x_lowputc.c b/soc/arm/a1x/a1x_lowputc.c similarity index 100% rename from arch/arm/src/a1x/a1x_lowputc.c rename to soc/arm/a1x/a1x_lowputc.c diff --git a/arch/arm/src/a1x/a1x_lowputc.h b/soc/arm/a1x/a1x_lowputc.h similarity index 100% rename from arch/arm/src/a1x/a1x_lowputc.h rename to soc/arm/a1x/a1x_lowputc.h diff --git a/arch/arm/src/a1x/a1x_pio.c b/soc/arm/a1x/a1x_pio.c similarity index 100% rename from arch/arm/src/a1x/a1x_pio.c rename to soc/arm/a1x/a1x_pio.c diff --git a/arch/arm/src/a1x/a1x_pio.h b/soc/arm/a1x/a1x_pio.h similarity index 100% rename from arch/arm/src/a1x/a1x_pio.h rename to soc/arm/a1x/a1x_pio.h diff --git a/arch/arm/src/a1x/a1x_serial.c b/soc/arm/a1x/a1x_serial.c similarity index 100% rename from arch/arm/src/a1x/a1x_serial.c rename to soc/arm/a1x/a1x_serial.c diff --git a/arch/arm/src/a1x/a1x_serial.h b/soc/arm/a1x/a1x_serial.h similarity index 100% rename from arch/arm/src/a1x/a1x_serial.h rename to soc/arm/a1x/a1x_serial.h diff --git a/arch/arm/src/a1x/a1x_timerisr.c b/soc/arm/a1x/a1x_timerisr.c similarity index 100% rename from arch/arm/src/a1x/a1x_timerisr.c rename to soc/arm/a1x/a1x_timerisr.c diff --git a/arch/arm/src/a1x/chip.h b/soc/arm/a1x/chip.h similarity index 100% rename from arch/arm/src/a1x/chip.h rename to soc/arm/a1x/chip.h diff --git a/arch/arm/src/a1x/hardware/a10_memorymap.h b/soc/arm/a1x/hardware/a10_memorymap.h similarity index 100% rename from arch/arm/src/a1x/hardware/a10_memorymap.h rename to soc/arm/a1x/hardware/a10_memorymap.h diff --git a/arch/arm/src/a1x/hardware/a10_piocfg.h b/soc/arm/a1x/hardware/a10_piocfg.h similarity index 100% rename from arch/arm/src/a1x/hardware/a10_piocfg.h rename to soc/arm/a1x/hardware/a10_piocfg.h diff --git a/arch/arm/src/a1x/hardware/a1x_intc.h b/soc/arm/a1x/hardware/a1x_intc.h similarity index 100% rename from arch/arm/src/a1x/hardware/a1x_intc.h rename to soc/arm/a1x/hardware/a1x_intc.h diff --git a/arch/arm/src/a1x/hardware/a1x_memorymap.h b/soc/arm/a1x/hardware/a1x_memorymap.h similarity index 100% rename from arch/arm/src/a1x/hardware/a1x_memorymap.h rename to soc/arm/a1x/hardware/a1x_memorymap.h diff --git a/arch/arm/src/a1x/hardware/a1x_pio.h b/soc/arm/a1x/hardware/a1x_pio.h similarity index 100% rename from arch/arm/src/a1x/hardware/a1x_pio.h rename to soc/arm/a1x/hardware/a1x_pio.h diff --git a/arch/arm/src/a1x/hardware/a1x_piocfg.h b/soc/arm/a1x/hardware/a1x_piocfg.h similarity index 100% rename from arch/arm/src/a1x/hardware/a1x_piocfg.h rename to soc/arm/a1x/hardware/a1x_piocfg.h diff --git a/arch/arm/src/a1x/hardware/a1x_timer.h b/soc/arm/a1x/hardware/a1x_timer.h similarity index 100% rename from arch/arm/src/a1x/hardware/a1x_timer.h rename to soc/arm/a1x/hardware/a1x_timer.h diff --git a/arch/arm/src/a1x/hardware/a1x_uart.h b/soc/arm/a1x/hardware/a1x_uart.h similarity index 100% rename from arch/arm/src/a1x/hardware/a1x_uart.h rename to soc/arm/a1x/hardware/a1x_uart.h diff --git a/arch/arm/src/am335x/Kconfig b/soc/arm/am335x/Kconfig similarity index 100% rename from arch/arm/src/am335x/Kconfig rename to soc/arm/am335x/Kconfig diff --git a/arch/arm/src/am335x/Make.defs b/soc/arm/am335x/Make.defs similarity index 100% rename from arch/arm/src/am335x/Make.defs rename to soc/arm/am335x/Make.defs diff --git a/arch/arm/src/am335x/am335x_boot.c b/soc/arm/am335x/am335x_boot.c similarity index 100% rename from arch/arm/src/am335x/am335x_boot.c rename to soc/arm/am335x/am335x_boot.c diff --git a/arch/arm/src/am335x/am335x_boot.h b/soc/arm/am335x/am335x_boot.h similarity index 100% rename from arch/arm/src/am335x/am335x_boot.h rename to soc/arm/am335x/am335x_boot.h diff --git a/arch/arm/src/am335x/am335x_can.c b/soc/arm/am335x/am335x_can.c similarity index 100% rename from arch/arm/src/am335x/am335x_can.c rename to soc/arm/am335x/am335x_can.c diff --git a/arch/arm/src/am335x/am335x_can.h b/soc/arm/am335x/am335x_can.h similarity index 100% rename from arch/arm/src/am335x/am335x_can.h rename to soc/arm/am335x/am335x_can.h diff --git a/arch/arm/src/am335x/am335x_clockconfig.c b/soc/arm/am335x/am335x_clockconfig.c similarity index 100% rename from arch/arm/src/am335x/am335x_clockconfig.c rename to soc/arm/am335x/am335x_clockconfig.c diff --git a/arch/arm/src/am335x/am335x_clockconfig.h b/soc/arm/am335x/am335x_clockconfig.h similarity index 100% rename from arch/arm/src/am335x/am335x_clockconfig.h rename to soc/arm/am335x/am335x_clockconfig.h diff --git a/arch/arm/src/am335x/am335x_config.h b/soc/arm/am335x/am335x_config.h similarity index 100% rename from arch/arm/src/am335x/am335x_config.h rename to soc/arm/am335x/am335x_config.h diff --git a/arch/arm/src/am335x/am335x_edid.c b/soc/arm/am335x/am335x_edid.c similarity index 100% rename from arch/arm/src/am335x/am335x_edid.c rename to soc/arm/am335x/am335x_edid.c diff --git a/arch/arm/src/am335x/am335x_gpio.c b/soc/arm/am335x/am335x_gpio.c similarity index 100% rename from arch/arm/src/am335x/am335x_gpio.c rename to soc/arm/am335x/am335x_gpio.c diff --git a/arch/arm/src/am335x/am335x_gpio.h b/soc/arm/am335x/am335x_gpio.h similarity index 100% rename from arch/arm/src/am335x/am335x_gpio.h rename to soc/arm/am335x/am335x_gpio.h diff --git a/arch/arm/src/am335x/am335x_gpioirq.c b/soc/arm/am335x/am335x_gpioirq.c similarity index 100% rename from arch/arm/src/am335x/am335x_gpioirq.c rename to soc/arm/am335x/am335x_gpioirq.c diff --git a/arch/arm/src/am335x/am335x_i2c.c b/soc/arm/am335x/am335x_i2c.c similarity index 100% rename from arch/arm/src/am335x/am335x_i2c.c rename to soc/arm/am335x/am335x_i2c.c diff --git a/arch/arm/src/am335x/am335x_i2c.h b/soc/arm/am335x/am335x_i2c.h similarity index 100% rename from arch/arm/src/am335x/am335x_i2c.h rename to soc/arm/am335x/am335x_i2c.h diff --git a/arch/arm/src/am335x/am335x_irq.c b/soc/arm/am335x/am335x_irq.c similarity index 100% rename from arch/arm/src/am335x/am335x_irq.c rename to soc/arm/am335x/am335x_irq.c diff --git a/arch/arm/src/am335x/am335x_irq.h b/soc/arm/am335x/am335x_irq.h similarity index 100% rename from arch/arm/src/am335x/am335x_irq.h rename to soc/arm/am335x/am335x_irq.h diff --git a/arch/arm/src/am335x/am335x_lcdc.c b/soc/arm/am335x/am335x_lcdc.c similarity index 100% rename from arch/arm/src/am335x/am335x_lcdc.c rename to soc/arm/am335x/am335x_lcdc.c diff --git a/arch/arm/src/am335x/am335x_lcdc.h b/soc/arm/am335x/am335x_lcdc.h similarity index 100% rename from arch/arm/src/am335x/am335x_lcdc.h rename to soc/arm/am335x/am335x_lcdc.h diff --git a/arch/arm/src/am335x/am335x_lowputc.c b/soc/arm/am335x/am335x_lowputc.c similarity index 100% rename from arch/arm/src/am335x/am335x_lowputc.c rename to soc/arm/am335x/am335x_lowputc.c diff --git a/arch/arm/src/am335x/am335x_lowputc.h b/soc/arm/am335x/am335x_lowputc.h similarity index 100% rename from arch/arm/src/am335x/am335x_lowputc.h rename to soc/arm/am335x/am335x_lowputc.h diff --git a/arch/arm/src/am335x/am335x_pinmux.c b/soc/arm/am335x/am335x_pinmux.c similarity index 100% rename from arch/arm/src/am335x/am335x_pinmux.c rename to soc/arm/am335x/am335x_pinmux.c diff --git a/arch/arm/src/am335x/am335x_pinmux.h b/soc/arm/am335x/am335x_pinmux.h similarity index 100% rename from arch/arm/src/am335x/am335x_pinmux.h rename to soc/arm/am335x/am335x_pinmux.h diff --git a/arch/arm/src/am335x/am335x_serial.c b/soc/arm/am335x/am335x_serial.c similarity index 100% rename from arch/arm/src/am335x/am335x_serial.c rename to soc/arm/am335x/am335x_serial.c diff --git a/arch/arm/src/am335x/am335x_serial.h b/soc/arm/am335x/am335x_serial.h similarity index 100% rename from arch/arm/src/am335x/am335x_serial.h rename to soc/arm/am335x/am335x_serial.h diff --git a/arch/arm/src/am335x/am335x_sysclk.c b/soc/arm/am335x/am335x_sysclk.c similarity index 100% rename from arch/arm/src/am335x/am335x_sysclk.c rename to soc/arm/am335x/am335x_sysclk.c diff --git a/arch/arm/src/am335x/am335x_sysclk.h b/soc/arm/am335x/am335x_sysclk.h similarity index 100% rename from arch/arm/src/am335x/am335x_sysclk.h rename to soc/arm/am335x/am335x_sysclk.h diff --git a/arch/arm/src/am335x/am335x_timerisr.c b/soc/arm/am335x/am335x_timerisr.c similarity index 100% rename from arch/arm/src/am335x/am335x_timerisr.c rename to soc/arm/am335x/am335x_timerisr.c diff --git a/arch/arm/src/am335x/am335x_wdog.c b/soc/arm/am335x/am335x_wdog.c similarity index 100% rename from arch/arm/src/am335x/am335x_wdog.c rename to soc/arm/am335x/am335x_wdog.c diff --git a/arch/arm/src/am335x/am335x_wdog.h b/soc/arm/am335x/am335x_wdog.h similarity index 100% rename from arch/arm/src/am335x/am335x_wdog.h rename to soc/arm/am335x/am335x_wdog.h diff --git a/arch/arm/src/am335x/chip.h b/soc/arm/am335x/chip.h similarity index 100% rename from arch/arm/src/am335x/chip.h rename to soc/arm/am335x/chip.h diff --git a/arch/arm/src/am335x/hardware/am3358_memorymap.h b/soc/arm/am335x/hardware/am3358_memorymap.h similarity index 100% rename from arch/arm/src/am335x/hardware/am3358_memorymap.h rename to soc/arm/am335x/hardware/am3358_memorymap.h diff --git a/arch/arm/src/am335x/hardware/am3358_pinmux.h b/soc/arm/am335x/hardware/am3358_pinmux.h similarity index 100% rename from arch/arm/src/am335x/hardware/am3358_pinmux.h rename to soc/arm/am335x/hardware/am3358_pinmux.h diff --git a/arch/arm/src/am335x/hardware/am335x_dcan.h b/soc/arm/am335x/hardware/am335x_dcan.h similarity index 100% rename from arch/arm/src/am335x/hardware/am335x_dcan.h rename to soc/arm/am335x/hardware/am335x_dcan.h diff --git a/arch/arm/src/am335x/hardware/am335x_gpio.h b/soc/arm/am335x/hardware/am335x_gpio.h similarity index 100% rename from arch/arm/src/am335x/hardware/am335x_gpio.h rename to soc/arm/am335x/hardware/am335x_gpio.h diff --git a/arch/arm/src/am335x/hardware/am335x_i2c.h b/soc/arm/am335x/hardware/am335x_i2c.h similarity index 100% rename from arch/arm/src/am335x/hardware/am335x_i2c.h rename to soc/arm/am335x/hardware/am335x_i2c.h diff --git a/arch/arm/src/am335x/hardware/am335x_intc.h b/soc/arm/am335x/hardware/am335x_intc.h similarity index 100% rename from arch/arm/src/am335x/hardware/am335x_intc.h rename to soc/arm/am335x/hardware/am335x_intc.h diff --git a/arch/arm/src/am335x/hardware/am335x_lcd.h b/soc/arm/am335x/hardware/am335x_lcd.h similarity index 100% rename from arch/arm/src/am335x/hardware/am335x_lcd.h rename to soc/arm/am335x/hardware/am335x_lcd.h diff --git a/arch/arm/src/am335x/hardware/am335x_mcspi.h b/soc/arm/am335x/hardware/am335x_mcspi.h similarity index 100% rename from arch/arm/src/am335x/hardware/am335x_mcspi.h rename to soc/arm/am335x/hardware/am335x_mcspi.h diff --git a/arch/arm/src/am335x/hardware/am335x_memorymap.h b/soc/arm/am335x/hardware/am335x_memorymap.h similarity index 100% rename from arch/arm/src/am335x/hardware/am335x_memorymap.h rename to soc/arm/am335x/hardware/am335x_memorymap.h diff --git a/arch/arm/src/am335x/hardware/am335x_pinmux.h b/soc/arm/am335x/hardware/am335x_pinmux.h similarity index 100% rename from arch/arm/src/am335x/hardware/am335x_pinmux.h rename to soc/arm/am335x/hardware/am335x_pinmux.h diff --git a/arch/arm/src/am335x/hardware/am335x_prcm.h b/soc/arm/am335x/hardware/am335x_prcm.h similarity index 100% rename from arch/arm/src/am335x/hardware/am335x_prcm.h rename to soc/arm/am335x/hardware/am335x_prcm.h diff --git a/arch/arm/src/am335x/hardware/am335x_scm.h b/soc/arm/am335x/hardware/am335x_scm.h similarity index 100% rename from arch/arm/src/am335x/hardware/am335x_scm.h rename to soc/arm/am335x/hardware/am335x_scm.h diff --git a/arch/arm/src/am335x/hardware/am335x_timer.h b/soc/arm/am335x/hardware/am335x_timer.h similarity index 100% rename from arch/arm/src/am335x/hardware/am335x_timer.h rename to soc/arm/am335x/hardware/am335x_timer.h diff --git a/arch/arm/src/am335x/hardware/am335x_uart.h b/soc/arm/am335x/hardware/am335x_uart.h similarity index 100% rename from arch/arm/src/am335x/hardware/am335x_uart.h rename to soc/arm/am335x/hardware/am335x_uart.h diff --git a/arch/arm/src/am335x/hardware/am335x_wdog.h b/soc/arm/am335x/hardware/am335x_wdog.h similarity index 100% rename from arch/arm/src/am335x/hardware/am335x_wdog.h rename to soc/arm/am335x/hardware/am335x_wdog.h diff --git a/arch/arm/src/at32/Kconfig b/soc/arm/at32/Kconfig similarity index 100% rename from arch/arm/src/at32/Kconfig rename to soc/arm/at32/Kconfig diff --git a/arch/arm/src/at32/Make.defs b/soc/arm/at32/Make.defs similarity index 100% rename from arch/arm/src/at32/Make.defs rename to soc/arm/at32/Make.defs diff --git a/arch/arm/src/at32/at32.h b/soc/arm/at32/at32.h similarity index 100% rename from arch/arm/src/at32/at32.h rename to soc/arm/at32/at32.h diff --git a/arch/arm/src/at32/at32_adc.c b/soc/arm/at32/at32_adc.c similarity index 100% rename from arch/arm/src/at32/at32_adc.c rename to soc/arm/at32/at32_adc.c diff --git a/arch/arm/src/at32/at32_adc.h b/soc/arm/at32/at32_adc.h similarity index 100% rename from arch/arm/src/at32/at32_adc.h rename to soc/arm/at32/at32_adc.h diff --git a/arch/arm/src/at32/at32_allocateheap.c b/soc/arm/at32/at32_allocateheap.c similarity index 100% rename from arch/arm/src/at32/at32_allocateheap.c rename to soc/arm/at32/at32_allocateheap.c diff --git a/arch/arm/src/at32/at32_can.c b/soc/arm/at32/at32_can.c similarity index 100% rename from arch/arm/src/at32/at32_can.c rename to soc/arm/at32/at32_can.c diff --git a/arch/arm/src/at32/at32_can.h b/soc/arm/at32/at32_can.h similarity index 100% rename from arch/arm/src/at32/at32_can.h rename to soc/arm/at32/at32_can.h diff --git a/arch/arm/src/at32/at32_can_sock.c b/soc/arm/at32/at32_can_sock.c similarity index 100% rename from arch/arm/src/at32/at32_can_sock.c rename to soc/arm/at32/at32_can_sock.c diff --git a/arch/arm/src/at32/at32_dbgmcu.h b/soc/arm/at32/at32_dbgmcu.h similarity index 100% rename from arch/arm/src/at32/at32_dbgmcu.h rename to soc/arm/at32/at32_dbgmcu.h diff --git a/arch/arm/src/at32/at32_dma.c b/soc/arm/at32/at32_dma.c similarity index 100% rename from arch/arm/src/at32/at32_dma.c rename to soc/arm/at32/at32_dma.c diff --git a/arch/arm/src/at32/at32_dma.h b/soc/arm/at32/at32_dma.h similarity index 100% rename from arch/arm/src/at32/at32_dma.h rename to soc/arm/at32/at32_dma.h diff --git a/arch/arm/src/at32/at32_dma_v1mux.c b/soc/arm/at32/at32_dma_v1mux.c similarity index 100% rename from arch/arm/src/at32/at32_dma_v1mux.c rename to soc/arm/at32/at32_dma_v1mux.c diff --git a/arch/arm/src/at32/at32_dumpgpio.c b/soc/arm/at32/at32_dumpgpio.c similarity index 100% rename from arch/arm/src/at32/at32_dumpgpio.c rename to soc/arm/at32/at32_dumpgpio.c diff --git a/arch/arm/src/at32/at32_eth.c b/soc/arm/at32/at32_eth.c similarity index 100% rename from arch/arm/src/at32/at32_eth.c rename to soc/arm/at32/at32_eth.c diff --git a/arch/arm/src/at32/at32_eth.h b/soc/arm/at32/at32_eth.h similarity index 100% rename from arch/arm/src/at32/at32_eth.h rename to soc/arm/at32/at32_eth.h diff --git a/arch/arm/src/at32/at32_exti.h b/soc/arm/at32/at32_exti.h similarity index 100% rename from arch/arm/src/at32/at32_exti.h rename to soc/arm/at32/at32_exti.h diff --git a/arch/arm/src/at32/at32_exti_alarm.c b/soc/arm/at32/at32_exti_alarm.c similarity index 100% rename from arch/arm/src/at32/at32_exti_alarm.c rename to soc/arm/at32/at32_exti_alarm.c diff --git a/arch/arm/src/at32/at32_exti_gpio.c b/soc/arm/at32/at32_exti_gpio.c similarity index 100% rename from arch/arm/src/at32/at32_exti_gpio.c rename to soc/arm/at32/at32_exti_gpio.c diff --git a/arch/arm/src/at32/at32_exti_pwr.c b/soc/arm/at32/at32_exti_pwr.c similarity index 100% rename from arch/arm/src/at32/at32_exti_pwr.c rename to soc/arm/at32/at32_exti_pwr.c diff --git a/arch/arm/src/at32/at32_exti_pwr.h b/soc/arm/at32/at32_exti_pwr.h similarity index 100% rename from arch/arm/src/at32/at32_exti_pwr.h rename to soc/arm/at32/at32_exti_pwr.h diff --git a/arch/arm/src/at32/at32_exti_wakeup.c b/soc/arm/at32/at32_exti_wakeup.c similarity index 100% rename from arch/arm/src/at32/at32_exti_wakeup.c rename to soc/arm/at32/at32_exti_wakeup.c diff --git a/arch/arm/src/at32/at32_flash.c b/soc/arm/at32/at32_flash.c similarity index 100% rename from arch/arm/src/at32/at32_flash.c rename to soc/arm/at32/at32_flash.c diff --git a/arch/arm/src/at32/at32_flash.h b/soc/arm/at32/at32_flash.h similarity index 100% rename from arch/arm/src/at32/at32_flash.h rename to soc/arm/at32/at32_flash.h diff --git a/arch/arm/src/at32/at32_gpio.c b/soc/arm/at32/at32_gpio.c similarity index 100% rename from arch/arm/src/at32/at32_gpio.c rename to soc/arm/at32/at32_gpio.c diff --git a/arch/arm/src/at32/at32_gpio.h b/soc/arm/at32/at32_gpio.h similarity index 100% rename from arch/arm/src/at32/at32_gpio.h rename to soc/arm/at32/at32_gpio.h diff --git a/arch/arm/src/at32/at32_i2c.c b/soc/arm/at32/at32_i2c.c similarity index 100% rename from arch/arm/src/at32/at32_i2c.c rename to soc/arm/at32/at32_i2c.c diff --git a/arch/arm/src/at32/at32_i2c.h b/soc/arm/at32/at32_i2c.h similarity index 100% rename from arch/arm/src/at32/at32_i2c.h rename to soc/arm/at32/at32_i2c.h diff --git a/arch/arm/src/at32/at32_idle.c b/soc/arm/at32/at32_idle.c similarity index 100% rename from arch/arm/src/at32/at32_idle.c rename to soc/arm/at32/at32_idle.c diff --git a/arch/arm/src/at32/at32_irq.c b/soc/arm/at32/at32_irq.c similarity index 100% rename from arch/arm/src/at32/at32_irq.c rename to soc/arm/at32/at32_irq.c diff --git a/arch/arm/src/at32/at32_iwdg.c b/soc/arm/at32/at32_iwdg.c similarity index 100% rename from arch/arm/src/at32/at32_iwdg.c rename to soc/arm/at32/at32_iwdg.c diff --git a/arch/arm/src/at32/at32_lowputc.c b/soc/arm/at32/at32_lowputc.c similarity index 100% rename from arch/arm/src/at32/at32_lowputc.c rename to soc/arm/at32/at32_lowputc.c diff --git a/arch/arm/src/at32/at32_lowputc.h b/soc/arm/at32/at32_lowputc.h similarity index 100% rename from arch/arm/src/at32/at32_lowputc.h rename to soc/arm/at32/at32_lowputc.h diff --git a/arch/arm/src/at32/at32_lse.c b/soc/arm/at32/at32_lse.c similarity index 100% rename from arch/arm/src/at32/at32_lse.c rename to soc/arm/at32/at32_lse.c diff --git a/arch/arm/src/at32/at32_lsi.c b/soc/arm/at32/at32_lsi.c similarity index 100% rename from arch/arm/src/at32/at32_lsi.c rename to soc/arm/at32/at32_lsi.c diff --git a/arch/arm/src/at32/at32_mpuinit.c b/soc/arm/at32/at32_mpuinit.c similarity index 100% rename from arch/arm/src/at32/at32_mpuinit.c rename to soc/arm/at32/at32_mpuinit.c diff --git a/arch/arm/src/at32/at32_mpuinit.h b/soc/arm/at32/at32_mpuinit.h similarity index 100% rename from arch/arm/src/at32/at32_mpuinit.h rename to soc/arm/at32/at32_mpuinit.h diff --git a/arch/arm/src/at32/at32_otgfs.h b/soc/arm/at32/at32_otgfs.h similarity index 100% rename from arch/arm/src/at32/at32_otgfs.h rename to soc/arm/at32/at32_otgfs.h diff --git a/arch/arm/src/at32/at32_otgfsdev.c b/soc/arm/at32/at32_otgfsdev.c similarity index 100% rename from arch/arm/src/at32/at32_otgfsdev.c rename to soc/arm/at32/at32_otgfsdev.c diff --git a/arch/arm/src/at32/at32_otgfshost.c b/soc/arm/at32/at32_otgfshost.c similarity index 100% rename from arch/arm/src/at32/at32_otgfshost.c rename to soc/arm/at32/at32_otgfshost.c diff --git a/arch/arm/src/at32/at32_pm.h b/soc/arm/at32/at32_pm.h similarity index 100% rename from arch/arm/src/at32/at32_pm.h rename to soc/arm/at32/at32_pm.h diff --git a/arch/arm/src/at32/at32_pminitialize.c b/soc/arm/at32/at32_pminitialize.c similarity index 100% rename from arch/arm/src/at32/at32_pminitialize.c rename to soc/arm/at32/at32_pminitialize.c diff --git a/arch/arm/src/at32/at32_pmsleep.c b/soc/arm/at32/at32_pmsleep.c similarity index 100% rename from arch/arm/src/at32/at32_pmsleep.c rename to soc/arm/at32/at32_pmsleep.c diff --git a/arch/arm/src/at32/at32_pmstandby.c b/soc/arm/at32/at32_pmstandby.c similarity index 100% rename from arch/arm/src/at32/at32_pmstandby.c rename to soc/arm/at32/at32_pmstandby.c diff --git a/arch/arm/src/at32/at32_pmstop.c b/soc/arm/at32/at32_pmstop.c similarity index 100% rename from arch/arm/src/at32/at32_pmstop.c rename to soc/arm/at32/at32_pmstop.c diff --git a/arch/arm/src/at32/at32_pwm.c b/soc/arm/at32/at32_pwm.c similarity index 100% rename from arch/arm/src/at32/at32_pwm.c rename to soc/arm/at32/at32_pwm.c diff --git a/arch/arm/src/at32/at32_pwm.h b/soc/arm/at32/at32_pwm.h similarity index 100% rename from arch/arm/src/at32/at32_pwm.h rename to soc/arm/at32/at32_pwm.h diff --git a/arch/arm/src/at32/at32_pwr.c b/soc/arm/at32/at32_pwr.c similarity index 100% rename from arch/arm/src/at32/at32_pwr.c rename to soc/arm/at32/at32_pwr.c diff --git a/arch/arm/src/at32/at32_pwr.h b/soc/arm/at32/at32_pwr.h similarity index 100% rename from arch/arm/src/at32/at32_pwr.h rename to soc/arm/at32/at32_pwr.h diff --git a/arch/arm/src/at32/at32_rcc.c b/soc/arm/at32/at32_rcc.c similarity index 100% rename from arch/arm/src/at32/at32_rcc.c rename to soc/arm/at32/at32_rcc.c diff --git a/arch/arm/src/at32/at32_rcc.h b/soc/arm/at32/at32_rcc.h similarity index 100% rename from arch/arm/src/at32/at32_rcc.h rename to soc/arm/at32/at32_rcc.h diff --git a/arch/arm/src/at32/at32_rtc.c b/soc/arm/at32/at32_rtc.c similarity index 100% rename from arch/arm/src/at32/at32_rtc.c rename to soc/arm/at32/at32_rtc.c diff --git a/arch/arm/src/at32/at32_rtc.h b/soc/arm/at32/at32_rtc.h similarity index 100% rename from arch/arm/src/at32/at32_rtc.h rename to soc/arm/at32/at32_rtc.h diff --git a/arch/arm/src/at32/at32_rtc_lowerhalf.c b/soc/arm/at32/at32_rtc_lowerhalf.c similarity index 100% rename from arch/arm/src/at32/at32_rtc_lowerhalf.c rename to soc/arm/at32/at32_rtc_lowerhalf.c diff --git a/arch/arm/src/at32/at32_sdio.c b/soc/arm/at32/at32_sdio.c similarity index 100% rename from arch/arm/src/at32/at32_sdio.c rename to soc/arm/at32/at32_sdio.c diff --git a/arch/arm/src/at32/at32_sdio.h b/soc/arm/at32/at32_sdio.h similarity index 100% rename from arch/arm/src/at32/at32_sdio.h rename to soc/arm/at32/at32_sdio.h diff --git a/arch/arm/src/at32/at32_serial.c b/soc/arm/at32/at32_serial.c similarity index 100% rename from arch/arm/src/at32/at32_serial.c rename to soc/arm/at32/at32_serial.c diff --git a/arch/arm/src/at32/at32_spi.c b/soc/arm/at32/at32_spi.c similarity index 100% rename from arch/arm/src/at32/at32_spi.c rename to soc/arm/at32/at32_spi.c diff --git a/arch/arm/src/at32/at32_spi.h b/soc/arm/at32/at32_spi.h similarity index 100% rename from arch/arm/src/at32/at32_spi.h rename to soc/arm/at32/at32_spi.h diff --git a/arch/arm/src/at32/at32_start.c b/soc/arm/at32/at32_start.c similarity index 100% rename from arch/arm/src/at32/at32_start.c rename to soc/arm/at32/at32_start.c diff --git a/arch/arm/src/at32/at32_start.h b/soc/arm/at32/at32_start.h similarity index 100% rename from arch/arm/src/at32/at32_start.h rename to soc/arm/at32/at32_start.h diff --git a/arch/arm/src/at32/at32_syscfg.h b/soc/arm/at32/at32_syscfg.h similarity index 100% rename from arch/arm/src/at32/at32_syscfg.h rename to soc/arm/at32/at32_syscfg.h diff --git a/arch/arm/src/at32/at32_tim.c b/soc/arm/at32/at32_tim.c similarity index 100% rename from arch/arm/src/at32/at32_tim.c rename to soc/arm/at32/at32_tim.c diff --git a/arch/arm/src/at32/at32_tim.h b/soc/arm/at32/at32_tim.h similarity index 100% rename from arch/arm/src/at32/at32_tim.h rename to soc/arm/at32/at32_tim.h diff --git a/arch/arm/src/at32/at32_tim_lowerhalf.c b/soc/arm/at32/at32_tim_lowerhalf.c similarity index 100% rename from arch/arm/src/at32/at32_tim_lowerhalf.c rename to soc/arm/at32/at32_tim_lowerhalf.c diff --git a/arch/arm/src/at32/at32_timerisr.c b/soc/arm/at32/at32_timerisr.c similarity index 100% rename from arch/arm/src/at32/at32_timerisr.c rename to soc/arm/at32/at32_timerisr.c diff --git a/arch/arm/src/at32/at32_uart.h b/soc/arm/at32/at32_uart.h similarity index 100% rename from arch/arm/src/at32/at32_uart.h rename to soc/arm/at32/at32_uart.h diff --git a/arch/arm/src/at32/at32_uid.c b/soc/arm/at32/at32_uid.c similarity index 100% rename from arch/arm/src/at32/at32_uid.c rename to soc/arm/at32/at32_uid.c diff --git a/arch/arm/src/at32/at32_uid.h b/soc/arm/at32/at32_uid.h similarity index 100% rename from arch/arm/src/at32/at32_uid.h rename to soc/arm/at32/at32_uid.h diff --git a/arch/arm/src/at32/at32_usbhost.c b/soc/arm/at32/at32_usbhost.c similarity index 100% rename from arch/arm/src/at32/at32_usbhost.c rename to soc/arm/at32/at32_usbhost.c diff --git a/arch/arm/src/at32/at32_usbhost.h b/soc/arm/at32/at32_usbhost.h similarity index 100% rename from arch/arm/src/at32/at32_usbhost.h rename to soc/arm/at32/at32_usbhost.h diff --git a/arch/arm/src/at32/at32_userspace.c b/soc/arm/at32/at32_userspace.c similarity index 100% rename from arch/arm/src/at32/at32_userspace.c rename to soc/arm/at32/at32_userspace.c diff --git a/arch/arm/src/at32/at32_userspace.h b/soc/arm/at32/at32_userspace.h similarity index 100% rename from arch/arm/src/at32/at32_userspace.h rename to soc/arm/at32/at32_userspace.h diff --git a/arch/arm/src/at32/at32_waste.c b/soc/arm/at32/at32_waste.c similarity index 100% rename from arch/arm/src/at32/at32_waste.c rename to soc/arm/at32/at32_waste.c diff --git a/arch/arm/src/at32/at32_waste.h b/soc/arm/at32/at32_waste.h similarity index 100% rename from arch/arm/src/at32/at32_waste.h rename to soc/arm/at32/at32_waste.h diff --git a/arch/arm/src/at32/at32_wdg.h b/soc/arm/at32/at32_wdg.h similarity index 100% rename from arch/arm/src/at32/at32_wdg.h rename to soc/arm/at32/at32_wdg.h diff --git a/arch/arm/src/at32/at32_wwdg.c b/soc/arm/at32/at32_wwdg.c similarity index 100% rename from arch/arm/src/at32/at32_wwdg.c rename to soc/arm/at32/at32_wwdg.c diff --git a/arch/arm/src/at32/at32f43xx_flash.c b/soc/arm/at32/at32f43xx_flash.c similarity index 100% rename from arch/arm/src/at32/at32f43xx_flash.c rename to soc/arm/at32/at32f43xx_flash.c diff --git a/arch/arm/src/at32/at32f43xxx_alarm.h b/soc/arm/at32/at32f43xxx_alarm.h similarity index 100% rename from arch/arm/src/at32/at32f43xxx_alarm.h rename to soc/arm/at32/at32f43xxx_alarm.h diff --git a/arch/arm/src/at32/at32f43xxx_rcc.c b/soc/arm/at32/at32f43xxx_rcc.c similarity index 100% rename from arch/arm/src/at32/at32f43xxx_rcc.c rename to soc/arm/at32/at32f43xxx_rcc.c diff --git a/arch/arm/src/at32/at32f43xxx_rtcc.c b/soc/arm/at32/at32f43xxx_rtcc.c similarity index 100% rename from arch/arm/src/at32/at32f43xxx_rtcc.c rename to soc/arm/at32/at32f43xxx_rtcc.c diff --git a/arch/arm/src/at32/chip.h b/soc/arm/at32/chip.h similarity index 100% rename from arch/arm/src/at32/chip.h rename to soc/arm/at32/chip.h diff --git a/arch/arm/src/at32/hardware/at32_adc.h b/soc/arm/at32/hardware/at32_adc.h similarity index 100% rename from arch/arm/src/at32/hardware/at32_adc.h rename to soc/arm/at32/hardware/at32_adc.h diff --git a/arch/arm/src/at32/hardware/at32_adc_v1.h b/soc/arm/at32/hardware/at32_adc_v1.h similarity index 100% rename from arch/arm/src/at32/hardware/at32_adc_v1.h rename to soc/arm/at32/hardware/at32_adc_v1.h diff --git a/arch/arm/src/at32/hardware/at32_can.h b/soc/arm/at32/hardware/at32_can.h similarity index 100% rename from arch/arm/src/at32/hardware/at32_can.h rename to soc/arm/at32/hardware/at32_can.h diff --git a/arch/arm/src/at32/hardware/at32_dbgmcu.h b/soc/arm/at32/hardware/at32_dbgmcu.h similarity index 100% rename from arch/arm/src/at32/hardware/at32_dbgmcu.h rename to soc/arm/at32/hardware/at32_dbgmcu.h diff --git a/arch/arm/src/at32/hardware/at32_dma.h b/soc/arm/at32/hardware/at32_dma.h similarity index 100% rename from arch/arm/src/at32/hardware/at32_dma.h rename to soc/arm/at32/hardware/at32_dma.h diff --git a/arch/arm/src/at32/hardware/at32_dmamux.h b/soc/arm/at32/hardware/at32_dmamux.h similarity index 100% rename from arch/arm/src/at32/hardware/at32_dmamux.h rename to soc/arm/at32/hardware/at32_dmamux.h diff --git a/arch/arm/src/at32/hardware/at32_eth.h b/soc/arm/at32/hardware/at32_eth.h similarity index 100% rename from arch/arm/src/at32/hardware/at32_eth.h rename to soc/arm/at32/hardware/at32_eth.h diff --git a/arch/arm/src/at32/hardware/at32_exti.h b/soc/arm/at32/hardware/at32_exti.h similarity index 100% rename from arch/arm/src/at32/hardware/at32_exti.h rename to soc/arm/at32/hardware/at32_exti.h diff --git a/arch/arm/src/at32/hardware/at32_flash.h b/soc/arm/at32/hardware/at32_flash.h similarity index 100% rename from arch/arm/src/at32/hardware/at32_flash.h rename to soc/arm/at32/hardware/at32_flash.h diff --git a/arch/arm/src/at32/hardware/at32_i2c.h b/soc/arm/at32/hardware/at32_i2c.h similarity index 100% rename from arch/arm/src/at32/hardware/at32_i2c.h rename to soc/arm/at32/hardware/at32_i2c.h diff --git a/arch/arm/src/at32/hardware/at32_memorymap.h b/soc/arm/at32/hardware/at32_memorymap.h similarity index 100% rename from arch/arm/src/at32/hardware/at32_memorymap.h rename to soc/arm/at32/hardware/at32_memorymap.h diff --git a/arch/arm/src/at32/hardware/at32_pinmap.h b/soc/arm/at32/hardware/at32_pinmap.h similarity index 100% rename from arch/arm/src/at32/hardware/at32_pinmap.h rename to soc/arm/at32/hardware/at32_pinmap.h diff --git a/arch/arm/src/at32/hardware/at32_pwr.h b/soc/arm/at32/hardware/at32_pwr.h similarity index 100% rename from arch/arm/src/at32/hardware/at32_pwr.h rename to soc/arm/at32/hardware/at32_pwr.h diff --git a/arch/arm/src/at32/hardware/at32_rtcc.h b/soc/arm/at32/hardware/at32_rtcc.h similarity index 100% rename from arch/arm/src/at32/hardware/at32_rtcc.h rename to soc/arm/at32/hardware/at32_rtcc.h diff --git a/arch/arm/src/at32/hardware/at32_sdio.h b/soc/arm/at32/hardware/at32_sdio.h similarity index 100% rename from arch/arm/src/at32/hardware/at32_sdio.h rename to soc/arm/at32/hardware/at32_sdio.h diff --git a/arch/arm/src/at32/hardware/at32_spi.h b/soc/arm/at32/hardware/at32_spi.h similarity index 100% rename from arch/arm/src/at32/hardware/at32_spi.h rename to soc/arm/at32/hardware/at32_spi.h diff --git a/arch/arm/src/at32/hardware/at32_tim.h b/soc/arm/at32/hardware/at32_tim.h similarity index 100% rename from arch/arm/src/at32/hardware/at32_tim.h rename to soc/arm/at32/hardware/at32_tim.h diff --git a/arch/arm/src/at32/hardware/at32_wdg.h b/soc/arm/at32/hardware/at32_wdg.h similarity index 100% rename from arch/arm/src/at32/hardware/at32_wdg.h rename to soc/arm/at32/hardware/at32_wdg.h diff --git a/arch/arm/src/at32/hardware/at32f43xxx_dmamux.h b/soc/arm/at32/hardware/at32f43xxx_dmamux.h similarity index 100% rename from arch/arm/src/at32/hardware/at32f43xxx_dmamux.h rename to soc/arm/at32/hardware/at32f43xxx_dmamux.h diff --git a/arch/arm/src/at32/hardware/at32f43xxx_gpio.h b/soc/arm/at32/hardware/at32f43xxx_gpio.h similarity index 100% rename from arch/arm/src/at32/hardware/at32f43xxx_gpio.h rename to soc/arm/at32/hardware/at32f43xxx_gpio.h diff --git a/arch/arm/src/at32/hardware/at32f43xxx_memorymap.h b/soc/arm/at32/hardware/at32f43xxx_memorymap.h similarity index 100% rename from arch/arm/src/at32/hardware/at32f43xxx_memorymap.h rename to soc/arm/at32/hardware/at32f43xxx_memorymap.h diff --git a/arch/arm/src/at32/hardware/at32f43xxx_pinmap.h b/soc/arm/at32/hardware/at32f43xxx_pinmap.h similarity index 100% rename from arch/arm/src/at32/hardware/at32f43xxx_pinmap.h rename to soc/arm/at32/hardware/at32f43xxx_pinmap.h diff --git a/arch/arm/src/at32/hardware/at32f43xxx_rcc.h b/soc/arm/at32/hardware/at32f43xxx_rcc.h similarity index 100% rename from arch/arm/src/at32/hardware/at32f43xxx_rcc.h rename to soc/arm/at32/hardware/at32f43xxx_rcc.h diff --git a/arch/arm/src/at32/hardware/at32f43xxx_syscfg.h b/soc/arm/at32/hardware/at32f43xxx_syscfg.h similarity index 100% rename from arch/arm/src/at32/hardware/at32f43xxx_syscfg.h rename to soc/arm/at32/hardware/at32f43xxx_syscfg.h diff --git a/arch/arm/src/at32/hardware/at32f43xxx_uart.h b/soc/arm/at32/hardware/at32f43xxx_uart.h similarity index 100% rename from arch/arm/src/at32/hardware/at32f43xxx_uart.h rename to soc/arm/at32/hardware/at32f43xxx_uart.h diff --git a/arch/arm/src/at32/hardware/at32fxxxxx_otgfs.h b/soc/arm/at32/hardware/at32fxxxxx_otgfs.h similarity index 100% rename from arch/arm/src/at32/hardware/at32fxxxxx_otgfs.h rename to soc/arm/at32/hardware/at32fxxxxx_otgfs.h diff --git a/arch/arm/src/c5471/Kconfig b/soc/arm/c5471/Kconfig similarity index 100% rename from arch/arm/src/c5471/Kconfig rename to soc/arm/c5471/Kconfig diff --git a/arch/arm/src/c5471/Make.defs b/soc/arm/c5471/Make.defs similarity index 100% rename from arch/arm/src/c5471/Make.defs rename to soc/arm/c5471/Make.defs diff --git a/arch/arm/src/c5471/c5471_ethernet.c b/soc/arm/c5471/c5471_ethernet.c similarity index 100% rename from arch/arm/src/c5471/c5471_ethernet.c rename to soc/arm/c5471/c5471_ethernet.c diff --git a/arch/arm/src/c5471/c5471_irq.c b/soc/arm/c5471/c5471_irq.c similarity index 100% rename from arch/arm/src/c5471/c5471_irq.c rename to soc/arm/c5471/c5471_irq.c diff --git a/arch/arm/src/c5471/c5471_lowputc.S b/soc/arm/c5471/c5471_lowputc.S similarity index 100% rename from arch/arm/src/c5471/c5471_lowputc.S rename to soc/arm/c5471/c5471_lowputc.S diff --git a/arch/arm/src/c5471/c5471_serial.c b/soc/arm/c5471/c5471_serial.c similarity index 100% rename from arch/arm/src/c5471/c5471_serial.c rename to soc/arm/c5471/c5471_serial.c diff --git a/arch/arm/src/c5471/c5471_timerisr.c b/soc/arm/c5471/c5471_timerisr.c similarity index 100% rename from arch/arm/src/c5471/c5471_timerisr.c rename to soc/arm/c5471/c5471_timerisr.c diff --git a/arch/arm/src/c5471/c5471_vectors.S b/soc/arm/c5471/c5471_vectors.S similarity index 100% rename from arch/arm/src/c5471/c5471_vectors.S rename to soc/arm/c5471/c5471_vectors.S diff --git a/arch/arm/src/c5471/c5471_watchdog.c b/soc/arm/c5471/c5471_watchdog.c similarity index 100% rename from arch/arm/src/c5471/c5471_watchdog.c rename to soc/arm/c5471/c5471_watchdog.c diff --git a/arch/arm/src/c5471/chip.h b/soc/arm/c5471/chip.h similarity index 100% rename from arch/arm/src/c5471/chip.h rename to soc/arm/c5471/chip.h diff --git a/arch/arm/src/csk6/CMakeLists.txt b/soc/arm/csk6/CMakeLists.txt similarity index 100% rename from arch/arm/src/csk6/CMakeLists.txt rename to soc/arm/csk6/CMakeLists.txt diff --git a/arch/arm/src/csk6/Make.defs b/soc/arm/csk6/Make.defs similarity index 100% rename from arch/arm/src/csk6/Make.defs rename to soc/arm/csk6/Make.defs diff --git a/arch/arm/src/csk6/chip.h b/soc/arm/csk6/chip.h similarity index 100% rename from arch/arm/src/csk6/chip.h rename to soc/arm/csk6/chip.h diff --git a/arch/arm/src/csk6/csk6_irq.c b/soc/arm/csk6/csk6_irq.c similarity index 100% rename from arch/arm/src/csk6/csk6_irq.c rename to soc/arm/csk6/csk6_irq.c diff --git a/arch/arm/src/csk6/csk6_lowputc.c b/soc/arm/csk6/csk6_lowputc.c similarity index 100% rename from arch/arm/src/csk6/csk6_lowputc.c rename to soc/arm/csk6/csk6_lowputc.c diff --git a/arch/arm/src/csk6/csk6_lowputc.h b/soc/arm/csk6/csk6_lowputc.h similarity index 100% rename from arch/arm/src/csk6/csk6_lowputc.h rename to soc/arm/csk6/csk6_lowputc.h diff --git a/arch/arm/src/csk6/csk6_serial.c b/soc/arm/csk6/csk6_serial.c similarity index 100% rename from arch/arm/src/csk6/csk6_serial.c rename to soc/arm/csk6/csk6_serial.c diff --git a/arch/arm/src/csk6/csk6_start.c b/soc/arm/csk6/csk6_start.c similarity index 100% rename from arch/arm/src/csk6/csk6_start.c rename to soc/arm/csk6/csk6_start.c diff --git a/arch/arm/src/csk6/csk6_timer.c b/soc/arm/csk6/csk6_timer.c similarity index 100% rename from arch/arm/src/csk6/csk6_timer.c rename to soc/arm/csk6/csk6_timer.c diff --git a/arch/arm/src/cxd32xx/Kconfig b/soc/arm/cxd32xx/Kconfig similarity index 100% rename from arch/arm/src/cxd32xx/Kconfig rename to soc/arm/cxd32xx/Kconfig diff --git a/arch/arm/src/cxd32xx/Make.defs b/soc/arm/cxd32xx/Make.defs similarity index 100% rename from arch/arm/src/cxd32xx/Make.defs rename to soc/arm/cxd32xx/Make.defs diff --git a/arch/arm/src/cxd32xx/chip.h b/soc/arm/cxd32xx/chip.h similarity index 100% rename from arch/arm/src/cxd32xx/chip.h rename to soc/arm/cxd32xx/chip.h diff --git a/arch/arm/src/cxd32xx/cxd32_config.h b/soc/arm/cxd32xx/cxd32_config.h similarity index 100% rename from arch/arm/src/cxd32xx/cxd32_config.h rename to soc/arm/cxd32xx/cxd32_config.h diff --git a/arch/arm/src/cxd32xx/cxd32_irq.c b/soc/arm/cxd32xx/cxd32_irq.c similarity index 100% rename from arch/arm/src/cxd32xx/cxd32_irq.c rename to soc/arm/cxd32xx/cxd32_irq.c diff --git a/arch/arm/src/cxd32xx/cxd32_serial.c b/soc/arm/cxd32xx/cxd32_serial.c similarity index 100% rename from arch/arm/src/cxd32xx/cxd32_serial.c rename to soc/arm/cxd32xx/cxd32_serial.c diff --git a/arch/arm/src/cxd32xx/cxd32_serial.h b/soc/arm/cxd32xx/cxd32_serial.h similarity index 100% rename from arch/arm/src/cxd32xx/cxd32_serial.h rename to soc/arm/cxd32xx/cxd32_serial.h diff --git a/arch/arm/src/cxd32xx/cxd32_serial_pl011.c b/soc/arm/cxd32xx/cxd32_serial_pl011.c similarity index 100% rename from arch/arm/src/cxd32xx/cxd32_serial_pl011.c rename to soc/arm/cxd32xx/cxd32_serial_pl011.c diff --git a/arch/arm/src/cxd32xx/cxd32_start.c b/soc/arm/cxd32xx/cxd32_start.c similarity index 100% rename from arch/arm/src/cxd32xx/cxd32_start.c rename to soc/arm/cxd32xx/cxd32_start.c diff --git a/arch/arm/src/cxd32xx/cxd32_timerisr.c b/soc/arm/cxd32xx/cxd32_timerisr.c similarity index 100% rename from arch/arm/src/cxd32xx/cxd32_timerisr.c rename to soc/arm/cxd32xx/cxd32_timerisr.c diff --git a/arch/arm/src/cxd32xx/cxd32_uart.c b/soc/arm/cxd32xx/cxd32_uart.c similarity index 100% rename from arch/arm/src/cxd32xx/cxd32_uart.c rename to soc/arm/cxd32xx/cxd32_uart.c diff --git a/arch/arm/src/cxd32xx/cxd32_uart.h b/soc/arm/cxd32xx/cxd32_uart.h similarity index 100% rename from arch/arm/src/cxd32xx/cxd32_uart.h rename to soc/arm/cxd32xx/cxd32_uart.h diff --git a/arch/arm/src/cxd32xx/hardware/cxd3277_clockfreq.h b/soc/arm/cxd32xx/hardware/cxd3277_clockfreq.h similarity index 100% rename from arch/arm/src/cxd32xx/hardware/cxd3277_clockfreq.h rename to soc/arm/cxd32xx/hardware/cxd3277_clockfreq.h diff --git a/arch/arm/src/cxd32xx/hardware/cxd3277_memorymap.h b/soc/arm/cxd32xx/hardware/cxd3277_memorymap.h similarity index 100% rename from arch/arm/src/cxd32xx/hardware/cxd3277_memorymap.h rename to soc/arm/cxd32xx/hardware/cxd3277_memorymap.h diff --git a/arch/arm/src/cxd32xx/hardware/cxd32_timer.h b/soc/arm/cxd32xx/hardware/cxd32_timer.h similarity index 100% rename from arch/arm/src/cxd32xx/hardware/cxd32_timer.h rename to soc/arm/cxd32xx/hardware/cxd32_timer.h diff --git a/arch/arm/src/cxd32xx/hardware/cxd32_uart.h b/soc/arm/cxd32xx/hardware/cxd32_uart.h similarity index 100% rename from arch/arm/src/cxd32xx/hardware/cxd32_uart.h rename to soc/arm/cxd32xx/hardware/cxd32_uart.h diff --git a/arch/arm/src/cxd56xx/CMakeLists.txt b/soc/arm/cxd56xx/CMakeLists.txt similarity index 100% rename from arch/arm/src/cxd56xx/CMakeLists.txt rename to soc/arm/cxd56xx/CMakeLists.txt diff --git a/arch/arm/src/cxd56xx/Kconfig b/soc/arm/cxd56xx/Kconfig similarity index 100% rename from arch/arm/src/cxd56xx/Kconfig rename to soc/arm/cxd56xx/Kconfig diff --git a/arch/arm/src/cxd56xx/Make.defs b/soc/arm/cxd56xx/Make.defs similarity index 100% rename from arch/arm/src/cxd56xx/Make.defs rename to soc/arm/cxd56xx/Make.defs diff --git a/arch/arm/src/cxd56xx/chip.h b/soc/arm/cxd56xx/chip.h similarity index 100% rename from arch/arm/src/cxd56xx/chip.h rename to soc/arm/cxd56xx/chip.h diff --git a/arch/arm/src/cxd56xx/cxd56_adc.c b/soc/arm/cxd56xx/cxd56_adc.c similarity index 99% rename from arch/arm/src/cxd56xx/cxd56_adc.c rename to soc/arm/cxd56xx/cxd56_adc.c index 47b3ac00d9..86829ce507 100644 --- a/arch/arm/src/cxd56xx/cxd56_adc.c +++ b/soc/arm/cxd56xx/cxd56_adc.c @@ -32,7 +32,7 @@ #include #include -#include +#include #include #include #include diff --git a/arch/arm/src/cxd56xx/cxd56_adc.h b/soc/arm/cxd56xx/cxd56_adc.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_adc.h rename to soc/arm/cxd56xx/cxd56_adc.h diff --git a/arch/arm/src/cxd56xx/cxd56_allocateheap.c b/soc/arm/cxd56xx/cxd56_allocateheap.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_allocateheap.c rename to soc/arm/cxd56xx/cxd56_allocateheap.c diff --git a/arch/arm/src/cxd56xx/cxd56_backuplog.c b/soc/arm/cxd56xx/cxd56_backuplog.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_backuplog.c rename to soc/arm/cxd56xx/cxd56_backuplog.c diff --git a/arch/arm/src/cxd56xx/cxd56_charger.c b/soc/arm/cxd56xx/cxd56_charger.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_charger.c rename to soc/arm/cxd56xx/cxd56_charger.c diff --git a/arch/arm/src/cxd56xx/cxd56_charger.h b/soc/arm/cxd56xx/cxd56_charger.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_charger.h rename to soc/arm/cxd56xx/cxd56_charger.h diff --git a/arch/arm/src/cxd56xx/cxd56_cisif.c b/soc/arm/cxd56xx/cxd56_cisif.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_cisif.c rename to soc/arm/cxd56xx/cxd56_cisif.c diff --git a/arch/arm/src/cxd56xx/cxd56_clock.c b/soc/arm/cxd56xx/cxd56_clock.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_clock.c rename to soc/arm/cxd56xx/cxd56_clock.c diff --git a/arch/arm/src/cxd56xx/cxd56_clock.h b/soc/arm/cxd56xx/cxd56_clock.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_clock.h rename to soc/arm/cxd56xx/cxd56_clock.h diff --git a/arch/arm/src/cxd56xx/cxd56_config.h b/soc/arm/cxd56xx/cxd56_config.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_config.h rename to soc/arm/cxd56xx/cxd56_config.h diff --git a/arch/arm/src/cxd56xx/cxd56_cpu1signal.c b/soc/arm/cxd56xx/cxd56_cpu1signal.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_cpu1signal.c rename to soc/arm/cxd56xx/cxd56_cpu1signal.c diff --git a/arch/arm/src/cxd56xx/cxd56_cpu1signal.h b/soc/arm/cxd56xx/cxd56_cpu1signal.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_cpu1signal.h rename to soc/arm/cxd56xx/cxd56_cpu1signal.h diff --git a/arch/arm/src/cxd56xx/cxd56_cpufifo.c b/soc/arm/cxd56xx/cxd56_cpufifo.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_cpufifo.c rename to soc/arm/cxd56xx/cxd56_cpufifo.c diff --git a/arch/arm/src/cxd56xx/cxd56_cpufifo.h b/soc/arm/cxd56xx/cxd56_cpufifo.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_cpufifo.h rename to soc/arm/cxd56xx/cxd56_cpufifo.h diff --git a/arch/arm/src/cxd56xx/cxd56_cpuidlestack.c b/soc/arm/cxd56xx/cxd56_cpuidlestack.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_cpuidlestack.c rename to soc/arm/cxd56xx/cxd56_cpuidlestack.c diff --git a/arch/arm/src/cxd56xx/cxd56_cpuindex.c b/soc/arm/cxd56xx/cxd56_cpuindex.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_cpuindex.c rename to soc/arm/cxd56xx/cxd56_cpuindex.c diff --git a/arch/arm/src/cxd56xx/cxd56_cpuindex.h b/soc/arm/cxd56xx/cxd56_cpuindex.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_cpuindex.h rename to soc/arm/cxd56xx/cxd56_cpuindex.h diff --git a/arch/arm/src/cxd56xx/cxd56_cpustart.c b/soc/arm/cxd56xx/cxd56_cpustart.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_cpustart.c rename to soc/arm/cxd56xx/cxd56_cpustart.c diff --git a/arch/arm/src/cxd56xx/cxd56_delay.c b/soc/arm/cxd56xx/cxd56_delay.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_delay.c rename to soc/arm/cxd56xx/cxd56_delay.c diff --git a/arch/arm/src/cxd56xx/cxd56_dmac.c b/soc/arm/cxd56xx/cxd56_dmac.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_dmac.c rename to soc/arm/cxd56xx/cxd56_dmac.c diff --git a/arch/arm/src/cxd56xx/cxd56_dmac.h b/soc/arm/cxd56xx/cxd56_dmac.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_dmac.h rename to soc/arm/cxd56xx/cxd56_dmac.h diff --git a/arch/arm/src/cxd56xx/cxd56_dmac_common.h b/soc/arm/cxd56xx/cxd56_dmac_common.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_dmac_common.h rename to soc/arm/cxd56xx/cxd56_dmac_common.h diff --git a/arch/arm/src/cxd56xx/cxd56_emmc.c b/soc/arm/cxd56xx/cxd56_emmc.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_emmc.c rename to soc/arm/cxd56xx/cxd56_emmc.c diff --git a/arch/arm/src/cxd56xx/cxd56_emmc.h b/soc/arm/cxd56xx/cxd56_emmc.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_emmc.h rename to soc/arm/cxd56xx/cxd56_emmc.h diff --git a/arch/arm/src/cxd56xx/cxd56_farapi.c b/soc/arm/cxd56xx/cxd56_farapi.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_farapi.c rename to soc/arm/cxd56xx/cxd56_farapi.c diff --git a/arch/arm/src/cxd56xx/cxd56_farapi.h b/soc/arm/cxd56xx/cxd56_farapi.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_farapi.h rename to soc/arm/cxd56xx/cxd56_farapi.h diff --git a/arch/arm/src/cxd56xx/cxd56_farapistub.S b/soc/arm/cxd56xx/cxd56_farapistub.S similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_farapistub.S rename to soc/arm/cxd56xx/cxd56_farapistub.S diff --git a/arch/arm/src/cxd56xx/cxd56_farapistub.h b/soc/arm/cxd56xx/cxd56_farapistub.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_farapistub.h rename to soc/arm/cxd56xx/cxd56_farapistub.h diff --git a/arch/arm/src/cxd56xx/cxd56_gauge.c b/soc/arm/cxd56xx/cxd56_gauge.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_gauge.c rename to soc/arm/cxd56xx/cxd56_gauge.c diff --git a/arch/arm/src/cxd56xx/cxd56_gauge.h b/soc/arm/cxd56xx/cxd56_gauge.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_gauge.h rename to soc/arm/cxd56xx/cxd56_gauge.h diff --git a/arch/arm/src/cxd56xx/cxd56_ge2d.c b/soc/arm/cxd56xx/cxd56_ge2d.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_ge2d.c rename to soc/arm/cxd56xx/cxd56_ge2d.c diff --git a/arch/arm/src/cxd56xx/cxd56_geofence.c b/soc/arm/cxd56xx/cxd56_geofence.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_geofence.c rename to soc/arm/cxd56xx/cxd56_geofence.c diff --git a/arch/arm/src/cxd56xx/cxd56_geofence.h b/soc/arm/cxd56xx/cxd56_geofence.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_geofence.h rename to soc/arm/cxd56xx/cxd56_geofence.h diff --git a/arch/arm/src/cxd56xx/cxd56_gnss.c b/soc/arm/cxd56xx/cxd56_gnss.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_gnss.c rename to soc/arm/cxd56xx/cxd56_gnss.c diff --git a/arch/arm/src/cxd56xx/cxd56_gnss.h b/soc/arm/cxd56xx/cxd56_gnss.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_gnss.h rename to soc/arm/cxd56xx/cxd56_gnss.h diff --git a/arch/arm/src/cxd56xx/cxd56_gnss_api.h b/soc/arm/cxd56xx/cxd56_gnss_api.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_gnss_api.h rename to soc/arm/cxd56xx/cxd56_gnss_api.h diff --git a/arch/arm/src/cxd56xx/cxd56_gnssheap.c b/soc/arm/cxd56xx/cxd56_gnssheap.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_gnssheap.c rename to soc/arm/cxd56xx/cxd56_gnssheap.c diff --git a/arch/arm/src/cxd56xx/cxd56_gpio.c b/soc/arm/cxd56xx/cxd56_gpio.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_gpio.c rename to soc/arm/cxd56xx/cxd56_gpio.c diff --git a/arch/arm/src/cxd56xx/cxd56_gpio.h b/soc/arm/cxd56xx/cxd56_gpio.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_gpio.h rename to soc/arm/cxd56xx/cxd56_gpio.h diff --git a/arch/arm/src/cxd56xx/cxd56_gpioint.c b/soc/arm/cxd56xx/cxd56_gpioint.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_gpioint.c rename to soc/arm/cxd56xx/cxd56_gpioint.c diff --git a/arch/arm/src/cxd56xx/cxd56_gpioint.h b/soc/arm/cxd56xx/cxd56_gpioint.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_gpioint.h rename to soc/arm/cxd56xx/cxd56_gpioint.h diff --git a/arch/arm/src/cxd56xx/cxd56_hostif.c b/soc/arm/cxd56xx/cxd56_hostif.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_hostif.c rename to soc/arm/cxd56xx/cxd56_hostif.c diff --git a/arch/arm/src/cxd56xx/cxd56_i2c.c b/soc/arm/cxd56xx/cxd56_i2c.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_i2c.c rename to soc/arm/cxd56xx/cxd56_i2c.c diff --git a/arch/arm/src/cxd56xx/cxd56_i2c.h b/soc/arm/cxd56xx/cxd56_i2c.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_i2c.h rename to soc/arm/cxd56xx/cxd56_i2c.h diff --git a/arch/arm/src/cxd56xx/cxd56_i2c_bitbang.c b/soc/arm/cxd56xx/cxd56_i2c_bitbang.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_i2c_bitbang.c rename to soc/arm/cxd56xx/cxd56_i2c_bitbang.c diff --git a/arch/arm/src/cxd56xx/cxd56_i2c_bitbang.h b/soc/arm/cxd56xx/cxd56_i2c_bitbang.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_i2c_bitbang.h rename to soc/arm/cxd56xx/cxd56_i2c_bitbang.h diff --git a/arch/arm/src/cxd56xx/cxd56_icc.c b/soc/arm/cxd56xx/cxd56_icc.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_icc.c rename to soc/arm/cxd56xx/cxd56_icc.c diff --git a/arch/arm/src/cxd56xx/cxd56_icc.h b/soc/arm/cxd56xx/cxd56_icc.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_icc.h rename to soc/arm/cxd56xx/cxd56_icc.h diff --git a/arch/arm/src/cxd56xx/cxd56_idle.c b/soc/arm/cxd56xx/cxd56_idle.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_idle.c rename to soc/arm/cxd56xx/cxd56_idle.c diff --git a/arch/arm/src/cxd56xx/cxd56_irq.c b/soc/arm/cxd56xx/cxd56_irq.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_irq.c rename to soc/arm/cxd56xx/cxd56_irq.c diff --git a/arch/arm/src/cxd56xx/cxd56_nxaudio.c b/soc/arm/cxd56xx/cxd56_nxaudio.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_nxaudio.c rename to soc/arm/cxd56xx/cxd56_nxaudio.c diff --git a/arch/arm/src/cxd56xx/cxd56_nxaudio.h b/soc/arm/cxd56xx/cxd56_nxaudio.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_nxaudio.h rename to soc/arm/cxd56xx/cxd56_nxaudio.h diff --git a/arch/arm/src/cxd56xx/cxd56_nxaudio_src.c b/soc/arm/cxd56xx/cxd56_nxaudio_src.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_nxaudio_src.c rename to soc/arm/cxd56xx/cxd56_nxaudio_src.c diff --git a/arch/arm/src/cxd56xx/cxd56_nxaudio_src.h b/soc/arm/cxd56xx/cxd56_nxaudio_src.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_nxaudio_src.h rename to soc/arm/cxd56xx/cxd56_nxaudio_src.h diff --git a/arch/arm/src/cxd56xx/cxd56_pinconfig.c b/soc/arm/cxd56xx/cxd56_pinconfig.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_pinconfig.c rename to soc/arm/cxd56xx/cxd56_pinconfig.c diff --git a/arch/arm/src/cxd56xx/cxd56_pinconfig.h b/soc/arm/cxd56xx/cxd56_pinconfig.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_pinconfig.h rename to soc/arm/cxd56xx/cxd56_pinconfig.h diff --git a/arch/arm/src/cxd56xx/cxd56_pmic.c b/soc/arm/cxd56xx/cxd56_pmic.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_pmic.c rename to soc/arm/cxd56xx/cxd56_pmic.c diff --git a/arch/arm/src/cxd56xx/cxd56_pmic.h b/soc/arm/cxd56xx/cxd56_pmic.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_pmic.h rename to soc/arm/cxd56xx/cxd56_pmic.h diff --git a/arch/arm/src/cxd56xx/cxd56_powermgr.c b/soc/arm/cxd56xx/cxd56_powermgr.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_powermgr.c rename to soc/arm/cxd56xx/cxd56_powermgr.c diff --git a/arch/arm/src/cxd56xx/cxd56_powermgr.h b/soc/arm/cxd56xx/cxd56_powermgr.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_powermgr.h rename to soc/arm/cxd56xx/cxd56_powermgr.h diff --git a/arch/arm/src/cxd56xx/cxd56_powermgr_procfs.c b/soc/arm/cxd56xx/cxd56_powermgr_procfs.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_powermgr_procfs.c rename to soc/arm/cxd56xx/cxd56_powermgr_procfs.c diff --git a/arch/arm/src/cxd56xx/cxd56_powermgr_procfs.h b/soc/arm/cxd56xx/cxd56_powermgr_procfs.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_powermgr_procfs.h rename to soc/arm/cxd56xx/cxd56_powermgr_procfs.h diff --git a/arch/arm/src/cxd56xx/cxd56_pwm.c b/soc/arm/cxd56xx/cxd56_pwm.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_pwm.c rename to soc/arm/cxd56xx/cxd56_pwm.c diff --git a/arch/arm/src/cxd56xx/cxd56_pwm.h b/soc/arm/cxd56xx/cxd56_pwm.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_pwm.h rename to soc/arm/cxd56xx/cxd56_pwm.h diff --git a/arch/arm/src/cxd56xx/cxd56_rtc.c b/soc/arm/cxd56xx/cxd56_rtc.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_rtc.c rename to soc/arm/cxd56xx/cxd56_rtc.c diff --git a/arch/arm/src/cxd56xx/cxd56_rtc.h b/soc/arm/cxd56xx/cxd56_rtc.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_rtc.h rename to soc/arm/cxd56xx/cxd56_rtc.h diff --git a/arch/arm/src/cxd56xx/cxd56_rtc_lowerhalf.c b/soc/arm/cxd56xx/cxd56_rtc_lowerhalf.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_rtc_lowerhalf.c rename to soc/arm/cxd56xx/cxd56_rtc_lowerhalf.c diff --git a/arch/arm/src/cxd56xx/cxd56_scu.c b/soc/arm/cxd56xx/cxd56_scu.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_scu.c rename to soc/arm/cxd56xx/cxd56_scu.c diff --git a/arch/arm/src/cxd56xx/cxd56_scufifo.c b/soc/arm/cxd56xx/cxd56_scufifo.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_scufifo.c rename to soc/arm/cxd56xx/cxd56_scufifo.c diff --git a/arch/arm/src/cxd56xx/cxd56_scufifo.h b/soc/arm/cxd56xx/cxd56_scufifo.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_scufifo.h rename to soc/arm/cxd56xx/cxd56_scufifo.h diff --git a/arch/arm/src/cxd56xx/cxd56_sdhci.c b/soc/arm/cxd56xx/cxd56_sdhci.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_sdhci.c rename to soc/arm/cxd56xx/cxd56_sdhci.c diff --git a/arch/arm/src/cxd56xx/cxd56_sdhci.h b/soc/arm/cxd56xx/cxd56_sdhci.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_sdhci.h rename to soc/arm/cxd56xx/cxd56_sdhci.h diff --git a/arch/arm/src/cxd56xx/cxd56_serial.c b/soc/arm/cxd56xx/cxd56_serial.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_serial.c rename to soc/arm/cxd56xx/cxd56_serial.c diff --git a/arch/arm/src/cxd56xx/cxd56_serial.h b/soc/arm/cxd56xx/cxd56_serial.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_serial.h rename to soc/arm/cxd56xx/cxd56_serial.h diff --git a/arch/arm/src/cxd56xx/cxd56_sfc.c b/soc/arm/cxd56xx/cxd56_sfc.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_sfc.c rename to soc/arm/cxd56xx/cxd56_sfc.c diff --git a/arch/arm/src/cxd56xx/cxd56_sfc.h b/soc/arm/cxd56xx/cxd56_sfc.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_sfc.h rename to soc/arm/cxd56xx/cxd56_sfc.h diff --git a/arch/arm/src/cxd56xx/cxd56_smpcall.c b/soc/arm/cxd56xx/cxd56_smpcall.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_smpcall.c rename to soc/arm/cxd56xx/cxd56_smpcall.c diff --git a/arch/arm/src/cxd56xx/cxd56_sph.c b/soc/arm/cxd56xx/cxd56_sph.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_sph.c rename to soc/arm/cxd56xx/cxd56_sph.c diff --git a/arch/arm/src/cxd56xx/cxd56_sph.h b/soc/arm/cxd56xx/cxd56_sph.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_sph.h rename to soc/arm/cxd56xx/cxd56_sph.h diff --git a/arch/arm/src/cxd56xx/cxd56_spi.c b/soc/arm/cxd56xx/cxd56_spi.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_spi.c rename to soc/arm/cxd56xx/cxd56_spi.c diff --git a/arch/arm/src/cxd56xx/cxd56_spi.h b/soc/arm/cxd56xx/cxd56_spi.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_spi.h rename to soc/arm/cxd56xx/cxd56_spi.h diff --git a/arch/arm/src/cxd56xx/cxd56_start.c b/soc/arm/cxd56xx/cxd56_start.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_start.c rename to soc/arm/cxd56xx/cxd56_start.c diff --git a/arch/arm/src/cxd56xx/cxd56_sysctl.c b/soc/arm/cxd56xx/cxd56_sysctl.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_sysctl.c rename to soc/arm/cxd56xx/cxd56_sysctl.c diff --git a/arch/arm/src/cxd56xx/cxd56_sysctl.h b/soc/arm/cxd56xx/cxd56_sysctl.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_sysctl.h rename to soc/arm/cxd56xx/cxd56_sysctl.h diff --git a/arch/arm/src/cxd56xx/cxd56_testset.c b/soc/arm/cxd56xx/cxd56_testset.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_testset.c rename to soc/arm/cxd56xx/cxd56_testset.c diff --git a/arch/arm/src/cxd56xx/cxd56_textheap.c b/soc/arm/cxd56xx/cxd56_textheap.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_textheap.c rename to soc/arm/cxd56xx/cxd56_textheap.c diff --git a/arch/arm/src/cxd56xx/cxd56_timer.c b/soc/arm/cxd56xx/cxd56_timer.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_timer.c rename to soc/arm/cxd56xx/cxd56_timer.c diff --git a/arch/arm/src/cxd56xx/cxd56_timer.h b/soc/arm/cxd56xx/cxd56_timer.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_timer.h rename to soc/arm/cxd56xx/cxd56_timer.h diff --git a/arch/arm/src/cxd56xx/cxd56_timerisr.c b/soc/arm/cxd56xx/cxd56_timerisr.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_timerisr.c rename to soc/arm/cxd56xx/cxd56_timerisr.c diff --git a/arch/arm/src/cxd56xx/cxd56_timerisr.h b/soc/arm/cxd56xx/cxd56_timerisr.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_timerisr.h rename to soc/arm/cxd56xx/cxd56_timerisr.h diff --git a/arch/arm/src/cxd56xx/cxd56_uart.c b/soc/arm/cxd56xx/cxd56_uart.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_uart.c rename to soc/arm/cxd56xx/cxd56_uart.c diff --git a/arch/arm/src/cxd56xx/cxd56_uart.h b/soc/arm/cxd56xx/cxd56_uart.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_uart.h rename to soc/arm/cxd56xx/cxd56_uart.h diff --git a/arch/arm/src/cxd56xx/cxd56_uart0.c b/soc/arm/cxd56xx/cxd56_uart0.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_uart0.c rename to soc/arm/cxd56xx/cxd56_uart0.c diff --git a/arch/arm/src/cxd56xx/cxd56_udmac.c b/soc/arm/cxd56xx/cxd56_udmac.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_udmac.c rename to soc/arm/cxd56xx/cxd56_udmac.c diff --git a/arch/arm/src/cxd56xx/cxd56_udmac.h b/soc/arm/cxd56xx/cxd56_udmac.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_udmac.h rename to soc/arm/cxd56xx/cxd56_udmac.h diff --git a/arch/arm/src/cxd56xx/cxd56_uid.c b/soc/arm/cxd56xx/cxd56_uid.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_uid.c rename to soc/arm/cxd56xx/cxd56_uid.c diff --git a/arch/arm/src/cxd56xx/cxd56_uid.h b/soc/arm/cxd56xx/cxd56_uid.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_uid.h rename to soc/arm/cxd56xx/cxd56_uid.h diff --git a/arch/arm/src/cxd56xx/cxd56_usbdev.c b/soc/arm/cxd56xx/cxd56_usbdev.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_usbdev.c rename to soc/arm/cxd56xx/cxd56_usbdev.c diff --git a/arch/arm/src/cxd56xx/cxd56_usbdev.h b/soc/arm/cxd56xx/cxd56_usbdev.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_usbdev.h rename to soc/arm/cxd56xx/cxd56_usbdev.h diff --git a/arch/arm/src/cxd56xx/cxd56_wdt.c b/soc/arm/cxd56xx/cxd56_wdt.c similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_wdt.c rename to soc/arm/cxd56xx/cxd56_wdt.c diff --git a/arch/arm/src/cxd56xx/cxd56_wdt.h b/soc/arm/cxd56xx/cxd56_wdt.h similarity index 100% rename from arch/arm/src/cxd56xx/cxd56_wdt.h rename to soc/arm/cxd56xx/cxd56_wdt.h diff --git a/arch/arm/src/cxd56xx/hardware/cxd5602_backupmem.h b/soc/arm/cxd56xx/hardware/cxd5602_backupmem.h similarity index 100% rename from arch/arm/src/cxd56xx/hardware/cxd5602_backupmem.h rename to soc/arm/cxd56xx/hardware/cxd5602_backupmem.h diff --git a/arch/arm/src/cxd56xx/hardware/cxd5602_isop.h b/soc/arm/cxd56xx/hardware/cxd5602_isop.h similarity index 100% rename from arch/arm/src/cxd56xx/hardware/cxd5602_isop.h rename to soc/arm/cxd56xx/hardware/cxd5602_isop.h diff --git a/arch/arm/src/cxd56xx/hardware/cxd5602_isop_hadc0_highspeed.h b/soc/arm/cxd56xx/hardware/cxd5602_isop_hadc0_highspeed.h similarity index 100% rename from arch/arm/src/cxd56xx/hardware/cxd5602_isop_hadc0_highspeed.h rename to soc/arm/cxd56xx/hardware/cxd5602_isop_hadc0_highspeed.h diff --git a/arch/arm/src/cxd56xx/hardware/cxd5602_memorymap.h b/soc/arm/cxd56xx/hardware/cxd5602_memorymap.h similarity index 100% rename from arch/arm/src/cxd56xx/hardware/cxd5602_memorymap.h rename to soc/arm/cxd56xx/hardware/cxd5602_memorymap.h diff --git a/arch/arm/src/cxd56xx/hardware/cxd5602_pinconfig.h b/soc/arm/cxd56xx/hardware/cxd5602_pinconfig.h similarity index 100% rename from arch/arm/src/cxd56xx/hardware/cxd5602_pinconfig.h rename to soc/arm/cxd56xx/hardware/cxd5602_pinconfig.h diff --git a/arch/arm/src/cxd56xx/hardware/cxd5602_topreg.h b/soc/arm/cxd56xx/hardware/cxd5602_topreg.h similarity index 100% rename from arch/arm/src/cxd56xx/hardware/cxd5602_topreg.h rename to soc/arm/cxd56xx/hardware/cxd5602_topreg.h diff --git a/arch/arm/src/cxd56xx/hardware/cxd56_adc.h b/soc/arm/cxd56xx/hardware/cxd56_adc.h similarity index 100% rename from arch/arm/src/cxd56xx/hardware/cxd56_adc.h rename to soc/arm/cxd56xx/hardware/cxd56_adc.h diff --git a/arch/arm/src/cxd56xx/hardware/cxd56_cisif.h b/soc/arm/cxd56xx/hardware/cxd56_cisif.h similarity index 100% rename from arch/arm/src/cxd56xx/hardware/cxd56_cisif.h rename to soc/arm/cxd56xx/hardware/cxd56_cisif.h diff --git a/arch/arm/src/cxd56xx/hardware/cxd56_cpufifo.h b/soc/arm/cxd56xx/hardware/cxd56_cpufifo.h similarity index 100% rename from arch/arm/src/cxd56xx/hardware/cxd56_cpufifo.h rename to soc/arm/cxd56xx/hardware/cxd56_cpufifo.h diff --git a/arch/arm/src/cxd56xx/hardware/cxd56_crg.h b/soc/arm/cxd56xx/hardware/cxd56_crg.h similarity index 100% rename from arch/arm/src/cxd56xx/hardware/cxd56_crg.h rename to soc/arm/cxd56xx/hardware/cxd56_crg.h diff --git a/arch/arm/src/cxd56xx/hardware/cxd56_emmc.h b/soc/arm/cxd56xx/hardware/cxd56_emmc.h similarity index 100% rename from arch/arm/src/cxd56xx/hardware/cxd56_emmc.h rename to soc/arm/cxd56xx/hardware/cxd56_emmc.h diff --git a/arch/arm/src/cxd56xx/hardware/cxd56_ge2d.h b/soc/arm/cxd56xx/hardware/cxd56_ge2d.h similarity index 100% rename from arch/arm/src/cxd56xx/hardware/cxd56_ge2d.h rename to soc/arm/cxd56xx/hardware/cxd56_ge2d.h diff --git a/arch/arm/src/cxd56xx/hardware/cxd56_i2c.h b/soc/arm/cxd56xx/hardware/cxd56_i2c.h similarity index 100% rename from arch/arm/src/cxd56xx/hardware/cxd56_i2c.h rename to soc/arm/cxd56xx/hardware/cxd56_i2c.h diff --git a/arch/arm/src/cxd56xx/hardware/cxd56_rtc.h b/soc/arm/cxd56xx/hardware/cxd56_rtc.h similarity index 100% rename from arch/arm/src/cxd56xx/hardware/cxd56_rtc.h rename to soc/arm/cxd56xx/hardware/cxd56_rtc.h diff --git a/arch/arm/src/cxd56xx/hardware/cxd56_scu.h b/soc/arm/cxd56xx/hardware/cxd56_scu.h similarity index 100% rename from arch/arm/src/cxd56xx/hardware/cxd56_scu.h rename to soc/arm/cxd56xx/hardware/cxd56_scu.h diff --git a/arch/arm/src/cxd56xx/hardware/cxd56_scufifo.h b/soc/arm/cxd56xx/hardware/cxd56_scufifo.h similarity index 100% rename from arch/arm/src/cxd56xx/hardware/cxd56_scufifo.h rename to soc/arm/cxd56xx/hardware/cxd56_scufifo.h diff --git a/arch/arm/src/cxd56xx/hardware/cxd56_scuseq.h b/soc/arm/cxd56xx/hardware/cxd56_scuseq.h similarity index 100% rename from arch/arm/src/cxd56xx/hardware/cxd56_scuseq.h rename to soc/arm/cxd56xx/hardware/cxd56_scuseq.h diff --git a/arch/arm/src/cxd56xx/hardware/cxd56_sph.h b/soc/arm/cxd56xx/hardware/cxd56_sph.h similarity index 100% rename from arch/arm/src/cxd56xx/hardware/cxd56_sph.h rename to soc/arm/cxd56xx/hardware/cxd56_sph.h diff --git a/arch/arm/src/cxd56xx/hardware/cxd56_spi.h b/soc/arm/cxd56xx/hardware/cxd56_spi.h similarity index 100% rename from arch/arm/src/cxd56xx/hardware/cxd56_spi.h rename to soc/arm/cxd56xx/hardware/cxd56_spi.h diff --git a/arch/arm/src/cxd56xx/hardware/cxd56_timer.h b/soc/arm/cxd56xx/hardware/cxd56_timer.h similarity index 100% rename from arch/arm/src/cxd56xx/hardware/cxd56_timer.h rename to soc/arm/cxd56xx/hardware/cxd56_timer.h diff --git a/arch/arm/src/cxd56xx/hardware/cxd56_uart.h b/soc/arm/cxd56xx/hardware/cxd56_uart.h similarity index 100% rename from arch/arm/src/cxd56xx/hardware/cxd56_uart.h rename to soc/arm/cxd56xx/hardware/cxd56_uart.h diff --git a/arch/arm/src/cxd56xx/hardware/cxd56_udmac.h b/soc/arm/cxd56xx/hardware/cxd56_udmac.h similarity index 100% rename from arch/arm/src/cxd56xx/hardware/cxd56_udmac.h rename to soc/arm/cxd56xx/hardware/cxd56_udmac.h diff --git a/arch/arm/src/cxd56xx/hardware/cxd56_wdt.h b/soc/arm/cxd56xx/hardware/cxd56_wdt.h similarity index 100% rename from arch/arm/src/cxd56xx/hardware/cxd56_wdt.h rename to soc/arm/cxd56xx/hardware/cxd56_wdt.h diff --git a/arch/arm/src/dm320/Kconfig b/soc/arm/dm320/Kconfig similarity index 100% rename from arch/arm/src/dm320/Kconfig rename to soc/arm/dm320/Kconfig diff --git a/arch/arm/src/dm320/Make.defs b/soc/arm/dm320/Make.defs similarity index 100% rename from arch/arm/src/dm320/Make.defs rename to soc/arm/dm320/Make.defs diff --git a/arch/arm/src/dm320/chip.h b/soc/arm/dm320/chip.h similarity index 100% rename from arch/arm/src/dm320/chip.h rename to soc/arm/dm320/chip.h diff --git a/arch/arm/src/dm320/dm320_ahb.h b/soc/arm/dm320/dm320_ahb.h similarity index 100% rename from arch/arm/src/dm320/dm320_ahb.h rename to soc/arm/dm320/dm320_ahb.h diff --git a/arch/arm/src/dm320/dm320_allocateheap.c b/soc/arm/dm320/dm320_allocateheap.c similarity index 100% rename from arch/arm/src/dm320/dm320_allocateheap.c rename to soc/arm/dm320/dm320_allocateheap.c diff --git a/arch/arm/src/dm320/dm320_boot.c b/soc/arm/dm320/dm320_boot.c similarity index 100% rename from arch/arm/src/dm320/dm320_boot.c rename to soc/arm/dm320/dm320_boot.c diff --git a/arch/arm/src/dm320/dm320_busc.h b/soc/arm/dm320/dm320_busc.h similarity index 100% rename from arch/arm/src/dm320/dm320_busc.h rename to soc/arm/dm320/dm320_busc.h diff --git a/arch/arm/src/dm320/dm320_clkc.h b/soc/arm/dm320/dm320_clkc.h similarity index 100% rename from arch/arm/src/dm320/dm320_clkc.h rename to soc/arm/dm320/dm320_clkc.h diff --git a/arch/arm/src/dm320/dm320_decodeirq.c b/soc/arm/dm320/dm320_decodeirq.c similarity index 100% rename from arch/arm/src/dm320/dm320_decodeirq.c rename to soc/arm/dm320/dm320_decodeirq.c diff --git a/arch/arm/src/dm320/dm320_emif.h b/soc/arm/dm320/dm320_emif.h similarity index 100% rename from arch/arm/src/dm320/dm320_emif.h rename to soc/arm/dm320/dm320_emif.h diff --git a/arch/arm/src/dm320/dm320_framebuffer.c b/soc/arm/dm320/dm320_framebuffer.c similarity index 100% rename from arch/arm/src/dm320/dm320_framebuffer.c rename to soc/arm/dm320/dm320_framebuffer.c diff --git a/arch/arm/src/dm320/dm320_gio.h b/soc/arm/dm320/dm320_gio.h similarity index 100% rename from arch/arm/src/dm320/dm320_gio.h rename to soc/arm/dm320/dm320_gio.h diff --git a/arch/arm/src/dm320/dm320_intc.h b/soc/arm/dm320/dm320_intc.h similarity index 100% rename from arch/arm/src/dm320/dm320_intc.h rename to soc/arm/dm320/dm320_intc.h diff --git a/arch/arm/src/dm320/dm320_irq.c b/soc/arm/dm320/dm320_irq.c similarity index 100% rename from arch/arm/src/dm320/dm320_irq.c rename to soc/arm/dm320/dm320_irq.c diff --git a/arch/arm/src/dm320/dm320_lowputc.S b/soc/arm/dm320/dm320_lowputc.S similarity index 100% rename from arch/arm/src/dm320/dm320_lowputc.S rename to soc/arm/dm320/dm320_lowputc.S diff --git a/arch/arm/src/dm320/dm320_memorymap.h b/soc/arm/dm320/dm320_memorymap.h similarity index 100% rename from arch/arm/src/dm320/dm320_memorymap.h rename to soc/arm/dm320/dm320_memorymap.h diff --git a/arch/arm/src/dm320/dm320_osd.h b/soc/arm/dm320/dm320_osd.h similarity index 100% rename from arch/arm/src/dm320/dm320_osd.h rename to soc/arm/dm320/dm320_osd.h diff --git a/arch/arm/src/dm320/dm320_restart.S b/soc/arm/dm320/dm320_restart.S similarity index 100% rename from arch/arm/src/dm320/dm320_restart.S rename to soc/arm/dm320/dm320_restart.S diff --git a/arch/arm/src/dm320/dm320_serial.c b/soc/arm/dm320/dm320_serial.c similarity index 100% rename from arch/arm/src/dm320/dm320_serial.c rename to soc/arm/dm320/dm320_serial.c diff --git a/arch/arm/src/dm320/dm320_timer.h b/soc/arm/dm320/dm320_timer.h similarity index 100% rename from arch/arm/src/dm320/dm320_timer.h rename to soc/arm/dm320/dm320_timer.h diff --git a/arch/arm/src/dm320/dm320_timerisr.c b/soc/arm/dm320/dm320_timerisr.c similarity index 100% rename from arch/arm/src/dm320/dm320_timerisr.c rename to soc/arm/dm320/dm320_timerisr.c diff --git a/arch/arm/src/dm320/dm320_uart.h b/soc/arm/dm320/dm320_uart.h similarity index 100% rename from arch/arm/src/dm320/dm320_uart.h rename to soc/arm/dm320/dm320_uart.h diff --git a/arch/arm/src/dm320/dm320_usb.h b/soc/arm/dm320/dm320_usb.h similarity index 100% rename from arch/arm/src/dm320/dm320_usb.h rename to soc/arm/dm320/dm320_usb.h diff --git a/arch/arm/src/dm320/dm320_usbdev.c b/soc/arm/dm320/dm320_usbdev.c similarity index 100% rename from arch/arm/src/dm320/dm320_usbdev.c rename to soc/arm/dm320/dm320_usbdev.c diff --git a/arch/arm/src/efm32/Kconfig b/soc/arm/efm32/Kconfig similarity index 100% rename from arch/arm/src/efm32/Kconfig rename to soc/arm/efm32/Kconfig diff --git a/arch/arm/src/efm32/Make.defs b/soc/arm/efm32/Make.defs similarity index 100% rename from arch/arm/src/efm32/Make.defs rename to soc/arm/efm32/Make.defs diff --git a/arch/arm/src/efm32/chip.h b/soc/arm/efm32/chip.h similarity index 100% rename from arch/arm/src/efm32/chip.h rename to soc/arm/efm32/chip.h diff --git a/arch/arm/src/efm32/efm32_adc.c b/soc/arm/efm32/efm32_adc.c similarity index 100% rename from arch/arm/src/efm32/efm32_adc.c rename to soc/arm/efm32/efm32_adc.c diff --git a/arch/arm/src/efm32/efm32_adc.h b/soc/arm/efm32/efm32_adc.h similarity index 100% rename from arch/arm/src/efm32/efm32_adc.h rename to soc/arm/efm32/efm32_adc.h diff --git a/arch/arm/src/efm32/efm32_bitband.c b/soc/arm/efm32/efm32_bitband.c similarity index 100% rename from arch/arm/src/efm32/efm32_bitband.c rename to soc/arm/efm32/efm32_bitband.c diff --git a/arch/arm/src/efm32/efm32_bitband.h b/soc/arm/efm32/efm32_bitband.h similarity index 100% rename from arch/arm/src/efm32/efm32_bitband.h rename to soc/arm/efm32/efm32_bitband.h diff --git a/arch/arm/src/efm32/efm32_clockconfig.c b/soc/arm/efm32/efm32_clockconfig.c similarity index 100% rename from arch/arm/src/efm32/efm32_clockconfig.c rename to soc/arm/efm32/efm32_clockconfig.c diff --git a/arch/arm/src/efm32/efm32_clockconfig.h b/soc/arm/efm32/efm32_clockconfig.h similarity index 100% rename from arch/arm/src/efm32/efm32_clockconfig.h rename to soc/arm/efm32/efm32_clockconfig.h diff --git a/arch/arm/src/efm32/efm32_config.h b/soc/arm/efm32/efm32_config.h similarity index 100% rename from arch/arm/src/efm32/efm32_config.h rename to soc/arm/efm32/efm32_config.h diff --git a/arch/arm/src/efm32/efm32_dma.c b/soc/arm/efm32/efm32_dma.c similarity index 100% rename from arch/arm/src/efm32/efm32_dma.c rename to soc/arm/efm32/efm32_dma.c diff --git a/arch/arm/src/efm32/efm32_dma.h b/soc/arm/efm32/efm32_dma.h similarity index 100% rename from arch/arm/src/efm32/efm32_dma.h rename to soc/arm/efm32/efm32_dma.h diff --git a/arch/arm/src/efm32/efm32_flash.c b/soc/arm/efm32/efm32_flash.c similarity index 100% rename from arch/arm/src/efm32/efm32_flash.c rename to soc/arm/efm32/efm32_flash.c diff --git a/arch/arm/src/efm32/efm32_gpio.c b/soc/arm/efm32/efm32_gpio.c similarity index 100% rename from arch/arm/src/efm32/efm32_gpio.c rename to soc/arm/efm32/efm32_gpio.c diff --git a/arch/arm/src/efm32/efm32_gpio.h b/soc/arm/efm32/efm32_gpio.h similarity index 100% rename from arch/arm/src/efm32/efm32_gpio.h rename to soc/arm/efm32/efm32_gpio.h diff --git a/arch/arm/src/efm32/efm32_gpioirq.c b/soc/arm/efm32/efm32_gpioirq.c similarity index 100% rename from arch/arm/src/efm32/efm32_gpioirq.c rename to soc/arm/efm32/efm32_gpioirq.c diff --git a/arch/arm/src/efm32/efm32_i2c.c b/soc/arm/efm32/efm32_i2c.c similarity index 100% rename from arch/arm/src/efm32/efm32_i2c.c rename to soc/arm/efm32/efm32_i2c.c diff --git a/arch/arm/src/efm32/efm32_i2c.h b/soc/arm/efm32/efm32_i2c.h similarity index 100% rename from arch/arm/src/efm32/efm32_i2c.h rename to soc/arm/efm32/efm32_i2c.h diff --git a/arch/arm/src/efm32/efm32_idle.c b/soc/arm/efm32/efm32_idle.c similarity index 100% rename from arch/arm/src/efm32/efm32_idle.c rename to soc/arm/efm32/efm32_idle.c diff --git a/arch/arm/src/efm32/efm32_irq.c b/soc/arm/efm32/efm32_irq.c similarity index 100% rename from arch/arm/src/efm32/efm32_irq.c rename to soc/arm/efm32/efm32_irq.c diff --git a/arch/arm/src/efm32/efm32_leserial.c b/soc/arm/efm32/efm32_leserial.c similarity index 100% rename from arch/arm/src/efm32/efm32_leserial.c rename to soc/arm/efm32/efm32_leserial.c diff --git a/arch/arm/src/efm32/efm32_lowputc.c b/soc/arm/efm32/efm32_lowputc.c similarity index 100% rename from arch/arm/src/efm32/efm32_lowputc.c rename to soc/arm/efm32/efm32_lowputc.c diff --git a/arch/arm/src/efm32/efm32_lowputc.h b/soc/arm/efm32/efm32_lowputc.h similarity index 100% rename from arch/arm/src/efm32/efm32_lowputc.h rename to soc/arm/efm32/efm32_lowputc.h diff --git a/arch/arm/src/efm32/efm32_pm.h b/soc/arm/efm32/efm32_pm.h similarity index 100% rename from arch/arm/src/efm32/efm32_pm.h rename to soc/arm/efm32/efm32_pm.h diff --git a/arch/arm/src/efm32/efm32_pwm.c b/soc/arm/efm32/efm32_pwm.c similarity index 100% rename from arch/arm/src/efm32/efm32_pwm.c rename to soc/arm/efm32/efm32_pwm.c diff --git a/arch/arm/src/efm32/efm32_pwm.h b/soc/arm/efm32/efm32_pwm.h similarity index 100% rename from arch/arm/src/efm32/efm32_pwm.h rename to soc/arm/efm32/efm32_pwm.h diff --git a/arch/arm/src/efm32/efm32_rmu.c b/soc/arm/efm32/efm32_rmu.c similarity index 100% rename from arch/arm/src/efm32/efm32_rmu.c rename to soc/arm/efm32/efm32_rmu.c diff --git a/arch/arm/src/efm32/efm32_rmu.h b/soc/arm/efm32/efm32_rmu.h similarity index 100% rename from arch/arm/src/efm32/efm32_rmu.h rename to soc/arm/efm32/efm32_rmu.h diff --git a/arch/arm/src/efm32/efm32_rtc.h b/soc/arm/efm32/efm32_rtc.h similarity index 100% rename from arch/arm/src/efm32/efm32_rtc.h rename to soc/arm/efm32/efm32_rtc.h diff --git a/arch/arm/src/efm32/efm32_rtc_burtc.c b/soc/arm/efm32/efm32_rtc_burtc.c similarity index 100% rename from arch/arm/src/efm32/efm32_rtc_burtc.c rename to soc/arm/efm32/efm32_rtc_burtc.c diff --git a/arch/arm/src/efm32/efm32_serial.c b/soc/arm/efm32/efm32_serial.c similarity index 100% rename from arch/arm/src/efm32/efm32_serial.c rename to soc/arm/efm32/efm32_serial.c diff --git a/arch/arm/src/efm32/efm32_spi.c b/soc/arm/efm32/efm32_spi.c similarity index 100% rename from arch/arm/src/efm32/efm32_spi.c rename to soc/arm/efm32/efm32_spi.c diff --git a/arch/arm/src/efm32/efm32_spi.h b/soc/arm/efm32/efm32_spi.h similarity index 100% rename from arch/arm/src/efm32/efm32_spi.h rename to soc/arm/efm32/efm32_spi.h diff --git a/arch/arm/src/efm32/efm32_start.c b/soc/arm/efm32/efm32_start.c similarity index 100% rename from arch/arm/src/efm32/efm32_start.c rename to soc/arm/efm32/efm32_start.c diff --git a/arch/arm/src/efm32/efm32_start.h b/soc/arm/efm32/efm32_start.h similarity index 100% rename from arch/arm/src/efm32/efm32_start.h rename to soc/arm/efm32/efm32_start.h diff --git a/arch/arm/src/efm32/efm32_timer.c b/soc/arm/efm32/efm32_timer.c similarity index 100% rename from arch/arm/src/efm32/efm32_timer.c rename to soc/arm/efm32/efm32_timer.c diff --git a/arch/arm/src/efm32/efm32_timer.h b/soc/arm/efm32/efm32_timer.h similarity index 100% rename from arch/arm/src/efm32/efm32_timer.h rename to soc/arm/efm32/efm32_timer.h diff --git a/arch/arm/src/efm32/efm32_timerisr.c b/soc/arm/efm32/efm32_timerisr.c similarity index 100% rename from arch/arm/src/efm32/efm32_timerisr.c rename to soc/arm/efm32/efm32_timerisr.c diff --git a/arch/arm/src/efm32/efm32_usb.h b/soc/arm/efm32/efm32_usb.h similarity index 100% rename from arch/arm/src/efm32/efm32_usb.h rename to soc/arm/efm32/efm32_usb.h diff --git a/arch/arm/src/efm32/efm32_usbdev.c b/soc/arm/efm32/efm32_usbdev.c similarity index 100% rename from arch/arm/src/efm32/efm32_usbdev.c rename to soc/arm/efm32/efm32_usbdev.c diff --git a/arch/arm/src/efm32/efm32_usbhost.c b/soc/arm/efm32/efm32_usbhost.c similarity index 100% rename from arch/arm/src/efm32/efm32_usbhost.c rename to soc/arm/efm32/efm32_usbhost.c diff --git a/arch/arm/src/efm32/hardware/efm32_acmp.h b/soc/arm/efm32/hardware/efm32_acmp.h similarity index 100% rename from arch/arm/src/efm32/hardware/efm32_acmp.h rename to soc/arm/efm32/hardware/efm32_acmp.h diff --git a/arch/arm/src/efm32/hardware/efm32_adc.h b/soc/arm/efm32/hardware/efm32_adc.h similarity index 100% rename from arch/arm/src/efm32/hardware/efm32_adc.h rename to soc/arm/efm32/hardware/efm32_adc.h diff --git a/arch/arm/src/efm32/hardware/efm32_aes.h b/soc/arm/efm32/hardware/efm32_aes.h similarity index 100% rename from arch/arm/src/efm32/hardware/efm32_aes.h rename to soc/arm/efm32/hardware/efm32_aes.h diff --git a/arch/arm/src/efm32/hardware/efm32_burtc.h b/soc/arm/efm32/hardware/efm32_burtc.h similarity index 100% rename from arch/arm/src/efm32/hardware/efm32_burtc.h rename to soc/arm/efm32/hardware/efm32_burtc.h diff --git a/arch/arm/src/efm32/hardware/efm32_calibrate.h b/soc/arm/efm32/hardware/efm32_calibrate.h similarity index 100% rename from arch/arm/src/efm32/hardware/efm32_calibrate.h rename to soc/arm/efm32/hardware/efm32_calibrate.h diff --git a/arch/arm/src/efm32/hardware/efm32_cmu.h b/soc/arm/efm32/hardware/efm32_cmu.h similarity index 100% rename from arch/arm/src/efm32/hardware/efm32_cmu.h rename to soc/arm/efm32/hardware/efm32_cmu.h diff --git a/arch/arm/src/efm32/hardware/efm32_dac.h b/soc/arm/efm32/hardware/efm32_dac.h similarity index 100% rename from arch/arm/src/efm32/hardware/efm32_dac.h rename to soc/arm/efm32/hardware/efm32_dac.h diff --git a/arch/arm/src/efm32/hardware/efm32_devinfo.h b/soc/arm/efm32/hardware/efm32_devinfo.h similarity index 100% rename from arch/arm/src/efm32/hardware/efm32_devinfo.h rename to soc/arm/efm32/hardware/efm32_devinfo.h diff --git a/arch/arm/src/efm32/hardware/efm32_dma.h b/soc/arm/efm32/hardware/efm32_dma.h similarity index 100% rename from arch/arm/src/efm32/hardware/efm32_dma.h rename to soc/arm/efm32/hardware/efm32_dma.h diff --git a/arch/arm/src/efm32/hardware/efm32_emu.h b/soc/arm/efm32/hardware/efm32_emu.h similarity index 100% rename from arch/arm/src/efm32/hardware/efm32_emu.h rename to soc/arm/efm32/hardware/efm32_emu.h diff --git a/arch/arm/src/efm32/hardware/efm32_flash.h b/soc/arm/efm32/hardware/efm32_flash.h similarity index 100% rename from arch/arm/src/efm32/hardware/efm32_flash.h rename to soc/arm/efm32/hardware/efm32_flash.h diff --git a/arch/arm/src/efm32/hardware/efm32_gpio.h b/soc/arm/efm32/hardware/efm32_gpio.h similarity index 100% rename from arch/arm/src/efm32/hardware/efm32_gpio.h rename to soc/arm/efm32/hardware/efm32_gpio.h diff --git a/arch/arm/src/efm32/hardware/efm32_i2c.h b/soc/arm/efm32/hardware/efm32_i2c.h similarity index 100% rename from arch/arm/src/efm32/hardware/efm32_i2c.h rename to soc/arm/efm32/hardware/efm32_i2c.h diff --git a/arch/arm/src/efm32/hardware/efm32_lcd.h b/soc/arm/efm32/hardware/efm32_lcd.h similarity index 100% rename from arch/arm/src/efm32/hardware/efm32_lcd.h rename to soc/arm/efm32/hardware/efm32_lcd.h diff --git a/arch/arm/src/efm32/hardware/efm32_lesense.h b/soc/arm/efm32/hardware/efm32_lesense.h similarity index 100% rename from arch/arm/src/efm32/hardware/efm32_lesense.h rename to soc/arm/efm32/hardware/efm32_lesense.h diff --git a/arch/arm/src/efm32/hardware/efm32_letimer.h b/soc/arm/efm32/hardware/efm32_letimer.h similarity index 100% rename from arch/arm/src/efm32/hardware/efm32_letimer.h rename to soc/arm/efm32/hardware/efm32_letimer.h diff --git a/arch/arm/src/efm32/hardware/efm32_leuart.h b/soc/arm/efm32/hardware/efm32_leuart.h similarity index 100% rename from arch/arm/src/efm32/hardware/efm32_leuart.h rename to soc/arm/efm32/hardware/efm32_leuart.h diff --git a/arch/arm/src/efm32/hardware/efm32_memorymap.h b/soc/arm/efm32/hardware/efm32_memorymap.h similarity index 100% rename from arch/arm/src/efm32/hardware/efm32_memorymap.h rename to soc/arm/efm32/hardware/efm32_memorymap.h diff --git a/arch/arm/src/efm32/hardware/efm32_msc.h b/soc/arm/efm32/hardware/efm32_msc.h similarity index 100% rename from arch/arm/src/efm32/hardware/efm32_msc.h rename to soc/arm/efm32/hardware/efm32_msc.h diff --git a/arch/arm/src/efm32/hardware/efm32_pcnt.h b/soc/arm/efm32/hardware/efm32_pcnt.h similarity index 100% rename from arch/arm/src/efm32/hardware/efm32_pcnt.h rename to soc/arm/efm32/hardware/efm32_pcnt.h diff --git a/arch/arm/src/efm32/hardware/efm32_prs.h b/soc/arm/efm32/hardware/efm32_prs.h similarity index 100% rename from arch/arm/src/efm32/hardware/efm32_prs.h rename to soc/arm/efm32/hardware/efm32_prs.h diff --git a/arch/arm/src/efm32/hardware/efm32_rmu.h b/soc/arm/efm32/hardware/efm32_rmu.h similarity index 100% rename from arch/arm/src/efm32/hardware/efm32_rmu.h rename to soc/arm/efm32/hardware/efm32_rmu.h diff --git a/arch/arm/src/efm32/hardware/efm32_romtable.h b/soc/arm/efm32/hardware/efm32_romtable.h similarity index 100% rename from arch/arm/src/efm32/hardware/efm32_romtable.h rename to soc/arm/efm32/hardware/efm32_romtable.h diff --git a/arch/arm/src/efm32/hardware/efm32_rtc.h b/soc/arm/efm32/hardware/efm32_rtc.h similarity index 100% rename from arch/arm/src/efm32/hardware/efm32_rtc.h rename to soc/arm/efm32/hardware/efm32_rtc.h diff --git a/arch/arm/src/efm32/hardware/efm32_timer.h b/soc/arm/efm32/hardware/efm32_timer.h similarity index 100% rename from arch/arm/src/efm32/hardware/efm32_timer.h rename to soc/arm/efm32/hardware/efm32_timer.h diff --git a/arch/arm/src/efm32/hardware/efm32_usart.h b/soc/arm/efm32/hardware/efm32_usart.h similarity index 100% rename from arch/arm/src/efm32/hardware/efm32_usart.h rename to soc/arm/efm32/hardware/efm32_usart.h diff --git a/arch/arm/src/efm32/hardware/efm32_usb.h b/soc/arm/efm32/hardware/efm32_usb.h similarity index 100% rename from arch/arm/src/efm32/hardware/efm32_usb.h rename to soc/arm/efm32/hardware/efm32_usb.h diff --git a/arch/arm/src/efm32/hardware/efm32_vcmp.h b/soc/arm/efm32/hardware/efm32_vcmp.h similarity index 100% rename from arch/arm/src/efm32/hardware/efm32_vcmp.h rename to soc/arm/efm32/hardware/efm32_vcmp.h diff --git a/arch/arm/src/efm32/hardware/efm32_wdog.h b/soc/arm/efm32/hardware/efm32_wdog.h similarity index 100% rename from arch/arm/src/efm32/hardware/efm32_wdog.h rename to soc/arm/efm32/hardware/efm32_wdog.h diff --git a/arch/arm/src/efm32/hardware/efm32g_memorymap.h b/soc/arm/efm32/hardware/efm32g_memorymap.h similarity index 100% rename from arch/arm/src/efm32/hardware/efm32g_memorymap.h rename to soc/arm/efm32/hardware/efm32g_memorymap.h diff --git a/arch/arm/src/efm32/hardware/efm32gg_memorymap.h b/soc/arm/efm32/hardware/efm32gg_memorymap.h similarity index 100% rename from arch/arm/src/efm32/hardware/efm32gg_memorymap.h rename to soc/arm/efm32/hardware/efm32gg_memorymap.h diff --git a/arch/arm/src/efm32/hardware/efm32tg_memorymap.h b/soc/arm/efm32/hardware/efm32tg_memorymap.h similarity index 100% rename from arch/arm/src/efm32/hardware/efm32tg_memorymap.h rename to soc/arm/efm32/hardware/efm32tg_memorymap.h diff --git a/arch/arm/src/eoss3/Kconfig b/soc/arm/eoss3/Kconfig similarity index 100% rename from arch/arm/src/eoss3/Kconfig rename to soc/arm/eoss3/Kconfig diff --git a/arch/arm/src/eoss3/Make.defs b/soc/arm/eoss3/Make.defs similarity index 100% rename from arch/arm/src/eoss3/Make.defs rename to soc/arm/eoss3/Make.defs diff --git a/arch/arm/src/eoss3/chip.h b/soc/arm/eoss3/chip.h similarity index 100% rename from arch/arm/src/eoss3/chip.h rename to soc/arm/eoss3/chip.h diff --git a/arch/arm/src/eoss3/eoss3.h b/soc/arm/eoss3/eoss3.h similarity index 100% rename from arch/arm/src/eoss3/eoss3.h rename to soc/arm/eoss3/eoss3.h diff --git a/arch/arm/src/eoss3/eoss3_clockconfig.c b/soc/arm/eoss3/eoss3_clockconfig.c similarity index 100% rename from arch/arm/src/eoss3/eoss3_clockconfig.c rename to soc/arm/eoss3/eoss3_clockconfig.c diff --git a/arch/arm/src/eoss3/eoss3_clockconfig.h b/soc/arm/eoss3/eoss3_clockconfig.h similarity index 100% rename from arch/arm/src/eoss3/eoss3_clockconfig.h rename to soc/arm/eoss3/eoss3_clockconfig.h diff --git a/arch/arm/src/eoss3/eoss3_gpio.c b/soc/arm/eoss3/eoss3_gpio.c similarity index 100% rename from arch/arm/src/eoss3/eoss3_gpio.c rename to soc/arm/eoss3/eoss3_gpio.c diff --git a/arch/arm/src/eoss3/eoss3_gpio.h b/soc/arm/eoss3/eoss3_gpio.h similarity index 100% rename from arch/arm/src/eoss3/eoss3_gpio.h rename to soc/arm/eoss3/eoss3_gpio.h diff --git a/arch/arm/src/eoss3/eoss3_idle.c b/soc/arm/eoss3/eoss3_idle.c similarity index 100% rename from arch/arm/src/eoss3/eoss3_idle.c rename to soc/arm/eoss3/eoss3_idle.c diff --git a/arch/arm/src/eoss3/eoss3_irq.c b/soc/arm/eoss3/eoss3_irq.c similarity index 100% rename from arch/arm/src/eoss3/eoss3_irq.c rename to soc/arm/eoss3/eoss3_irq.c diff --git a/arch/arm/src/eoss3/eoss3_lowputc.c b/soc/arm/eoss3/eoss3_lowputc.c similarity index 100% rename from arch/arm/src/eoss3/eoss3_lowputc.c rename to soc/arm/eoss3/eoss3_lowputc.c diff --git a/arch/arm/src/eoss3/eoss3_lowputc.h b/soc/arm/eoss3/eoss3_lowputc.h similarity index 100% rename from arch/arm/src/eoss3/eoss3_lowputc.h rename to soc/arm/eoss3/eoss3_lowputc.h diff --git a/arch/arm/src/eoss3/eoss3_serial.c b/soc/arm/eoss3/eoss3_serial.c similarity index 100% rename from arch/arm/src/eoss3/eoss3_serial.c rename to soc/arm/eoss3/eoss3_serial.c diff --git a/arch/arm/src/eoss3/eoss3_start.c b/soc/arm/eoss3/eoss3_start.c similarity index 100% rename from arch/arm/src/eoss3/eoss3_start.c rename to soc/arm/eoss3/eoss3_start.c diff --git a/arch/arm/src/eoss3/eoss3_start.h b/soc/arm/eoss3/eoss3_start.h similarity index 100% rename from arch/arm/src/eoss3/eoss3_start.h rename to soc/arm/eoss3/eoss3_start.h diff --git a/arch/arm/src/eoss3/eoss3_timerisr.c b/soc/arm/eoss3/eoss3_timerisr.c similarity index 100% rename from arch/arm/src/eoss3/eoss3_timerisr.c rename to soc/arm/eoss3/eoss3_timerisr.c diff --git a/arch/arm/src/eoss3/hardware/eoss3_clock.h b/soc/arm/eoss3/hardware/eoss3_clock.h similarity index 100% rename from arch/arm/src/eoss3/hardware/eoss3_clock.h rename to soc/arm/eoss3/hardware/eoss3_clock.h diff --git a/arch/arm/src/eoss3/hardware/eoss3_intr.h b/soc/arm/eoss3/hardware/eoss3_intr.h similarity index 100% rename from arch/arm/src/eoss3/hardware/eoss3_intr.h rename to soc/arm/eoss3/hardware/eoss3_intr.h diff --git a/arch/arm/src/eoss3/hardware/eoss3_iomux.h b/soc/arm/eoss3/hardware/eoss3_iomux.h similarity index 100% rename from arch/arm/src/eoss3/hardware/eoss3_iomux.h rename to soc/arm/eoss3/hardware/eoss3_iomux.h diff --git a/arch/arm/src/eoss3/hardware/eoss3_memorymap.h b/soc/arm/eoss3/hardware/eoss3_memorymap.h similarity index 100% rename from arch/arm/src/eoss3/hardware/eoss3_memorymap.h rename to soc/arm/eoss3/hardware/eoss3_memorymap.h diff --git a/arch/arm/src/eoss3/hardware/eoss3_uart.h b/soc/arm/eoss3/hardware/eoss3_uart.h similarity index 100% rename from arch/arm/src/eoss3/hardware/eoss3_uart.h rename to soc/arm/eoss3/hardware/eoss3_uart.h diff --git a/arch/arm/src/fvp-v8r-aarch32/CMakeLists.txt b/soc/arm/fvp-v8r-aarch32/CMakeLists.txt similarity index 100% rename from arch/arm/src/fvp-v8r-aarch32/CMakeLists.txt rename to soc/arm/fvp-v8r-aarch32/CMakeLists.txt diff --git a/arch/arm/src/fvp-v8r-aarch32/Kconfig b/soc/arm/fvp-v8r-aarch32/Kconfig similarity index 100% rename from arch/arm/src/fvp-v8r-aarch32/Kconfig rename to soc/arm/fvp-v8r-aarch32/Kconfig diff --git a/arch/arm/src/fvp-v8r-aarch32/Make.defs b/soc/arm/fvp-v8r-aarch32/Make.defs similarity index 100% rename from arch/arm/src/fvp-v8r-aarch32/Make.defs rename to soc/arm/fvp-v8r-aarch32/Make.defs diff --git a/arch/arm/src/fvp-v8r-aarch32/chip.h b/soc/arm/fvp-v8r-aarch32/chip.h similarity index 100% rename from arch/arm/src/fvp-v8r-aarch32/chip.h rename to soc/arm/fvp-v8r-aarch32/chip.h diff --git a/arch/arm/src/fvp-v8r-aarch32/fvp_boot.c b/soc/arm/fvp-v8r-aarch32/fvp_boot.c similarity index 100% rename from arch/arm/src/fvp-v8r-aarch32/fvp_boot.c rename to soc/arm/fvp-v8r-aarch32/fvp_boot.c diff --git a/arch/arm/src/fvp-v8r-aarch32/fvp_boot.h b/soc/arm/fvp-v8r-aarch32/fvp_boot.h similarity index 100% rename from arch/arm/src/fvp-v8r-aarch32/fvp_boot.h rename to soc/arm/fvp-v8r-aarch32/fvp_boot.h diff --git a/arch/arm/src/fvp-v8r-aarch32/fvp_serial.c b/soc/arm/fvp-v8r-aarch32/fvp_serial.c similarity index 100% rename from arch/arm/src/fvp-v8r-aarch32/fvp_serial.c rename to soc/arm/fvp-v8r-aarch32/fvp_serial.c diff --git a/arch/arm/src/gd32f4/Kconfig b/soc/arm/gd32f4/Kconfig similarity index 100% rename from arch/arm/src/gd32f4/Kconfig rename to soc/arm/gd32f4/Kconfig diff --git a/arch/arm/src/gd32f4/Make.defs b/soc/arm/gd32f4/Make.defs similarity index 100% rename from arch/arm/src/gd32f4/Make.defs rename to soc/arm/gd32f4/Make.defs diff --git a/arch/arm/src/gd32f4/chip.h b/soc/arm/gd32f4/chip.h similarity index 100% rename from arch/arm/src/gd32f4/chip.h rename to soc/arm/gd32f4/chip.h diff --git a/arch/arm/src/gd32f4/gd32f4xx.h b/soc/arm/gd32f4/gd32f4xx.h similarity index 100% rename from arch/arm/src/gd32f4/gd32f4xx.h rename to soc/arm/gd32f4/gd32f4xx.h diff --git a/arch/arm/src/gd32f4/gd32f4xx_allocateheap.c b/soc/arm/gd32f4/gd32f4xx_allocateheap.c similarity index 100% rename from arch/arm/src/gd32f4/gd32f4xx_allocateheap.c rename to soc/arm/gd32f4/gd32f4xx_allocateheap.c diff --git a/arch/arm/src/gd32f4/gd32f4xx_dma.c b/soc/arm/gd32f4/gd32f4xx_dma.c similarity index 100% rename from arch/arm/src/gd32f4/gd32f4xx_dma.c rename to soc/arm/gd32f4/gd32f4xx_dma.c diff --git a/arch/arm/src/gd32f4/gd32f4xx_dma.h b/soc/arm/gd32f4/gd32f4xx_dma.h similarity index 100% rename from arch/arm/src/gd32f4/gd32f4xx_dma.h rename to soc/arm/gd32f4/gd32f4xx_dma.h diff --git a/arch/arm/src/gd32f4/gd32f4xx_enet.c b/soc/arm/gd32f4/gd32f4xx_enet.c similarity index 100% rename from arch/arm/src/gd32f4/gd32f4xx_enet.c rename to soc/arm/gd32f4/gd32f4xx_enet.c diff --git a/arch/arm/src/gd32f4/gd32f4xx_enet.h b/soc/arm/gd32f4/gd32f4xx_enet.h similarity index 100% rename from arch/arm/src/gd32f4/gd32f4xx_enet.h rename to soc/arm/gd32f4/gd32f4xx_enet.h diff --git a/arch/arm/src/gd32f4/gd32f4xx_exti.c b/soc/arm/gd32f4/gd32f4xx_exti.c similarity index 100% rename from arch/arm/src/gd32f4/gd32f4xx_exti.c rename to soc/arm/gd32f4/gd32f4xx_exti.c diff --git a/arch/arm/src/gd32f4/gd32f4xx_exti.h b/soc/arm/gd32f4/gd32f4xx_exti.h similarity index 100% rename from arch/arm/src/gd32f4/gd32f4xx_exti.h rename to soc/arm/gd32f4/gd32f4xx_exti.h diff --git a/arch/arm/src/gd32f4/gd32f4xx_fmc.c b/soc/arm/gd32f4/gd32f4xx_fmc.c similarity index 100% rename from arch/arm/src/gd32f4/gd32f4xx_fmc.c rename to soc/arm/gd32f4/gd32f4xx_fmc.c diff --git a/arch/arm/src/gd32f4/gd32f4xx_fmc.h b/soc/arm/gd32f4/gd32f4xx_fmc.h similarity index 100% rename from arch/arm/src/gd32f4/gd32f4xx_fmc.h rename to soc/arm/gd32f4/gd32f4xx_fmc.h diff --git a/arch/arm/src/gd32f4/gd32f4xx_gpio.c b/soc/arm/gd32f4/gd32f4xx_gpio.c similarity index 100% rename from arch/arm/src/gd32f4/gd32f4xx_gpio.c rename to soc/arm/gd32f4/gd32f4xx_gpio.c diff --git a/arch/arm/src/gd32f4/gd32f4xx_gpio.h b/soc/arm/gd32f4/gd32f4xx_gpio.h similarity index 100% rename from arch/arm/src/gd32f4/gd32f4xx_gpio.h rename to soc/arm/gd32f4/gd32f4xx_gpio.h diff --git a/arch/arm/src/gd32f4/gd32f4xx_i2c.c b/soc/arm/gd32f4/gd32f4xx_i2c.c similarity index 100% rename from arch/arm/src/gd32f4/gd32f4xx_i2c.c rename to soc/arm/gd32f4/gd32f4xx_i2c.c diff --git a/arch/arm/src/gd32f4/gd32f4xx_i2c.h b/soc/arm/gd32f4/gd32f4xx_i2c.h similarity index 100% rename from arch/arm/src/gd32f4/gd32f4xx_i2c.h rename to soc/arm/gd32f4/gd32f4xx_i2c.h diff --git a/arch/arm/src/gd32f4/gd32f4xx_idle.c b/soc/arm/gd32f4/gd32f4xx_idle.c similarity index 100% rename from arch/arm/src/gd32f4/gd32f4xx_idle.c rename to soc/arm/gd32f4/gd32f4xx_idle.c diff --git a/arch/arm/src/gd32f4/gd32f4xx_irq.c b/soc/arm/gd32f4/gd32f4xx_irq.c similarity index 100% rename from arch/arm/src/gd32f4/gd32f4xx_irq.c rename to soc/arm/gd32f4/gd32f4xx_irq.c diff --git a/arch/arm/src/gd32f4/gd32f4xx_lowputc.c b/soc/arm/gd32f4/gd32f4xx_lowputc.c similarity index 100% rename from arch/arm/src/gd32f4/gd32f4xx_lowputc.c rename to soc/arm/gd32f4/gd32f4xx_lowputc.c diff --git a/arch/arm/src/gd32f4/gd32f4xx_lowputc.h b/soc/arm/gd32f4/gd32f4xx_lowputc.h similarity index 100% rename from arch/arm/src/gd32f4/gd32f4xx_lowputc.h rename to soc/arm/gd32f4/gd32f4xx_lowputc.h diff --git a/arch/arm/src/gd32f4/gd32f4xx_pmu.c b/soc/arm/gd32f4/gd32f4xx_pmu.c similarity index 100% rename from arch/arm/src/gd32f4/gd32f4xx_pmu.c rename to soc/arm/gd32f4/gd32f4xx_pmu.c diff --git a/arch/arm/src/gd32f4/gd32f4xx_pmu.h b/soc/arm/gd32f4/gd32f4xx_pmu.h similarity index 100% rename from arch/arm/src/gd32f4/gd32f4xx_pmu.h rename to soc/arm/gd32f4/gd32f4xx_pmu.h diff --git a/arch/arm/src/gd32f4/gd32f4xx_progmem.c b/soc/arm/gd32f4/gd32f4xx_progmem.c similarity index 100% rename from arch/arm/src/gd32f4/gd32f4xx_progmem.c rename to soc/arm/gd32f4/gd32f4xx_progmem.c diff --git a/arch/arm/src/gd32f4/gd32f4xx_progmem.h b/soc/arm/gd32f4/gd32f4xx_progmem.h similarity index 100% rename from arch/arm/src/gd32f4/gd32f4xx_progmem.h rename to soc/arm/gd32f4/gd32f4xx_progmem.h diff --git a/arch/arm/src/gd32f4/gd32f4xx_rcu.c b/soc/arm/gd32f4/gd32f4xx_rcu.c similarity index 100% rename from arch/arm/src/gd32f4/gd32f4xx_rcu.c rename to soc/arm/gd32f4/gd32f4xx_rcu.c diff --git a/arch/arm/src/gd32f4/gd32f4xx_rcu.h b/soc/arm/gd32f4/gd32f4xx_rcu.h similarity index 100% rename from arch/arm/src/gd32f4/gd32f4xx_rcu.h rename to soc/arm/gd32f4/gd32f4xx_rcu.h diff --git a/arch/arm/src/gd32f4/gd32f4xx_sdio.c b/soc/arm/gd32f4/gd32f4xx_sdio.c similarity index 100% rename from arch/arm/src/gd32f4/gd32f4xx_sdio.c rename to soc/arm/gd32f4/gd32f4xx_sdio.c diff --git a/arch/arm/src/gd32f4/gd32f4xx_sdio.h b/soc/arm/gd32f4/gd32f4xx_sdio.h similarity index 100% rename from arch/arm/src/gd32f4/gd32f4xx_sdio.h rename to soc/arm/gd32f4/gd32f4xx_sdio.h diff --git a/arch/arm/src/gd32f4/gd32f4xx_serial.c b/soc/arm/gd32f4/gd32f4xx_serial.c similarity index 100% rename from arch/arm/src/gd32f4/gd32f4xx_serial.c rename to soc/arm/gd32f4/gd32f4xx_serial.c diff --git a/arch/arm/src/gd32f4/gd32f4xx_spi.c b/soc/arm/gd32f4/gd32f4xx_spi.c similarity index 100% rename from arch/arm/src/gd32f4/gd32f4xx_spi.c rename to soc/arm/gd32f4/gd32f4xx_spi.c diff --git a/arch/arm/src/gd32f4/gd32f4xx_spi.h b/soc/arm/gd32f4/gd32f4xx_spi.h similarity index 100% rename from arch/arm/src/gd32f4/gd32f4xx_spi.h rename to soc/arm/gd32f4/gd32f4xx_spi.h diff --git a/arch/arm/src/gd32f4/gd32f4xx_start.c b/soc/arm/gd32f4/gd32f4xx_start.c similarity index 100% rename from arch/arm/src/gd32f4/gd32f4xx_start.c rename to soc/arm/gd32f4/gd32f4xx_start.c diff --git a/arch/arm/src/gd32f4/gd32f4xx_start.h b/soc/arm/gd32f4/gd32f4xx_start.h similarity index 100% rename from arch/arm/src/gd32f4/gd32f4xx_start.h rename to soc/arm/gd32f4/gd32f4xx_start.h diff --git a/arch/arm/src/gd32f4/gd32f4xx_syscfg.c b/soc/arm/gd32f4/gd32f4xx_syscfg.c similarity index 100% rename from arch/arm/src/gd32f4/gd32f4xx_syscfg.c rename to soc/arm/gd32f4/gd32f4xx_syscfg.c diff --git a/arch/arm/src/gd32f4/gd32f4xx_syscfg.h b/soc/arm/gd32f4/gd32f4xx_syscfg.h similarity index 100% rename from arch/arm/src/gd32f4/gd32f4xx_syscfg.h rename to soc/arm/gd32f4/gd32f4xx_syscfg.h diff --git a/arch/arm/src/gd32f4/gd32f4xx_timerisr.c b/soc/arm/gd32f4/gd32f4xx_timerisr.c similarity index 100% rename from arch/arm/src/gd32f4/gd32f4xx_timerisr.c rename to soc/arm/gd32f4/gd32f4xx_timerisr.c diff --git a/arch/arm/src/gd32f4/gd32f4xx_usart.h b/soc/arm/gd32f4/gd32f4xx_usart.h similarity index 100% rename from arch/arm/src/gd32f4/gd32f4xx_usart.h rename to soc/arm/gd32f4/gd32f4xx_usart.h diff --git a/arch/arm/src/gd32f4/hardware/gd32f450_memorymap.h b/soc/arm/gd32f4/hardware/gd32f450_memorymap.h similarity index 100% rename from arch/arm/src/gd32f4/hardware/gd32f450_memorymap.h rename to soc/arm/gd32f4/hardware/gd32f450_memorymap.h diff --git a/arch/arm/src/gd32f4/hardware/gd32f450_pinmap.h b/soc/arm/gd32f4/hardware/gd32f450_pinmap.h similarity index 100% rename from arch/arm/src/gd32f4/hardware/gd32f450_pinmap.h rename to soc/arm/gd32f4/hardware/gd32f450_pinmap.h diff --git a/arch/arm/src/gd32f4/hardware/gd32f4xx_dma.h b/soc/arm/gd32f4/hardware/gd32f4xx_dma.h similarity index 100% rename from arch/arm/src/gd32f4/hardware/gd32f4xx_dma.h rename to soc/arm/gd32f4/hardware/gd32f4xx_dma.h diff --git a/arch/arm/src/gd32f4/hardware/gd32f4xx_enet.h b/soc/arm/gd32f4/hardware/gd32f4xx_enet.h similarity index 100% rename from arch/arm/src/gd32f4/hardware/gd32f4xx_enet.h rename to soc/arm/gd32f4/hardware/gd32f4xx_enet.h diff --git a/arch/arm/src/gd32f4/hardware/gd32f4xx_exti.h b/soc/arm/gd32f4/hardware/gd32f4xx_exti.h similarity index 100% rename from arch/arm/src/gd32f4/hardware/gd32f4xx_exti.h rename to soc/arm/gd32f4/hardware/gd32f4xx_exti.h diff --git a/arch/arm/src/gd32f4/hardware/gd32f4xx_fmc.h b/soc/arm/gd32f4/hardware/gd32f4xx_fmc.h similarity index 100% rename from arch/arm/src/gd32f4/hardware/gd32f4xx_fmc.h rename to soc/arm/gd32f4/hardware/gd32f4xx_fmc.h diff --git a/arch/arm/src/gd32f4/hardware/gd32f4xx_gpio.h b/soc/arm/gd32f4/hardware/gd32f4xx_gpio.h similarity index 100% rename from arch/arm/src/gd32f4/hardware/gd32f4xx_gpio.h rename to soc/arm/gd32f4/hardware/gd32f4xx_gpio.h diff --git a/arch/arm/src/gd32f4/hardware/gd32f4xx_i2c.h b/soc/arm/gd32f4/hardware/gd32f4xx_i2c.h similarity index 100% rename from arch/arm/src/gd32f4/hardware/gd32f4xx_i2c.h rename to soc/arm/gd32f4/hardware/gd32f4xx_i2c.h diff --git a/arch/arm/src/gd32f4/hardware/gd32f4xx_memorymap.h b/soc/arm/gd32f4/hardware/gd32f4xx_memorymap.h similarity index 100% rename from arch/arm/src/gd32f4/hardware/gd32f4xx_memorymap.h rename to soc/arm/gd32f4/hardware/gd32f4xx_memorymap.h diff --git a/arch/arm/src/gd32f4/hardware/gd32f4xx_pinmap.h b/soc/arm/gd32f4/hardware/gd32f4xx_pinmap.h similarity index 100% rename from arch/arm/src/gd32f4/hardware/gd32f4xx_pinmap.h rename to soc/arm/gd32f4/hardware/gd32f4xx_pinmap.h diff --git a/arch/arm/src/gd32f4/hardware/gd32f4xx_pmu.h b/soc/arm/gd32f4/hardware/gd32f4xx_pmu.h similarity index 100% rename from arch/arm/src/gd32f4/hardware/gd32f4xx_pmu.h rename to soc/arm/gd32f4/hardware/gd32f4xx_pmu.h diff --git a/arch/arm/src/gd32f4/hardware/gd32f4xx_rcu.h b/soc/arm/gd32f4/hardware/gd32f4xx_rcu.h similarity index 100% rename from arch/arm/src/gd32f4/hardware/gd32f4xx_rcu.h rename to soc/arm/gd32f4/hardware/gd32f4xx_rcu.h diff --git a/arch/arm/src/gd32f4/hardware/gd32f4xx_sdio.h b/soc/arm/gd32f4/hardware/gd32f4xx_sdio.h similarity index 100% rename from arch/arm/src/gd32f4/hardware/gd32f4xx_sdio.h rename to soc/arm/gd32f4/hardware/gd32f4xx_sdio.h diff --git a/arch/arm/src/gd32f4/hardware/gd32f4xx_spi.h b/soc/arm/gd32f4/hardware/gd32f4xx_spi.h similarity index 100% rename from arch/arm/src/gd32f4/hardware/gd32f4xx_spi.h rename to soc/arm/gd32f4/hardware/gd32f4xx_spi.h diff --git a/arch/arm/src/gd32f4/hardware/gd32f4xx_syscfg.h b/soc/arm/gd32f4/hardware/gd32f4xx_syscfg.h similarity index 100% rename from arch/arm/src/gd32f4/hardware/gd32f4xx_syscfg.h rename to soc/arm/gd32f4/hardware/gd32f4xx_syscfg.h diff --git a/arch/arm/src/gd32f4/hardware/gd32f4xx_uart.h b/soc/arm/gd32f4/hardware/gd32f4xx_uart.h similarity index 100% rename from arch/arm/src/gd32f4/hardware/gd32f4xx_uart.h rename to soc/arm/gd32f4/hardware/gd32f4xx_uart.h diff --git a/arch/arm/src/goldfish/CMakeLists.txt b/soc/arm/goldfish/CMakeLists.txt similarity index 100% rename from arch/arm/src/goldfish/CMakeLists.txt rename to soc/arm/goldfish/CMakeLists.txt diff --git a/arch/arm/src/goldfish/Kconfig b/soc/arm/goldfish/Kconfig similarity index 100% rename from arch/arm/src/goldfish/Kconfig rename to soc/arm/goldfish/Kconfig diff --git a/arch/arm/src/goldfish/Make.defs b/soc/arm/goldfish/Make.defs similarity index 100% rename from arch/arm/src/goldfish/Make.defs rename to soc/arm/goldfish/Make.defs diff --git a/arch/arm/src/goldfish/chip.h b/soc/arm/goldfish/chip.h similarity index 100% rename from arch/arm/src/goldfish/chip.h rename to soc/arm/goldfish/chip.h diff --git a/arch/arm/src/goldfish/goldfish_boot.c b/soc/arm/goldfish/goldfish_boot.c similarity index 100% rename from arch/arm/src/goldfish/goldfish_boot.c rename to soc/arm/goldfish/goldfish_boot.c diff --git a/arch/arm/src/goldfish/goldfish_cpuboot.c b/soc/arm/goldfish/goldfish_cpuboot.c similarity index 100% rename from arch/arm/src/goldfish/goldfish_cpuboot.c rename to soc/arm/goldfish/goldfish_cpuboot.c diff --git a/arch/arm/src/goldfish/goldfish_irq.c b/soc/arm/goldfish/goldfish_irq.c similarity index 100% rename from arch/arm/src/goldfish/goldfish_irq.c rename to soc/arm/goldfish/goldfish_irq.c diff --git a/arch/arm/src/goldfish/goldfish_irq.h b/soc/arm/goldfish/goldfish_irq.h similarity index 100% rename from arch/arm/src/goldfish/goldfish_irq.h rename to soc/arm/goldfish/goldfish_irq.h diff --git a/arch/arm/src/goldfish/goldfish_memorymap.c b/soc/arm/goldfish/goldfish_memorymap.c similarity index 100% rename from arch/arm/src/goldfish/goldfish_memorymap.c rename to soc/arm/goldfish/goldfish_memorymap.c diff --git a/arch/arm/src/goldfish/goldfish_memorymap.h b/soc/arm/goldfish/goldfish_memorymap.h similarity index 100% rename from arch/arm/src/goldfish/goldfish_memorymap.h rename to soc/arm/goldfish/goldfish_memorymap.h diff --git a/arch/arm/src/goldfish/goldfish_pgalloc.c b/soc/arm/goldfish/goldfish_pgalloc.c similarity index 100% rename from arch/arm/src/goldfish/goldfish_pgalloc.c rename to soc/arm/goldfish/goldfish_pgalloc.c diff --git a/arch/arm/src/goldfish/goldfish_serial.c b/soc/arm/goldfish/goldfish_serial.c similarity index 100% rename from arch/arm/src/goldfish/goldfish_serial.c rename to soc/arm/goldfish/goldfish_serial.c diff --git a/arch/arm/src/goldfish/goldfish_timer.c b/soc/arm/goldfish/goldfish_timer.c similarity index 100% rename from arch/arm/src/goldfish/goldfish_timer.c rename to soc/arm/goldfish/goldfish_timer.c diff --git a/arch/arm/src/imx1/Kconfig b/soc/arm/imx1/Kconfig similarity index 100% rename from arch/arm/src/imx1/Kconfig rename to soc/arm/imx1/Kconfig diff --git a/arch/arm/src/imx1/Make.defs b/soc/arm/imx1/Make.defs similarity index 100% rename from arch/arm/src/imx1/Make.defs rename to soc/arm/imx1/Make.defs diff --git a/arch/arm/src/imx1/chip.h b/soc/arm/imx1/chip.h similarity index 100% rename from arch/arm/src/imx1/chip.h rename to soc/arm/imx1/chip.h diff --git a/arch/arm/src/imx1/imx_aitc.h b/soc/arm/imx1/imx_aitc.h similarity index 100% rename from arch/arm/src/imx1/imx_aitc.h rename to soc/arm/imx1/imx_aitc.h diff --git a/arch/arm/src/imx1/imx_allocateheap.c b/soc/arm/imx1/imx_allocateheap.c similarity index 100% rename from arch/arm/src/imx1/imx_allocateheap.c rename to soc/arm/imx1/imx_allocateheap.c diff --git a/arch/arm/src/imx1/imx_boot.c b/soc/arm/imx1/imx_boot.c similarity index 100% rename from arch/arm/src/imx1/imx_boot.c rename to soc/arm/imx1/imx_boot.c diff --git a/arch/arm/src/imx1/imx_cspi.h b/soc/arm/imx1/imx_cspi.h similarity index 100% rename from arch/arm/src/imx1/imx_cspi.h rename to soc/arm/imx1/imx_cspi.h diff --git a/arch/arm/src/imx1/imx_decodeirq.c b/soc/arm/imx1/imx_decodeirq.c similarity index 100% rename from arch/arm/src/imx1/imx_decodeirq.c rename to soc/arm/imx1/imx_decodeirq.c diff --git a/arch/arm/src/imx1/imx_dma.h b/soc/arm/imx1/imx_dma.h similarity index 100% rename from arch/arm/src/imx1/imx_dma.h rename to soc/arm/imx1/imx_dma.h diff --git a/arch/arm/src/imx1/imx_eim.h b/soc/arm/imx1/imx_eim.h similarity index 100% rename from arch/arm/src/imx1/imx_eim.h rename to soc/arm/imx1/imx_eim.h diff --git a/arch/arm/src/imx1/imx_gpio.c b/soc/arm/imx1/imx_gpio.c similarity index 100% rename from arch/arm/src/imx1/imx_gpio.c rename to soc/arm/imx1/imx_gpio.c diff --git a/arch/arm/src/imx1/imx_gpio.h b/soc/arm/imx1/imx_gpio.h similarity index 100% rename from arch/arm/src/imx1/imx_gpio.h rename to soc/arm/imx1/imx_gpio.h diff --git a/arch/arm/src/imx1/imx_i2c.h b/soc/arm/imx1/imx_i2c.h similarity index 100% rename from arch/arm/src/imx1/imx_i2c.h rename to soc/arm/imx1/imx_i2c.h diff --git a/arch/arm/src/imx1/imx_irq.c b/soc/arm/imx1/imx_irq.c similarity index 100% rename from arch/arm/src/imx1/imx_irq.c rename to soc/arm/imx1/imx_irq.c diff --git a/arch/arm/src/imx1/imx_lowputc.S b/soc/arm/imx1/imx_lowputc.S similarity index 100% rename from arch/arm/src/imx1/imx_lowputc.S rename to soc/arm/imx1/imx_lowputc.S diff --git a/arch/arm/src/imx1/imx_memorymap.h b/soc/arm/imx1/imx_memorymap.h similarity index 100% rename from arch/arm/src/imx1/imx_memorymap.h rename to soc/arm/imx1/imx_memorymap.h diff --git a/arch/arm/src/imx1/imx_rtc.h b/soc/arm/imx1/imx_rtc.h similarity index 100% rename from arch/arm/src/imx1/imx_rtc.h rename to soc/arm/imx1/imx_rtc.h diff --git a/arch/arm/src/imx1/imx_serial.c b/soc/arm/imx1/imx_serial.c similarity index 100% rename from arch/arm/src/imx1/imx_serial.c rename to soc/arm/imx1/imx_serial.c diff --git a/arch/arm/src/imx1/imx_spi.c b/soc/arm/imx1/imx_spi.c similarity index 100% rename from arch/arm/src/imx1/imx_spi.c rename to soc/arm/imx1/imx_spi.c diff --git a/arch/arm/src/imx1/imx_system.h b/soc/arm/imx1/imx_system.h similarity index 100% rename from arch/arm/src/imx1/imx_system.h rename to soc/arm/imx1/imx_system.h diff --git a/arch/arm/src/imx1/imx_timer.h b/soc/arm/imx1/imx_timer.h similarity index 100% rename from arch/arm/src/imx1/imx_timer.h rename to soc/arm/imx1/imx_timer.h diff --git a/arch/arm/src/imx1/imx_timerisr.c b/soc/arm/imx1/imx_timerisr.c similarity index 100% rename from arch/arm/src/imx1/imx_timerisr.c rename to soc/arm/imx1/imx_timerisr.c diff --git a/arch/arm/src/imx1/imx_uart.h b/soc/arm/imx1/imx_uart.h similarity index 100% rename from arch/arm/src/imx1/imx_uart.h rename to soc/arm/imx1/imx_uart.h diff --git a/arch/arm/src/imx1/imx_usbd.h b/soc/arm/imx1/imx_usbd.h similarity index 100% rename from arch/arm/src/imx1/imx_usbd.h rename to soc/arm/imx1/imx_usbd.h diff --git a/arch/arm/src/imx1/imx_wdog.h b/soc/arm/imx1/imx_wdog.h similarity index 100% rename from arch/arm/src/imx1/imx_wdog.h rename to soc/arm/imx1/imx_wdog.h diff --git a/arch/arm/src/imx6/CMakeLists.txt b/soc/arm/imx6/CMakeLists.txt similarity index 100% rename from arch/arm/src/imx6/CMakeLists.txt rename to soc/arm/imx6/CMakeLists.txt diff --git a/arch/arm/src/imx6/Kconfig b/soc/arm/imx6/Kconfig similarity index 100% rename from arch/arm/src/imx6/Kconfig rename to soc/arm/imx6/Kconfig diff --git a/arch/arm/src/imx6/Make.defs b/soc/arm/imx6/Make.defs similarity index 100% rename from arch/arm/src/imx6/Make.defs rename to soc/arm/imx6/Make.defs diff --git a/arch/arm/src/imx6/chip.h b/soc/arm/imx6/chip.h similarity index 100% rename from arch/arm/src/imx6/chip.h rename to soc/arm/imx6/chip.h diff --git a/arch/arm/src/imx6/hardware/imx_ccm.h b/soc/arm/imx6/hardware/imx_ccm.h similarity index 100% rename from arch/arm/src/imx6/hardware/imx_ccm.h rename to soc/arm/imx6/hardware/imx_ccm.h diff --git a/arch/arm/src/imx6/hardware/imx_ecspi.h b/soc/arm/imx6/hardware/imx_ecspi.h similarity index 100% rename from arch/arm/src/imx6/hardware/imx_ecspi.h rename to soc/arm/imx6/hardware/imx_ecspi.h diff --git a/arch/arm/src/imx6/hardware/imx_enet.h b/soc/arm/imx6/hardware/imx_enet.h similarity index 100% rename from arch/arm/src/imx6/hardware/imx_enet.h rename to soc/arm/imx6/hardware/imx_enet.h diff --git a/arch/arm/src/imx6/hardware/imx_gpio.h b/soc/arm/imx6/hardware/imx_gpio.h similarity index 100% rename from arch/arm/src/imx6/hardware/imx_gpio.h rename to soc/arm/imx6/hardware/imx_gpio.h diff --git a/arch/arm/src/imx6/hardware/imx_gpt.h b/soc/arm/imx6/hardware/imx_gpt.h similarity index 100% rename from arch/arm/src/imx6/hardware/imx_gpt.h rename to soc/arm/imx6/hardware/imx_gpt.h diff --git a/arch/arm/src/imx6/hardware/imx_iomuxc.h b/soc/arm/imx6/hardware/imx_iomuxc.h similarity index 100% rename from arch/arm/src/imx6/hardware/imx_iomuxc.h rename to soc/arm/imx6/hardware/imx_iomuxc.h diff --git a/arch/arm/src/imx6/hardware/imx_memorymap.h b/soc/arm/imx6/hardware/imx_memorymap.h similarity index 100% rename from arch/arm/src/imx6/hardware/imx_memorymap.h rename to soc/arm/imx6/hardware/imx_memorymap.h diff --git a/arch/arm/src/imx6/hardware/imx_pinmux.h b/soc/arm/imx6/hardware/imx_pinmux.h similarity index 100% rename from arch/arm/src/imx6/hardware/imx_pinmux.h rename to soc/arm/imx6/hardware/imx_pinmux.h diff --git a/arch/arm/src/imx6/hardware/imx_src.h b/soc/arm/imx6/hardware/imx_src.h similarity index 100% rename from arch/arm/src/imx6/hardware/imx_src.h rename to soc/arm/imx6/hardware/imx_src.h diff --git a/arch/arm/src/imx6/hardware/imx_uart.h b/soc/arm/imx6/hardware/imx_uart.h similarity index 100% rename from arch/arm/src/imx6/hardware/imx_uart.h rename to soc/arm/imx6/hardware/imx_uart.h diff --git a/arch/arm/src/imx6/imx_boot.c b/soc/arm/imx6/imx_boot.c similarity index 100% rename from arch/arm/src/imx6/imx_boot.c rename to soc/arm/imx6/imx_boot.c diff --git a/arch/arm/src/imx6/imx_boot.h b/soc/arm/imx6/imx_boot.h similarity index 100% rename from arch/arm/src/imx6/imx_boot.h rename to soc/arm/imx6/imx_boot.h diff --git a/arch/arm/src/imx6/imx_clockconfig.c b/soc/arm/imx6/imx_clockconfig.c similarity index 100% rename from arch/arm/src/imx6/imx_clockconfig.c rename to soc/arm/imx6/imx_clockconfig.c diff --git a/arch/arm/src/imx6/imx_clockconfig.h b/soc/arm/imx6/imx_clockconfig.h similarity index 100% rename from arch/arm/src/imx6/imx_clockconfig.h rename to soc/arm/imx6/imx_clockconfig.h diff --git a/arch/arm/src/imx6/imx_config.h b/soc/arm/imx6/imx_config.h similarity index 100% rename from arch/arm/src/imx6/imx_config.h rename to soc/arm/imx6/imx_config.h diff --git a/arch/arm/src/imx6/imx_cpuboot.c b/soc/arm/imx6/imx_cpuboot.c similarity index 100% rename from arch/arm/src/imx6/imx_cpuboot.c rename to soc/arm/imx6/imx_cpuboot.c diff --git a/arch/arm/src/imx6/imx_ecspi.c b/soc/arm/imx6/imx_ecspi.c similarity index 100% rename from arch/arm/src/imx6/imx_ecspi.c rename to soc/arm/imx6/imx_ecspi.c diff --git a/arch/arm/src/imx6/imx_ecspi.h b/soc/arm/imx6/imx_ecspi.h similarity index 100% rename from arch/arm/src/imx6/imx_ecspi.h rename to soc/arm/imx6/imx_ecspi.h diff --git a/arch/arm/src/imx6/imx_enet.c b/soc/arm/imx6/imx_enet.c similarity index 100% rename from arch/arm/src/imx6/imx_enet.c rename to soc/arm/imx6/imx_enet.c diff --git a/arch/arm/src/imx6/imx_enet.h b/soc/arm/imx6/imx_enet.h similarity index 100% rename from arch/arm/src/imx6/imx_enet.h rename to soc/arm/imx6/imx_enet.h diff --git a/arch/arm/src/imx6/imx_gpio.c b/soc/arm/imx6/imx_gpio.c similarity index 100% rename from arch/arm/src/imx6/imx_gpio.c rename to soc/arm/imx6/imx_gpio.c diff --git a/arch/arm/src/imx6/imx_gpio.h b/soc/arm/imx6/imx_gpio.h similarity index 100% rename from arch/arm/src/imx6/imx_gpio.h rename to soc/arm/imx6/imx_gpio.h diff --git a/arch/arm/src/imx6/imx_idle.c b/soc/arm/imx6/imx_idle.c similarity index 100% rename from arch/arm/src/imx6/imx_idle.c rename to soc/arm/imx6/imx_idle.c diff --git a/arch/arm/src/imx6/imx_iomuxc.c b/soc/arm/imx6/imx_iomuxc.c similarity index 100% rename from arch/arm/src/imx6/imx_iomuxc.c rename to soc/arm/imx6/imx_iomuxc.c diff --git a/arch/arm/src/imx6/imx_iomuxc.h b/soc/arm/imx6/imx_iomuxc.h similarity index 100% rename from arch/arm/src/imx6/imx_iomuxc.h rename to soc/arm/imx6/imx_iomuxc.h diff --git a/arch/arm/src/imx6/imx_irq.c b/soc/arm/imx6/imx_irq.c similarity index 100% rename from arch/arm/src/imx6/imx_irq.c rename to soc/arm/imx6/imx_irq.c diff --git a/arch/arm/src/imx6/imx_lowputc.c b/soc/arm/imx6/imx_lowputc.c similarity index 100% rename from arch/arm/src/imx6/imx_lowputc.c rename to soc/arm/imx6/imx_lowputc.c diff --git a/arch/arm/src/imx6/imx_lowputc.h b/soc/arm/imx6/imx_lowputc.h similarity index 100% rename from arch/arm/src/imx6/imx_lowputc.h rename to soc/arm/imx6/imx_lowputc.h diff --git a/arch/arm/src/imx6/imx_memorymap.c b/soc/arm/imx6/imx_memorymap.c similarity index 100% rename from arch/arm/src/imx6/imx_memorymap.c rename to soc/arm/imx6/imx_memorymap.c diff --git a/arch/arm/src/imx6/imx_memorymap.h b/soc/arm/imx6/imx_memorymap.h similarity index 100% rename from arch/arm/src/imx6/imx_memorymap.h rename to soc/arm/imx6/imx_memorymap.h diff --git a/arch/arm/src/imx6/imx_pgalloc.c b/soc/arm/imx6/imx_pgalloc.c similarity index 100% rename from arch/arm/src/imx6/imx_pgalloc.c rename to soc/arm/imx6/imx_pgalloc.c diff --git a/arch/arm/src/imx6/imx_serial.c b/soc/arm/imx6/imx_serial.c similarity index 100% rename from arch/arm/src/imx6/imx_serial.c rename to soc/arm/imx6/imx_serial.c diff --git a/arch/arm/src/imx6/imx_serial.h b/soc/arm/imx6/imx_serial.h similarity index 100% rename from arch/arm/src/imx6/imx_serial.h rename to soc/arm/imx6/imx_serial.h diff --git a/arch/arm/src/imx6/imx_timerisr.c b/soc/arm/imx6/imx_timerisr.c similarity index 100% rename from arch/arm/src/imx6/imx_timerisr.c rename to soc/arm/imx6/imx_timerisr.c diff --git a/arch/arm/src/imx9/CMakeLists.txt b/soc/arm/imx9/CMakeLists.txt similarity index 100% rename from arch/arm/src/imx9/CMakeLists.txt rename to soc/arm/imx9/CMakeLists.txt diff --git a/arch/arm/src/imx9/Kconfig b/soc/arm/imx9/Kconfig similarity index 100% rename from arch/arm/src/imx9/Kconfig rename to soc/arm/imx9/Kconfig diff --git a/arch/arm/src/imx9/Make.defs b/soc/arm/imx9/Make.defs similarity index 100% rename from arch/arm/src/imx9/Make.defs rename to soc/arm/imx9/Make.defs diff --git a/arch/arm/src/imx9/chip.h b/soc/arm/imx9/chip.h similarity index 100% rename from arch/arm/src/imx9/chip.h rename to soc/arm/imx9/chip.h diff --git a/arch/arm/src/imx9/hardware/imx95/imx95_clock.h b/soc/arm/imx9/hardware/imx95/imx95_clock.h similarity index 100% rename from arch/arm/src/imx9/hardware/imx95/imx95_clock.h rename to soc/arm/imx9/hardware/imx95/imx95_clock.h diff --git a/arch/arm/src/imx9/hardware/imx95/imx95_dmamux.h b/soc/arm/imx9/hardware/imx95/imx95_dmamux.h similarity index 100% rename from arch/arm/src/imx9/hardware/imx95/imx95_dmamux.h rename to soc/arm/imx9/hardware/imx95/imx95_dmamux.h diff --git a/arch/arm/src/imx9/hardware/imx95/imx95_edma.h b/soc/arm/imx9/hardware/imx95/imx95_edma.h similarity index 100% rename from arch/arm/src/imx9/hardware/imx95/imx95_edma.h rename to soc/arm/imx9/hardware/imx95/imx95_edma.h diff --git a/arch/arm/src/imx9/hardware/imx95/imx95_gpio.h b/soc/arm/imx9/hardware/imx95/imx95_gpio.h similarity index 100% rename from arch/arm/src/imx9/hardware/imx95/imx95_gpio.h rename to soc/arm/imx9/hardware/imx95/imx95_gpio.h diff --git a/arch/arm/src/imx9/hardware/imx95/imx95_iomuxc.h b/soc/arm/imx9/hardware/imx95/imx95_iomuxc.h similarity index 100% rename from arch/arm/src/imx9/hardware/imx95/imx95_iomuxc.h rename to soc/arm/imx9/hardware/imx95/imx95_iomuxc.h diff --git a/arch/arm/src/imx9/hardware/imx95/imx95_memorymap.h b/soc/arm/imx9/hardware/imx95/imx95_memorymap.h similarity index 100% rename from arch/arm/src/imx9/hardware/imx95/imx95_memorymap.h rename to soc/arm/imx9/hardware/imx95/imx95_memorymap.h diff --git a/arch/arm/src/imx9/hardware/imx95/imx95_pinmux.h b/soc/arm/imx9/hardware/imx95/imx95_pinmux.h similarity index 100% rename from arch/arm/src/imx9/hardware/imx95/imx95_pinmux.h rename to soc/arm/imx9/hardware/imx95/imx95_pinmux.h diff --git a/arch/arm/src/imx9/hardware/imx9_clock.h b/soc/arm/imx9/hardware/imx9_clock.h similarity index 100% rename from arch/arm/src/imx9/hardware/imx9_clock.h rename to soc/arm/imx9/hardware/imx9_clock.h diff --git a/arch/arm/src/imx9/hardware/imx9_dmamux.h b/soc/arm/imx9/hardware/imx9_dmamux.h similarity index 100% rename from arch/arm/src/imx9/hardware/imx9_dmamux.h rename to soc/arm/imx9/hardware/imx9_dmamux.h diff --git a/arch/arm/src/imx9/hardware/imx9_edma.h b/soc/arm/imx9/hardware/imx9_edma.h similarity index 100% rename from arch/arm/src/imx9/hardware/imx9_edma.h rename to soc/arm/imx9/hardware/imx9_edma.h diff --git a/arch/arm/src/imx9/hardware/imx9_flexcan.h b/soc/arm/imx9/hardware/imx9_flexcan.h similarity index 100% rename from arch/arm/src/imx9/hardware/imx9_flexcan.h rename to soc/arm/imx9/hardware/imx9_flexcan.h diff --git a/arch/arm/src/imx9/hardware/imx9_gpc.h b/soc/arm/imx9/hardware/imx9_gpc.h similarity index 100% rename from arch/arm/src/imx9/hardware/imx9_gpc.h rename to soc/arm/imx9/hardware/imx9_gpc.h diff --git a/arch/arm/src/imx9/hardware/imx9_gpio.h b/soc/arm/imx9/hardware/imx9_gpio.h similarity index 100% rename from arch/arm/src/imx9/hardware/imx9_gpio.h rename to soc/arm/imx9/hardware/imx9_gpio.h diff --git a/arch/arm/src/imx9/hardware/imx9_iomuxc.h b/soc/arm/imx9/hardware/imx9_iomuxc.h similarity index 100% rename from arch/arm/src/imx9/hardware/imx9_iomuxc.h rename to soc/arm/imx9/hardware/imx9_iomuxc.h diff --git a/arch/arm/src/imx9/hardware/imx9_lpi2c.h b/soc/arm/imx9/hardware/imx9_lpi2c.h similarity index 100% rename from arch/arm/src/imx9/hardware/imx9_lpi2c.h rename to soc/arm/imx9/hardware/imx9_lpi2c.h diff --git a/arch/arm/src/imx9/hardware/imx9_lpit.h b/soc/arm/imx9/hardware/imx9_lpit.h similarity index 100% rename from arch/arm/src/imx9/hardware/imx9_lpit.h rename to soc/arm/imx9/hardware/imx9_lpit.h diff --git a/arch/arm/src/imx9/hardware/imx9_lpspi.h b/soc/arm/imx9/hardware/imx9_lpspi.h similarity index 100% rename from arch/arm/src/imx9/hardware/imx9_lpspi.h rename to soc/arm/imx9/hardware/imx9_lpspi.h diff --git a/arch/arm/src/imx9/hardware/imx9_lptmr.h b/soc/arm/imx9/hardware/imx9_lptmr.h similarity index 100% rename from arch/arm/src/imx9/hardware/imx9_lptmr.h rename to soc/arm/imx9/hardware/imx9_lptmr.h diff --git a/arch/arm/src/imx9/hardware/imx9_lpuart.h b/soc/arm/imx9/hardware/imx9_lpuart.h similarity index 100% rename from arch/arm/src/imx9/hardware/imx9_lpuart.h rename to soc/arm/imx9/hardware/imx9_lpuart.h diff --git a/arch/arm/src/imx9/hardware/imx9_memorymap.h b/soc/arm/imx9/hardware/imx9_memorymap.h similarity index 100% rename from arch/arm/src/imx9/hardware/imx9_memorymap.h rename to soc/arm/imx9/hardware/imx9_memorymap.h diff --git a/arch/arm/src/imx9/hardware/imx9_mu.h b/soc/arm/imx9/hardware/imx9_mu.h similarity index 100% rename from arch/arm/src/imx9/hardware/imx9_mu.h rename to soc/arm/imx9/hardware/imx9_mu.h diff --git a/arch/arm/src/imx9/hardware/imx9_pinmux.h b/soc/arm/imx9/hardware/imx9_pinmux.h similarity index 100% rename from arch/arm/src/imx9/hardware/imx9_pinmux.h rename to soc/arm/imx9/hardware/imx9_pinmux.h diff --git a/arch/arm/src/imx9/hardware/imx9_tpm.h b/soc/arm/imx9/hardware/imx9_tpm.h similarity index 100% rename from arch/arm/src/imx9/hardware/imx9_tpm.h rename to soc/arm/imx9/hardware/imx9_tpm.h diff --git a/arch/arm/src/imx9/hardware/imx9_tstmr.h b/soc/arm/imx9/hardware/imx9_tstmr.h similarity index 100% rename from arch/arm/src/imx9/hardware/imx9_tstmr.h rename to soc/arm/imx9/hardware/imx9_tstmr.h diff --git a/arch/arm/src/imx9/imx9_allocateheap.c b/soc/arm/imx9/imx9_allocateheap.c similarity index 100% rename from arch/arm/src/imx9/imx9_allocateheap.c rename to soc/arm/imx9/imx9_allocateheap.c diff --git a/arch/arm/src/imx9/imx9_clockconfig.c b/soc/arm/imx9/imx9_clockconfig.c similarity index 100% rename from arch/arm/src/imx9/imx9_clockconfig.c rename to soc/arm/imx9/imx9_clockconfig.c diff --git a/arch/arm/src/imx9/imx9_clockconfig.h b/soc/arm/imx9/imx9_clockconfig.h similarity index 100% rename from arch/arm/src/imx9/imx9_clockconfig.h rename to soc/arm/imx9/imx9_clockconfig.h diff --git a/arch/arm/src/imx9/imx9_edma.c b/soc/arm/imx9/imx9_edma.c similarity index 100% rename from arch/arm/src/imx9/imx9_edma.c rename to soc/arm/imx9/imx9_edma.c diff --git a/arch/arm/src/imx9/imx9_edma.h b/soc/arm/imx9/imx9_edma.h similarity index 100% rename from arch/arm/src/imx9/imx9_edma.h rename to soc/arm/imx9/imx9_edma.h diff --git a/arch/arm/src/imx9/imx9_flexcan.c b/soc/arm/imx9/imx9_flexcan.c similarity index 100% rename from arch/arm/src/imx9/imx9_flexcan.c rename to soc/arm/imx9/imx9_flexcan.c diff --git a/arch/arm/src/imx9/imx9_flexcan.h b/soc/arm/imx9/imx9_flexcan.h similarity index 100% rename from arch/arm/src/imx9/imx9_flexcan.h rename to soc/arm/imx9/imx9_flexcan.h diff --git a/arch/arm/src/imx9/imx9_gpio.c b/soc/arm/imx9/imx9_gpio.c similarity index 100% rename from arch/arm/src/imx9/imx9_gpio.c rename to soc/arm/imx9/imx9_gpio.c diff --git a/arch/arm/src/imx9/imx9_gpio.h b/soc/arm/imx9/imx9_gpio.h similarity index 100% rename from arch/arm/src/imx9/imx9_gpio.h rename to soc/arm/imx9/imx9_gpio.h diff --git a/arch/arm/src/imx9/imx9_gpiobase.c b/soc/arm/imx9/imx9_gpiobase.c similarity index 100% rename from arch/arm/src/imx9/imx9_gpiobase.c rename to soc/arm/imx9/imx9_gpiobase.c diff --git a/arch/arm/src/imx9/imx9_gpioirq.c b/soc/arm/imx9/imx9_gpioirq.c similarity index 100% rename from arch/arm/src/imx9/imx9_gpioirq.c rename to soc/arm/imx9/imx9_gpioirq.c diff --git a/arch/arm/src/imx9/imx9_idle.c b/soc/arm/imx9/imx9_idle.c similarity index 100% rename from arch/arm/src/imx9/imx9_idle.c rename to soc/arm/imx9/imx9_idle.c diff --git a/arch/arm/src/imx9/imx9_iomuxc.c b/soc/arm/imx9/imx9_iomuxc.c similarity index 100% rename from arch/arm/src/imx9/imx9_iomuxc.c rename to soc/arm/imx9/imx9_iomuxc.c diff --git a/arch/arm/src/imx9/imx9_iomuxc.h b/soc/arm/imx9/imx9_iomuxc.h similarity index 100% rename from arch/arm/src/imx9/imx9_iomuxc.h rename to soc/arm/imx9/imx9_iomuxc.h diff --git a/arch/arm/src/imx9/imx9_irq.c b/soc/arm/imx9/imx9_irq.c similarity index 100% rename from arch/arm/src/imx9/imx9_irq.c rename to soc/arm/imx9/imx9_irq.c diff --git a/arch/arm/src/imx9/imx9_lowputc.c b/soc/arm/imx9/imx9_lowputc.c similarity index 100% rename from arch/arm/src/imx9/imx9_lowputc.c rename to soc/arm/imx9/imx9_lowputc.c diff --git a/arch/arm/src/imx9/imx9_lowputc.h b/soc/arm/imx9/imx9_lowputc.h similarity index 100% rename from arch/arm/src/imx9/imx9_lowputc.h rename to soc/arm/imx9/imx9_lowputc.h diff --git a/arch/arm/src/imx9/imx9_lpi2c.c b/soc/arm/imx9/imx9_lpi2c.c similarity index 100% rename from arch/arm/src/imx9/imx9_lpi2c.c rename to soc/arm/imx9/imx9_lpi2c.c diff --git a/arch/arm/src/imx9/imx9_lpi2c.h b/soc/arm/imx9/imx9_lpi2c.h similarity index 100% rename from arch/arm/src/imx9/imx9_lpi2c.h rename to soc/arm/imx9/imx9_lpi2c.h diff --git a/arch/arm/src/imx9/imx9_lpspi.c b/soc/arm/imx9/imx9_lpspi.c similarity index 100% rename from arch/arm/src/imx9/imx9_lpspi.c rename to soc/arm/imx9/imx9_lpspi.c diff --git a/arch/arm/src/imx9/imx9_lpspi.h b/soc/arm/imx9/imx9_lpspi.h similarity index 100% rename from arch/arm/src/imx9/imx9_lpspi.h rename to soc/arm/imx9/imx9_lpspi.h diff --git a/arch/arm/src/imx9/imx9_lpuart.c b/soc/arm/imx9/imx9_lpuart.c similarity index 100% rename from arch/arm/src/imx9/imx9_lpuart.c rename to soc/arm/imx9/imx9_lpuart.c diff --git a/arch/arm/src/imx9/imx9_mpuinit.c b/soc/arm/imx9/imx9_mpuinit.c similarity index 100% rename from arch/arm/src/imx9/imx9_mpuinit.c rename to soc/arm/imx9/imx9_mpuinit.c diff --git a/arch/arm/src/imx9/imx9_mpuinit.h b/soc/arm/imx9/imx9_mpuinit.h similarity index 100% rename from arch/arm/src/imx9/imx9_mpuinit.h rename to soc/arm/imx9/imx9_mpuinit.h diff --git a/arch/arm/src/imx9/imx9_mu.c b/soc/arm/imx9/imx9_mu.c similarity index 100% rename from arch/arm/src/imx9/imx9_mu.c rename to soc/arm/imx9/imx9_mu.c diff --git a/arch/arm/src/imx9/imx9_mu.h b/soc/arm/imx9/imx9_mu.h similarity index 100% rename from arch/arm/src/imx9/imx9_mu.h rename to soc/arm/imx9/imx9_mu.h diff --git a/arch/arm/src/imx9/imx9_rptun.c b/soc/arm/imx9/imx9_rptun.c similarity index 100% rename from arch/arm/src/imx9/imx9_rptun.c rename to soc/arm/imx9/imx9_rptun.c diff --git a/arch/arm/src/imx9/imx9_rptun.h b/soc/arm/imx9/imx9_rptun.h similarity index 100% rename from arch/arm/src/imx9/imx9_rptun.h rename to soc/arm/imx9/imx9_rptun.h diff --git a/arch/arm/src/imx9/imx9_rsctable.c b/soc/arm/imx9/imx9_rsctable.c similarity index 100% rename from arch/arm/src/imx9/imx9_rsctable.c rename to soc/arm/imx9/imx9_rsctable.c diff --git a/arch/arm/src/imx9/imx9_rsctable.h b/soc/arm/imx9/imx9_rsctable.h similarity index 100% rename from arch/arm/src/imx9/imx9_rsctable.h rename to soc/arm/imx9/imx9_rsctable.h diff --git a/arch/arm/src/imx9/imx9_scmi.c b/soc/arm/imx9/imx9_scmi.c similarity index 100% rename from arch/arm/src/imx9/imx9_scmi.c rename to soc/arm/imx9/imx9_scmi.c diff --git a/arch/arm/src/imx9/imx9_scmi.h b/soc/arm/imx9/imx9_scmi.h similarity index 100% rename from arch/arm/src/imx9/imx9_scmi.h rename to soc/arm/imx9/imx9_scmi.h diff --git a/arch/arm/src/imx9/imx9_serial.h b/soc/arm/imx9/imx9_serial.h similarity index 100% rename from arch/arm/src/imx9/imx9_serial.h rename to soc/arm/imx9/imx9_serial.h diff --git a/arch/arm/src/imx9/imx9_start.c b/soc/arm/imx9/imx9_start.c similarity index 100% rename from arch/arm/src/imx9/imx9_start.c rename to soc/arm/imx9/imx9_start.c diff --git a/arch/arm/src/imx9/imx9_start.h b/soc/arm/imx9/imx9_start.h similarity index 100% rename from arch/arm/src/imx9/imx9_start.h rename to soc/arm/imx9/imx9_start.h diff --git a/arch/arm/src/imx9/imx9_timerisr.c b/soc/arm/imx9/imx9_timerisr.c similarity index 100% rename from arch/arm/src/imx9/imx9_timerisr.c rename to soc/arm/imx9/imx9_timerisr.c diff --git a/arch/arm/src/imx9/imx9_userspace.c b/soc/arm/imx9/imx9_userspace.c similarity index 100% rename from arch/arm/src/imx9/imx9_userspace.c rename to soc/arm/imx9/imx9_userspace.c diff --git a/arch/arm/src/imx9/imx9_userspace.h b/soc/arm/imx9/imx9_userspace.h similarity index 100% rename from arch/arm/src/imx9/imx9_userspace.h rename to soc/arm/imx9/imx9_userspace.h diff --git a/arch/arm/src/imxrt/CMakeLists.txt b/soc/arm/imxrt/CMakeLists.txt similarity index 100% rename from arch/arm/src/imxrt/CMakeLists.txt rename to soc/arm/imxrt/CMakeLists.txt diff --git a/arch/arm/src/imxrt/Kconfig b/soc/arm/imxrt/Kconfig similarity index 100% rename from arch/arm/src/imxrt/Kconfig rename to soc/arm/imxrt/Kconfig diff --git a/arch/arm/src/imxrt/Make.defs b/soc/arm/imxrt/Make.defs similarity index 100% rename from arch/arm/src/imxrt/Make.defs rename to soc/arm/imxrt/Make.defs diff --git a/arch/arm/src/imxrt/chip.h b/soc/arm/imxrt/chip.h similarity index 100% rename from arch/arm/src/imxrt/chip.h rename to soc/arm/imxrt/chip.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_adc.h b/soc/arm/imxrt/hardware/imxrt_adc.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_adc.h rename to soc/arm/imxrt/hardware/imxrt_adc.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_adc_etc.h b/soc/arm/imxrt/hardware/imxrt_adc_etc.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_adc_etc.h rename to soc/arm/imxrt/hardware/imxrt_adc_etc.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_adc_ver1.h b/soc/arm/imxrt/hardware/imxrt_adc_ver1.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_adc_ver1.h rename to soc/arm/imxrt/hardware/imxrt_adc_ver1.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_adc_ver2.h b/soc/arm/imxrt/hardware/imxrt_adc_ver2.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_adc_ver2.h rename to soc/arm/imxrt/hardware/imxrt_adc_ver2.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_ccm.h b/soc/arm/imxrt/hardware/imxrt_ccm.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_ccm.h rename to soc/arm/imxrt/hardware/imxrt_ccm.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_daisy.h b/soc/arm/imxrt/hardware/imxrt_daisy.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_daisy.h rename to soc/arm/imxrt/hardware/imxrt_daisy.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_dcdc.h b/soc/arm/imxrt/hardware/imxrt_dcdc.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_dcdc.h rename to soc/arm/imxrt/hardware/imxrt_dcdc.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_dmamux.h b/soc/arm/imxrt/hardware/imxrt_dmamux.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_dmamux.h rename to soc/arm/imxrt/hardware/imxrt_dmamux.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_edma.h b/soc/arm/imxrt/hardware/imxrt_edma.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_edma.h rename to soc/arm/imxrt/hardware/imxrt_edma.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_enc.h b/soc/arm/imxrt/hardware/imxrt_enc.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_enc.h rename to soc/arm/imxrt/hardware/imxrt_enc.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_enet.h b/soc/arm/imxrt/hardware/imxrt_enet.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_enet.h rename to soc/arm/imxrt/hardware/imxrt_enet.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_flexcan.h b/soc/arm/imxrt/hardware/imxrt_flexcan.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_flexcan.h rename to soc/arm/imxrt/hardware/imxrt_flexcan.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_flexio.h b/soc/arm/imxrt/hardware/imxrt_flexio.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_flexio.h rename to soc/arm/imxrt/hardware/imxrt_flexio.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_flexpwm.h b/soc/arm/imxrt/hardware/imxrt_flexpwm.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_flexpwm.h rename to soc/arm/imxrt/hardware/imxrt_flexpwm.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_flexspi.h b/soc/arm/imxrt/hardware/imxrt_flexspi.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_flexspi.h rename to soc/arm/imxrt/hardware/imxrt_flexspi.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_gpio.h b/soc/arm/imxrt/hardware/imxrt_gpio.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_gpio.h rename to soc/arm/imxrt/hardware/imxrt_gpio.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_gpt.h b/soc/arm/imxrt/hardware/imxrt_gpt.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_gpt.h rename to soc/arm/imxrt/hardware/imxrt_gpt.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_iomuxc.h b/soc/arm/imxrt/hardware/imxrt_iomuxc.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_iomuxc.h rename to soc/arm/imxrt/hardware/imxrt_iomuxc.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_iomuxc_ver1.h b/soc/arm/imxrt/hardware/imxrt_iomuxc_ver1.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_iomuxc_ver1.h rename to soc/arm/imxrt/hardware/imxrt_iomuxc_ver1.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_iomuxc_ver2.h b/soc/arm/imxrt/hardware/imxrt_iomuxc_ver2.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_iomuxc_ver2.h rename to soc/arm/imxrt/hardware/imxrt_iomuxc_ver2.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_lcd.h b/soc/arm/imxrt/hardware/imxrt_lcd.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_lcd.h rename to soc/arm/imxrt/hardware/imxrt_lcd.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_lpi2c.h b/soc/arm/imxrt/hardware/imxrt_lpi2c.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_lpi2c.h rename to soc/arm/imxrt/hardware/imxrt_lpi2c.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_lpspi.h b/soc/arm/imxrt/hardware/imxrt_lpspi.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_lpspi.h rename to soc/arm/imxrt/hardware/imxrt_lpspi.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_lpuart.h b/soc/arm/imxrt/hardware/imxrt_lpuart.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_lpuart.h rename to soc/arm/imxrt/hardware/imxrt_lpuart.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_memorymap.h b/soc/arm/imxrt/hardware/imxrt_memorymap.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_memorymap.h rename to soc/arm/imxrt/hardware/imxrt_memorymap.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_ocotp.h b/soc/arm/imxrt/hardware/imxrt_ocotp.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_ocotp.h rename to soc/arm/imxrt/hardware/imxrt_ocotp.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_pinmux.h b/soc/arm/imxrt/hardware/imxrt_pinmux.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_pinmux.h rename to soc/arm/imxrt/hardware/imxrt_pinmux.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_pit.h b/soc/arm/imxrt/hardware/imxrt_pit.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_pit.h rename to soc/arm/imxrt/hardware/imxrt_pit.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_snvs.h b/soc/arm/imxrt/hardware/imxrt_snvs.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_snvs.h rename to soc/arm/imxrt/hardware/imxrt_snvs.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_src.h b/soc/arm/imxrt/hardware/imxrt_src.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_src.h rename to soc/arm/imxrt/hardware/imxrt_src.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_tmr.h b/soc/arm/imxrt/hardware/imxrt_tmr.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_tmr.h rename to soc/arm/imxrt/hardware/imxrt_tmr.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_usb_analog.h b/soc/arm/imxrt/hardware/imxrt_usb_analog.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_usb_analog.h rename to soc/arm/imxrt/hardware/imxrt_usb_analog.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_usbotg.h b/soc/arm/imxrt/hardware/imxrt_usbotg.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_usbotg.h rename to soc/arm/imxrt/hardware/imxrt_usbotg.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_usbphy.h b/soc/arm/imxrt/hardware/imxrt_usbphy.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_usbphy.h rename to soc/arm/imxrt/hardware/imxrt_usbphy.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_usdhc.h b/soc/arm/imxrt/hardware/imxrt_usdhc.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_usdhc.h rename to soc/arm/imxrt/hardware/imxrt_usdhc.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_wdog.h b/soc/arm/imxrt/hardware/imxrt_wdog.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_wdog.h rename to soc/arm/imxrt/hardware/imxrt_wdog.h diff --git a/arch/arm/src/imxrt/hardware/imxrt_xbar.h b/soc/arm/imxrt/hardware/imxrt_xbar.h similarity index 100% rename from arch/arm/src/imxrt/hardware/imxrt_xbar.h rename to soc/arm/imxrt/hardware/imxrt_xbar.h diff --git a/arch/arm/src/imxrt/hardware/rt102x/imxrt102x_ccm.h b/soc/arm/imxrt/hardware/rt102x/imxrt102x_ccm.h similarity index 100% rename from arch/arm/src/imxrt/hardware/rt102x/imxrt102x_ccm.h rename to soc/arm/imxrt/hardware/rt102x/imxrt102x_ccm.h diff --git a/arch/arm/src/imxrt/hardware/rt102x/imxrt102x_dmamux.h b/soc/arm/imxrt/hardware/rt102x/imxrt102x_dmamux.h similarity index 100% rename from arch/arm/src/imxrt/hardware/rt102x/imxrt102x_dmamux.h rename to soc/arm/imxrt/hardware/rt102x/imxrt102x_dmamux.h diff --git a/arch/arm/src/imxrt/hardware/rt102x/imxrt102x_gpio.h b/soc/arm/imxrt/hardware/rt102x/imxrt102x_gpio.h similarity index 100% rename from arch/arm/src/imxrt/hardware/rt102x/imxrt102x_gpio.h rename to soc/arm/imxrt/hardware/rt102x/imxrt102x_gpio.h diff --git a/arch/arm/src/imxrt/hardware/rt102x/imxrt102x_iomuxc.h b/soc/arm/imxrt/hardware/rt102x/imxrt102x_iomuxc.h similarity index 100% rename from arch/arm/src/imxrt/hardware/rt102x/imxrt102x_iomuxc.h rename to soc/arm/imxrt/hardware/rt102x/imxrt102x_iomuxc.h diff --git a/arch/arm/src/imxrt/hardware/rt102x/imxrt102x_memorymap.h b/soc/arm/imxrt/hardware/rt102x/imxrt102x_memorymap.h similarity index 100% rename from arch/arm/src/imxrt/hardware/rt102x/imxrt102x_memorymap.h rename to soc/arm/imxrt/hardware/rt102x/imxrt102x_memorymap.h diff --git a/arch/arm/src/imxrt/hardware/rt102x/imxrt102x_pinmux.h b/soc/arm/imxrt/hardware/rt102x/imxrt102x_pinmux.h similarity index 100% rename from arch/arm/src/imxrt/hardware/rt102x/imxrt102x_pinmux.h rename to soc/arm/imxrt/hardware/rt102x/imxrt102x_pinmux.h diff --git a/arch/arm/src/imxrt/hardware/rt102x/imxrt102x_xbar.h b/soc/arm/imxrt/hardware/rt102x/imxrt102x_xbar.h similarity index 100% rename from arch/arm/src/imxrt/hardware/rt102x/imxrt102x_xbar.h rename to soc/arm/imxrt/hardware/rt102x/imxrt102x_xbar.h diff --git a/arch/arm/src/imxrt/hardware/rt105x/imxrt105x_ccm.h b/soc/arm/imxrt/hardware/rt105x/imxrt105x_ccm.h similarity index 100% rename from arch/arm/src/imxrt/hardware/rt105x/imxrt105x_ccm.h rename to soc/arm/imxrt/hardware/rt105x/imxrt105x_ccm.h diff --git a/arch/arm/src/imxrt/hardware/rt105x/imxrt105x_dmamux.h b/soc/arm/imxrt/hardware/rt105x/imxrt105x_dmamux.h similarity index 100% rename from arch/arm/src/imxrt/hardware/rt105x/imxrt105x_dmamux.h rename to soc/arm/imxrt/hardware/rt105x/imxrt105x_dmamux.h diff --git a/arch/arm/src/imxrt/hardware/rt105x/imxrt105x_gpio.h b/soc/arm/imxrt/hardware/rt105x/imxrt105x_gpio.h similarity index 100% rename from arch/arm/src/imxrt/hardware/rt105x/imxrt105x_gpio.h rename to soc/arm/imxrt/hardware/rt105x/imxrt105x_gpio.h diff --git a/arch/arm/src/imxrt/hardware/rt105x/imxrt105x_iomuxc.h b/soc/arm/imxrt/hardware/rt105x/imxrt105x_iomuxc.h similarity index 100% rename from arch/arm/src/imxrt/hardware/rt105x/imxrt105x_iomuxc.h rename to soc/arm/imxrt/hardware/rt105x/imxrt105x_iomuxc.h diff --git a/arch/arm/src/imxrt/hardware/rt105x/imxrt105x_memorymap.h b/soc/arm/imxrt/hardware/rt105x/imxrt105x_memorymap.h similarity index 100% rename from arch/arm/src/imxrt/hardware/rt105x/imxrt105x_memorymap.h rename to soc/arm/imxrt/hardware/rt105x/imxrt105x_memorymap.h diff --git a/arch/arm/src/imxrt/hardware/rt105x/imxrt105x_pinmux.h b/soc/arm/imxrt/hardware/rt105x/imxrt105x_pinmux.h similarity index 100% rename from arch/arm/src/imxrt/hardware/rt105x/imxrt105x_pinmux.h rename to soc/arm/imxrt/hardware/rt105x/imxrt105x_pinmux.h diff --git a/arch/arm/src/imxrt/hardware/rt105x/imxrt105x_xbar.h b/soc/arm/imxrt/hardware/rt105x/imxrt105x_xbar.h similarity index 100% rename from arch/arm/src/imxrt/hardware/rt105x/imxrt105x_xbar.h rename to soc/arm/imxrt/hardware/rt105x/imxrt105x_xbar.h diff --git a/arch/arm/src/imxrt/hardware/rt106x/imxrt106x_ccm.h b/soc/arm/imxrt/hardware/rt106x/imxrt106x_ccm.h similarity index 100% rename from arch/arm/src/imxrt/hardware/rt106x/imxrt106x_ccm.h rename to soc/arm/imxrt/hardware/rt106x/imxrt106x_ccm.h diff --git a/arch/arm/src/imxrt/hardware/rt106x/imxrt106x_dmamux.h b/soc/arm/imxrt/hardware/rt106x/imxrt106x_dmamux.h similarity index 100% rename from arch/arm/src/imxrt/hardware/rt106x/imxrt106x_dmamux.h rename to soc/arm/imxrt/hardware/rt106x/imxrt106x_dmamux.h diff --git a/arch/arm/src/imxrt/hardware/rt106x/imxrt106x_gpio.h b/soc/arm/imxrt/hardware/rt106x/imxrt106x_gpio.h similarity index 100% rename from arch/arm/src/imxrt/hardware/rt106x/imxrt106x_gpio.h rename to soc/arm/imxrt/hardware/rt106x/imxrt106x_gpio.h diff --git a/arch/arm/src/imxrt/hardware/rt106x/imxrt106x_iomuxc.h b/soc/arm/imxrt/hardware/rt106x/imxrt106x_iomuxc.h similarity index 100% rename from arch/arm/src/imxrt/hardware/rt106x/imxrt106x_iomuxc.h rename to soc/arm/imxrt/hardware/rt106x/imxrt106x_iomuxc.h diff --git a/arch/arm/src/imxrt/hardware/rt106x/imxrt106x_memorymap.h b/soc/arm/imxrt/hardware/rt106x/imxrt106x_memorymap.h similarity index 100% rename from arch/arm/src/imxrt/hardware/rt106x/imxrt106x_memorymap.h rename to soc/arm/imxrt/hardware/rt106x/imxrt106x_memorymap.h diff --git a/arch/arm/src/imxrt/hardware/rt106x/imxrt106x_pinmux.h b/soc/arm/imxrt/hardware/rt106x/imxrt106x_pinmux.h similarity index 100% rename from arch/arm/src/imxrt/hardware/rt106x/imxrt106x_pinmux.h rename to soc/arm/imxrt/hardware/rt106x/imxrt106x_pinmux.h diff --git a/arch/arm/src/imxrt/hardware/rt106x/imxrt106x_xbar.h b/soc/arm/imxrt/hardware/rt106x/imxrt106x_xbar.h similarity index 100% rename from arch/arm/src/imxrt/hardware/rt106x/imxrt106x_xbar.h rename to soc/arm/imxrt/hardware/rt106x/imxrt106x_xbar.h diff --git a/arch/arm/src/imxrt/hardware/rt117x/imxrt117x_anadig.h b/soc/arm/imxrt/hardware/rt117x/imxrt117x_anadig.h similarity index 100% rename from arch/arm/src/imxrt/hardware/rt117x/imxrt117x_anadig.h rename to soc/arm/imxrt/hardware/rt117x/imxrt117x_anadig.h diff --git a/arch/arm/src/imxrt/hardware/rt117x/imxrt117x_ccm.h b/soc/arm/imxrt/hardware/rt117x/imxrt117x_ccm.h similarity index 100% rename from arch/arm/src/imxrt/hardware/rt117x/imxrt117x_ccm.h rename to soc/arm/imxrt/hardware/rt117x/imxrt117x_ccm.h diff --git a/arch/arm/src/imxrt/hardware/rt117x/imxrt117x_dcdc.h b/soc/arm/imxrt/hardware/rt117x/imxrt117x_dcdc.h similarity index 100% rename from arch/arm/src/imxrt/hardware/rt117x/imxrt117x_dcdc.h rename to soc/arm/imxrt/hardware/rt117x/imxrt117x_dcdc.h diff --git a/arch/arm/src/imxrt/hardware/rt117x/imxrt117x_dmamux.h b/soc/arm/imxrt/hardware/rt117x/imxrt117x_dmamux.h similarity index 100% rename from arch/arm/src/imxrt/hardware/rt117x/imxrt117x_dmamux.h rename to soc/arm/imxrt/hardware/rt117x/imxrt117x_dmamux.h diff --git a/arch/arm/src/imxrt/hardware/rt117x/imxrt117x_gpc.h b/soc/arm/imxrt/hardware/rt117x/imxrt117x_gpc.h similarity index 100% rename from arch/arm/src/imxrt/hardware/rt117x/imxrt117x_gpc.h rename to soc/arm/imxrt/hardware/rt117x/imxrt117x_gpc.h diff --git a/arch/arm/src/imxrt/hardware/rt117x/imxrt117x_gpio.h b/soc/arm/imxrt/hardware/rt117x/imxrt117x_gpio.h similarity index 100% rename from arch/arm/src/imxrt/hardware/rt117x/imxrt117x_gpio.h rename to soc/arm/imxrt/hardware/rt117x/imxrt117x_gpio.h diff --git a/arch/arm/src/imxrt/hardware/rt117x/imxrt117x_iomuxc.h b/soc/arm/imxrt/hardware/rt117x/imxrt117x_iomuxc.h similarity index 100% rename from arch/arm/src/imxrt/hardware/rt117x/imxrt117x_iomuxc.h rename to soc/arm/imxrt/hardware/rt117x/imxrt117x_iomuxc.h diff --git a/arch/arm/src/imxrt/hardware/rt117x/imxrt117x_memorymap.h b/soc/arm/imxrt/hardware/rt117x/imxrt117x_memorymap.h similarity index 100% rename from arch/arm/src/imxrt/hardware/rt117x/imxrt117x_memorymap.h rename to soc/arm/imxrt/hardware/rt117x/imxrt117x_memorymap.h diff --git a/arch/arm/src/imxrt/hardware/rt117x/imxrt117x_ocotp.h b/soc/arm/imxrt/hardware/rt117x/imxrt117x_ocotp.h similarity index 100% rename from arch/arm/src/imxrt/hardware/rt117x/imxrt117x_ocotp.h rename to soc/arm/imxrt/hardware/rt117x/imxrt117x_ocotp.h diff --git a/arch/arm/src/imxrt/hardware/rt117x/imxrt117x_osc.h b/soc/arm/imxrt/hardware/rt117x/imxrt117x_osc.h similarity index 100% rename from arch/arm/src/imxrt/hardware/rt117x/imxrt117x_osc.h rename to soc/arm/imxrt/hardware/rt117x/imxrt117x_osc.h diff --git a/arch/arm/src/imxrt/hardware/rt117x/imxrt117x_pinmux.h b/soc/arm/imxrt/hardware/rt117x/imxrt117x_pinmux.h similarity index 100% rename from arch/arm/src/imxrt/hardware/rt117x/imxrt117x_pinmux.h rename to soc/arm/imxrt/hardware/rt117x/imxrt117x_pinmux.h diff --git a/arch/arm/src/imxrt/hardware/rt117x/imxrt117x_pll.h b/soc/arm/imxrt/hardware/rt117x/imxrt117x_pll.h similarity index 100% rename from arch/arm/src/imxrt/hardware/rt117x/imxrt117x_pll.h rename to soc/arm/imxrt/hardware/rt117x/imxrt117x_pll.h diff --git a/arch/arm/src/imxrt/hardware/rt117x/imxrt117x_pmu.h b/soc/arm/imxrt/hardware/rt117x/imxrt117x_pmu.h similarity index 100% rename from arch/arm/src/imxrt/hardware/rt117x/imxrt117x_pmu.h rename to soc/arm/imxrt/hardware/rt117x/imxrt117x_pmu.h diff --git a/arch/arm/src/imxrt/hardware/rt117x/imxrt117x_snvs.h b/soc/arm/imxrt/hardware/rt117x/imxrt117x_snvs.h similarity index 100% rename from arch/arm/src/imxrt/hardware/rt117x/imxrt117x_snvs.h rename to soc/arm/imxrt/hardware/rt117x/imxrt117x_snvs.h diff --git a/arch/arm/src/imxrt/hardware/rt117x/imxrt117x_xbar.h b/soc/arm/imxrt/hardware/rt117x/imxrt117x_xbar.h similarity index 100% rename from arch/arm/src/imxrt/hardware/rt117x/imxrt117x_xbar.h rename to soc/arm/imxrt/hardware/rt117x/imxrt117x_xbar.h diff --git a/arch/arm/src/imxrt/imxrt102x_daisy.c b/soc/arm/imxrt/imxrt102x_daisy.c similarity index 100% rename from arch/arm/src/imxrt/imxrt102x_daisy.c rename to soc/arm/imxrt/imxrt102x_daisy.c diff --git a/arch/arm/src/imxrt/imxrt102x_gpio.c b/soc/arm/imxrt/imxrt102x_gpio.c similarity index 100% rename from arch/arm/src/imxrt/imxrt102x_gpio.c rename to soc/arm/imxrt/imxrt102x_gpio.c diff --git a/arch/arm/src/imxrt/imxrt105x_daisy.c b/soc/arm/imxrt/imxrt105x_daisy.c similarity index 100% rename from arch/arm/src/imxrt/imxrt105x_daisy.c rename to soc/arm/imxrt/imxrt105x_daisy.c diff --git a/arch/arm/src/imxrt/imxrt105x_gpio.c b/soc/arm/imxrt/imxrt105x_gpio.c similarity index 100% rename from arch/arm/src/imxrt/imxrt105x_gpio.c rename to soc/arm/imxrt/imxrt105x_gpio.c diff --git a/arch/arm/src/imxrt/imxrt106x_daisy.c b/soc/arm/imxrt/imxrt106x_daisy.c similarity index 100% rename from arch/arm/src/imxrt/imxrt106x_daisy.c rename to soc/arm/imxrt/imxrt106x_daisy.c diff --git a/arch/arm/src/imxrt/imxrt106x_flash.c b/soc/arm/imxrt/imxrt106x_flash.c similarity index 100% rename from arch/arm/src/imxrt/imxrt106x_flash.c rename to soc/arm/imxrt/imxrt106x_flash.c diff --git a/arch/arm/src/imxrt/imxrt106x_gpio.c b/soc/arm/imxrt/imxrt106x_gpio.c similarity index 100% rename from arch/arm/src/imxrt/imxrt106x_gpio.c rename to soc/arm/imxrt/imxrt106x_gpio.c diff --git a/arch/arm/src/imxrt/imxrt117x_daisy.c b/soc/arm/imxrt/imxrt117x_daisy.c similarity index 100% rename from arch/arm/src/imxrt/imxrt117x_daisy.c rename to soc/arm/imxrt/imxrt117x_daisy.c diff --git a/arch/arm/src/imxrt/imxrt117x_gpio.c b/soc/arm/imxrt/imxrt117x_gpio.c similarity index 100% rename from arch/arm/src/imxrt/imxrt117x_gpio.c rename to soc/arm/imxrt/imxrt117x_gpio.c diff --git a/arch/arm/src/imxrt/imxrt_adc.h b/soc/arm/imxrt/imxrt_adc.h similarity index 100% rename from arch/arm/src/imxrt/imxrt_adc.h rename to soc/arm/imxrt/imxrt_adc.h diff --git a/arch/arm/src/imxrt/imxrt_adc_ver1.c b/soc/arm/imxrt/imxrt_adc_ver1.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_adc_ver1.c rename to soc/arm/imxrt/imxrt_adc_ver1.c diff --git a/arch/arm/src/imxrt/imxrt_adc_ver2.c b/soc/arm/imxrt/imxrt_adc_ver2.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_adc_ver2.c rename to soc/arm/imxrt/imxrt_adc_ver2.c diff --git a/arch/arm/src/imxrt/imxrt_allocateheap.c b/soc/arm/imxrt/imxrt_allocateheap.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_allocateheap.c rename to soc/arm/imxrt/imxrt_allocateheap.c diff --git a/arch/arm/src/imxrt/imxrt_clockconfig.h b/soc/arm/imxrt/imxrt_clockconfig.h similarity index 100% rename from arch/arm/src/imxrt/imxrt_clockconfig.h rename to soc/arm/imxrt/imxrt_clockconfig.h diff --git a/arch/arm/src/imxrt/imxrt_clockconfig_ver1.c b/soc/arm/imxrt/imxrt_clockconfig_ver1.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_clockconfig_ver1.c rename to soc/arm/imxrt/imxrt_clockconfig_ver1.c diff --git a/arch/arm/src/imxrt/imxrt_clockconfig_ver1.h b/soc/arm/imxrt/imxrt_clockconfig_ver1.h similarity index 100% rename from arch/arm/src/imxrt/imxrt_clockconfig_ver1.h rename to soc/arm/imxrt/imxrt_clockconfig_ver1.h diff --git a/arch/arm/src/imxrt/imxrt_clockconfig_ver2.c b/soc/arm/imxrt/imxrt_clockconfig_ver2.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_clockconfig_ver2.c rename to soc/arm/imxrt/imxrt_clockconfig_ver2.c diff --git a/arch/arm/src/imxrt/imxrt_clockconfig_ver2.h b/soc/arm/imxrt/imxrt_clockconfig_ver2.h similarity index 100% rename from arch/arm/src/imxrt/imxrt_clockconfig_ver2.h rename to soc/arm/imxrt/imxrt_clockconfig_ver2.h diff --git a/arch/arm/src/imxrt/imxrt_clrpend.c b/soc/arm/imxrt/imxrt_clrpend.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_clrpend.c rename to soc/arm/imxrt/imxrt_clrpend.c diff --git a/arch/arm/src/imxrt/imxrt_config.h b/soc/arm/imxrt/imxrt_config.h similarity index 100% rename from arch/arm/src/imxrt/imxrt_config.h rename to soc/arm/imxrt/imxrt_config.h diff --git a/arch/arm/src/imxrt/imxrt_daisy.c b/soc/arm/imxrt/imxrt_daisy.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_daisy.c rename to soc/arm/imxrt/imxrt_daisy.c diff --git a/arch/arm/src/imxrt/imxrt_edma.c b/soc/arm/imxrt/imxrt_edma.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_edma.c rename to soc/arm/imxrt/imxrt_edma.c diff --git a/arch/arm/src/imxrt/imxrt_edma.h b/soc/arm/imxrt/imxrt_edma.h similarity index 100% rename from arch/arm/src/imxrt/imxrt_edma.h rename to soc/arm/imxrt/imxrt_edma.h diff --git a/arch/arm/src/imxrt/imxrt_ehci.c b/soc/arm/imxrt/imxrt_ehci.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_ehci.c rename to soc/arm/imxrt/imxrt_ehci.c diff --git a/arch/arm/src/imxrt/imxrt_ehci.h b/soc/arm/imxrt/imxrt_ehci.h similarity index 100% rename from arch/arm/src/imxrt/imxrt_ehci.h rename to soc/arm/imxrt/imxrt_ehci.h diff --git a/arch/arm/src/imxrt/imxrt_enc.c b/soc/arm/imxrt/imxrt_enc.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_enc.c rename to soc/arm/imxrt/imxrt_enc.c diff --git a/arch/arm/src/imxrt/imxrt_enc.h b/soc/arm/imxrt/imxrt_enc.h similarity index 100% rename from arch/arm/src/imxrt/imxrt_enc.h rename to soc/arm/imxrt/imxrt_enc.h diff --git a/arch/arm/src/imxrt/imxrt_enet.c b/soc/arm/imxrt/imxrt_enet.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_enet.c rename to soc/arm/imxrt/imxrt_enet.c diff --git a/arch/arm/src/imxrt/imxrt_enet.h b/soc/arm/imxrt/imxrt_enet.h similarity index 100% rename from arch/arm/src/imxrt/imxrt_enet.h rename to soc/arm/imxrt/imxrt_enet.h diff --git a/arch/arm/src/imxrt/imxrt_flash.c b/soc/arm/imxrt/imxrt_flash.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_flash.c rename to soc/arm/imxrt/imxrt_flash.c diff --git a/arch/arm/src/imxrt/imxrt_flexcan.c b/soc/arm/imxrt/imxrt_flexcan.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_flexcan.c rename to soc/arm/imxrt/imxrt_flexcan.c diff --git a/arch/arm/src/imxrt/imxrt_flexcan.h b/soc/arm/imxrt/imxrt_flexcan.h similarity index 100% rename from arch/arm/src/imxrt/imxrt_flexcan.h rename to soc/arm/imxrt/imxrt_flexcan.h diff --git a/arch/arm/src/imxrt/imxrt_flexio.c b/soc/arm/imxrt/imxrt_flexio.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_flexio.c rename to soc/arm/imxrt/imxrt_flexio.c diff --git a/arch/arm/src/imxrt/imxrt_flexio.h b/soc/arm/imxrt/imxrt_flexio.h similarity index 100% rename from arch/arm/src/imxrt/imxrt_flexio.h rename to soc/arm/imxrt/imxrt_flexio.h diff --git a/arch/arm/src/imxrt/imxrt_flexpwm.c b/soc/arm/imxrt/imxrt_flexpwm.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_flexpwm.c rename to soc/arm/imxrt/imxrt_flexpwm.c diff --git a/arch/arm/src/imxrt/imxrt_flexpwm.h b/soc/arm/imxrt/imxrt_flexpwm.h similarity index 100% rename from arch/arm/src/imxrt/imxrt_flexpwm.h rename to soc/arm/imxrt/imxrt_flexpwm.h diff --git a/arch/arm/src/imxrt/imxrt_flexspi.c b/soc/arm/imxrt/imxrt_flexspi.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_flexspi.c rename to soc/arm/imxrt/imxrt_flexspi.c diff --git a/arch/arm/src/imxrt/imxrt_flexspi.h b/soc/arm/imxrt/imxrt_flexspi.h similarity index 100% rename from arch/arm/src/imxrt/imxrt_flexspi.h rename to soc/arm/imxrt/imxrt_flexspi.h diff --git a/arch/arm/src/imxrt/imxrt_gpio.c b/soc/arm/imxrt/imxrt_gpio.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_gpio.c rename to soc/arm/imxrt/imxrt_gpio.c diff --git a/arch/arm/src/imxrt/imxrt_gpio.h b/soc/arm/imxrt/imxrt_gpio.h similarity index 100% rename from arch/arm/src/imxrt/imxrt_gpio.h rename to soc/arm/imxrt/imxrt_gpio.h diff --git a/arch/arm/src/imxrt/imxrt_gpioirq.c b/soc/arm/imxrt/imxrt_gpioirq.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_gpioirq.c rename to soc/arm/imxrt/imxrt_gpioirq.c diff --git a/arch/arm/src/imxrt/imxrt_hprtc.c b/soc/arm/imxrt/imxrt_hprtc.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_hprtc.c rename to soc/arm/imxrt/imxrt_hprtc.c diff --git a/arch/arm/src/imxrt/imxrt_hprtc.h b/soc/arm/imxrt/imxrt_hprtc.h similarity index 100% rename from arch/arm/src/imxrt/imxrt_hprtc.h rename to soc/arm/imxrt/imxrt_hprtc.h diff --git a/arch/arm/src/imxrt/imxrt_idle.c b/soc/arm/imxrt/imxrt_idle.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_idle.c rename to soc/arm/imxrt/imxrt_idle.c diff --git a/arch/arm/src/imxrt/imxrt_iomuxc.h b/soc/arm/imxrt/imxrt_iomuxc.h similarity index 100% rename from arch/arm/src/imxrt/imxrt_iomuxc.h rename to soc/arm/imxrt/imxrt_iomuxc.h diff --git a/arch/arm/src/imxrt/imxrt_iomuxc_ver1.c b/soc/arm/imxrt/imxrt_iomuxc_ver1.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_iomuxc_ver1.c rename to soc/arm/imxrt/imxrt_iomuxc_ver1.c diff --git a/arch/arm/src/imxrt/imxrt_iomuxc_ver1.h b/soc/arm/imxrt/imxrt_iomuxc_ver1.h similarity index 100% rename from arch/arm/src/imxrt/imxrt_iomuxc_ver1.h rename to soc/arm/imxrt/imxrt_iomuxc_ver1.h diff --git a/arch/arm/src/imxrt/imxrt_iomuxc_ver2.c b/soc/arm/imxrt/imxrt_iomuxc_ver2.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_iomuxc_ver2.c rename to soc/arm/imxrt/imxrt_iomuxc_ver2.c diff --git a/arch/arm/src/imxrt/imxrt_iomuxc_ver2.h b/soc/arm/imxrt/imxrt_iomuxc_ver2.h similarity index 100% rename from arch/arm/src/imxrt/imxrt_iomuxc_ver2.h rename to soc/arm/imxrt/imxrt_iomuxc_ver2.h diff --git a/arch/arm/src/imxrt/imxrt_irq.c b/soc/arm/imxrt/imxrt_irq.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_irq.c rename to soc/arm/imxrt/imxrt_irq.c diff --git a/arch/arm/src/imxrt/imxrt_irq.h b/soc/arm/imxrt/imxrt_irq.h similarity index 100% rename from arch/arm/src/imxrt/imxrt_irq.h rename to soc/arm/imxrt/imxrt_irq.h diff --git a/arch/arm/src/imxrt/imxrt_lcd.c b/soc/arm/imxrt/imxrt_lcd.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_lcd.c rename to soc/arm/imxrt/imxrt_lcd.c diff --git a/arch/arm/src/imxrt/imxrt_lcd.h b/soc/arm/imxrt/imxrt_lcd.h similarity index 100% rename from arch/arm/src/imxrt/imxrt_lcd.h rename to soc/arm/imxrt/imxrt_lcd.h diff --git a/arch/arm/src/imxrt/imxrt_lowputc.c b/soc/arm/imxrt/imxrt_lowputc.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_lowputc.c rename to soc/arm/imxrt/imxrt_lowputc.c diff --git a/arch/arm/src/imxrt/imxrt_lowputc.h b/soc/arm/imxrt/imxrt_lowputc.h similarity index 100% rename from arch/arm/src/imxrt/imxrt_lowputc.h rename to soc/arm/imxrt/imxrt_lowputc.h diff --git a/arch/arm/src/imxrt/imxrt_lpi2c.c b/soc/arm/imxrt/imxrt_lpi2c.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_lpi2c.c rename to soc/arm/imxrt/imxrt_lpi2c.c diff --git a/arch/arm/src/imxrt/imxrt_lpi2c.h b/soc/arm/imxrt/imxrt_lpi2c.h similarity index 100% rename from arch/arm/src/imxrt/imxrt_lpi2c.h rename to soc/arm/imxrt/imxrt_lpi2c.h diff --git a/arch/arm/src/imxrt/imxrt_lpspi.c b/soc/arm/imxrt/imxrt_lpspi.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_lpspi.c rename to soc/arm/imxrt/imxrt_lpspi.c diff --git a/arch/arm/src/imxrt/imxrt_lpspi.h b/soc/arm/imxrt/imxrt_lpspi.h similarity index 100% rename from arch/arm/src/imxrt/imxrt_lpspi.h rename to soc/arm/imxrt/imxrt_lpspi.h diff --git a/arch/arm/src/imxrt/imxrt_lpsrtc.c b/soc/arm/imxrt/imxrt_lpsrtc.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_lpsrtc.c rename to soc/arm/imxrt/imxrt_lpsrtc.c diff --git a/arch/arm/src/imxrt/imxrt_lpsrtc.h b/soc/arm/imxrt/imxrt_lpsrtc.h similarity index 100% rename from arch/arm/src/imxrt/imxrt_lpsrtc.h rename to soc/arm/imxrt/imxrt_lpsrtc.h diff --git a/arch/arm/src/imxrt/imxrt_mpuinit.c b/soc/arm/imxrt/imxrt_mpuinit.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_mpuinit.c rename to soc/arm/imxrt/imxrt_mpuinit.c diff --git a/arch/arm/src/imxrt/imxrt_mpuinit.h b/soc/arm/imxrt/imxrt_mpuinit.h similarity index 100% rename from arch/arm/src/imxrt/imxrt_mpuinit.h rename to soc/arm/imxrt/imxrt_mpuinit.h diff --git a/arch/arm/src/imxrt/imxrt_ocotp.c b/soc/arm/imxrt/imxrt_ocotp.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_ocotp.c rename to soc/arm/imxrt/imxrt_ocotp.c diff --git a/arch/arm/src/imxrt/imxrt_ocotp.h b/soc/arm/imxrt/imxrt_ocotp.h similarity index 100% rename from arch/arm/src/imxrt/imxrt_ocotp.h rename to soc/arm/imxrt/imxrt_ocotp.h diff --git a/arch/arm/src/imxrt/imxrt_periphclks.c b/soc/arm/imxrt/imxrt_periphclks.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_periphclks.c rename to soc/arm/imxrt/imxrt_periphclks.c diff --git a/arch/arm/src/imxrt/imxrt_periphclks.h b/soc/arm/imxrt/imxrt_periphclks.h similarity index 100% rename from arch/arm/src/imxrt/imxrt_periphclks.h rename to soc/arm/imxrt/imxrt_periphclks.h diff --git a/arch/arm/src/imxrt/imxrt_pmu.c b/soc/arm/imxrt/imxrt_pmu.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_pmu.c rename to soc/arm/imxrt/imxrt_pmu.c diff --git a/arch/arm/src/imxrt/imxrt_pmu.h b/soc/arm/imxrt/imxrt_pmu.h similarity index 100% rename from arch/arm/src/imxrt/imxrt_pmu.h rename to soc/arm/imxrt/imxrt_pmu.h diff --git a/arch/arm/src/imxrt/imxrt_rtc_lowerhalf.c b/soc/arm/imxrt/imxrt_rtc_lowerhalf.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_rtc_lowerhalf.c rename to soc/arm/imxrt/imxrt_rtc_lowerhalf.c diff --git a/arch/arm/src/imxrt/imxrt_serial.c b/soc/arm/imxrt/imxrt_serial.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_serial.c rename to soc/arm/imxrt/imxrt_serial.c diff --git a/arch/arm/src/imxrt/imxrt_serial.h b/soc/arm/imxrt/imxrt_serial.h similarity index 100% rename from arch/arm/src/imxrt/imxrt_serial.h rename to soc/arm/imxrt/imxrt_serial.h diff --git a/arch/arm/src/imxrt/imxrt_start.c b/soc/arm/imxrt/imxrt_start.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_start.c rename to soc/arm/imxrt/imxrt_start.c diff --git a/arch/arm/src/imxrt/imxrt_start.h b/soc/arm/imxrt/imxrt_start.h similarity index 100% rename from arch/arm/src/imxrt/imxrt_start.h rename to soc/arm/imxrt/imxrt_start.h diff --git a/arch/arm/src/imxrt/imxrt_tickless.c b/soc/arm/imxrt/imxrt_tickless.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_tickless.c rename to soc/arm/imxrt/imxrt_tickless.c diff --git a/arch/arm/src/imxrt/imxrt_timerisr.c b/soc/arm/imxrt/imxrt_timerisr.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_timerisr.c rename to soc/arm/imxrt/imxrt_timerisr.c diff --git a/arch/arm/src/imxrt/imxrt_usbdev.c b/soc/arm/imxrt/imxrt_usbdev.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_usbdev.c rename to soc/arm/imxrt/imxrt_usbdev.c diff --git a/arch/arm/src/imxrt/imxrt_usdhc.c b/soc/arm/imxrt/imxrt_usdhc.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_usdhc.c rename to soc/arm/imxrt/imxrt_usdhc.c diff --git a/arch/arm/src/imxrt/imxrt_usdhc.h b/soc/arm/imxrt/imxrt_usdhc.h similarity index 100% rename from arch/arm/src/imxrt/imxrt_usdhc.h rename to soc/arm/imxrt/imxrt_usdhc.h diff --git a/arch/arm/src/imxrt/imxrt_userspace.c b/soc/arm/imxrt/imxrt_userspace.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_userspace.c rename to soc/arm/imxrt/imxrt_userspace.c diff --git a/arch/arm/src/imxrt/imxrt_userspace.h b/soc/arm/imxrt/imxrt_userspace.h similarity index 100% rename from arch/arm/src/imxrt/imxrt_userspace.h rename to soc/arm/imxrt/imxrt_userspace.h diff --git a/arch/arm/src/imxrt/imxrt_wdog.c b/soc/arm/imxrt/imxrt_wdog.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_wdog.c rename to soc/arm/imxrt/imxrt_wdog.c diff --git a/arch/arm/src/imxrt/imxrt_wdog.h b/soc/arm/imxrt/imxrt_wdog.h similarity index 100% rename from arch/arm/src/imxrt/imxrt_wdog.h rename to soc/arm/imxrt/imxrt_wdog.h diff --git a/arch/arm/src/imxrt/imxrt_xbar.c b/soc/arm/imxrt/imxrt_xbar.c similarity index 100% rename from arch/arm/src/imxrt/imxrt_xbar.c rename to soc/arm/imxrt/imxrt_xbar.c diff --git a/arch/arm/src/imxrt/imxrt_xbar.h b/soc/arm/imxrt/imxrt_xbar.h similarity index 100% rename from arch/arm/src/imxrt/imxrt_xbar.h rename to soc/arm/imxrt/imxrt_xbar.h diff --git a/arch/arm/include/.gitignore b/soc/arm/include/.gitignore similarity index 100% rename from arch/arm/include/.gitignore rename to soc/arm/include/.gitignore diff --git a/arch/arm/include/a1x/a10_irq.h b/soc/arm/include/a1x/a10_irq.h similarity index 100% rename from arch/arm/include/a1x/a10_irq.h rename to soc/arm/include/a1x/a10_irq.h diff --git a/arch/arm/include/a1x/chip.h b/soc/arm/include/a1x/chip.h similarity index 100% rename from arch/arm/include/a1x/chip.h rename to soc/arm/include/a1x/chip.h diff --git a/arch/arm/include/a1x/irq.h b/soc/arm/include/a1x/irq.h similarity index 100% rename from arch/arm/include/a1x/irq.h rename to soc/arm/include/a1x/irq.h diff --git a/arch/arm/include/am335x/am335x_irq.h b/soc/arm/include/am335x/am335x_irq.h similarity index 100% rename from arch/arm/include/am335x/am335x_irq.h rename to soc/arm/include/am335x/am335x_irq.h diff --git a/arch/arm/include/am335x/chip.h b/soc/arm/include/am335x/chip.h similarity index 100% rename from arch/arm/include/am335x/chip.h rename to soc/arm/include/am335x/chip.h diff --git a/arch/arm/include/am335x/irq.h b/soc/arm/include/am335x/irq.h similarity index 100% rename from arch/arm/include/am335x/irq.h rename to soc/arm/include/am335x/irq.h diff --git a/arch/arm/include/at32/at32f43xxx_irq.h b/soc/arm/include/at32/at32f43xxx_irq.h similarity index 100% rename from arch/arm/include/at32/at32f43xxx_irq.h rename to soc/arm/include/at32/at32f43xxx_irq.h diff --git a/arch/arm/include/at32/chip.h b/soc/arm/include/at32/chip.h similarity index 100% rename from arch/arm/include/at32/chip.h rename to soc/arm/include/at32/chip.h diff --git a/arch/arm/include/at32/irq.h b/soc/arm/include/at32/irq.h similarity index 100% rename from arch/arm/include/at32/irq.h rename to soc/arm/include/at32/irq.h diff --git a/arch/arm/include/c5471/irq.h b/soc/arm/include/c5471/irq.h similarity index 100% rename from arch/arm/include/c5471/irq.h rename to soc/arm/include/c5471/irq.h diff --git a/arch/arm/include/csk6/chip.h b/soc/arm/include/csk6/chip.h similarity index 100% rename from arch/arm/include/csk6/chip.h rename to soc/arm/include/csk6/chip.h diff --git a/arch/arm/include/csk6/irq.h b/soc/arm/include/csk6/irq.h similarity index 100% rename from arch/arm/include/csk6/irq.h rename to soc/arm/include/csk6/irq.h diff --git a/arch/arm/include/cxd32xx/chip.h b/soc/arm/include/cxd32xx/chip.h similarity index 100% rename from arch/arm/include/cxd32xx/chip.h rename to soc/arm/include/cxd32xx/chip.h diff --git a/arch/arm/include/cxd32xx/irq.h b/soc/arm/include/cxd32xx/irq.h similarity index 100% rename from arch/arm/include/cxd32xx/irq.h rename to soc/arm/include/cxd32xx/irq.h diff --git a/arch/arm/include/cxd56xx/adc.h b/soc/arm/include/cxd56xx/adc.h similarity index 100% rename from arch/arm/include/cxd56xx/adc.h rename to soc/arm/include/cxd56xx/adc.h diff --git a/arch/arm/include/cxd56xx/audio.h b/soc/arm/include/cxd56xx/audio.h similarity index 100% rename from arch/arm/include/cxd56xx/audio.h rename to soc/arm/include/cxd56xx/audio.h diff --git a/arch/arm/include/cxd56xx/backuplog.h b/soc/arm/include/cxd56xx/backuplog.h similarity index 100% rename from arch/arm/include/cxd56xx/backuplog.h rename to soc/arm/include/cxd56xx/backuplog.h diff --git a/arch/arm/include/cxd56xx/battery_ioctl.h b/soc/arm/include/cxd56xx/battery_ioctl.h similarity index 100% rename from arch/arm/include/cxd56xx/battery_ioctl.h rename to soc/arm/include/cxd56xx/battery_ioctl.h diff --git a/arch/arm/include/cxd56xx/chip.h b/soc/arm/include/cxd56xx/chip.h similarity index 100% rename from arch/arm/include/cxd56xx/chip.h rename to soc/arm/include/cxd56xx/chip.h diff --git a/arch/arm/include/cxd56xx/cisif.h b/soc/arm/include/cxd56xx/cisif.h similarity index 100% rename from arch/arm/include/cxd56xx/cisif.h rename to soc/arm/include/cxd56xx/cisif.h diff --git a/arch/arm/include/cxd56xx/crashdump.h b/soc/arm/include/cxd56xx/crashdump.h similarity index 100% rename from arch/arm/include/cxd56xx/crashdump.h rename to soc/arm/include/cxd56xx/crashdump.h diff --git a/arch/arm/include/cxd56xx/ge2d.h b/soc/arm/include/cxd56xx/ge2d.h similarity index 100% rename from arch/arm/include/cxd56xx/ge2d.h rename to soc/arm/include/cxd56xx/ge2d.h diff --git a/arch/arm/include/cxd56xx/geofence.h b/soc/arm/include/cxd56xx/geofence.h similarity index 100% rename from arch/arm/include/cxd56xx/geofence.h rename to soc/arm/include/cxd56xx/geofence.h diff --git a/arch/arm/include/cxd56xx/gnss.h b/soc/arm/include/cxd56xx/gnss.h similarity index 100% rename from arch/arm/include/cxd56xx/gnss.h rename to soc/arm/include/cxd56xx/gnss.h diff --git a/arch/arm/include/cxd56xx/gnss_type.h b/soc/arm/include/cxd56xx/gnss_type.h similarity index 100% rename from arch/arm/include/cxd56xx/gnss_type.h rename to soc/arm/include/cxd56xx/gnss_type.h diff --git a/arch/arm/include/cxd56xx/gnssram.h b/soc/arm/include/cxd56xx/gnssram.h similarity index 100% rename from arch/arm/include/cxd56xx/gnssram.h rename to soc/arm/include/cxd56xx/gnssram.h diff --git a/arch/arm/include/cxd56xx/hostif.h b/soc/arm/include/cxd56xx/hostif.h similarity index 100% rename from arch/arm/include/cxd56xx/hostif.h rename to soc/arm/include/cxd56xx/hostif.h diff --git a/arch/arm/include/cxd56xx/irq.h b/soc/arm/include/cxd56xx/irq.h similarity index 100% rename from arch/arm/include/cxd56xx/irq.h rename to soc/arm/include/cxd56xx/irq.h diff --git a/arch/arm/include/cxd56xx/nxaudio.h b/soc/arm/include/cxd56xx/nxaudio.h similarity index 100% rename from arch/arm/include/cxd56xx/nxaudio.h rename to soc/arm/include/cxd56xx/nxaudio.h diff --git a/arch/arm/include/cxd56xx/pin.h b/soc/arm/include/cxd56xx/pin.h similarity index 100% rename from arch/arm/include/cxd56xx/pin.h rename to soc/arm/include/cxd56xx/pin.h diff --git a/arch/arm/include/cxd56xx/pm.h b/soc/arm/include/cxd56xx/pm.h similarity index 100% rename from arch/arm/include/cxd56xx/pm.h rename to soc/arm/include/cxd56xx/pm.h diff --git a/arch/arm/include/cxd56xx/scu.h b/soc/arm/include/cxd56xx/scu.h similarity index 100% rename from arch/arm/include/cxd56xx/scu.h rename to soc/arm/include/cxd56xx/scu.h diff --git a/arch/arm/include/cxd56xx/timer.h b/soc/arm/include/cxd56xx/timer.h similarity index 100% rename from arch/arm/include/cxd56xx/timer.h rename to soc/arm/include/cxd56xx/timer.h diff --git a/arch/arm/include/cxd56xx/uart0.h b/soc/arm/include/cxd56xx/uart0.h similarity index 100% rename from arch/arm/include/cxd56xx/uart0.h rename to soc/arm/include/cxd56xx/uart0.h diff --git a/arch/arm/include/cxd56xx/usbdev.h b/soc/arm/include/cxd56xx/usbdev.h similarity index 100% rename from arch/arm/include/cxd56xx/usbdev.h rename to soc/arm/include/cxd56xx/usbdev.h diff --git a/arch/arm/include/dm320/irq.h b/soc/arm/include/dm320/irq.h similarity index 100% rename from arch/arm/include/dm320/irq.h rename to soc/arm/include/dm320/irq.h diff --git a/arch/arm/include/efm32/chip.h b/soc/arm/include/efm32/chip.h similarity index 100% rename from arch/arm/include/efm32/chip.h rename to soc/arm/include/efm32/chip.h diff --git a/arch/arm/include/efm32/efm32g_irq.h b/soc/arm/include/efm32/efm32g_irq.h similarity index 100% rename from arch/arm/include/efm32/efm32g_irq.h rename to soc/arm/include/efm32/efm32g_irq.h diff --git a/arch/arm/include/efm32/efm32gg_irq.h b/soc/arm/include/efm32/efm32gg_irq.h similarity index 100% rename from arch/arm/include/efm32/efm32gg_irq.h rename to soc/arm/include/efm32/efm32gg_irq.h diff --git a/arch/arm/include/efm32/efm32tg_irq.h b/soc/arm/include/efm32/efm32tg_irq.h similarity index 100% rename from arch/arm/include/efm32/efm32tg_irq.h rename to soc/arm/include/efm32/efm32tg_irq.h diff --git a/arch/arm/include/efm32/irq.h b/soc/arm/include/efm32/irq.h similarity index 100% rename from arch/arm/include/efm32/irq.h rename to soc/arm/include/efm32/irq.h diff --git a/arch/arm/include/eoss3/chip.h b/soc/arm/include/eoss3/chip.h similarity index 100% rename from arch/arm/include/eoss3/chip.h rename to soc/arm/include/eoss3/chip.h diff --git a/arch/arm/include/eoss3/irq.h b/soc/arm/include/eoss3/irq.h similarity index 100% rename from arch/arm/include/eoss3/irq.h rename to soc/arm/include/eoss3/irq.h diff --git a/arch/arm/include/fvp-v8r-aarch32/chip.h b/soc/arm/include/fvp-v8r-aarch32/chip.h similarity index 100% rename from arch/arm/include/fvp-v8r-aarch32/chip.h rename to soc/arm/include/fvp-v8r-aarch32/chip.h diff --git a/arch/arm/include/fvp-v8r-aarch32/irq.h b/soc/arm/include/fvp-v8r-aarch32/irq.h similarity index 100% rename from arch/arm/include/fvp-v8r-aarch32/irq.h rename to soc/arm/include/fvp-v8r-aarch32/irq.h diff --git a/arch/arm/include/gd32f4/chip.h b/soc/arm/include/gd32f4/chip.h similarity index 100% rename from arch/arm/include/gd32f4/chip.h rename to soc/arm/include/gd32f4/chip.h diff --git a/arch/arm/include/gd32f4/gd32f4xx_irq.h b/soc/arm/include/gd32f4/gd32f4xx_irq.h similarity index 100% rename from arch/arm/include/gd32f4/gd32f4xx_irq.h rename to soc/arm/include/gd32f4/gd32f4xx_irq.h diff --git a/arch/arm/include/gd32f4/irq.h b/soc/arm/include/gd32f4/irq.h similarity index 100% rename from arch/arm/include/gd32f4/irq.h rename to soc/arm/include/gd32f4/irq.h diff --git a/arch/arm/include/goldfish/chip.h b/soc/arm/include/goldfish/chip.h similarity index 100% rename from arch/arm/include/goldfish/chip.h rename to soc/arm/include/goldfish/chip.h diff --git a/arch/arm/include/goldfish/irq.h b/soc/arm/include/goldfish/irq.h similarity index 100% rename from arch/arm/include/goldfish/irq.h rename to soc/arm/include/goldfish/irq.h diff --git a/arch/arm/include/imx1/irq.h b/soc/arm/include/imx1/irq.h similarity index 100% rename from arch/arm/include/imx1/irq.h rename to soc/arm/include/imx1/irq.h diff --git a/arch/arm/include/imx6/chip.h b/soc/arm/include/imx6/chip.h similarity index 100% rename from arch/arm/include/imx6/chip.h rename to soc/arm/include/imx6/chip.h diff --git a/arch/arm/include/imx6/irq.h b/soc/arm/include/imx6/irq.h similarity index 100% rename from arch/arm/include/imx6/irq.h rename to soc/arm/include/imx6/irq.h diff --git a/arch/arm/include/imx9/chip.h b/soc/arm/include/imx9/chip.h similarity index 100% rename from arch/arm/include/imx9/chip.h rename to soc/arm/include/imx9/chip.h diff --git a/arch/arm/include/imx9/imx95_irq.h b/soc/arm/include/imx9/imx95_irq.h similarity index 100% rename from arch/arm/include/imx9/imx95_irq.h rename to soc/arm/include/imx9/imx95_irq.h diff --git a/arch/arm/include/imx9/irq.h b/soc/arm/include/imx9/irq.h similarity index 100% rename from arch/arm/include/imx9/irq.h rename to soc/arm/include/imx9/irq.h diff --git a/arch/arm/include/imxrt/chip.h b/soc/arm/include/imxrt/chip.h similarity index 100% rename from arch/arm/include/imxrt/chip.h rename to soc/arm/include/imxrt/chip.h diff --git a/arch/arm/include/imxrt/imxrt102x_irq.h b/soc/arm/include/imxrt/imxrt102x_irq.h similarity index 100% rename from arch/arm/include/imxrt/imxrt102x_irq.h rename to soc/arm/include/imxrt/imxrt102x_irq.h diff --git a/arch/arm/include/imxrt/imxrt105x_irq.h b/soc/arm/include/imxrt/imxrt105x_irq.h similarity index 100% rename from arch/arm/include/imxrt/imxrt105x_irq.h rename to soc/arm/include/imxrt/imxrt105x_irq.h diff --git a/arch/arm/include/imxrt/imxrt106x_irq.h b/soc/arm/include/imxrt/imxrt106x_irq.h similarity index 100% rename from arch/arm/include/imxrt/imxrt106x_irq.h rename to soc/arm/include/imxrt/imxrt106x_irq.h diff --git a/arch/arm/include/imxrt/imxrt117x_irq.h b/soc/arm/include/imxrt/imxrt117x_irq.h similarity index 100% rename from arch/arm/include/imxrt/imxrt117x_irq.h rename to soc/arm/include/imxrt/imxrt117x_irq.h diff --git a/arch/arm/include/imxrt/irq.h b/soc/arm/include/imxrt/irq.h similarity index 100% rename from arch/arm/include/imxrt/irq.h rename to soc/arm/include/imxrt/irq.h diff --git a/arch/arm/include/kinetis/chip.h b/soc/arm/include/kinetis/chip.h similarity index 100% rename from arch/arm/include/kinetis/chip.h rename to soc/arm/include/kinetis/chip.h diff --git a/arch/arm/include/kinetis/irq.h b/soc/arm/include/kinetis/irq.h similarity index 100% rename from arch/arm/include/kinetis/irq.h rename to soc/arm/include/kinetis/irq.h diff --git a/arch/arm/include/kinetis/kinetis_dma.h b/soc/arm/include/kinetis/kinetis_dma.h similarity index 100% rename from arch/arm/include/kinetis/kinetis_dma.h rename to soc/arm/include/kinetis/kinetis_dma.h diff --git a/arch/arm/include/kinetis/kinetis_dmamux.h b/soc/arm/include/kinetis/kinetis_dmamux.h similarity index 100% rename from arch/arm/include/kinetis/kinetis_dmamux.h rename to soc/arm/include/kinetis/kinetis_dmamux.h diff --git a/arch/arm/include/kinetis/kinetis_k20irq.h b/soc/arm/include/kinetis/kinetis_k20irq.h similarity index 100% rename from arch/arm/include/kinetis/kinetis_k20irq.h rename to soc/arm/include/kinetis/kinetis_k20irq.h diff --git a/arch/arm/include/kinetis/kinetis_k28irq.h b/soc/arm/include/kinetis/kinetis_k28irq.h similarity index 100% rename from arch/arm/include/kinetis/kinetis_k28irq.h rename to soc/arm/include/kinetis/kinetis_k28irq.h diff --git a/arch/arm/include/kinetis/kinetis_k40irq.h b/soc/arm/include/kinetis/kinetis_k40irq.h similarity index 100% rename from arch/arm/include/kinetis/kinetis_k40irq.h rename to soc/arm/include/kinetis/kinetis_k40irq.h diff --git a/arch/arm/include/kinetis/kinetis_k60irq.h b/soc/arm/include/kinetis/kinetis_k60irq.h similarity index 100% rename from arch/arm/include/kinetis/kinetis_k60irq.h rename to soc/arm/include/kinetis/kinetis_k60irq.h diff --git a/arch/arm/include/kinetis/kinetis_k64irq.h b/soc/arm/include/kinetis/kinetis_k64irq.h similarity index 100% rename from arch/arm/include/kinetis/kinetis_k64irq.h rename to soc/arm/include/kinetis/kinetis_k64irq.h diff --git a/arch/arm/include/kinetis/kinetis_k66irq.h b/soc/arm/include/kinetis/kinetis_k66irq.h similarity index 100% rename from arch/arm/include/kinetis/kinetis_k66irq.h rename to soc/arm/include/kinetis/kinetis_k66irq.h diff --git a/arch/arm/include/kinetis/kinetis_lpuart.h b/soc/arm/include/kinetis/kinetis_lpuart.h similarity index 100% rename from arch/arm/include/kinetis/kinetis_lpuart.h rename to soc/arm/include/kinetis/kinetis_lpuart.h diff --git a/arch/arm/include/kinetis/kinetis_mcg.h b/soc/arm/include/kinetis/kinetis_mcg.h similarity index 100% rename from arch/arm/include/kinetis/kinetis_mcg.h rename to soc/arm/include/kinetis/kinetis_mcg.h diff --git a/arch/arm/include/kinetis/kinetis_pmc.h b/soc/arm/include/kinetis/kinetis_pmc.h similarity index 100% rename from arch/arm/include/kinetis/kinetis_pmc.h rename to soc/arm/include/kinetis/kinetis_pmc.h diff --git a/arch/arm/include/kinetis/kinetis_sim.h b/soc/arm/include/kinetis/kinetis_sim.h similarity index 100% rename from arch/arm/include/kinetis/kinetis_sim.h rename to soc/arm/include/kinetis/kinetis_sim.h diff --git a/arch/arm/include/kl/chip.h b/soc/arm/include/kl/chip.h similarity index 100% rename from arch/arm/include/kl/chip.h rename to soc/arm/include/kl/chip.h diff --git a/arch/arm/include/kl/irq.h b/soc/arm/include/kl/irq.h similarity index 100% rename from arch/arm/include/kl/irq.h rename to soc/arm/include/kl/irq.h diff --git a/arch/arm/include/lc823450/chip.h b/soc/arm/include/lc823450/chip.h similarity index 100% rename from arch/arm/include/lc823450/chip.h rename to soc/arm/include/lc823450/chip.h diff --git a/arch/arm/include/lc823450/clk.h b/soc/arm/include/lc823450/clk.h similarity index 100% rename from arch/arm/include/lc823450/clk.h rename to soc/arm/include/lc823450/clk.h diff --git a/arch/arm/include/lc823450/irq.h b/soc/arm/include/lc823450/irq.h similarity index 100% rename from arch/arm/include/lc823450/irq.h rename to soc/arm/include/lc823450/irq.h diff --git a/arch/arm/include/lpc17xx_40xx/chip.h b/soc/arm/include/lpc17xx_40xx/chip.h similarity index 100% rename from arch/arm/include/lpc17xx_40xx/chip.h rename to soc/arm/include/lpc17xx_40xx/chip.h diff --git a/arch/arm/include/lpc17xx_40xx/irq.h b/soc/arm/include/lpc17xx_40xx/irq.h similarity index 100% rename from arch/arm/include/lpc17xx_40xx/irq.h rename to soc/arm/include/lpc17xx_40xx/irq.h diff --git a/arch/arm/include/lpc17xx_40xx/lpc176x_irq.h b/soc/arm/include/lpc17xx_40xx/lpc176x_irq.h similarity index 100% rename from arch/arm/include/lpc17xx_40xx/lpc176x_irq.h rename to soc/arm/include/lpc17xx_40xx/lpc176x_irq.h diff --git a/arch/arm/include/lpc17xx_40xx/lpc178x_40xx_irq.h b/soc/arm/include/lpc17xx_40xx/lpc178x_40xx_irq.h similarity index 100% rename from arch/arm/include/lpc17xx_40xx/lpc178x_40xx_irq.h rename to soc/arm/include/lpc17xx_40xx/lpc178x_40xx_irq.h diff --git a/arch/arm/include/lpc214x/irq.h b/soc/arm/include/lpc214x/irq.h similarity index 100% rename from arch/arm/include/lpc214x/irq.h rename to soc/arm/include/lpc214x/irq.h diff --git a/arch/arm/include/lpc2378/irq.h b/soc/arm/include/lpc2378/irq.h similarity index 100% rename from arch/arm/include/lpc2378/irq.h rename to soc/arm/include/lpc2378/irq.h diff --git a/arch/arm/include/lpc31xx/irq.h b/soc/arm/include/lpc31xx/irq.h similarity index 100% rename from arch/arm/include/lpc31xx/irq.h rename to soc/arm/include/lpc31xx/irq.h diff --git a/arch/arm/include/lpc43xx/chip.h b/soc/arm/include/lpc43xx/chip.h similarity index 100% rename from arch/arm/include/lpc43xx/chip.h rename to soc/arm/include/lpc43xx/chip.h diff --git a/arch/arm/include/lpc43xx/irq.h b/soc/arm/include/lpc43xx/irq.h similarity index 100% rename from arch/arm/include/lpc43xx/irq.h rename to soc/arm/include/lpc43xx/irq.h diff --git a/arch/arm/include/lpc54xx/chip.h b/soc/arm/include/lpc54xx/chip.h similarity index 100% rename from arch/arm/include/lpc54xx/chip.h rename to soc/arm/include/lpc54xx/chip.h diff --git a/arch/arm/include/lpc54xx/irq.h b/soc/arm/include/lpc54xx/irq.h similarity index 100% rename from arch/arm/include/lpc54xx/irq.h rename to soc/arm/include/lpc54xx/irq.h diff --git a/arch/arm/include/lpc54xx/lpc546x_irq.h b/soc/arm/include/lpc54xx/lpc546x_irq.h similarity index 100% rename from arch/arm/include/lpc54xx/lpc546x_irq.h rename to soc/arm/include/lpc54xx/lpc546x_irq.h diff --git a/arch/arm/include/max326xx/chip.h b/soc/arm/include/max326xx/chip.h similarity index 100% rename from arch/arm/include/max326xx/chip.h rename to soc/arm/include/max326xx/chip.h diff --git a/arch/arm/include/max326xx/irq.h b/soc/arm/include/max326xx/irq.h similarity index 100% rename from arch/arm/include/max326xx/irq.h rename to soc/arm/include/max326xx/irq.h diff --git a/arch/arm/include/max326xx/max32620_30_irq.h b/soc/arm/include/max326xx/max32620_30_irq.h similarity index 100% rename from arch/arm/include/max326xx/max32620_30_irq.h rename to soc/arm/include/max326xx/max32620_30_irq.h diff --git a/arch/arm/include/max326xx/max32660_irq.h b/soc/arm/include/max326xx/max32660_irq.h similarity index 100% rename from arch/arm/include/max326xx/max32660_irq.h rename to soc/arm/include/max326xx/max32660_irq.h diff --git a/arch/arm/include/max326xx/max32690_irq.h b/soc/arm/include/max326xx/max32690_irq.h similarity index 100% rename from arch/arm/include/max326xx/max32690_irq.h rename to soc/arm/include/max326xx/max32690_irq.h diff --git a/arch/arm/include/mcx-nxxx/chip.h b/soc/arm/include/mcx-nxxx/chip.h similarity index 100% rename from arch/arm/include/mcx-nxxx/chip.h rename to soc/arm/include/mcx-nxxx/chip.h diff --git a/arch/arm/include/mcx-nxxx/irq.h b/soc/arm/include/mcx-nxxx/irq.h similarity index 100% rename from arch/arm/include/mcx-nxxx/irq.h rename to soc/arm/include/mcx-nxxx/irq.h diff --git a/arch/arm/include/mcx-nxxx/n236_irq.h b/soc/arm/include/mcx-nxxx/n236_irq.h similarity index 100% rename from arch/arm/include/mcx-nxxx/n236_irq.h rename to soc/arm/include/mcx-nxxx/n236_irq.h diff --git a/arch/arm/include/moxart/irq.h b/soc/arm/include/moxart/irq.h similarity index 100% rename from arch/arm/include/moxart/irq.h rename to soc/arm/include/moxart/irq.h diff --git a/arch/arm/include/mps/chip.h b/soc/arm/include/mps/chip.h similarity index 100% rename from arch/arm/include/mps/chip.h rename to soc/arm/include/mps/chip.h diff --git a/arch/arm/include/mps/irq.h b/soc/arm/include/mps/irq.h similarity index 100% rename from arch/arm/include/mps/irq.h rename to soc/arm/include/mps/irq.h diff --git a/arch/arm/include/mx8mp/chip.h b/soc/arm/include/mx8mp/chip.h similarity index 100% rename from arch/arm/include/mx8mp/chip.h rename to soc/arm/include/mx8mp/chip.h diff --git a/arch/arm/include/mx8mp/irq.h b/soc/arm/include/mx8mp/irq.h similarity index 100% rename from arch/arm/include/mx8mp/irq.h rename to soc/arm/include/mx8mp/irq.h diff --git a/arch/arm/include/mx8mp/mx8mp_irq.h b/soc/arm/include/mx8mp/mx8mp_irq.h similarity index 100% rename from arch/arm/include/mx8mp/mx8mp_irq.h rename to soc/arm/include/mx8mp/mx8mp_irq.h diff --git a/arch/arm/include/nrf52/chip.h b/soc/arm/include/nrf52/chip.h similarity index 100% rename from arch/arm/include/nrf52/chip.h rename to soc/arm/include/nrf52/chip.h diff --git a/arch/arm/include/nrf52/irq.h b/soc/arm/include/nrf52/irq.h similarity index 100% rename from arch/arm/include/nrf52/irq.h rename to soc/arm/include/nrf52/irq.h diff --git a/arch/arm/include/nrf52/nrf52_irq.h b/soc/arm/include/nrf52/nrf52_irq.h similarity index 100% rename from arch/arm/include/nrf52/nrf52_irq.h rename to soc/arm/include/nrf52/nrf52_irq.h diff --git a/arch/arm/include/nrf53/chip.h b/soc/arm/include/nrf53/chip.h similarity index 100% rename from arch/arm/include/nrf53/chip.h rename to soc/arm/include/nrf53/chip.h diff --git a/arch/arm/include/nrf53/irq.h b/soc/arm/include/nrf53/irq.h similarity index 100% rename from arch/arm/include/nrf53/irq.h rename to soc/arm/include/nrf53/irq.h diff --git a/arch/arm/include/nrf53/nrf5340_irq.h b/soc/arm/include/nrf53/nrf5340_irq.h similarity index 100% rename from arch/arm/include/nrf53/nrf5340_irq.h rename to soc/arm/include/nrf53/nrf5340_irq.h diff --git a/arch/arm/include/nrf53/nrf5340_irq_cpuapp.h b/soc/arm/include/nrf53/nrf5340_irq_cpuapp.h similarity index 100% rename from arch/arm/include/nrf53/nrf5340_irq_cpuapp.h rename to soc/arm/include/nrf53/nrf5340_irq_cpuapp.h diff --git a/arch/arm/include/nrf53/nrf5340_irq_cpunet.h b/soc/arm/include/nrf53/nrf5340_irq_cpunet.h similarity index 100% rename from arch/arm/include/nrf53/nrf5340_irq_cpunet.h rename to soc/arm/include/nrf53/nrf5340_irq_cpunet.h diff --git a/arch/arm/include/nrf91/chip.h b/soc/arm/include/nrf91/chip.h similarity index 100% rename from arch/arm/include/nrf91/chip.h rename to soc/arm/include/nrf91/chip.h diff --git a/arch/arm/include/nrf91/irq.h b/soc/arm/include/nrf91/irq.h similarity index 100% rename from arch/arm/include/nrf91/irq.h rename to soc/arm/include/nrf91/irq.h diff --git a/arch/arm/include/nrf91/nrf9160_irq.h b/soc/arm/include/nrf91/nrf9160_irq.h similarity index 100% rename from arch/arm/include/nrf91/nrf9160_irq.h rename to soc/arm/include/nrf91/nrf9160_irq.h diff --git a/arch/arm/include/nuc1xx/chip.h b/soc/arm/include/nuc1xx/chip.h similarity index 100% rename from arch/arm/include/nuc1xx/chip.h rename to soc/arm/include/nuc1xx/chip.h diff --git a/arch/arm/include/nuc1xx/irq.h b/soc/arm/include/nuc1xx/irq.h similarity index 100% rename from arch/arm/include/nuc1xx/irq.h rename to soc/arm/include/nuc1xx/irq.h diff --git a/arch/arm/include/nuc1xx/nuc120_irq.h b/soc/arm/include/nuc1xx/nuc120_irq.h similarity index 100% rename from arch/arm/include/nuc1xx/nuc120_irq.h rename to soc/arm/include/nuc1xx/nuc120_irq.h diff --git a/arch/arm/include/phy62xx/chip.h b/soc/arm/include/phy62xx/chip.h similarity index 100% rename from arch/arm/include/phy62xx/chip.h rename to soc/arm/include/phy62xx/chip.h diff --git a/arch/arm/include/phy62xx/irq.h b/soc/arm/include/phy62xx/irq.h similarity index 100% rename from arch/arm/include/phy62xx/irq.h rename to soc/arm/include/phy62xx/irq.h diff --git a/arch/arm/include/phy62xx/phy62xx_irq.h b/soc/arm/include/phy62xx/phy62xx_irq.h similarity index 100% rename from arch/arm/include/phy62xx/phy62xx_irq.h rename to soc/arm/include/phy62xx/phy62xx_irq.h diff --git a/arch/arm/include/qemu/chip.h b/soc/arm/include/qemu/chip.h similarity index 100% rename from arch/arm/include/qemu/chip.h rename to soc/arm/include/qemu/chip.h diff --git a/arch/arm/include/qemu/irq.h b/soc/arm/include/qemu/irq.h similarity index 100% rename from arch/arm/include/qemu/irq.h rename to soc/arm/include/qemu/irq.h diff --git a/arch/arm/include/ra4/chip.h b/soc/arm/include/ra4/chip.h similarity index 100% rename from arch/arm/include/ra4/chip.h rename to soc/arm/include/ra4/chip.h diff --git a/arch/arm/include/ra4/irq.h b/soc/arm/include/ra4/irq.h similarity index 100% rename from arch/arm/include/ra4/irq.h rename to soc/arm/include/ra4/irq.h diff --git a/arch/arm/include/ra4/ra4m1_irq.h b/soc/arm/include/ra4/ra4m1_irq.h similarity index 100% rename from arch/arm/include/ra4/ra4m1_irq.h rename to soc/arm/include/ra4/ra4m1_irq.h diff --git a/arch/arm/include/rp2040/chip.h b/soc/arm/include/rp2040/chip.h similarity index 100% rename from arch/arm/include/rp2040/chip.h rename to soc/arm/include/rp2040/chip.h diff --git a/arch/arm/include/rp2040/i2c_slave.h b/soc/arm/include/rp2040/i2c_slave.h similarity index 100% rename from arch/arm/include/rp2040/i2c_slave.h rename to soc/arm/include/rp2040/i2c_slave.h diff --git a/arch/arm/include/rp2040/irq.h b/soc/arm/include/rp2040/irq.h similarity index 100% rename from arch/arm/include/rp2040/irq.h rename to soc/arm/include/rp2040/irq.h diff --git a/arch/arm/include/rp2040/watchdog.h b/soc/arm/include/rp2040/watchdog.h similarity index 100% rename from arch/arm/include/rp2040/watchdog.h rename to soc/arm/include/rp2040/watchdog.h diff --git a/arch/arm/include/rp23xx/chip.h b/soc/arm/include/rp23xx/chip.h similarity index 100% rename from arch/arm/include/rp23xx/chip.h rename to soc/arm/include/rp23xx/chip.h diff --git a/arch/arm/include/rp23xx/i2c_slave.h b/soc/arm/include/rp23xx/i2c_slave.h similarity index 100% rename from arch/arm/include/rp23xx/i2c_slave.h rename to soc/arm/include/rp23xx/i2c_slave.h diff --git a/arch/arm/include/rp23xx/irq.h b/soc/arm/include/rp23xx/irq.h similarity index 100% rename from arch/arm/include/rp23xx/irq.h rename to soc/arm/include/rp23xx/irq.h diff --git a/arch/arm/include/rp23xx/watchdog.h b/soc/arm/include/rp23xx/watchdog.h similarity index 100% rename from arch/arm/include/rp23xx/watchdog.h rename to soc/arm/include/rp23xx/watchdog.h diff --git a/arch/arm/include/s32k1xx/chip.h b/soc/arm/include/s32k1xx/chip.h similarity index 100% rename from arch/arm/include/s32k1xx/chip.h rename to soc/arm/include/s32k1xx/chip.h diff --git a/arch/arm/include/s32k1xx/irq.h b/soc/arm/include/s32k1xx/irq.h similarity index 100% rename from arch/arm/include/s32k1xx/irq.h rename to soc/arm/include/s32k1xx/irq.h diff --git a/arch/arm/include/s32k1xx/s32k11x_irq.h b/soc/arm/include/s32k1xx/s32k11x_irq.h similarity index 100% rename from arch/arm/include/s32k1xx/s32k11x_irq.h rename to soc/arm/include/s32k1xx/s32k11x_irq.h diff --git a/arch/arm/include/s32k1xx/s32k14x_irq.h b/soc/arm/include/s32k1xx/s32k14x_irq.h similarity index 100% rename from arch/arm/include/s32k1xx/s32k14x_irq.h rename to soc/arm/include/s32k1xx/s32k14x_irq.h diff --git a/arch/arm/include/s32k3xx/chip.h b/soc/arm/include/s32k3xx/chip.h similarity index 100% rename from arch/arm/include/s32k3xx/chip.h rename to soc/arm/include/s32k3xx/chip.h diff --git a/arch/arm/include/s32k3xx/irq.h b/soc/arm/include/s32k3xx/irq.h similarity index 100% rename from arch/arm/include/s32k3xx/irq.h rename to soc/arm/include/s32k3xx/irq.h diff --git a/arch/arm/include/s32k3xx/s32k3x4_irq.h b/soc/arm/include/s32k3xx/s32k3x4_irq.h similarity index 100% rename from arch/arm/include/s32k3xx/s32k3x4_irq.h rename to soc/arm/include/s32k3xx/s32k3x4_irq.h diff --git a/arch/arm/include/sam34/chip.h b/soc/arm/include/sam34/chip.h similarity index 100% rename from arch/arm/include/sam34/chip.h rename to soc/arm/include/sam34/chip.h diff --git a/arch/arm/include/sam34/irq.h b/soc/arm/include/sam34/irq.h similarity index 100% rename from arch/arm/include/sam34/irq.h rename to soc/arm/include/sam34/irq.h diff --git a/arch/arm/include/sam34/sam3u_irq.h b/soc/arm/include/sam34/sam3u_irq.h similarity index 100% rename from arch/arm/include/sam34/sam3u_irq.h rename to soc/arm/include/sam34/sam3u_irq.h diff --git a/arch/arm/include/sam34/sam3x_irq.h b/soc/arm/include/sam34/sam3x_irq.h similarity index 100% rename from arch/arm/include/sam34/sam3x_irq.h rename to soc/arm/include/sam34/sam3x_irq.h diff --git a/arch/arm/include/sam34/sam4cm_irq.h b/soc/arm/include/sam34/sam4cm_irq.h similarity index 100% rename from arch/arm/include/sam34/sam4cm_irq.h rename to soc/arm/include/sam34/sam4cm_irq.h diff --git a/arch/arm/include/sam34/sam4e_irq.h b/soc/arm/include/sam34/sam4e_irq.h similarity index 100% rename from arch/arm/include/sam34/sam4e_irq.h rename to soc/arm/include/sam34/sam4e_irq.h diff --git a/arch/arm/include/sam34/sam4l_irq.h b/soc/arm/include/sam34/sam4l_irq.h similarity index 100% rename from arch/arm/include/sam34/sam4l_irq.h rename to soc/arm/include/sam34/sam4l_irq.h diff --git a/arch/arm/include/sam34/sam4s_irq.h b/soc/arm/include/sam34/sam4s_irq.h similarity index 100% rename from arch/arm/include/sam34/sam4s_irq.h rename to soc/arm/include/sam34/sam4s_irq.h diff --git a/arch/arm/include/sama5/chip.h b/soc/arm/include/sama5/chip.h similarity index 100% rename from arch/arm/include/sama5/chip.h rename to soc/arm/include/sama5/chip.h diff --git a/arch/arm/include/sama5/irq.h b/soc/arm/include/sama5/irq.h similarity index 100% rename from arch/arm/include/sama5/irq.h rename to soc/arm/include/sama5/irq.h diff --git a/arch/arm/include/sama5/sama5d2_irq.h b/soc/arm/include/sama5/sama5d2_irq.h similarity index 100% rename from arch/arm/include/sama5/sama5d2_irq.h rename to soc/arm/include/sama5/sama5d2_irq.h diff --git a/arch/arm/include/sama5/sama5d3_irq.h b/soc/arm/include/sama5/sama5d3_irq.h similarity index 100% rename from arch/arm/include/sama5/sama5d3_irq.h rename to soc/arm/include/sama5/sama5d3_irq.h diff --git a/arch/arm/include/sama5/sama5d4_irq.h b/soc/arm/include/sama5/sama5d4_irq.h similarity index 100% rename from arch/arm/include/sama5/sama5d4_irq.h rename to soc/arm/include/sama5/sama5d4_irq.h diff --git a/arch/arm/include/samd2l2/chip.h b/soc/arm/include/samd2l2/chip.h similarity index 100% rename from arch/arm/include/samd2l2/chip.h rename to soc/arm/include/samd2l2/chip.h diff --git a/arch/arm/include/samd2l2/irq.h b/soc/arm/include/samd2l2/irq.h similarity index 100% rename from arch/arm/include/samd2l2/irq.h rename to soc/arm/include/samd2l2/irq.h diff --git a/arch/arm/include/samd2l2/sam_adc.h b/soc/arm/include/samd2l2/sam_adc.h similarity index 100% rename from arch/arm/include/samd2l2/sam_adc.h rename to soc/arm/include/samd2l2/sam_adc.h diff --git a/arch/arm/include/samd2l2/samd20_irq.h b/soc/arm/include/samd2l2/samd20_irq.h similarity index 100% rename from arch/arm/include/samd2l2/samd20_irq.h rename to soc/arm/include/samd2l2/samd20_irq.h diff --git a/arch/arm/include/samd2l2/samd21_irq.h b/soc/arm/include/samd2l2/samd21_irq.h similarity index 100% rename from arch/arm/include/samd2l2/samd21_irq.h rename to soc/arm/include/samd2l2/samd21_irq.h diff --git a/arch/arm/include/samd2l2/saml21_irq.h b/soc/arm/include/samd2l2/saml21_irq.h similarity index 100% rename from arch/arm/include/samd2l2/saml21_irq.h rename to soc/arm/include/samd2l2/saml21_irq.h diff --git a/arch/arm/include/samd5e5/chip.h b/soc/arm/include/samd5e5/chip.h similarity index 100% rename from arch/arm/include/samd5e5/chip.h rename to soc/arm/include/samd5e5/chip.h diff --git a/arch/arm/include/samd5e5/irq.h b/soc/arm/include/samd5e5/irq.h similarity index 100% rename from arch/arm/include/samd5e5/irq.h rename to soc/arm/include/samd5e5/irq.h diff --git a/arch/arm/include/samd5e5/samd5e5_irq.h b/soc/arm/include/samd5e5/samd5e5_irq.h similarity index 100% rename from arch/arm/include/samd5e5/samd5e5_irq.h rename to soc/arm/include/samd5e5/samd5e5_irq.h diff --git a/arch/arm/include/samv7/chip.h b/soc/arm/include/samv7/chip.h similarity index 100% rename from arch/arm/include/samv7/chip.h rename to soc/arm/include/samv7/chip.h diff --git a/arch/arm/include/samv7/irq.h b/soc/arm/include/samv7/irq.h similarity index 100% rename from arch/arm/include/samv7/irq.h rename to soc/arm/include/samv7/irq.h diff --git a/arch/arm/include/samv7/sam_afec.h b/soc/arm/include/samv7/sam_afec.h similarity index 100% rename from arch/arm/include/samv7/sam_afec.h rename to soc/arm/include/samv7/sam_afec.h diff --git a/arch/arm/include/samv7/same70_irq.h b/soc/arm/include/samv7/same70_irq.h similarity index 100% rename from arch/arm/include/samv7/same70_irq.h rename to soc/arm/include/samv7/same70_irq.h diff --git a/arch/arm/include/samv7/samv71_irq.h b/soc/arm/include/samv7/samv71_irq.h similarity index 100% rename from arch/arm/include/samv7/samv71_irq.h rename to soc/arm/include/samv7/samv71_irq.h diff --git a/arch/arm/include/stm32/chip.h b/soc/arm/include/stm32/chip.h similarity index 100% rename from arch/arm/include/stm32/chip.h rename to soc/arm/include/stm32/chip.h diff --git a/arch/arm/include/stm32/irq.h b/soc/arm/include/stm32/irq.h similarity index 100% rename from arch/arm/include/stm32/irq.h rename to soc/arm/include/stm32/irq.h diff --git a/arch/arm/include/stm32/stm32f10xxx_irq.h b/soc/arm/include/stm32/stm32f10xxx_irq.h similarity index 100% rename from arch/arm/include/stm32/stm32f10xxx_irq.h rename to soc/arm/include/stm32/stm32f10xxx_irq.h diff --git a/arch/arm/include/stm32/stm32f20xxx_irq.h b/soc/arm/include/stm32/stm32f20xxx_irq.h similarity index 100% rename from arch/arm/include/stm32/stm32f20xxx_irq.h rename to soc/arm/include/stm32/stm32f20xxx_irq.h diff --git a/arch/arm/include/stm32/stm32f30xxx_irq.h b/soc/arm/include/stm32/stm32f30xxx_irq.h similarity index 100% rename from arch/arm/include/stm32/stm32f30xxx_irq.h rename to soc/arm/include/stm32/stm32f30xxx_irq.h diff --git a/arch/arm/include/stm32/stm32f33xxx_irq.h b/soc/arm/include/stm32/stm32f33xxx_irq.h similarity index 100% rename from arch/arm/include/stm32/stm32f33xxx_irq.h rename to soc/arm/include/stm32/stm32f33xxx_irq.h diff --git a/arch/arm/include/stm32/stm32f37xxx_irq.h b/soc/arm/include/stm32/stm32f37xxx_irq.h similarity index 100% rename from arch/arm/include/stm32/stm32f37xxx_irq.h rename to soc/arm/include/stm32/stm32f37xxx_irq.h diff --git a/arch/arm/include/stm32/stm32f40xxx_irq.h b/soc/arm/include/stm32/stm32f40xxx_irq.h similarity index 100% rename from arch/arm/include/stm32/stm32f40xxx_irq.h rename to soc/arm/include/stm32/stm32f40xxx_irq.h diff --git a/arch/arm/include/stm32/stm32g4xxxx_irq.h b/soc/arm/include/stm32/stm32g4xxxx_irq.h similarity index 100% rename from arch/arm/include/stm32/stm32g4xxxx_irq.h rename to soc/arm/include/stm32/stm32g4xxxx_irq.h diff --git a/arch/arm/include/stm32/stm32l15xxx_irq.h b/soc/arm/include/stm32/stm32l15xxx_irq.h similarity index 100% rename from arch/arm/include/stm32/stm32l15xxx_irq.h rename to soc/arm/include/stm32/stm32l15xxx_irq.h diff --git a/arch/arm/include/stm32f0l0g0/chip.h b/soc/arm/include/stm32f0l0g0/chip.h similarity index 100% rename from arch/arm/include/stm32f0l0g0/chip.h rename to soc/arm/include/stm32f0l0g0/chip.h diff --git a/arch/arm/include/stm32f0l0g0/irq.h b/soc/arm/include/stm32f0l0g0/irq.h similarity index 100% rename from arch/arm/include/stm32f0l0g0/irq.h rename to soc/arm/include/stm32f0l0g0/irq.h diff --git a/arch/arm/include/stm32f0l0g0/stm32c0_irq.h b/soc/arm/include/stm32f0l0g0/stm32c0_irq.h similarity index 100% rename from arch/arm/include/stm32f0l0g0/stm32c0_irq.h rename to soc/arm/include/stm32f0l0g0/stm32c0_irq.h diff --git a/arch/arm/include/stm32f0l0g0/stm32f0_irq.h b/soc/arm/include/stm32f0l0g0/stm32f0_irq.h similarity index 100% rename from arch/arm/include/stm32f0l0g0/stm32f0_irq.h rename to soc/arm/include/stm32f0l0g0/stm32f0_irq.h diff --git a/arch/arm/include/stm32f0l0g0/stm32g0_irq.h b/soc/arm/include/stm32f0l0g0/stm32g0_irq.h similarity index 100% rename from arch/arm/include/stm32f0l0g0/stm32g0_irq.h rename to soc/arm/include/stm32f0l0g0/stm32g0_irq.h diff --git a/arch/arm/include/stm32f0l0g0/stm32l0_irq.h b/soc/arm/include/stm32f0l0g0/stm32l0_irq.h similarity index 100% rename from arch/arm/include/stm32f0l0g0/stm32l0_irq.h rename to soc/arm/include/stm32f0l0g0/stm32l0_irq.h diff --git a/arch/arm/include/stm32f7/chip.h b/soc/arm/include/stm32f7/chip.h similarity index 100% rename from arch/arm/include/stm32f7/chip.h rename to soc/arm/include/stm32f7/chip.h diff --git a/arch/arm/include/stm32f7/irq.h b/soc/arm/include/stm32f7/irq.h similarity index 100% rename from arch/arm/include/stm32f7/irq.h rename to soc/arm/include/stm32f7/irq.h diff --git a/arch/arm/include/stm32f7/stm32f72xx73xx_irq.h b/soc/arm/include/stm32f7/stm32f72xx73xx_irq.h similarity index 100% rename from arch/arm/include/stm32f7/stm32f72xx73xx_irq.h rename to soc/arm/include/stm32f7/stm32f72xx73xx_irq.h diff --git a/arch/arm/include/stm32f7/stm32f74xx75xx_irq.h b/soc/arm/include/stm32f7/stm32f74xx75xx_irq.h similarity index 100% rename from arch/arm/include/stm32f7/stm32f74xx75xx_irq.h rename to soc/arm/include/stm32f7/stm32f74xx75xx_irq.h diff --git a/arch/arm/include/stm32f7/stm32f76xx77xx_irq.h b/soc/arm/include/stm32f7/stm32f76xx77xx_irq.h similarity index 100% rename from arch/arm/include/stm32f7/stm32f76xx77xx_irq.h rename to soc/arm/include/stm32f7/stm32f76xx77xx_irq.h diff --git a/arch/arm/include/stm32h5/chip.h b/soc/arm/include/stm32h5/chip.h similarity index 100% rename from arch/arm/include/stm32h5/chip.h rename to soc/arm/include/stm32h5/chip.h diff --git a/arch/arm/include/stm32h5/irq.h b/soc/arm/include/stm32h5/irq.h similarity index 100% rename from arch/arm/include/stm32h5/irq.h rename to soc/arm/include/stm32h5/irq.h diff --git a/arch/arm/include/stm32h5/stm32h5xx_irq.h b/soc/arm/include/stm32h5/stm32h5xx_irq.h similarity index 100% rename from arch/arm/include/stm32h5/stm32h5xx_irq.h rename to soc/arm/include/stm32h5/stm32h5xx_irq.h diff --git a/arch/arm/include/stm32h7/chip.h b/soc/arm/include/stm32h7/chip.h similarity index 96% rename from arch/arm/include/stm32h7/chip.h rename to soc/arm/include/stm32h7/chip.h index 721ad74a0a..17525403f9 100644 --- a/arch/arm/include/stm32h7/chip.h +++ b/soc/arm/include/stm32h7/chip.h @@ -33,6 +33,19 @@ * Pre-processor Prototypes ****************************************************************************/ +/* If the common ARMv7-M vector handling logic is used, then it expects the + * following definition in this file that provides the number of supported + * external interrupts which, for this architecture, is provided in the + * arch/stm32h7/chip.h header file. + */ + +#define ARMV7M_PERIPHERAL_INTERRUPTS STM32_IRQ_NEXTINTS + +/* Cache line sizes (in bytes)for the STM32H7 */ + +#define ARMV7M_DCACHE_LINESIZE 32 /* 32 bytes (8 words) */ +#define ARMV7M_ICACHE_LINESIZE 32 /* 32 bytes (8 words) */ + /* STM32H7x3xx Differences between family members: * * ----------- ---------------- ----- ---- diff --git a/arch/arm/include/stm32h7/irq.h b/soc/arm/include/stm32h7/irq.h similarity index 94% rename from arch/arm/include/stm32h7/irq.h rename to soc/arm/include/stm32h7/irq.h index a5a13c7b19..8d8167cd29 100644 --- a/arch/arm/include/stm32h7/irq.h +++ b/soc/arm/include/stm32h7/irq.h @@ -70,17 +70,17 @@ ****************************************************************************/ #if defined(CONFIG_STM32H7_STM32H7X3XX) -# include +# include #elif defined(CONFIG_STM32H7_STM32H7B3XX) -# include +# include #elif defined(CONFIG_STM32H7_STM32H7X5XX) # if CONFIG_ARCH_CHIP_STM32H7_CORTEXM7 -# include +# include # else -# include +# include # endif #elif defined(CONFIG_STM32H7_STM32H7X7XX) -# include +# include #else # error "Unsupported STM32 H7 chip" #endif diff --git a/arch/arm/include/stm32h7/stm32h7x3xx_irq.h b/soc/arm/include/stm32h7/stm32h7x3xx_irq.h similarity index 99% rename from arch/arm/include/stm32h7/stm32h7x3xx_irq.h rename to soc/arm/include/stm32h7/stm32h7x3xx_irq.h index 6da365a463..91a85293cd 100644 --- a/arch/arm/include/stm32h7/stm32h7x3xx_irq.h +++ b/soc/arm/include/stm32h7/stm32h7x3xx_irq.h @@ -25,6 +25,7 @@ */ #ifndef __ARCH_ARM_INCLUDE_STM32H7_STM32H7X3XX_IRQ_H +#define __ARCH_ARM_INCLUDE_STM32H7_STM32H7X3XX_IRQ_H /**************************************************************************** * Included Files diff --git a/arch/arm/include/stm32h7/stm32h7x5xx_cpu2_irq.h b/soc/arm/include/stm32h7/stm32h7x5xx_cpu2_irq.h similarity index 100% rename from arch/arm/include/stm32h7/stm32h7x5xx_cpu2_irq.h rename to soc/arm/include/stm32h7/stm32h7x5xx_cpu2_irq.h diff --git a/arch/arm/include/stm32h7/stm32h7x5xx_irq.h b/soc/arm/include/stm32h7/stm32h7x5xx_irq.h similarity index 100% rename from arch/arm/include/stm32h7/stm32h7x5xx_irq.h rename to soc/arm/include/stm32h7/stm32h7x5xx_irq.h diff --git a/arch/arm/include/stm32h7/stm32h7x7xx_irq.h b/soc/arm/include/stm32h7/stm32h7x7xx_irq.h similarity index 100% rename from arch/arm/include/stm32h7/stm32h7x7xx_irq.h rename to soc/arm/include/stm32h7/stm32h7x7xx_irq.h diff --git a/arch/arm/include/stm32l4/chip.h b/soc/arm/include/stm32l4/chip.h similarity index 100% rename from arch/arm/include/stm32l4/chip.h rename to soc/arm/include/stm32l4/chip.h diff --git a/arch/arm/include/stm32l4/irq.h b/soc/arm/include/stm32l4/irq.h similarity index 100% rename from arch/arm/include/stm32l4/irq.h rename to soc/arm/include/stm32l4/irq.h diff --git a/arch/arm/include/stm32l4/stm32l4x3xx_irq.h b/soc/arm/include/stm32l4/stm32l4x3xx_irq.h similarity index 100% rename from arch/arm/include/stm32l4/stm32l4x3xx_irq.h rename to soc/arm/include/stm32l4/stm32l4x3xx_irq.h diff --git a/arch/arm/include/stm32l4/stm32l4x5xx_irq.h b/soc/arm/include/stm32l4/stm32l4x5xx_irq.h similarity index 100% rename from arch/arm/include/stm32l4/stm32l4x5xx_irq.h rename to soc/arm/include/stm32l4/stm32l4x5xx_irq.h diff --git a/arch/arm/include/stm32l4/stm32l4x6xx_irq.h b/soc/arm/include/stm32l4/stm32l4x6xx_irq.h similarity index 100% rename from arch/arm/include/stm32l4/stm32l4x6xx_irq.h rename to soc/arm/include/stm32l4/stm32l4x6xx_irq.h diff --git a/arch/arm/include/stm32l4/stm32l4xrxx_irq.h b/soc/arm/include/stm32l4/stm32l4xrxx_irq.h similarity index 100% rename from arch/arm/include/stm32l4/stm32l4xrxx_irq.h rename to soc/arm/include/stm32l4/stm32l4xrxx_irq.h diff --git a/arch/arm/include/stm32l5/chip.h b/soc/arm/include/stm32l5/chip.h similarity index 100% rename from arch/arm/include/stm32l5/chip.h rename to soc/arm/include/stm32l5/chip.h diff --git a/arch/arm/include/stm32l5/irq.h b/soc/arm/include/stm32l5/irq.h similarity index 100% rename from arch/arm/include/stm32l5/irq.h rename to soc/arm/include/stm32l5/irq.h diff --git a/arch/arm/include/stm32l5/stm32l562xx_irq.h b/soc/arm/include/stm32l5/stm32l562xx_irq.h similarity index 100% rename from arch/arm/include/stm32l5/stm32l562xx_irq.h rename to soc/arm/include/stm32l5/stm32l562xx_irq.h diff --git a/arch/arm/include/stm32l5/stm32l5_irq.h b/soc/arm/include/stm32l5/stm32l5_irq.h similarity index 100% rename from arch/arm/include/stm32l5/stm32l5_irq.h rename to soc/arm/include/stm32l5/stm32l5_irq.h diff --git a/arch/arm/include/stm32u5/chip.h b/soc/arm/include/stm32u5/chip.h similarity index 100% rename from arch/arm/include/stm32u5/chip.h rename to soc/arm/include/stm32u5/chip.h diff --git a/arch/arm/include/stm32u5/irq.h b/soc/arm/include/stm32u5/irq.h similarity index 100% rename from arch/arm/include/stm32u5/irq.h rename to soc/arm/include/stm32u5/irq.h diff --git a/arch/arm/include/stm32u5/stm32_irq.h b/soc/arm/include/stm32u5/stm32_irq.h similarity index 100% rename from arch/arm/include/stm32u5/stm32_irq.h rename to soc/arm/include/stm32u5/stm32_irq.h diff --git a/arch/arm/include/stm32u5/stm32u5xx_irq.h b/soc/arm/include/stm32u5/stm32u5xx_irq.h similarity index 100% rename from arch/arm/include/stm32u5/stm32u5xx_irq.h rename to soc/arm/include/stm32u5/stm32u5xx_irq.h diff --git a/arch/arm/include/stm32wb/chip.h b/soc/arm/include/stm32wb/chip.h similarity index 100% rename from arch/arm/include/stm32wb/chip.h rename to soc/arm/include/stm32wb/chip.h diff --git a/arch/arm/include/stm32wb/irq.h b/soc/arm/include/stm32wb/irq.h similarity index 100% rename from arch/arm/include/stm32wb/irq.h rename to soc/arm/include/stm32wb/irq.h diff --git a/arch/arm/include/stm32wb/stm32wb_irq.h b/soc/arm/include/stm32wb/stm32wb_irq.h similarity index 100% rename from arch/arm/include/stm32wb/stm32wb_irq.h rename to soc/arm/include/stm32wb/stm32wb_irq.h diff --git a/arch/arm/include/stm32wl5/chip.h b/soc/arm/include/stm32wl5/chip.h similarity index 100% rename from arch/arm/include/stm32wl5/chip.h rename to soc/arm/include/stm32wl5/chip.h diff --git a/arch/arm/include/stm32wl5/irq.h b/soc/arm/include/stm32wl5/irq.h similarity index 100% rename from arch/arm/include/stm32wl5/irq.h rename to soc/arm/include/stm32wl5/irq.h diff --git a/arch/arm/include/stm32wl5/stm32wl5xxx_cpu1_irq.h b/soc/arm/include/stm32wl5/stm32wl5xxx_cpu1_irq.h similarity index 100% rename from arch/arm/include/stm32wl5/stm32wl5xxx_cpu1_irq.h rename to soc/arm/include/stm32wl5/stm32wl5xxx_cpu1_irq.h diff --git a/arch/arm/include/str71x/irq.h b/soc/arm/include/str71x/irq.h similarity index 100% rename from arch/arm/include/str71x/irq.h rename to soc/arm/include/str71x/irq.h diff --git a/arch/arm/include/tiva/cc13x0_irq.h b/soc/arm/include/tiva/cc13x0_irq.h similarity index 100% rename from arch/arm/include/tiva/cc13x0_irq.h rename to soc/arm/include/tiva/cc13x0_irq.h diff --git a/arch/arm/include/tiva/cc13x2_cc26x2_irq.h b/soc/arm/include/tiva/cc13x2_cc26x2_irq.h similarity index 100% rename from arch/arm/include/tiva/cc13x2_cc26x2_irq.h rename to soc/arm/include/tiva/cc13x2_cc26x2_irq.h diff --git a/arch/arm/include/tiva/chip.h b/soc/arm/include/tiva/chip.h similarity index 100% rename from arch/arm/include/tiva/chip.h rename to soc/arm/include/tiva/chip.h diff --git a/arch/arm/include/tiva/irq.h b/soc/arm/include/tiva/irq.h similarity index 100% rename from arch/arm/include/tiva/irq.h rename to soc/arm/include/tiva/irq.h diff --git a/arch/arm/include/tiva/lm3s_irq.h b/soc/arm/include/tiva/lm3s_irq.h similarity index 100% rename from arch/arm/include/tiva/lm3s_irq.h rename to soc/arm/include/tiva/lm3s_irq.h diff --git a/arch/arm/include/tiva/lm4f_irq.h b/soc/arm/include/tiva/lm4f_irq.h similarity index 100% rename from arch/arm/include/tiva/lm4f_irq.h rename to soc/arm/include/tiva/lm4f_irq.h diff --git a/arch/arm/include/tiva/tm4c_irq.h b/soc/arm/include/tiva/tm4c_irq.h similarity index 100% rename from arch/arm/include/tiva/tm4c_irq.h rename to soc/arm/include/tiva/tm4c_irq.h diff --git a/arch/arm/include/tlsr82/chip.h b/soc/arm/include/tlsr82/chip.h similarity index 100% rename from arch/arm/include/tlsr82/chip.h rename to soc/arm/include/tlsr82/chip.h diff --git a/arch/arm/include/tlsr82/irq.h b/soc/arm/include/tlsr82/irq.h similarity index 100% rename from arch/arm/include/tlsr82/irq.h rename to soc/arm/include/tlsr82/irq.h diff --git a/arch/arm/include/tms570/chip.h b/soc/arm/include/tms570/chip.h similarity index 100% rename from arch/arm/include/tms570/chip.h rename to soc/arm/include/tms570/chip.h diff --git a/arch/arm/include/tms570/irq.h b/soc/arm/include/tms570/irq.h similarity index 100% rename from arch/arm/include/tms570/irq.h rename to soc/arm/include/tms570/irq.h diff --git a/arch/arm/include/tms570/tms570ls04x03x_irq.h b/soc/arm/include/tms570/tms570ls04x03x_irq.h similarity index 100% rename from arch/arm/include/tms570/tms570ls04x03x_irq.h rename to soc/arm/include/tms570/tms570ls04x03x_irq.h diff --git a/arch/arm/include/xmc4/chip.h b/soc/arm/include/xmc4/chip.h similarity index 100% rename from arch/arm/include/xmc4/chip.h rename to soc/arm/include/xmc4/chip.h diff --git a/arch/arm/include/xmc4/irq.h b/soc/arm/include/xmc4/irq.h similarity index 100% rename from arch/arm/include/xmc4/irq.h rename to soc/arm/include/xmc4/irq.h diff --git a/arch/arm/include/xmc4/xmc4500_irq.h b/soc/arm/include/xmc4/xmc4500_irq.h similarity index 100% rename from arch/arm/include/xmc4/xmc4500_irq.h rename to soc/arm/include/xmc4/xmc4500_irq.h diff --git a/arch/arm/include/xmc4/xmc4700_irq.h b/soc/arm/include/xmc4/xmc4700_irq.h similarity index 100% rename from arch/arm/include/xmc4/xmc4700_irq.h rename to soc/arm/include/xmc4/xmc4700_irq.h diff --git a/arch/arm/include/xmc4/xmc4800_irq.h b/soc/arm/include/xmc4/xmc4800_irq.h similarity index 100% rename from arch/arm/include/xmc4/xmc4800_irq.h rename to soc/arm/include/xmc4/xmc4800_irq.h diff --git a/arch/arm/src/kinetis/Kconfig b/soc/arm/kinetis/Kconfig similarity index 100% rename from arch/arm/src/kinetis/Kconfig rename to soc/arm/kinetis/Kconfig diff --git a/arch/arm/src/kinetis/Make.defs b/soc/arm/kinetis/Make.defs similarity index 100% rename from arch/arm/src/kinetis/Make.defs rename to soc/arm/kinetis/Make.defs diff --git a/arch/arm/src/kinetis/chip.h b/soc/arm/kinetis/chip.h similarity index 100% rename from arch/arm/src/kinetis/chip.h rename to soc/arm/kinetis/chip.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_adc.h b/soc/arm/kinetis/hardware/kinetis_adc.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_adc.h rename to soc/arm/kinetis/hardware/kinetis_adc.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_aips.h b/soc/arm/kinetis/hardware/kinetis_aips.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_aips.h rename to soc/arm/kinetis/hardware/kinetis_aips.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_axbs.h b/soc/arm/kinetis/hardware/kinetis_axbs.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_axbs.h rename to soc/arm/kinetis/hardware/kinetis_axbs.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_cmp.h b/soc/arm/kinetis/hardware/kinetis_cmp.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_cmp.h rename to soc/arm/kinetis/hardware/kinetis_cmp.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_cmt.h b/soc/arm/kinetis/hardware/kinetis_cmt.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_cmt.h rename to soc/arm/kinetis/hardware/kinetis_cmt.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_crc.h b/soc/arm/kinetis/hardware/kinetis_crc.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_crc.h rename to soc/arm/kinetis/hardware/kinetis_crc.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_dac.h b/soc/arm/kinetis/hardware/kinetis_dac.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_dac.h rename to soc/arm/kinetis/hardware/kinetis_dac.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_dmamux.h b/soc/arm/kinetis/hardware/kinetis_dmamux.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_dmamux.h rename to soc/arm/kinetis/hardware/kinetis_dmamux.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_dspi.h b/soc/arm/kinetis/hardware/kinetis_dspi.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_dspi.h rename to soc/arm/kinetis/hardware/kinetis_dspi.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_edma.h b/soc/arm/kinetis/hardware/kinetis_edma.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_edma.h rename to soc/arm/kinetis/hardware/kinetis_edma.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_enet.h b/soc/arm/kinetis/hardware/kinetis_enet.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_enet.h rename to soc/arm/kinetis/hardware/kinetis_enet.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_ewm.h b/soc/arm/kinetis/hardware/kinetis_ewm.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_ewm.h rename to soc/arm/kinetis/hardware/kinetis_ewm.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_flexbus.h b/soc/arm/kinetis/hardware/kinetis_flexbus.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_flexbus.h rename to soc/arm/kinetis/hardware/kinetis_flexbus.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_flexcan.h b/soc/arm/kinetis/hardware/kinetis_flexcan.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_flexcan.h rename to soc/arm/kinetis/hardware/kinetis_flexcan.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_fmc.h b/soc/arm/kinetis/hardware/kinetis_fmc.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_fmc.h rename to soc/arm/kinetis/hardware/kinetis_fmc.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_ftfe.h b/soc/arm/kinetis/hardware/kinetis_ftfe.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_ftfe.h rename to soc/arm/kinetis/hardware/kinetis_ftfe.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_ftm.h b/soc/arm/kinetis/hardware/kinetis_ftm.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_ftm.h rename to soc/arm/kinetis/hardware/kinetis_ftm.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_gpio.h b/soc/arm/kinetis/hardware/kinetis_gpio.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_gpio.h rename to soc/arm/kinetis/hardware/kinetis_gpio.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_i2c.h b/soc/arm/kinetis/hardware/kinetis_i2c.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_i2c.h rename to soc/arm/kinetis/hardware/kinetis_i2c.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_i2s.h b/soc/arm/kinetis/hardware/kinetis_i2s.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_i2s.h rename to soc/arm/kinetis/hardware/kinetis_i2s.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_k20k40k60fmc.h b/soc/arm/kinetis/hardware/kinetis_k20k40k60fmc.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_k20k40k60fmc.h rename to soc/arm/kinetis/hardware/kinetis_k20k40k60fmc.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_k20k40k60mpu.h b/soc/arm/kinetis/hardware/kinetis_k20k40k60mpu.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_k20k40k60mpu.h rename to soc/arm/kinetis/hardware/kinetis_k20k40k60mpu.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_k20memorymap.h b/soc/arm/kinetis/hardware/kinetis_k20memorymap.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_k20memorymap.h rename to soc/arm/kinetis/hardware/kinetis_k20memorymap.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_k20pinmux.h b/soc/arm/kinetis/hardware/kinetis_k20pinmux.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_k20pinmux.h rename to soc/arm/kinetis/hardware/kinetis_k20pinmux.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_k28k64k66mpu.h b/soc/arm/kinetis/hardware/kinetis_k28k64k66mpu.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_k28k64k66mpu.h rename to soc/arm/kinetis/hardware/kinetis_k28k64k66mpu.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_k28k66fmc.h b/soc/arm/kinetis/hardware/kinetis_k28k66fmc.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_k28k66fmc.h rename to soc/arm/kinetis/hardware/kinetis_k28k66fmc.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_k28memorymap.h b/soc/arm/kinetis/hardware/kinetis_k28memorymap.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_k28memorymap.h rename to soc/arm/kinetis/hardware/kinetis_k28memorymap.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_k28pinmux.h b/soc/arm/kinetis/hardware/kinetis_k28pinmux.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_k28pinmux.h rename to soc/arm/kinetis/hardware/kinetis_k28pinmux.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_k40memorymap.h b/soc/arm/kinetis/hardware/kinetis_k40memorymap.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_k40memorymap.h rename to soc/arm/kinetis/hardware/kinetis_k40memorymap.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_k40pinmux.h b/soc/arm/kinetis/hardware/kinetis_k40pinmux.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_k40pinmux.h rename to soc/arm/kinetis/hardware/kinetis_k40pinmux.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_k60memorymap.h b/soc/arm/kinetis/hardware/kinetis_k60memorymap.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_k60memorymap.h rename to soc/arm/kinetis/hardware/kinetis_k60memorymap.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_k60pinmux.h b/soc/arm/kinetis/hardware/kinetis_k60pinmux.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_k60pinmux.h rename to soc/arm/kinetis/hardware/kinetis_k60pinmux.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_k64fmc.h b/soc/arm/kinetis/hardware/kinetis_k64fmc.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_k64fmc.h rename to soc/arm/kinetis/hardware/kinetis_k64fmc.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_k64memorymap.h b/soc/arm/kinetis/hardware/kinetis_k64memorymap.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_k64memorymap.h rename to soc/arm/kinetis/hardware/kinetis_k64memorymap.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_k64pinmux.h b/soc/arm/kinetis/hardware/kinetis_k64pinmux.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_k64pinmux.h rename to soc/arm/kinetis/hardware/kinetis_k64pinmux.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_k66memorymap.h b/soc/arm/kinetis/hardware/kinetis_k66memorymap.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_k66memorymap.h rename to soc/arm/kinetis/hardware/kinetis_k66memorymap.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_k66pinmux.h b/soc/arm/kinetis/hardware/kinetis_k66pinmux.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_k66pinmux.h rename to soc/arm/kinetis/hardware/kinetis_k66pinmux.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_kx6tpm.h b/soc/arm/kinetis/hardware/kinetis_kx6tpm.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_kx6tpm.h rename to soc/arm/kinetis/hardware/kinetis_kx6tpm.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_llwu.h b/soc/arm/kinetis/hardware/kinetis_llwu.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_llwu.h rename to soc/arm/kinetis/hardware/kinetis_llwu.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_lptmr.h b/soc/arm/kinetis/hardware/kinetis_lptmr.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_lptmr.h rename to soc/arm/kinetis/hardware/kinetis_lptmr.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_lpuart.h b/soc/arm/kinetis/hardware/kinetis_lpuart.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_lpuart.h rename to soc/arm/kinetis/hardware/kinetis_lpuart.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_mcg.h b/soc/arm/kinetis/hardware/kinetis_mcg.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_mcg.h rename to soc/arm/kinetis/hardware/kinetis_mcg.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_mcm.h b/soc/arm/kinetis/hardware/kinetis_mcm.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_mcm.h rename to soc/arm/kinetis/hardware/kinetis_mcm.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_memorymap.h b/soc/arm/kinetis/hardware/kinetis_memorymap.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_memorymap.h rename to soc/arm/kinetis/hardware/kinetis_memorymap.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_mmcau.h b/soc/arm/kinetis/hardware/kinetis_mmcau.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_mmcau.h rename to soc/arm/kinetis/hardware/kinetis_mmcau.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_mpu.h b/soc/arm/kinetis/hardware/kinetis_mpu.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_mpu.h rename to soc/arm/kinetis/hardware/kinetis_mpu.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_osc.h b/soc/arm/kinetis/hardware/kinetis_osc.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_osc.h rename to soc/arm/kinetis/hardware/kinetis_osc.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_pdb.h b/soc/arm/kinetis/hardware/kinetis_pdb.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_pdb.h rename to soc/arm/kinetis/hardware/kinetis_pdb.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_pinmux.h b/soc/arm/kinetis/hardware/kinetis_pinmux.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_pinmux.h rename to soc/arm/kinetis/hardware/kinetis_pinmux.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_pit.h b/soc/arm/kinetis/hardware/kinetis_pit.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_pit.h rename to soc/arm/kinetis/hardware/kinetis_pit.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_pmc.h b/soc/arm/kinetis/hardware/kinetis_pmc.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_pmc.h rename to soc/arm/kinetis/hardware/kinetis_pmc.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_port.h b/soc/arm/kinetis/hardware/kinetis_port.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_port.h rename to soc/arm/kinetis/hardware/kinetis_port.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_rngb.h b/soc/arm/kinetis/hardware/kinetis_rngb.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_rngb.h rename to soc/arm/kinetis/hardware/kinetis_rngb.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_rtc.h b/soc/arm/kinetis/hardware/kinetis_rtc.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_rtc.h rename to soc/arm/kinetis/hardware/kinetis_rtc.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_sdhc.h b/soc/arm/kinetis/hardware/kinetis_sdhc.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_sdhc.h rename to soc/arm/kinetis/hardware/kinetis_sdhc.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_sim.h b/soc/arm/kinetis/hardware/kinetis_sim.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_sim.h rename to soc/arm/kinetis/hardware/kinetis_sim.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_slcd.h b/soc/arm/kinetis/hardware/kinetis_slcd.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_slcd.h rename to soc/arm/kinetis/hardware/kinetis_slcd.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_smc.h b/soc/arm/kinetis/hardware/kinetis_smc.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_smc.h rename to soc/arm/kinetis/hardware/kinetis_smc.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_tsi.h b/soc/arm/kinetis/hardware/kinetis_tsi.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_tsi.h rename to soc/arm/kinetis/hardware/kinetis_tsi.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_uart.h b/soc/arm/kinetis/hardware/kinetis_uart.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_uart.h rename to soc/arm/kinetis/hardware/kinetis_uart.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_usbdcd.h b/soc/arm/kinetis/hardware/kinetis_usbdcd.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_usbdcd.h rename to soc/arm/kinetis/hardware/kinetis_usbdcd.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_usbhs.h b/soc/arm/kinetis/hardware/kinetis_usbhs.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_usbhs.h rename to soc/arm/kinetis/hardware/kinetis_usbhs.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_usbotg.h b/soc/arm/kinetis/hardware/kinetis_usbotg.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_usbotg.h rename to soc/arm/kinetis/hardware/kinetis_usbotg.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_vrefv1.h b/soc/arm/kinetis/hardware/kinetis_vrefv1.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_vrefv1.h rename to soc/arm/kinetis/hardware/kinetis_vrefv1.h diff --git a/arch/arm/src/kinetis/hardware/kinetis_wdog.h b/soc/arm/kinetis/hardware/kinetis_wdog.h similarity index 100% rename from arch/arm/src/kinetis/hardware/kinetis_wdog.h rename to soc/arm/kinetis/hardware/kinetis_wdog.h diff --git a/arch/arm/src/kinetis/kinetis.h b/soc/arm/kinetis/kinetis.h similarity index 100% rename from arch/arm/src/kinetis/kinetis.h rename to soc/arm/kinetis/kinetis.h diff --git a/arch/arm/src/kinetis/kinetis_alarm.h b/soc/arm/kinetis/kinetis_alarm.h similarity index 100% rename from arch/arm/src/kinetis/kinetis_alarm.h rename to soc/arm/kinetis/kinetis_alarm.h diff --git a/arch/arm/src/kinetis/kinetis_allocateheap.c b/soc/arm/kinetis/kinetis_allocateheap.c similarity index 100% rename from arch/arm/src/kinetis/kinetis_allocateheap.c rename to soc/arm/kinetis/kinetis_allocateheap.c diff --git a/arch/arm/src/kinetis/kinetis_cfmconfig.c b/soc/arm/kinetis/kinetis_cfmconfig.c similarity index 100% rename from arch/arm/src/kinetis/kinetis_cfmconfig.c rename to soc/arm/kinetis/kinetis_cfmconfig.c diff --git a/arch/arm/src/kinetis/kinetis_clockconfig.c b/soc/arm/kinetis/kinetis_clockconfig.c similarity index 100% rename from arch/arm/src/kinetis/kinetis_clockconfig.c rename to soc/arm/kinetis/kinetis_clockconfig.c diff --git a/arch/arm/src/kinetis/kinetis_clrpend.c b/soc/arm/kinetis/kinetis_clrpend.c similarity index 100% rename from arch/arm/src/kinetis/kinetis_clrpend.c rename to soc/arm/kinetis/kinetis_clrpend.c diff --git a/arch/arm/src/kinetis/kinetis_config.h b/soc/arm/kinetis/kinetis_config.h similarity index 100% rename from arch/arm/src/kinetis/kinetis_config.h rename to soc/arm/kinetis/kinetis_config.h diff --git a/arch/arm/src/kinetis/kinetis_edma.c b/soc/arm/kinetis/kinetis_edma.c similarity index 100% rename from arch/arm/src/kinetis/kinetis_edma.c rename to soc/arm/kinetis/kinetis_edma.c diff --git a/arch/arm/src/kinetis/kinetis_edma.h b/soc/arm/kinetis/kinetis_edma.h similarity index 100% rename from arch/arm/src/kinetis/kinetis_edma.h rename to soc/arm/kinetis/kinetis_edma.h diff --git a/arch/arm/src/kinetis/kinetis_enet.c b/soc/arm/kinetis/kinetis_enet.c similarity index 100% rename from arch/arm/src/kinetis/kinetis_enet.c rename to soc/arm/kinetis/kinetis_enet.c diff --git a/arch/arm/src/kinetis/kinetis_flexcan.c b/soc/arm/kinetis/kinetis_flexcan.c similarity index 100% rename from arch/arm/src/kinetis/kinetis_flexcan.c rename to soc/arm/kinetis/kinetis_flexcan.c diff --git a/arch/arm/src/kinetis/kinetis_i2c.c b/soc/arm/kinetis/kinetis_i2c.c similarity index 100% rename from arch/arm/src/kinetis/kinetis_i2c.c rename to soc/arm/kinetis/kinetis_i2c.c diff --git a/arch/arm/src/kinetis/kinetis_i2c.h b/soc/arm/kinetis/kinetis_i2c.h similarity index 100% rename from arch/arm/src/kinetis/kinetis_i2c.h rename to soc/arm/kinetis/kinetis_i2c.h diff --git a/arch/arm/src/kinetis/kinetis_idle.c b/soc/arm/kinetis/kinetis_idle.c similarity index 100% rename from arch/arm/src/kinetis/kinetis_idle.c rename to soc/arm/kinetis/kinetis_idle.c diff --git a/arch/arm/src/kinetis/kinetis_irq.c b/soc/arm/kinetis/kinetis_irq.c similarity index 100% rename from arch/arm/src/kinetis/kinetis_irq.c rename to soc/arm/kinetis/kinetis_irq.c diff --git a/arch/arm/src/kinetis/kinetis_lowputc.c b/soc/arm/kinetis/kinetis_lowputc.c similarity index 100% rename from arch/arm/src/kinetis/kinetis_lowputc.c rename to soc/arm/kinetis/kinetis_lowputc.c diff --git a/arch/arm/src/kinetis/kinetis_lpserial.c b/soc/arm/kinetis/kinetis_lpserial.c similarity index 100% rename from arch/arm/src/kinetis/kinetis_lpserial.c rename to soc/arm/kinetis/kinetis_lpserial.c diff --git a/arch/arm/src/kinetis/kinetis_lpuart.h b/soc/arm/kinetis/kinetis_lpuart.h similarity index 100% rename from arch/arm/src/kinetis/kinetis_lpuart.h rename to soc/arm/kinetis/kinetis_lpuart.h diff --git a/arch/arm/src/kinetis/kinetis_mpuinit.c b/soc/arm/kinetis/kinetis_mpuinit.c similarity index 100% rename from arch/arm/src/kinetis/kinetis_mpuinit.c rename to soc/arm/kinetis/kinetis_mpuinit.c diff --git a/arch/arm/src/kinetis/kinetis_mpuinit.h b/soc/arm/kinetis/kinetis_mpuinit.h similarity index 100% rename from arch/arm/src/kinetis/kinetis_mpuinit.h rename to soc/arm/kinetis/kinetis_mpuinit.h diff --git a/arch/arm/src/kinetis/kinetis_pin.c b/soc/arm/kinetis/kinetis_pin.c similarity index 100% rename from arch/arm/src/kinetis/kinetis_pin.c rename to soc/arm/kinetis/kinetis_pin.c diff --git a/arch/arm/src/kinetis/kinetis_pindma.c b/soc/arm/kinetis/kinetis_pindma.c similarity index 100% rename from arch/arm/src/kinetis/kinetis_pindma.c rename to soc/arm/kinetis/kinetis_pindma.c diff --git a/arch/arm/src/kinetis/kinetis_pindump.c b/soc/arm/kinetis/kinetis_pindump.c similarity index 100% rename from arch/arm/src/kinetis/kinetis_pindump.c rename to soc/arm/kinetis/kinetis_pindump.c diff --git a/arch/arm/src/kinetis/kinetis_pingpio.c b/soc/arm/kinetis/kinetis_pingpio.c similarity index 100% rename from arch/arm/src/kinetis/kinetis_pingpio.c rename to soc/arm/kinetis/kinetis_pingpio.c diff --git a/arch/arm/src/kinetis/kinetis_pinirq.c b/soc/arm/kinetis/kinetis_pinirq.c similarity index 100% rename from arch/arm/src/kinetis/kinetis_pinirq.c rename to soc/arm/kinetis/kinetis_pinirq.c diff --git a/arch/arm/src/kinetis/kinetis_pwm.c b/soc/arm/kinetis/kinetis_pwm.c similarity index 100% rename from arch/arm/src/kinetis/kinetis_pwm.c rename to soc/arm/kinetis/kinetis_pwm.c diff --git a/arch/arm/src/kinetis/kinetis_pwm.h b/soc/arm/kinetis/kinetis_pwm.h similarity index 100% rename from arch/arm/src/kinetis/kinetis_pwm.h rename to soc/arm/kinetis/kinetis_pwm.h diff --git a/arch/arm/src/kinetis/kinetis_rtc.c b/soc/arm/kinetis/kinetis_rtc.c similarity index 100% rename from arch/arm/src/kinetis/kinetis_rtc.c rename to soc/arm/kinetis/kinetis_rtc.c diff --git a/arch/arm/src/kinetis/kinetis_rtc_if.h b/soc/arm/kinetis/kinetis_rtc_if.h similarity index 100% rename from arch/arm/src/kinetis/kinetis_rtc_if.h rename to soc/arm/kinetis/kinetis_rtc_if.h diff --git a/arch/arm/src/kinetis/kinetis_rtc_lowerhalf.c b/soc/arm/kinetis/kinetis_rtc_lowerhalf.c similarity index 100% rename from arch/arm/src/kinetis/kinetis_rtc_lowerhalf.c rename to soc/arm/kinetis/kinetis_rtc_lowerhalf.c diff --git a/arch/arm/src/kinetis/kinetis_sdhc.c b/soc/arm/kinetis/kinetis_sdhc.c similarity index 100% rename from arch/arm/src/kinetis/kinetis_sdhc.c rename to soc/arm/kinetis/kinetis_sdhc.c diff --git a/arch/arm/src/kinetis/kinetis_serial.c b/soc/arm/kinetis/kinetis_serial.c similarity index 100% rename from arch/arm/src/kinetis/kinetis_serial.c rename to soc/arm/kinetis/kinetis_serial.c diff --git a/arch/arm/src/kinetis/kinetis_serialinit.c b/soc/arm/kinetis/kinetis_serialinit.c similarity index 100% rename from arch/arm/src/kinetis/kinetis_serialinit.c rename to soc/arm/kinetis/kinetis_serialinit.c diff --git a/arch/arm/src/kinetis/kinetis_spi.c b/soc/arm/kinetis/kinetis_spi.c similarity index 100% rename from arch/arm/src/kinetis/kinetis_spi.c rename to soc/arm/kinetis/kinetis_spi.c diff --git a/arch/arm/src/kinetis/kinetis_spi.h b/soc/arm/kinetis/kinetis_spi.h similarity index 100% rename from arch/arm/src/kinetis/kinetis_spi.h rename to soc/arm/kinetis/kinetis_spi.h diff --git a/arch/arm/src/kinetis/kinetis_start.c b/soc/arm/kinetis/kinetis_start.c similarity index 100% rename from arch/arm/src/kinetis/kinetis_start.c rename to soc/arm/kinetis/kinetis_start.c diff --git a/arch/arm/src/kinetis/kinetis_start.h b/soc/arm/kinetis/kinetis_start.h similarity index 100% rename from arch/arm/src/kinetis/kinetis_start.h rename to soc/arm/kinetis/kinetis_start.h diff --git a/arch/arm/src/kinetis/kinetis_timerisr.c b/soc/arm/kinetis/kinetis_timerisr.c similarity index 100% rename from arch/arm/src/kinetis/kinetis_timerisr.c rename to soc/arm/kinetis/kinetis_timerisr.c diff --git a/arch/arm/src/kinetis/kinetis_tpm.h b/soc/arm/kinetis/kinetis_tpm.h similarity index 100% rename from arch/arm/src/kinetis/kinetis_tpm.h rename to soc/arm/kinetis/kinetis_tpm.h diff --git a/arch/arm/src/kinetis/kinetis_uart.h b/soc/arm/kinetis/kinetis_uart.h similarity index 100% rename from arch/arm/src/kinetis/kinetis_uart.h rename to soc/arm/kinetis/kinetis_uart.h diff --git a/arch/arm/src/kinetis/kinetis_uid.c b/soc/arm/kinetis/kinetis_uid.c similarity index 100% rename from arch/arm/src/kinetis/kinetis_uid.c rename to soc/arm/kinetis/kinetis_uid.c diff --git a/arch/arm/src/kinetis/kinetis_uid.h b/soc/arm/kinetis/kinetis_uid.h similarity index 100% rename from arch/arm/src/kinetis/kinetis_uid.h rename to soc/arm/kinetis/kinetis_uid.h diff --git a/arch/arm/src/kinetis/kinetis_usbdev.c b/soc/arm/kinetis/kinetis_usbdev.c similarity index 100% rename from arch/arm/src/kinetis/kinetis_usbdev.c rename to soc/arm/kinetis/kinetis_usbdev.c diff --git a/arch/arm/src/kinetis/kinetis_usbhshost.c b/soc/arm/kinetis/kinetis_usbhshost.c similarity index 100% rename from arch/arm/src/kinetis/kinetis_usbhshost.c rename to soc/arm/kinetis/kinetis_usbhshost.c diff --git a/arch/arm/src/kinetis/kinetis_usbhshost.h b/soc/arm/kinetis/kinetis_usbhshost.h similarity index 100% rename from arch/arm/src/kinetis/kinetis_usbhshost.h rename to soc/arm/kinetis/kinetis_usbhshost.h diff --git a/arch/arm/src/kinetis/kinetis_usbotg.h b/soc/arm/kinetis/kinetis_usbotg.h similarity index 100% rename from arch/arm/src/kinetis/kinetis_usbotg.h rename to soc/arm/kinetis/kinetis_usbotg.h diff --git a/arch/arm/src/kinetis/kinetis_userspace.c b/soc/arm/kinetis/kinetis_userspace.c similarity index 100% rename from arch/arm/src/kinetis/kinetis_userspace.c rename to soc/arm/kinetis/kinetis_userspace.c diff --git a/arch/arm/src/kinetis/kinetis_userspace.h b/soc/arm/kinetis/kinetis_userspace.h similarity index 100% rename from arch/arm/src/kinetis/kinetis_userspace.h rename to soc/arm/kinetis/kinetis_userspace.h diff --git a/arch/arm/src/kinetis/kinetis_wdog.c b/soc/arm/kinetis/kinetis_wdog.c similarity index 100% rename from arch/arm/src/kinetis/kinetis_wdog.c rename to soc/arm/kinetis/kinetis_wdog.c diff --git a/arch/arm/src/kl/Kconfig b/soc/arm/kl/Kconfig similarity index 100% rename from arch/arm/src/kl/Kconfig rename to soc/arm/kl/Kconfig diff --git a/arch/arm/src/kl/Make.defs b/soc/arm/kl/Make.defs similarity index 100% rename from arch/arm/src/kl/Make.defs rename to soc/arm/kl/Make.defs diff --git a/arch/arm/src/kl/chip.h b/soc/arm/kl/chip.h similarity index 100% rename from arch/arm/src/kl/chip.h rename to soc/arm/kl/chip.h diff --git a/arch/arm/src/kl/hardware/k25z128_pinmux.h b/soc/arm/kl/hardware/k25z128_pinmux.h similarity index 100% rename from arch/arm/src/kl/hardware/k25z128_pinmux.h rename to soc/arm/kl/hardware/k25z128_pinmux.h diff --git a/arch/arm/src/kl/hardware/kl_fmc.h b/soc/arm/kl/hardware/kl_fmc.h similarity index 100% rename from arch/arm/src/kl/hardware/kl_fmc.h rename to soc/arm/kl/hardware/kl_fmc.h diff --git a/arch/arm/src/kl/hardware/kl_gpio.h b/soc/arm/kl/hardware/kl_gpio.h similarity index 100% rename from arch/arm/src/kl/hardware/kl_gpio.h rename to soc/arm/kl/hardware/kl_gpio.h diff --git a/arch/arm/src/kl/hardware/kl_i2c.h b/soc/arm/kl/hardware/kl_i2c.h similarity index 100% rename from arch/arm/src/kl/hardware/kl_i2c.h rename to soc/arm/kl/hardware/kl_i2c.h diff --git a/arch/arm/src/kl/hardware/kl_llwu.h b/soc/arm/kl/hardware/kl_llwu.h similarity index 100% rename from arch/arm/src/kl/hardware/kl_llwu.h rename to soc/arm/kl/hardware/kl_llwu.h diff --git a/arch/arm/src/kl/hardware/kl_mcg.h b/soc/arm/kl/hardware/kl_mcg.h similarity index 100% rename from arch/arm/src/kl/hardware/kl_mcg.h rename to soc/arm/kl/hardware/kl_mcg.h diff --git a/arch/arm/src/kl/hardware/kl_memorymap.h b/soc/arm/kl/hardware/kl_memorymap.h similarity index 100% rename from arch/arm/src/kl/hardware/kl_memorymap.h rename to soc/arm/kl/hardware/kl_memorymap.h diff --git a/arch/arm/src/kl/hardware/kl_osc.h b/soc/arm/kl/hardware/kl_osc.h similarity index 100% rename from arch/arm/src/kl/hardware/kl_osc.h rename to soc/arm/kl/hardware/kl_osc.h diff --git a/arch/arm/src/kl/hardware/kl_pinmux.h b/soc/arm/kl/hardware/kl_pinmux.h similarity index 100% rename from arch/arm/src/kl/hardware/kl_pinmux.h rename to soc/arm/kl/hardware/kl_pinmux.h diff --git a/arch/arm/src/kl/hardware/kl_pit.h b/soc/arm/kl/hardware/kl_pit.h similarity index 100% rename from arch/arm/src/kl/hardware/kl_pit.h rename to soc/arm/kl/hardware/kl_pit.h diff --git a/arch/arm/src/kl/hardware/kl_port.h b/soc/arm/kl/hardware/kl_port.h similarity index 100% rename from arch/arm/src/kl/hardware/kl_port.h rename to soc/arm/kl/hardware/kl_port.h diff --git a/arch/arm/src/kl/hardware/kl_sim.h b/soc/arm/kl/hardware/kl_sim.h similarity index 100% rename from arch/arm/src/kl/hardware/kl_sim.h rename to soc/arm/kl/hardware/kl_sim.h diff --git a/arch/arm/src/kl/hardware/kl_spi.h b/soc/arm/kl/hardware/kl_spi.h similarity index 100% rename from arch/arm/src/kl/hardware/kl_spi.h rename to soc/arm/kl/hardware/kl_spi.h diff --git a/arch/arm/src/kl/hardware/kl_tpm.h b/soc/arm/kl/hardware/kl_tpm.h similarity index 100% rename from arch/arm/src/kl/hardware/kl_tpm.h rename to soc/arm/kl/hardware/kl_tpm.h diff --git a/arch/arm/src/kl/hardware/kl_tsi.h b/soc/arm/kl/hardware/kl_tsi.h similarity index 100% rename from arch/arm/src/kl/hardware/kl_tsi.h rename to soc/arm/kl/hardware/kl_tsi.h diff --git a/arch/arm/src/kl/hardware/kl_uart.h b/soc/arm/kl/hardware/kl_uart.h similarity index 100% rename from arch/arm/src/kl/hardware/kl_uart.h rename to soc/arm/kl/hardware/kl_uart.h diff --git a/arch/arm/src/kl/kl_cfmconfig.c b/soc/arm/kl/kl_cfmconfig.c similarity index 100% rename from arch/arm/src/kl/kl_cfmconfig.c rename to soc/arm/kl/kl_cfmconfig.c diff --git a/arch/arm/src/kl/kl_clockconfig.c b/soc/arm/kl/kl_clockconfig.c similarity index 100% rename from arch/arm/src/kl/kl_clockconfig.c rename to soc/arm/kl/kl_clockconfig.c diff --git a/arch/arm/src/kl/kl_clockconfig.h b/soc/arm/kl/kl_clockconfig.h similarity index 100% rename from arch/arm/src/kl/kl_clockconfig.h rename to soc/arm/kl/kl_clockconfig.h diff --git a/arch/arm/src/kl/kl_config.h b/soc/arm/kl/kl_config.h similarity index 100% rename from arch/arm/src/kl/kl_config.h rename to soc/arm/kl/kl_config.h diff --git a/arch/arm/src/kl/kl_dma.h b/soc/arm/kl/kl_dma.h similarity index 100% rename from arch/arm/src/kl/kl_dma.h rename to soc/arm/kl/kl_dma.h diff --git a/arch/arm/src/kl/kl_dumpgpio.c b/soc/arm/kl/kl_dumpgpio.c similarity index 100% rename from arch/arm/src/kl/kl_dumpgpio.c rename to soc/arm/kl/kl_dumpgpio.c diff --git a/arch/arm/src/kl/kl_gpio.c b/soc/arm/kl/kl_gpio.c similarity index 100% rename from arch/arm/src/kl/kl_gpio.c rename to soc/arm/kl/kl_gpio.c diff --git a/arch/arm/src/kl/kl_gpio.h b/soc/arm/kl/kl_gpio.h similarity index 100% rename from arch/arm/src/kl/kl_gpio.h rename to soc/arm/kl/kl_gpio.h diff --git a/arch/arm/src/kl/kl_gpioirq.c b/soc/arm/kl/kl_gpioirq.c similarity index 100% rename from arch/arm/src/kl/kl_gpioirq.c rename to soc/arm/kl/kl_gpioirq.c diff --git a/arch/arm/src/kl/kl_idle.c b/soc/arm/kl/kl_idle.c similarity index 100% rename from arch/arm/src/kl/kl_idle.c rename to soc/arm/kl/kl_idle.c diff --git a/arch/arm/src/kl/kl_irq.c b/soc/arm/kl/kl_irq.c similarity index 100% rename from arch/arm/src/kl/kl_irq.c rename to soc/arm/kl/kl_irq.c diff --git a/arch/arm/src/kl/kl_irq.h b/soc/arm/kl/kl_irq.h similarity index 100% rename from arch/arm/src/kl/kl_irq.h rename to soc/arm/kl/kl_irq.h diff --git a/arch/arm/src/kl/kl_irqprio.c b/soc/arm/kl/kl_irqprio.c similarity index 100% rename from arch/arm/src/kl/kl_irqprio.c rename to soc/arm/kl/kl_irqprio.c diff --git a/arch/arm/src/kl/kl_lowputc.c b/soc/arm/kl/kl_lowputc.c similarity index 100% rename from arch/arm/src/kl/kl_lowputc.c rename to soc/arm/kl/kl_lowputc.c diff --git a/arch/arm/src/kl/kl_lowputc.h b/soc/arm/kl/kl_lowputc.h similarity index 100% rename from arch/arm/src/kl/kl_lowputc.h rename to soc/arm/kl/kl_lowputc.h diff --git a/arch/arm/src/kl/kl_pwm.c b/soc/arm/kl/kl_pwm.c similarity index 100% rename from arch/arm/src/kl/kl_pwm.c rename to soc/arm/kl/kl_pwm.c diff --git a/arch/arm/src/kl/kl_pwm.h b/soc/arm/kl/kl_pwm.h similarity index 100% rename from arch/arm/src/kl/kl_pwm.h rename to soc/arm/kl/kl_pwm.h diff --git a/arch/arm/src/kl/kl_serial.c b/soc/arm/kl/kl_serial.c similarity index 100% rename from arch/arm/src/kl/kl_serial.c rename to soc/arm/kl/kl_serial.c diff --git a/arch/arm/src/kl/kl_spi.c b/soc/arm/kl/kl_spi.c similarity index 100% rename from arch/arm/src/kl/kl_spi.c rename to soc/arm/kl/kl_spi.c diff --git a/arch/arm/src/kl/kl_spi.h b/soc/arm/kl/kl_spi.h similarity index 100% rename from arch/arm/src/kl/kl_spi.h rename to soc/arm/kl/kl_spi.h diff --git a/arch/arm/src/kl/kl_start.c b/soc/arm/kl/kl_start.c similarity index 100% rename from arch/arm/src/kl/kl_start.c rename to soc/arm/kl/kl_start.c diff --git a/arch/arm/src/kl/kl_start.h b/soc/arm/kl/kl_start.h similarity index 100% rename from arch/arm/src/kl/kl_start.h rename to soc/arm/kl/kl_start.h diff --git a/arch/arm/src/kl/kl_timerisr.c b/soc/arm/kl/kl_timerisr.c similarity index 100% rename from arch/arm/src/kl/kl_timerisr.c rename to soc/arm/kl/kl_timerisr.c diff --git a/arch/arm/src/kl/kl_userspace.c b/soc/arm/kl/kl_userspace.c similarity index 100% rename from arch/arm/src/kl/kl_userspace.c rename to soc/arm/kl/kl_userspace.c diff --git a/arch/arm/src/kl/kl_userspace.h b/soc/arm/kl/kl_userspace.h similarity index 100% rename from arch/arm/src/kl/kl_userspace.h rename to soc/arm/kl/kl_userspace.h diff --git a/arch/arm/src/lc823450/Kconfig b/soc/arm/lc823450/Kconfig similarity index 100% rename from arch/arm/src/lc823450/Kconfig rename to soc/arm/lc823450/Kconfig diff --git a/arch/arm/src/lc823450/Make.defs b/soc/arm/lc823450/Make.defs similarity index 100% rename from arch/arm/src/lc823450/Make.defs rename to soc/arm/lc823450/Make.defs diff --git a/arch/arm/src/lc823450/chip.h b/soc/arm/lc823450/chip.h similarity index 100% rename from arch/arm/src/lc823450/chip.h rename to soc/arm/lc823450/chip.h diff --git a/arch/arm/src/lc823450/lc823450_adc.c b/soc/arm/lc823450/lc823450_adc.c similarity index 100% rename from arch/arm/src/lc823450/lc823450_adc.c rename to soc/arm/lc823450/lc823450_adc.c diff --git a/arch/arm/src/lc823450/lc823450_adc.h b/soc/arm/lc823450/lc823450_adc.h similarity index 100% rename from arch/arm/src/lc823450/lc823450_adc.h rename to soc/arm/lc823450/lc823450_adc.h diff --git a/arch/arm/src/lc823450/lc823450_allocateheap2.c b/soc/arm/lc823450/lc823450_allocateheap2.c similarity index 100% rename from arch/arm/src/lc823450/lc823450_allocateheap2.c rename to soc/arm/lc823450/lc823450_allocateheap2.c diff --git a/arch/arm/src/lc823450/lc823450_clockconfig.c b/soc/arm/lc823450/lc823450_clockconfig.c similarity index 100% rename from arch/arm/src/lc823450/lc823450_clockconfig.c rename to soc/arm/lc823450/lc823450_clockconfig.c diff --git a/arch/arm/src/lc823450/lc823450_clockconfig.h b/soc/arm/lc823450/lc823450_clockconfig.h similarity index 100% rename from arch/arm/src/lc823450/lc823450_clockconfig.h rename to soc/arm/lc823450/lc823450_clockconfig.h diff --git a/arch/arm/src/lc823450/lc823450_cpuidlestack.c b/soc/arm/lc823450/lc823450_cpuidlestack.c similarity index 100% rename from arch/arm/src/lc823450/lc823450_cpuidlestack.c rename to soc/arm/lc823450/lc823450_cpuidlestack.c diff --git a/arch/arm/src/lc823450/lc823450_cpuindex.c b/soc/arm/lc823450/lc823450_cpuindex.c similarity index 100% rename from arch/arm/src/lc823450/lc823450_cpuindex.c rename to soc/arm/lc823450/lc823450_cpuindex.c diff --git a/arch/arm/src/lc823450/lc823450_cpustart.c b/soc/arm/lc823450/lc823450_cpustart.c similarity index 100% rename from arch/arm/src/lc823450/lc823450_cpustart.c rename to soc/arm/lc823450/lc823450_cpustart.c diff --git a/arch/arm/src/lc823450/lc823450_dma.c b/soc/arm/lc823450/lc823450_dma.c similarity index 100% rename from arch/arm/src/lc823450/lc823450_dma.c rename to soc/arm/lc823450/lc823450_dma.c diff --git a/arch/arm/src/lc823450/lc823450_dma.h b/soc/arm/lc823450/lc823450_dma.h similarity index 100% rename from arch/arm/src/lc823450/lc823450_dma.h rename to soc/arm/lc823450/lc823450_dma.h diff --git a/arch/arm/src/lc823450/lc823450_dvfs2.c b/soc/arm/lc823450/lc823450_dvfs2.c similarity index 100% rename from arch/arm/src/lc823450/lc823450_dvfs2.c rename to soc/arm/lc823450/lc823450_dvfs2.c diff --git a/arch/arm/src/lc823450/lc823450_dvfs2.h b/soc/arm/lc823450/lc823450_dvfs2.h similarity index 100% rename from arch/arm/src/lc823450/lc823450_dvfs2.h rename to soc/arm/lc823450/lc823450_dvfs2.h diff --git a/arch/arm/src/lc823450/lc823450_gpio.c b/soc/arm/lc823450/lc823450_gpio.c similarity index 100% rename from arch/arm/src/lc823450/lc823450_gpio.c rename to soc/arm/lc823450/lc823450_gpio.c diff --git a/arch/arm/src/lc823450/lc823450_gpio.h b/soc/arm/lc823450/lc823450_gpio.h similarity index 100% rename from arch/arm/src/lc823450/lc823450_gpio.h rename to soc/arm/lc823450/lc823450_gpio.h diff --git a/arch/arm/src/lc823450/lc823450_i2c.c b/soc/arm/lc823450/lc823450_i2c.c similarity index 100% rename from arch/arm/src/lc823450/lc823450_i2c.c rename to soc/arm/lc823450/lc823450_i2c.c diff --git a/arch/arm/src/lc823450/lc823450_i2c.h b/soc/arm/lc823450/lc823450_i2c.h similarity index 100% rename from arch/arm/src/lc823450/lc823450_i2c.h rename to soc/arm/lc823450/lc823450_i2c.h diff --git a/arch/arm/src/lc823450/lc823450_i2s.c b/soc/arm/lc823450/lc823450_i2s.c similarity index 100% rename from arch/arm/src/lc823450/lc823450_i2s.c rename to soc/arm/lc823450/lc823450_i2s.c diff --git a/arch/arm/src/lc823450/lc823450_i2s.h b/soc/arm/lc823450/lc823450_i2s.h similarity index 100% rename from arch/arm/src/lc823450/lc823450_i2s.h rename to soc/arm/lc823450/lc823450_i2s.h diff --git a/arch/arm/src/lc823450/lc823450_idle.c b/soc/arm/lc823450/lc823450_idle.c similarity index 100% rename from arch/arm/src/lc823450/lc823450_idle.c rename to soc/arm/lc823450/lc823450_idle.c diff --git a/arch/arm/src/lc823450/lc823450_intc.h b/soc/arm/lc823450/lc823450_intc.h similarity index 100% rename from arch/arm/src/lc823450/lc823450_intc.h rename to soc/arm/lc823450/lc823450_intc.h diff --git a/arch/arm/src/lc823450/lc823450_ipl2.c b/soc/arm/lc823450/lc823450_ipl2.c similarity index 100% rename from arch/arm/src/lc823450/lc823450_ipl2.c rename to soc/arm/lc823450/lc823450_ipl2.c diff --git a/arch/arm/src/lc823450/lc823450_irq.c b/soc/arm/lc823450/lc823450_irq.c similarity index 100% rename from arch/arm/src/lc823450/lc823450_irq.c rename to soc/arm/lc823450/lc823450_irq.c diff --git a/arch/arm/src/lc823450/lc823450_lowputc.c b/soc/arm/lc823450/lc823450_lowputc.c similarity index 100% rename from arch/arm/src/lc823450/lc823450_lowputc.c rename to soc/arm/lc823450/lc823450_lowputc.c diff --git a/arch/arm/src/lc823450/lc823450_lowputc.h b/soc/arm/lc823450/lc823450_lowputc.h similarity index 100% rename from arch/arm/src/lc823450/lc823450_lowputc.h rename to soc/arm/lc823450/lc823450_lowputc.h diff --git a/arch/arm/src/lc823450/lc823450_mmcl.c b/soc/arm/lc823450/lc823450_mmcl.c similarity index 100% rename from arch/arm/src/lc823450/lc823450_mmcl.c rename to soc/arm/lc823450/lc823450_mmcl.c diff --git a/arch/arm/src/lc823450/lc823450_mmcl.h b/soc/arm/lc823450/lc823450_mmcl.h similarity index 100% rename from arch/arm/src/lc823450/lc823450_mmcl.h rename to soc/arm/lc823450/lc823450_mmcl.h diff --git a/arch/arm/src/lc823450/lc823450_mpuinit2.c b/soc/arm/lc823450/lc823450_mpuinit2.c similarity index 100% rename from arch/arm/src/lc823450/lc823450_mpuinit2.c rename to soc/arm/lc823450/lc823450_mpuinit2.c diff --git a/arch/arm/src/lc823450/lc823450_mpuinit2.h b/soc/arm/lc823450/lc823450_mpuinit2.h similarity index 100% rename from arch/arm/src/lc823450/lc823450_mpuinit2.h rename to soc/arm/lc823450/lc823450_mpuinit2.h diff --git a/arch/arm/src/lc823450/lc823450_mtd.c b/soc/arm/lc823450/lc823450_mtd.c similarity index 100% rename from arch/arm/src/lc823450/lc823450_mtd.c rename to soc/arm/lc823450/lc823450_mtd.c diff --git a/arch/arm/src/lc823450/lc823450_mtd.h b/soc/arm/lc823450/lc823450_mtd.h similarity index 100% rename from arch/arm/src/lc823450/lc823450_mtd.h rename to soc/arm/lc823450/lc823450_mtd.h diff --git a/arch/arm/src/lc823450/lc823450_procfs_dvfs.c b/soc/arm/lc823450/lc823450_procfs_dvfs.c similarity index 100% rename from arch/arm/src/lc823450/lc823450_procfs_dvfs.c rename to soc/arm/lc823450/lc823450_procfs_dvfs.c diff --git a/arch/arm/src/lc823450/lc823450_pwm.h b/soc/arm/lc823450/lc823450_pwm.h similarity index 100% rename from arch/arm/src/lc823450/lc823450_pwm.h rename to soc/arm/lc823450/lc823450_pwm.h diff --git a/arch/arm/src/lc823450/lc823450_rtc.c b/soc/arm/lc823450/lc823450_rtc.c similarity index 100% rename from arch/arm/src/lc823450/lc823450_rtc.c rename to soc/arm/lc823450/lc823450_rtc.c diff --git a/arch/arm/src/lc823450/lc823450_sdc.c b/soc/arm/lc823450/lc823450_sdc.c similarity index 100% rename from arch/arm/src/lc823450/lc823450_sdc.c rename to soc/arm/lc823450/lc823450_sdc.c diff --git a/arch/arm/src/lc823450/lc823450_sdc.h b/soc/arm/lc823450/lc823450_sdc.h similarity index 100% rename from arch/arm/src/lc823450/lc823450_sdc.h rename to soc/arm/lc823450/lc823450_sdc.h diff --git a/arch/arm/src/lc823450/lc823450_sddrv_dep.c b/soc/arm/lc823450/lc823450_sddrv_dep.c similarity index 100% rename from arch/arm/src/lc823450/lc823450_sddrv_dep.c rename to soc/arm/lc823450/lc823450_sddrv_dep.c diff --git a/arch/arm/src/lc823450/lc823450_sddrv_if.h b/soc/arm/lc823450/lc823450_sddrv_if.h similarity index 100% rename from arch/arm/src/lc823450/lc823450_sddrv_if.h rename to soc/arm/lc823450/lc823450_sddrv_if.h diff --git a/arch/arm/src/lc823450/lc823450_sddrv_type.h b/soc/arm/lc823450/lc823450_sddrv_type.h similarity index 100% rename from arch/arm/src/lc823450/lc823450_sddrv_type.h rename to soc/arm/lc823450/lc823450_sddrv_type.h diff --git a/arch/arm/src/lc823450/lc823450_serial.c b/soc/arm/lc823450/lc823450_serial.c similarity index 100% rename from arch/arm/src/lc823450/lc823450_serial.c rename to soc/arm/lc823450/lc823450_serial.c diff --git a/arch/arm/src/lc823450/lc823450_serial.h b/soc/arm/lc823450/lc823450_serial.h similarity index 100% rename from arch/arm/src/lc823450/lc823450_serial.h rename to soc/arm/lc823450/lc823450_serial.h diff --git a/arch/arm/src/lc823450/lc823450_smpcall.c b/soc/arm/lc823450/lc823450_smpcall.c similarity index 100% rename from arch/arm/src/lc823450/lc823450_smpcall.c rename to soc/arm/lc823450/lc823450_smpcall.c diff --git a/arch/arm/src/lc823450/lc823450_spi.c b/soc/arm/lc823450/lc823450_spi.c similarity index 100% rename from arch/arm/src/lc823450/lc823450_spi.c rename to soc/arm/lc823450/lc823450_spi.c diff --git a/arch/arm/src/lc823450/lc823450_spi.h b/soc/arm/lc823450/lc823450_spi.h similarity index 100% rename from arch/arm/src/lc823450/lc823450_spi.h rename to soc/arm/lc823450/lc823450_spi.h diff --git a/arch/arm/src/lc823450/lc823450_spifi2.c b/soc/arm/lc823450/lc823450_spifi2.c similarity index 100% rename from arch/arm/src/lc823450/lc823450_spifi2.c rename to soc/arm/lc823450/lc823450_spifi2.c diff --git a/arch/arm/src/lc823450/lc823450_spifi2.h b/soc/arm/lc823450/lc823450_spifi2.h similarity index 100% rename from arch/arm/src/lc823450/lc823450_spifi2.h rename to soc/arm/lc823450/lc823450_spifi2.h diff --git a/arch/arm/src/lc823450/lc823450_start.c b/soc/arm/lc823450/lc823450_start.c similarity index 100% rename from arch/arm/src/lc823450/lc823450_start.c rename to soc/arm/lc823450/lc823450_start.c diff --git a/arch/arm/src/lc823450/lc823450_start.h b/soc/arm/lc823450/lc823450_start.h similarity index 100% rename from arch/arm/src/lc823450/lc823450_start.h rename to soc/arm/lc823450/lc823450_start.h diff --git a/arch/arm/src/lc823450/lc823450_symbols.ld b/soc/arm/lc823450/lc823450_symbols.ld similarity index 100% rename from arch/arm/src/lc823450/lc823450_symbols.ld rename to soc/arm/lc823450/lc823450_symbols.ld diff --git a/arch/arm/src/lc823450/lc823450_syscontrol.c b/soc/arm/lc823450/lc823450_syscontrol.c similarity index 100% rename from arch/arm/src/lc823450/lc823450_syscontrol.c rename to soc/arm/lc823450/lc823450_syscontrol.c diff --git a/arch/arm/src/lc823450/lc823450_syscontrol.h b/soc/arm/lc823450/lc823450_syscontrol.h similarity index 100% rename from arch/arm/src/lc823450/lc823450_syscontrol.h rename to soc/arm/lc823450/lc823450_syscontrol.h diff --git a/arch/arm/src/lc823450/lc823450_testset.c b/soc/arm/lc823450/lc823450_testset.c similarity index 100% rename from arch/arm/src/lc823450/lc823450_testset.c rename to soc/arm/lc823450/lc823450_testset.c diff --git a/arch/arm/src/lc823450/lc823450_timer.c b/soc/arm/lc823450/lc823450_timer.c similarity index 100% rename from arch/arm/src/lc823450/lc823450_timer.c rename to soc/arm/lc823450/lc823450_timer.c diff --git a/arch/arm/src/lc823450/lc823450_timer.h b/soc/arm/lc823450/lc823450_timer.h similarity index 100% rename from arch/arm/src/lc823450/lc823450_timer.h rename to soc/arm/lc823450/lc823450_timer.h diff --git a/arch/arm/src/lc823450/lc823450_usbdev.c b/soc/arm/lc823450/lc823450_usbdev.c similarity index 100% rename from arch/arm/src/lc823450/lc823450_usbdev.c rename to soc/arm/lc823450/lc823450_usbdev.c diff --git a/arch/arm/src/lc823450/lc823450_usbdev.h b/soc/arm/lc823450/lc823450_usbdev.h similarity index 100% rename from arch/arm/src/lc823450/lc823450_usbdev.h rename to soc/arm/lc823450/lc823450_usbdev.h diff --git a/arch/arm/src/lc823450/lc823450_userspace.c b/soc/arm/lc823450/lc823450_userspace.c similarity index 100% rename from arch/arm/src/lc823450/lc823450_userspace.c rename to soc/arm/lc823450/lc823450_userspace.c diff --git a/arch/arm/src/lc823450/lc823450_userspace.h b/soc/arm/lc823450/lc823450_userspace.h similarity index 100% rename from arch/arm/src/lc823450/lc823450_userspace.h rename to soc/arm/lc823450/lc823450_userspace.h diff --git a/arch/arm/src/lc823450/lc823450_wdt.c b/soc/arm/lc823450/lc823450_wdt.c similarity index 100% rename from arch/arm/src/lc823450/lc823450_wdt.c rename to soc/arm/lc823450/lc823450_wdt.c diff --git a/arch/arm/src/lc823450/lc823450_wdt.h b/soc/arm/lc823450/lc823450_wdt.h similarity index 100% rename from arch/arm/src/lc823450/lc823450_wdt.h rename to soc/arm/lc823450/lc823450_wdt.h diff --git a/arch/arm/src/lpc17xx_40xx/Kconfig b/soc/arm/lpc17xx_40xx/Kconfig similarity index 100% rename from arch/arm/src/lpc17xx_40xx/Kconfig rename to soc/arm/lpc17xx_40xx/Kconfig diff --git a/arch/arm/src/lpc17xx_40xx/Make.defs b/soc/arm/lpc17xx_40xx/Make.defs similarity index 100% rename from arch/arm/src/lpc17xx_40xx/Make.defs rename to soc/arm/lpc17xx_40xx/Make.defs diff --git a/arch/arm/src/lpc17xx_40xx/chip.h b/soc/arm/lpc17xx_40xx/chip.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/chip.h rename to soc/arm/lpc17xx_40xx/chip.h diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc176x_memorymap.h b/soc/arm/lpc17xx_40xx/hardware/lpc176x_memorymap.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/hardware/lpc176x_memorymap.h rename to soc/arm/lpc17xx_40xx/hardware/lpc176x_memorymap.h diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc176x_pinconfig.h b/soc/arm/lpc17xx_40xx/hardware/lpc176x_pinconfig.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/hardware/lpc176x_pinconfig.h rename to soc/arm/lpc17xx_40xx/hardware/lpc176x_pinconfig.h diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc176x_pinconn.h b/soc/arm/lpc17xx_40xx/hardware/lpc176x_pinconn.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/hardware/lpc176x_pinconn.h rename to soc/arm/lpc17xx_40xx/hardware/lpc176x_pinconn.h diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc176x_syscon.h b/soc/arm/lpc17xx_40xx/hardware/lpc176x_syscon.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/hardware/lpc176x_syscon.h rename to soc/arm/lpc17xx_40xx/hardware/lpc176x_syscon.h diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc178x_40xx_iocon.h b/soc/arm/lpc17xx_40xx/hardware/lpc178x_40xx_iocon.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/hardware/lpc178x_40xx_iocon.h rename to soc/arm/lpc17xx_40xx/hardware/lpc178x_40xx_iocon.h diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc178x_40xx_memorymap.h b/soc/arm/lpc17xx_40xx/hardware/lpc178x_40xx_memorymap.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/hardware/lpc178x_40xx_memorymap.h rename to soc/arm/lpc17xx_40xx/hardware/lpc178x_40xx_memorymap.h diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc178x_40xx_pinconfig.h b/soc/arm/lpc17xx_40xx/hardware/lpc178x_40xx_pinconfig.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/hardware/lpc178x_40xx_pinconfig.h rename to soc/arm/lpc17xx_40xx/hardware/lpc178x_40xx_pinconfig.h diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc178x_40xx_syscon.h b/soc/arm/lpc17xx_40xx/hardware/lpc178x_40xx_syscon.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/hardware/lpc178x_40xx_syscon.h rename to soc/arm/lpc17xx_40xx/hardware/lpc178x_40xx_syscon.h diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_adc.h b/soc/arm/lpc17xx_40xx/hardware/lpc17_40_adc.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_adc.h rename to soc/arm/lpc17xx_40xx/hardware/lpc17_40_adc.h diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_can.h b/soc/arm/lpc17xx_40xx/hardware/lpc17_40_can.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_can.h rename to soc/arm/lpc17xx_40xx/hardware/lpc17_40_can.h diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_dac.h b/soc/arm/lpc17xx_40xx/hardware/lpc17_40_dac.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_dac.h rename to soc/arm/lpc17xx_40xx/hardware/lpc17_40_dac.h diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_eeprom.h b/soc/arm/lpc17xx_40xx/hardware/lpc17_40_eeprom.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_eeprom.h rename to soc/arm/lpc17xx_40xx/hardware/lpc17_40_eeprom.h diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_emc.h b/soc/arm/lpc17xx_40xx/hardware/lpc17_40_emc.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_emc.h rename to soc/arm/lpc17xx_40xx/hardware/lpc17_40_emc.h diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_ethernet.h b/soc/arm/lpc17xx_40xx/hardware/lpc17_40_ethernet.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_ethernet.h rename to soc/arm/lpc17xx_40xx/hardware/lpc17_40_ethernet.h diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_gpdma.h b/soc/arm/lpc17xx_40xx/hardware/lpc17_40_gpdma.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_gpdma.h rename to soc/arm/lpc17xx_40xx/hardware/lpc17_40_gpdma.h diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_gpio.h b/soc/arm/lpc17xx_40xx/hardware/lpc17_40_gpio.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_gpio.h rename to soc/arm/lpc17xx_40xx/hardware/lpc17_40_gpio.h diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_i2c.h b/soc/arm/lpc17xx_40xx/hardware/lpc17_40_i2c.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_i2c.h rename to soc/arm/lpc17xx_40xx/hardware/lpc17_40_i2c.h diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_i2s.h b/soc/arm/lpc17xx_40xx/hardware/lpc17_40_i2s.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_i2s.h rename to soc/arm/lpc17xx_40xx/hardware/lpc17_40_i2s.h diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_lcd.h b/soc/arm/lpc17xx_40xx/hardware/lpc17_40_lcd.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_lcd.h rename to soc/arm/lpc17xx_40xx/hardware/lpc17_40_lcd.h diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_mcpwm.h b/soc/arm/lpc17xx_40xx/hardware/lpc17_40_mcpwm.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_mcpwm.h rename to soc/arm/lpc17xx_40xx/hardware/lpc17_40_mcpwm.h diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_memorymap.h b/soc/arm/lpc17xx_40xx/hardware/lpc17_40_memorymap.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_memorymap.h rename to soc/arm/lpc17xx_40xx/hardware/lpc17_40_memorymap.h diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_pinconfig.h b/soc/arm/lpc17xx_40xx/hardware/lpc17_40_pinconfig.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_pinconfig.h rename to soc/arm/lpc17xx_40xx/hardware/lpc17_40_pinconfig.h diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_pinconn.h b/soc/arm/lpc17xx_40xx/hardware/lpc17_40_pinconn.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_pinconn.h rename to soc/arm/lpc17xx_40xx/hardware/lpc17_40_pinconn.h diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_pwm.h b/soc/arm/lpc17xx_40xx/hardware/lpc17_40_pwm.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_pwm.h rename to soc/arm/lpc17xx_40xx/hardware/lpc17_40_pwm.h diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_qei.h b/soc/arm/lpc17xx_40xx/hardware/lpc17_40_qei.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_qei.h rename to soc/arm/lpc17xx_40xx/hardware/lpc17_40_qei.h diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_rit.h b/soc/arm/lpc17xx_40xx/hardware/lpc17_40_rit.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_rit.h rename to soc/arm/lpc17xx_40xx/hardware/lpc17_40_rit.h diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_rtc.h b/soc/arm/lpc17xx_40xx/hardware/lpc17_40_rtc.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_rtc.h rename to soc/arm/lpc17xx_40xx/hardware/lpc17_40_rtc.h diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_rtcevmr.h b/soc/arm/lpc17xx_40xx/hardware/lpc17_40_rtcevmr.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_rtcevmr.h rename to soc/arm/lpc17xx_40xx/hardware/lpc17_40_rtcevmr.h diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_sdcard.h b/soc/arm/lpc17xx_40xx/hardware/lpc17_40_sdcard.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_sdcard.h rename to soc/arm/lpc17xx_40xx/hardware/lpc17_40_sdcard.h diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_spi.h b/soc/arm/lpc17xx_40xx/hardware/lpc17_40_spi.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_spi.h rename to soc/arm/lpc17xx_40xx/hardware/lpc17_40_spi.h diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_ssp.h b/soc/arm/lpc17xx_40xx/hardware/lpc17_40_ssp.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_ssp.h rename to soc/arm/lpc17xx_40xx/hardware/lpc17_40_ssp.h diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_syscon.h b/soc/arm/lpc17xx_40xx/hardware/lpc17_40_syscon.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_syscon.h rename to soc/arm/lpc17xx_40xx/hardware/lpc17_40_syscon.h diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_timer.h b/soc/arm/lpc17xx_40xx/hardware/lpc17_40_timer.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_timer.h rename to soc/arm/lpc17xx_40xx/hardware/lpc17_40_timer.h diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_uart.h b/soc/arm/lpc17xx_40xx/hardware/lpc17_40_uart.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_uart.h rename to soc/arm/lpc17xx_40xx/hardware/lpc17_40_uart.h diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_usb.h b/soc/arm/lpc17xx_40xx/hardware/lpc17_40_usb.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_usb.h rename to soc/arm/lpc17xx_40xx/hardware/lpc17_40_usb.h diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_wdt.h b/soc/arm/lpc17xx_40xx/hardware/lpc17_40_wdt.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_wdt.h rename to soc/arm/lpc17xx_40xx/hardware/lpc17_40_wdt.h diff --git a/arch/arm/src/lpc17xx_40xx/lpc176x_clockconfig.c b/soc/arm/lpc17xx_40xx/lpc176x_clockconfig.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc176x_clockconfig.c rename to soc/arm/lpc17xx_40xx/lpc176x_clockconfig.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc176x_gpio.c b/soc/arm/lpc17xx_40xx/lpc176x_gpio.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc176x_gpio.c rename to soc/arm/lpc17xx_40xx/lpc176x_gpio.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc176x_gpio.h b/soc/arm/lpc17xx_40xx/lpc176x_gpio.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc176x_gpio.h rename to soc/arm/lpc17xx_40xx/lpc176x_gpio.h diff --git a/arch/arm/src/lpc17xx_40xx/lpc176x_rtc.c b/soc/arm/lpc17xx_40xx/lpc176x_rtc.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc176x_rtc.c rename to soc/arm/lpc17xx_40xx/lpc176x_rtc.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc178x_40xx_clockconfig.c b/soc/arm/lpc17xx_40xx/lpc178x_40xx_clockconfig.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc178x_40xx_clockconfig.c rename to soc/arm/lpc17xx_40xx/lpc178x_40xx_clockconfig.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc178x_40xx_gpio.c b/soc/arm/lpc17xx_40xx/lpc178x_40xx_gpio.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc178x_40xx_gpio.c rename to soc/arm/lpc17xx_40xx/lpc178x_40xx_gpio.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc178x_40xx_gpio.h b/soc/arm/lpc17xx_40xx/lpc178x_40xx_gpio.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc178x_40xx_gpio.h rename to soc/arm/lpc17xx_40xx/lpc178x_40xx_gpio.h diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_adc.c b/soc/arm/lpc17xx_40xx/lpc17_40_adc.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_adc.c rename to soc/arm/lpc17xx_40xx/lpc17_40_adc.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_adc.h b/soc/arm/lpc17xx_40xx/lpc17_40_adc.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_adc.h rename to soc/arm/lpc17xx_40xx/lpc17_40_adc.h diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_allocateheap.c b/soc/arm/lpc17xx_40xx/lpc17_40_allocateheap.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_allocateheap.c rename to soc/arm/lpc17xx_40xx/lpc17_40_allocateheap.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_can.c b/soc/arm/lpc17xx_40xx/lpc17_40_can.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_can.c rename to soc/arm/lpc17xx_40xx/lpc17_40_can.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_can.h b/soc/arm/lpc17xx_40xx/lpc17_40_can.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_can.h rename to soc/arm/lpc17xx_40xx/lpc17_40_can.h diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_clockconfig.c b/soc/arm/lpc17xx_40xx/lpc17_40_clockconfig.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_clockconfig.c rename to soc/arm/lpc17xx_40xx/lpc17_40_clockconfig.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_clockconfig.h b/soc/arm/lpc17xx_40xx/lpc17_40_clockconfig.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_clockconfig.h rename to soc/arm/lpc17xx_40xx/lpc17_40_clockconfig.h diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_clrpend.c b/soc/arm/lpc17xx_40xx/lpc17_40_clrpend.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_clrpend.c rename to soc/arm/lpc17xx_40xx/lpc17_40_clrpend.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_clrpend.h b/soc/arm/lpc17xx_40xx/lpc17_40_clrpend.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_clrpend.h rename to soc/arm/lpc17xx_40xx/lpc17_40_clrpend.h diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_dac.c b/soc/arm/lpc17xx_40xx/lpc17_40_dac.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_dac.c rename to soc/arm/lpc17xx_40xx/lpc17_40_dac.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_dac.h b/soc/arm/lpc17xx_40xx/lpc17_40_dac.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_dac.h rename to soc/arm/lpc17xx_40xx/lpc17_40_dac.h diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_emacram.h b/soc/arm/lpc17xx_40xx/lpc17_40_emacram.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_emacram.h rename to soc/arm/lpc17xx_40xx/lpc17_40_emacram.h diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_emc.c b/soc/arm/lpc17xx_40xx/lpc17_40_emc.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_emc.c rename to soc/arm/lpc17xx_40xx/lpc17_40_emc.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_emc.h b/soc/arm/lpc17xx_40xx/lpc17_40_emc.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_emc.h rename to soc/arm/lpc17xx_40xx/lpc17_40_emc.h diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.c b/soc/arm/lpc17xx_40xx/lpc17_40_ethernet.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.c rename to soc/arm/lpc17xx_40xx/lpc17_40_ethernet.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.h b/soc/arm/lpc17xx_40xx/lpc17_40_ethernet.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.h rename to soc/arm/lpc17xx_40xx/lpc17_40_ethernet.h diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_gpdma.c b/soc/arm/lpc17xx_40xx/lpc17_40_gpdma.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_gpdma.c rename to soc/arm/lpc17xx_40xx/lpc17_40_gpdma.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_gpdma.h b/soc/arm/lpc17xx_40xx/lpc17_40_gpdma.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_gpdma.h rename to soc/arm/lpc17xx_40xx/lpc17_40_gpdma.h diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_gpio.c b/soc/arm/lpc17xx_40xx/lpc17_40_gpio.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_gpio.c rename to soc/arm/lpc17xx_40xx/lpc17_40_gpio.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_gpio.h b/soc/arm/lpc17xx_40xx/lpc17_40_gpio.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_gpio.h rename to soc/arm/lpc17xx_40xx/lpc17_40_gpio.h diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_gpiodbg.c b/soc/arm/lpc17xx_40xx/lpc17_40_gpiodbg.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_gpiodbg.c rename to soc/arm/lpc17xx_40xx/lpc17_40_gpiodbg.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_gpioint.c b/soc/arm/lpc17xx_40xx/lpc17_40_gpioint.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_gpioint.c rename to soc/arm/lpc17xx_40xx/lpc17_40_gpioint.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_i2c.c b/soc/arm/lpc17xx_40xx/lpc17_40_i2c.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_i2c.c rename to soc/arm/lpc17xx_40xx/lpc17_40_i2c.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_i2c.h b/soc/arm/lpc17xx_40xx/lpc17_40_i2c.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_i2c.h rename to soc/arm/lpc17xx_40xx/lpc17_40_i2c.h diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_i2s.h b/soc/arm/lpc17xx_40xx/lpc17_40_i2s.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_i2s.h rename to soc/arm/lpc17xx_40xx/lpc17_40_i2s.h diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_idle.c b/soc/arm/lpc17xx_40xx/lpc17_40_idle.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_idle.c rename to soc/arm/lpc17xx_40xx/lpc17_40_idle.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_irq.c b/soc/arm/lpc17xx_40xx/lpc17_40_irq.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_irq.c rename to soc/arm/lpc17xx_40xx/lpc17_40_irq.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_lcd.c b/soc/arm/lpc17xx_40xx/lpc17_40_lcd.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_lcd.c rename to soc/arm/lpc17xx_40xx/lpc17_40_lcd.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_lcd.h b/soc/arm/lpc17xx_40xx/lpc17_40_lcd.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_lcd.h rename to soc/arm/lpc17xx_40xx/lpc17_40_lcd.h diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_lowputc.c b/soc/arm/lpc17xx_40xx/lpc17_40_lowputc.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_lowputc.c rename to soc/arm/lpc17xx_40xx/lpc17_40_lowputc.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_lowputc.h b/soc/arm/lpc17xx_40xx/lpc17_40_lowputc.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_lowputc.h rename to soc/arm/lpc17xx_40xx/lpc17_40_lowputc.h diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_mcpwm.c b/soc/arm/lpc17xx_40xx/lpc17_40_mcpwm.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_mcpwm.c rename to soc/arm/lpc17xx_40xx/lpc17_40_mcpwm.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_mpuinit.c b/soc/arm/lpc17xx_40xx/lpc17_40_mpuinit.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_mpuinit.c rename to soc/arm/lpc17xx_40xx/lpc17_40_mpuinit.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_mpuinit.h b/soc/arm/lpc17xx_40xx/lpc17_40_mpuinit.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_mpuinit.h rename to soc/arm/lpc17xx_40xx/lpc17_40_mpuinit.h diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_ohciram.h b/soc/arm/lpc17xx_40xx/lpc17_40_ohciram.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_ohciram.h rename to soc/arm/lpc17xx_40xx/lpc17_40_ohciram.h diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_progmem.c b/soc/arm/lpc17xx_40xx/lpc17_40_progmem.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_progmem.c rename to soc/arm/lpc17xx_40xx/lpc17_40_progmem.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_progmem.h b/soc/arm/lpc17xx_40xx/lpc17_40_progmem.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_progmem.h rename to soc/arm/lpc17xx_40xx/lpc17_40_progmem.h diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_pwm.c b/soc/arm/lpc17xx_40xx/lpc17_40_pwm.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_pwm.c rename to soc/arm/lpc17xx_40xx/lpc17_40_pwm.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_pwm.h b/soc/arm/lpc17xx_40xx/lpc17_40_pwm.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_pwm.h rename to soc/arm/lpc17xx_40xx/lpc17_40_pwm.h diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_qei.h b/soc/arm/lpc17xx_40xx/lpc17_40_qei.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_qei.h rename to soc/arm/lpc17xx_40xx/lpc17_40_qei.h diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_rit.h b/soc/arm/lpc17xx_40xx/lpc17_40_rit.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_rit.h rename to soc/arm/lpc17xx_40xx/lpc17_40_rit.h diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_rtc.h b/soc/arm/lpc17xx_40xx/lpc17_40_rtc.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_rtc.h rename to soc/arm/lpc17xx_40xx/lpc17_40_rtc.h diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_sdcard.c b/soc/arm/lpc17xx_40xx/lpc17_40_sdcard.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_sdcard.c rename to soc/arm/lpc17xx_40xx/lpc17_40_sdcard.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_sdcard.h b/soc/arm/lpc17xx_40xx/lpc17_40_sdcard.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_sdcard.h rename to soc/arm/lpc17xx_40xx/lpc17_40_sdcard.h diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_serial.c b/soc/arm/lpc17xx_40xx/lpc17_40_serial.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_serial.c rename to soc/arm/lpc17xx_40xx/lpc17_40_serial.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_serial.h b/soc/arm/lpc17xx_40xx/lpc17_40_serial.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_serial.h rename to soc/arm/lpc17xx_40xx/lpc17_40_serial.h diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_spi.c b/soc/arm/lpc17xx_40xx/lpc17_40_spi.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_spi.c rename to soc/arm/lpc17xx_40xx/lpc17_40_spi.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_spi.h b/soc/arm/lpc17xx_40xx/lpc17_40_spi.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_spi.h rename to soc/arm/lpc17xx_40xx/lpc17_40_spi.h diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_ssp.c b/soc/arm/lpc17xx_40xx/lpc17_40_ssp.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_ssp.c rename to soc/arm/lpc17xx_40xx/lpc17_40_ssp.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_ssp.h b/soc/arm/lpc17xx_40xx/lpc17_40_ssp.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_ssp.h rename to soc/arm/lpc17xx_40xx/lpc17_40_ssp.h diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_start.c b/soc/arm/lpc17xx_40xx/lpc17_40_start.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_start.c rename to soc/arm/lpc17xx_40xx/lpc17_40_start.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_start.h b/soc/arm/lpc17xx_40xx/lpc17_40_start.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_start.h rename to soc/arm/lpc17xx_40xx/lpc17_40_start.h diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_timer.c b/soc/arm/lpc17xx_40xx/lpc17_40_timer.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_timer.c rename to soc/arm/lpc17xx_40xx/lpc17_40_timer.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_timer.h b/soc/arm/lpc17xx_40xx/lpc17_40_timer.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_timer.h rename to soc/arm/lpc17xx_40xx/lpc17_40_timer.h diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_timerisr.c b/soc/arm/lpc17xx_40xx/lpc17_40_timerisr.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_timerisr.c rename to soc/arm/lpc17xx_40xx/lpc17_40_timerisr.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_usbdev.c b/soc/arm/lpc17xx_40xx/lpc17_40_usbdev.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_usbdev.c rename to soc/arm/lpc17xx_40xx/lpc17_40_usbdev.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_usbhost.c b/soc/arm/lpc17xx_40xx/lpc17_40_usbhost.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_usbhost.c rename to soc/arm/lpc17xx_40xx/lpc17_40_usbhost.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_usbhost.h b/soc/arm/lpc17xx_40xx/lpc17_40_usbhost.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_usbhost.h rename to soc/arm/lpc17xx_40xx/lpc17_40_usbhost.h diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_userspace.c b/soc/arm/lpc17xx_40xx/lpc17_40_userspace.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_userspace.c rename to soc/arm/lpc17xx_40xx/lpc17_40_userspace.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_userspace.h b/soc/arm/lpc17xx_40xx/lpc17_40_userspace.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_userspace.h rename to soc/arm/lpc17xx_40xx/lpc17_40_userspace.h diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_wdt.c b/soc/arm/lpc17xx_40xx/lpc17_40_wdt.c similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_wdt.c rename to soc/arm/lpc17xx_40xx/lpc17_40_wdt.c diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_wdt.h b/soc/arm/lpc17xx_40xx/lpc17_40_wdt.h similarity index 100% rename from arch/arm/src/lpc17xx_40xx/lpc17_40_wdt.h rename to soc/arm/lpc17xx_40xx/lpc17_40_wdt.h diff --git a/arch/arm/src/lpc214x/Kconfig b/soc/arm/lpc214x/Kconfig similarity index 100% rename from arch/arm/src/lpc214x/Kconfig rename to soc/arm/lpc214x/Kconfig diff --git a/arch/arm/src/lpc214x/Make.defs b/soc/arm/lpc214x/Make.defs similarity index 100% rename from arch/arm/src/lpc214x/Make.defs rename to soc/arm/lpc214x/Make.defs diff --git a/arch/arm/src/lpc214x/chip.h b/soc/arm/lpc214x/chip.h similarity index 100% rename from arch/arm/src/lpc214x/chip.h rename to soc/arm/lpc214x/chip.h diff --git a/arch/arm/src/lpc214x/lpc214x_apb.h b/soc/arm/lpc214x/lpc214x_apb.h similarity index 100% rename from arch/arm/src/lpc214x/lpc214x_apb.h rename to soc/arm/lpc214x/lpc214x_apb.h diff --git a/arch/arm/src/lpc214x/lpc214x_decodeirq.c b/soc/arm/lpc214x/lpc214x_decodeirq.c similarity index 100% rename from arch/arm/src/lpc214x/lpc214x_decodeirq.c rename to soc/arm/lpc214x/lpc214x_decodeirq.c diff --git a/arch/arm/src/lpc214x/lpc214x_head.S b/soc/arm/lpc214x/lpc214x_head.S similarity index 100% rename from arch/arm/src/lpc214x/lpc214x_head.S rename to soc/arm/lpc214x/lpc214x_head.S diff --git a/arch/arm/src/lpc214x/lpc214x_i2c.h b/soc/arm/lpc214x/lpc214x_i2c.h similarity index 100% rename from arch/arm/src/lpc214x/lpc214x_i2c.h rename to soc/arm/lpc214x/lpc214x_i2c.h diff --git a/arch/arm/src/lpc214x/lpc214x_irq.c b/soc/arm/lpc214x/lpc214x_irq.c similarity index 100% rename from arch/arm/src/lpc214x/lpc214x_irq.c rename to soc/arm/lpc214x/lpc214x_irq.c diff --git a/arch/arm/src/lpc214x/lpc214x_lowputc.S b/soc/arm/lpc214x/lpc214x_lowputc.S similarity index 100% rename from arch/arm/src/lpc214x/lpc214x_lowputc.S rename to soc/arm/lpc214x/lpc214x_lowputc.S diff --git a/arch/arm/src/lpc214x/lpc214x_pinsel.h b/soc/arm/lpc214x/lpc214x_pinsel.h similarity index 100% rename from arch/arm/src/lpc214x/lpc214x_pinsel.h rename to soc/arm/lpc214x/lpc214x_pinsel.h diff --git a/arch/arm/src/lpc214x/lpc214x_pll.h b/soc/arm/lpc214x/lpc214x_pll.h similarity index 100% rename from arch/arm/src/lpc214x/lpc214x_pll.h rename to soc/arm/lpc214x/lpc214x_pll.h diff --git a/arch/arm/src/lpc214x/lpc214x_power.h b/soc/arm/lpc214x/lpc214x_power.h similarity index 100% rename from arch/arm/src/lpc214x/lpc214x_power.h rename to soc/arm/lpc214x/lpc214x_power.h diff --git a/arch/arm/src/lpc214x/lpc214x_serial.c b/soc/arm/lpc214x/lpc214x_serial.c similarity index 100% rename from arch/arm/src/lpc214x/lpc214x_serial.c rename to soc/arm/lpc214x/lpc214x_serial.c diff --git a/arch/arm/src/lpc214x/lpc214x_spi.h b/soc/arm/lpc214x/lpc214x_spi.h similarity index 100% rename from arch/arm/src/lpc214x/lpc214x_spi.h rename to soc/arm/lpc214x/lpc214x_spi.h diff --git a/arch/arm/src/lpc214x/lpc214x_timer.h b/soc/arm/lpc214x/lpc214x_timer.h similarity index 100% rename from arch/arm/src/lpc214x/lpc214x_timer.h rename to soc/arm/lpc214x/lpc214x_timer.h diff --git a/arch/arm/src/lpc214x/lpc214x_timerisr.c b/soc/arm/lpc214x/lpc214x_timerisr.c similarity index 100% rename from arch/arm/src/lpc214x/lpc214x_timerisr.c rename to soc/arm/lpc214x/lpc214x_timerisr.c diff --git a/arch/arm/src/lpc214x/lpc214x_uart.h b/soc/arm/lpc214x/lpc214x_uart.h similarity index 100% rename from arch/arm/src/lpc214x/lpc214x_uart.h rename to soc/arm/lpc214x/lpc214x_uart.h diff --git a/arch/arm/src/lpc214x/lpc214x_usbdev.c b/soc/arm/lpc214x/lpc214x_usbdev.c similarity index 100% rename from arch/arm/src/lpc214x/lpc214x_usbdev.c rename to soc/arm/lpc214x/lpc214x_usbdev.c diff --git a/arch/arm/src/lpc214x/lpc214x_usbdev.h b/soc/arm/lpc214x/lpc214x_usbdev.h similarity index 100% rename from arch/arm/src/lpc214x/lpc214x_usbdev.h rename to soc/arm/lpc214x/lpc214x_usbdev.h diff --git a/arch/arm/src/lpc214x/lpc214x_vic.h b/soc/arm/lpc214x/lpc214x_vic.h similarity index 100% rename from arch/arm/src/lpc214x/lpc214x_vic.h rename to soc/arm/lpc214x/lpc214x_vic.h diff --git a/arch/arm/src/lpc2378/Kconfig b/soc/arm/lpc2378/Kconfig similarity index 100% rename from arch/arm/src/lpc2378/Kconfig rename to soc/arm/lpc2378/Kconfig diff --git a/arch/arm/src/lpc2378/Make.defs b/soc/arm/lpc2378/Make.defs similarity index 100% rename from arch/arm/src/lpc2378/Make.defs rename to soc/arm/lpc2378/Make.defs diff --git a/arch/arm/src/lpc2378/chip.h b/soc/arm/lpc2378/chip.h similarity index 100% rename from arch/arm/src/lpc2378/chip.h rename to soc/arm/lpc2378/chip.h diff --git a/arch/arm/src/lpc2378/lpc2378.h b/soc/arm/lpc2378/lpc2378.h similarity index 100% rename from arch/arm/src/lpc2378/lpc2378.h rename to soc/arm/lpc2378/lpc2378.h diff --git a/arch/arm/src/lpc2378/lpc23xx_decodeirq.c b/soc/arm/lpc2378/lpc23xx_decodeirq.c similarity index 100% rename from arch/arm/src/lpc2378/lpc23xx_decodeirq.c rename to soc/arm/lpc2378/lpc23xx_decodeirq.c diff --git a/arch/arm/src/lpc2378/lpc23xx_gpio.h b/soc/arm/lpc2378/lpc23xx_gpio.h similarity index 100% rename from arch/arm/src/lpc2378/lpc23xx_gpio.h rename to soc/arm/lpc2378/lpc23xx_gpio.h diff --git a/arch/arm/src/lpc2378/lpc23xx_head.S b/soc/arm/lpc2378/lpc23xx_head.S similarity index 100% rename from arch/arm/src/lpc2378/lpc23xx_head.S rename to soc/arm/lpc2378/lpc23xx_head.S diff --git a/arch/arm/src/lpc2378/lpc23xx_i2c.c b/soc/arm/lpc2378/lpc23xx_i2c.c similarity index 100% rename from arch/arm/src/lpc2378/lpc23xx_i2c.c rename to soc/arm/lpc2378/lpc23xx_i2c.c diff --git a/arch/arm/src/lpc2378/lpc23xx_i2c.h b/soc/arm/lpc2378/lpc23xx_i2c.h similarity index 100% rename from arch/arm/src/lpc2378/lpc23xx_i2c.h rename to soc/arm/lpc2378/lpc23xx_i2c.h diff --git a/arch/arm/src/lpc2378/lpc23xx_io.c b/soc/arm/lpc2378/lpc23xx_io.c similarity index 100% rename from arch/arm/src/lpc2378/lpc23xx_io.c rename to soc/arm/lpc2378/lpc23xx_io.c diff --git a/arch/arm/src/lpc2378/lpc23xx_irq.c b/soc/arm/lpc2378/lpc23xx_irq.c similarity index 100% rename from arch/arm/src/lpc2378/lpc23xx_irq.c rename to soc/arm/lpc2378/lpc23xx_irq.c diff --git a/arch/arm/src/lpc2378/lpc23xx_lowputc.S b/soc/arm/lpc2378/lpc23xx_lowputc.S similarity index 100% rename from arch/arm/src/lpc2378/lpc23xx_lowputc.S rename to soc/arm/lpc2378/lpc23xx_lowputc.S diff --git a/arch/arm/src/lpc2378/lpc23xx_pinsel.h b/soc/arm/lpc2378/lpc23xx_pinsel.h similarity index 100% rename from arch/arm/src/lpc2378/lpc23xx_pinsel.h rename to soc/arm/lpc2378/lpc23xx_pinsel.h diff --git a/arch/arm/src/lpc2378/lpc23xx_pllsetup.c b/soc/arm/lpc2378/lpc23xx_pllsetup.c similarity index 100% rename from arch/arm/src/lpc2378/lpc23xx_pllsetup.c rename to soc/arm/lpc2378/lpc23xx_pllsetup.c diff --git a/arch/arm/src/lpc2378/lpc23xx_scb.h b/soc/arm/lpc2378/lpc23xx_scb.h similarity index 100% rename from arch/arm/src/lpc2378/lpc23xx_scb.h rename to soc/arm/lpc2378/lpc23xx_scb.h diff --git a/arch/arm/src/lpc2378/lpc23xx_serial.c b/soc/arm/lpc2378/lpc23xx_serial.c similarity index 100% rename from arch/arm/src/lpc2378/lpc23xx_serial.c rename to soc/arm/lpc2378/lpc23xx_serial.c diff --git a/arch/arm/src/lpc2378/lpc23xx_spi.c b/soc/arm/lpc2378/lpc23xx_spi.c similarity index 100% rename from arch/arm/src/lpc2378/lpc23xx_spi.c rename to soc/arm/lpc2378/lpc23xx_spi.c diff --git a/arch/arm/src/lpc2378/lpc23xx_spi.h b/soc/arm/lpc2378/lpc23xx_spi.h similarity index 100% rename from arch/arm/src/lpc2378/lpc23xx_spi.h rename to soc/arm/lpc2378/lpc23xx_spi.h diff --git a/arch/arm/src/lpc2378/lpc23xx_timer.h b/soc/arm/lpc2378/lpc23xx_timer.h similarity index 100% rename from arch/arm/src/lpc2378/lpc23xx_timer.h rename to soc/arm/lpc2378/lpc23xx_timer.h diff --git a/arch/arm/src/lpc2378/lpc23xx_timerisr.c b/soc/arm/lpc2378/lpc23xx_timerisr.c similarity index 100% rename from arch/arm/src/lpc2378/lpc23xx_timerisr.c rename to soc/arm/lpc2378/lpc23xx_timerisr.c diff --git a/arch/arm/src/lpc2378/lpc23xx_uart.h b/soc/arm/lpc2378/lpc23xx_uart.h similarity index 100% rename from arch/arm/src/lpc2378/lpc23xx_uart.h rename to soc/arm/lpc2378/lpc23xx_uart.h diff --git a/arch/arm/src/lpc2378/lpc23xx_vic.h b/soc/arm/lpc2378/lpc23xx_vic.h similarity index 100% rename from arch/arm/src/lpc2378/lpc23xx_vic.h rename to soc/arm/lpc2378/lpc23xx_vic.h diff --git a/arch/arm/src/lpc31xx/Kconfig b/soc/arm/lpc31xx/Kconfig similarity index 100% rename from arch/arm/src/lpc31xx/Kconfig rename to soc/arm/lpc31xx/Kconfig diff --git a/arch/arm/src/lpc31xx/Make.defs b/soc/arm/lpc31xx/Make.defs similarity index 100% rename from arch/arm/src/lpc31xx/Make.defs rename to soc/arm/lpc31xx/Make.defs diff --git a/arch/arm/src/lpc31xx/chip.h b/soc/arm/lpc31xx/chip.h similarity index 100% rename from arch/arm/src/lpc31xx/chip.h rename to soc/arm/lpc31xx/chip.h diff --git a/arch/arm/src/lpc31xx/lpc31.h b/soc/arm/lpc31xx/lpc31.h similarity index 100% rename from arch/arm/src/lpc31xx/lpc31.h rename to soc/arm/lpc31xx/lpc31.h diff --git a/arch/arm/src/lpc31xx/lpc31_adc.h b/soc/arm/lpc31xx/lpc31_adc.h similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_adc.h rename to soc/arm/lpc31xx/lpc31_adc.h diff --git a/arch/arm/src/lpc31xx/lpc31_allocateheap.c b/soc/arm/lpc31xx/lpc31_allocateheap.c similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_allocateheap.c rename to soc/arm/lpc31xx/lpc31_allocateheap.c diff --git a/arch/arm/src/lpc31xx/lpc31_analogdie.h b/soc/arm/lpc31xx/lpc31_analogdie.h similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_analogdie.h rename to soc/arm/lpc31xx/lpc31_analogdie.h diff --git a/arch/arm/src/lpc31xx/lpc31_bcrndx.c b/soc/arm/lpc31xx/lpc31_bcrndx.c similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_bcrndx.c rename to soc/arm/lpc31xx/lpc31_bcrndx.c diff --git a/arch/arm/src/lpc31xx/lpc31_boot.c b/soc/arm/lpc31xx/lpc31_boot.c similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_boot.c rename to soc/arm/lpc31xx/lpc31_boot.c diff --git a/arch/arm/src/lpc31xx/lpc31_boot.h b/soc/arm/lpc31xx/lpc31_boot.h similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_boot.h rename to soc/arm/lpc31xx/lpc31_boot.h diff --git a/arch/arm/src/lpc31xx/lpc31_cgu.h b/soc/arm/lpc31xx/lpc31_cgu.h similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_cgu.h rename to soc/arm/lpc31xx/lpc31_cgu.h diff --git a/arch/arm/src/lpc31xx/lpc31_cgudrvr.h b/soc/arm/lpc31xx/lpc31_cgudrvr.h similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_cgudrvr.h rename to soc/arm/lpc31xx/lpc31_cgudrvr.h diff --git a/arch/arm/src/lpc31xx/lpc31_clkdomain.c b/soc/arm/lpc31xx/lpc31_clkdomain.c similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_clkdomain.c rename to soc/arm/lpc31xx/lpc31_clkdomain.c diff --git a/arch/arm/src/lpc31xx/lpc31_clkexten.c b/soc/arm/lpc31xx/lpc31_clkexten.c similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_clkexten.c rename to soc/arm/lpc31xx/lpc31_clkexten.c diff --git a/arch/arm/src/lpc31xx/lpc31_clkfreq.c b/soc/arm/lpc31xx/lpc31_clkfreq.c similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_clkfreq.c rename to soc/arm/lpc31xx/lpc31_clkfreq.c diff --git a/arch/arm/src/lpc31xx/lpc31_clkinit.c b/soc/arm/lpc31xx/lpc31_clkinit.c similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_clkinit.c rename to soc/arm/lpc31xx/lpc31_clkinit.c diff --git a/arch/arm/src/lpc31xx/lpc31_decodeirq.c b/soc/arm/lpc31xx/lpc31_decodeirq.c similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_decodeirq.c rename to soc/arm/lpc31xx/lpc31_decodeirq.c diff --git a/arch/arm/src/lpc31xx/lpc31_defclk.c b/soc/arm/lpc31xx/lpc31_defclk.c similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_defclk.c rename to soc/arm/lpc31xx/lpc31_defclk.c diff --git a/arch/arm/src/lpc31xx/lpc31_dma.h b/soc/arm/lpc31xx/lpc31_dma.h similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_dma.h rename to soc/arm/lpc31xx/lpc31_dma.h diff --git a/arch/arm/src/lpc31xx/lpc31_ehci.c b/soc/arm/lpc31xx/lpc31_ehci.c similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_ehci.c rename to soc/arm/lpc31xx/lpc31_ehci.c diff --git a/arch/arm/src/lpc31xx/lpc31_esrndx.c b/soc/arm/lpc31xx/lpc31_esrndx.c similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_esrndx.c rename to soc/arm/lpc31xx/lpc31_esrndx.c diff --git a/arch/arm/src/lpc31xx/lpc31_evntrtr.h b/soc/arm/lpc31xx/lpc31_evntrtr.h similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_evntrtr.h rename to soc/arm/lpc31xx/lpc31_evntrtr.h diff --git a/arch/arm/src/lpc31xx/lpc31_fdcndx.c b/soc/arm/lpc31xx/lpc31_fdcndx.c similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_fdcndx.c rename to soc/arm/lpc31xx/lpc31_fdcndx.c diff --git a/arch/arm/src/lpc31xx/lpc31_fdivinit.c b/soc/arm/lpc31xx/lpc31_fdivinit.c similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_fdivinit.c rename to soc/arm/lpc31xx/lpc31_fdivinit.c diff --git a/arch/arm/src/lpc31xx/lpc31_freqin.c b/soc/arm/lpc31xx/lpc31_freqin.c similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_freqin.c rename to soc/arm/lpc31xx/lpc31_freqin.c diff --git a/arch/arm/src/lpc31xx/lpc31_i2c.c b/soc/arm/lpc31xx/lpc31_i2c.c similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_i2c.c rename to soc/arm/lpc31xx/lpc31_i2c.c diff --git a/arch/arm/src/lpc31xx/lpc31_i2c.h b/soc/arm/lpc31xx/lpc31_i2c.h similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_i2c.h rename to soc/arm/lpc31xx/lpc31_i2c.h diff --git a/arch/arm/src/lpc31xx/lpc31_i2s.h b/soc/arm/lpc31xx/lpc31_i2s.h similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_i2s.h rename to soc/arm/lpc31xx/lpc31_i2s.h diff --git a/arch/arm/src/lpc31xx/lpc31_intc.h b/soc/arm/lpc31xx/lpc31_intc.h similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_intc.h rename to soc/arm/lpc31xx/lpc31_intc.h diff --git a/arch/arm/src/lpc31xx/lpc31_ioconfig.h b/soc/arm/lpc31xx/lpc31_ioconfig.h similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_ioconfig.h rename to soc/arm/lpc31xx/lpc31_ioconfig.h diff --git a/arch/arm/src/lpc31xx/lpc31_irq.c b/soc/arm/lpc31xx/lpc31_irq.c similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_irq.c rename to soc/arm/lpc31xx/lpc31_irq.c diff --git a/arch/arm/src/lpc31xx/lpc31_lcd.h b/soc/arm/lpc31xx/lpc31_lcd.h similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_lcd.h rename to soc/arm/lpc31xx/lpc31_lcd.h diff --git a/arch/arm/src/lpc31xx/lpc31_lowputc.c b/soc/arm/lpc31xx/lpc31_lowputc.c similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_lowputc.c rename to soc/arm/lpc31xx/lpc31_lowputc.c diff --git a/arch/arm/src/lpc31xx/lpc31_mci.h b/soc/arm/lpc31xx/lpc31_mci.h similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_mci.h rename to soc/arm/lpc31xx/lpc31_mci.h diff --git a/arch/arm/src/lpc31xx/lpc31_memorymap.h b/soc/arm/lpc31xx/lpc31_memorymap.h similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_memorymap.h rename to soc/arm/lpc31xx/lpc31_memorymap.h diff --git a/arch/arm/src/lpc31xx/lpc31_mpmc.h b/soc/arm/lpc31xx/lpc31_mpmc.h similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_mpmc.h rename to soc/arm/lpc31xx/lpc31_mpmc.h diff --git a/arch/arm/src/lpc31xx/lpc31_nand.h b/soc/arm/lpc31xx/lpc31_nand.h similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_nand.h rename to soc/arm/lpc31xx/lpc31_nand.h diff --git a/arch/arm/src/lpc31xx/lpc31_otp.h b/soc/arm/lpc31xx/lpc31_otp.h similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_otp.h rename to soc/arm/lpc31xx/lpc31_otp.h diff --git a/arch/arm/src/lpc31xx/lpc31_pcm.h b/soc/arm/lpc31xx/lpc31_pcm.h similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_pcm.h rename to soc/arm/lpc31xx/lpc31_pcm.h diff --git a/arch/arm/src/lpc31xx/lpc31_pllconfig.c b/soc/arm/lpc31xx/lpc31_pllconfig.c similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_pllconfig.c rename to soc/arm/lpc31xx/lpc31_pllconfig.c diff --git a/arch/arm/src/lpc31xx/lpc31_pwm.h b/soc/arm/lpc31xx/lpc31_pwm.h similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_pwm.h rename to soc/arm/lpc31xx/lpc31_pwm.h diff --git a/arch/arm/src/lpc31xx/lpc31_resetclks.c b/soc/arm/lpc31xx/lpc31_resetclks.c similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_resetclks.c rename to soc/arm/lpc31xx/lpc31_resetclks.c diff --git a/arch/arm/src/lpc31xx/lpc31_rng.h b/soc/arm/lpc31xx/lpc31_rng.h similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_rng.h rename to soc/arm/lpc31xx/lpc31_rng.h diff --git a/arch/arm/src/lpc31xx/lpc31_serial.c b/soc/arm/lpc31xx/lpc31_serial.c similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_serial.c rename to soc/arm/lpc31xx/lpc31_serial.c diff --git a/arch/arm/src/lpc31xx/lpc31_setfdiv.c b/soc/arm/lpc31xx/lpc31_setfdiv.c similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_setfdiv.c rename to soc/arm/lpc31xx/lpc31_setfdiv.c diff --git a/arch/arm/src/lpc31xx/lpc31_setfreqin.c b/soc/arm/lpc31xx/lpc31_setfreqin.c similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_setfreqin.c rename to soc/arm/lpc31xx/lpc31_setfreqin.c diff --git a/arch/arm/src/lpc31xx/lpc31_softreset.c b/soc/arm/lpc31xx/lpc31_softreset.c similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_softreset.c rename to soc/arm/lpc31xx/lpc31_softreset.c diff --git a/arch/arm/src/lpc31xx/lpc31_spi.c b/soc/arm/lpc31xx/lpc31_spi.c similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_spi.c rename to soc/arm/lpc31xx/lpc31_spi.c diff --git a/arch/arm/src/lpc31xx/lpc31_spi.h b/soc/arm/lpc31xx/lpc31_spi.h similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_spi.h rename to soc/arm/lpc31xx/lpc31_spi.h diff --git a/arch/arm/src/lpc31xx/lpc31_syscreg.h b/soc/arm/lpc31xx/lpc31_syscreg.h similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_syscreg.h rename to soc/arm/lpc31xx/lpc31_syscreg.h diff --git a/arch/arm/src/lpc31xx/lpc31_timer.h b/soc/arm/lpc31xx/lpc31_timer.h similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_timer.h rename to soc/arm/lpc31xx/lpc31_timer.h diff --git a/arch/arm/src/lpc31xx/lpc31_timerisr.c b/soc/arm/lpc31xx/lpc31_timerisr.c similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_timerisr.c rename to soc/arm/lpc31xx/lpc31_timerisr.c diff --git a/arch/arm/src/lpc31xx/lpc31_uart.h b/soc/arm/lpc31xx/lpc31_uart.h similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_uart.h rename to soc/arm/lpc31xx/lpc31_uart.h diff --git a/arch/arm/src/lpc31xx/lpc31_usbdev.c b/soc/arm/lpc31xx/lpc31_usbdev.c similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_usbdev.c rename to soc/arm/lpc31xx/lpc31_usbdev.c diff --git a/arch/arm/src/lpc31xx/lpc31_usbotg.h b/soc/arm/lpc31xx/lpc31_usbotg.h similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_usbotg.h rename to soc/arm/lpc31xx/lpc31_usbotg.h diff --git a/arch/arm/src/lpc31xx/lpc31_wdt.h b/soc/arm/lpc31xx/lpc31_wdt.h similarity index 100% rename from arch/arm/src/lpc31xx/lpc31_wdt.h rename to soc/arm/lpc31xx/lpc31_wdt.h diff --git a/arch/arm/src/lpc43xx/Kconfig b/soc/arm/lpc43xx/Kconfig similarity index 100% rename from arch/arm/src/lpc43xx/Kconfig rename to soc/arm/lpc43xx/Kconfig diff --git a/arch/arm/src/lpc43xx/Make.defs b/soc/arm/lpc43xx/Make.defs similarity index 100% rename from arch/arm/src/lpc43xx/Make.defs rename to soc/arm/lpc43xx/Make.defs diff --git a/arch/arm/src/lpc43xx/chip.h b/soc/arm/lpc43xx/chip.h similarity index 100% rename from arch/arm/src/lpc43xx/chip.h rename to soc/arm/lpc43xx/chip.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc4310203050_memorymap.h b/soc/arm/lpc43xx/hardware/lpc4310203050_memorymap.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc4310203050_memorymap.h rename to soc/arm/lpc43xx/hardware/lpc4310203050_memorymap.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc4310203050_pinconfig.h b/soc/arm/lpc43xx/hardware/lpc4310203050_pinconfig.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc4310203050_pinconfig.h rename to soc/arm/lpc43xx/hardware/lpc4310203050_pinconfig.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc4337jet100_pinconfig.h b/soc/arm/lpc43xx/hardware/lpc4337jet100_pinconfig.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc4337jet100_pinconfig.h rename to soc/arm/lpc43xx/hardware/lpc4337jet100_pinconfig.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc435357_memorymap.h b/soc/arm/lpc43xx/hardware/lpc435357_memorymap.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc435357_memorymap.h rename to soc/arm/lpc43xx/hardware/lpc435357_memorymap.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc4357fet256_pinconfig.h b/soc/arm/lpc43xx/hardware/lpc4357fet256_pinconfig.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc4357fet256_pinconfig.h rename to soc/arm/lpc43xx/hardware/lpc4357fet256_pinconfig.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_adc.h b/soc/arm/lpc43xx/hardware/lpc43_adc.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_adc.h rename to soc/arm/lpc43xx/hardware/lpc43_adc.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_aes.h b/soc/arm/lpc43xx/hardware/lpc43_aes.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_aes.h rename to soc/arm/lpc43xx/hardware/lpc43_aes.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_atimer.h b/soc/arm/lpc43xx/hardware/lpc43_atimer.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_atimer.h rename to soc/arm/lpc43xx/hardware/lpc43_atimer.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_can.h b/soc/arm/lpc43xx/hardware/lpc43_can.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_can.h rename to soc/arm/lpc43xx/hardware/lpc43_can.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_ccu.h b/soc/arm/lpc43xx/hardware/lpc43_ccu.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_ccu.h rename to soc/arm/lpc43xx/hardware/lpc43_ccu.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_cgu.h b/soc/arm/lpc43xx/hardware/lpc43_cgu.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_cgu.h rename to soc/arm/lpc43xx/hardware/lpc43_cgu.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_creg.h b/soc/arm/lpc43xx/hardware/lpc43_creg.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_creg.h rename to soc/arm/lpc43xx/hardware/lpc43_creg.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_dac.h b/soc/arm/lpc43xx/hardware/lpc43_dac.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_dac.h rename to soc/arm/lpc43xx/hardware/lpc43_dac.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_eeprom.h b/soc/arm/lpc43xx/hardware/lpc43_eeprom.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_eeprom.h rename to soc/arm/lpc43xx/hardware/lpc43_eeprom.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_emc.h b/soc/arm/lpc43xx/hardware/lpc43_emc.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_emc.h rename to soc/arm/lpc43xx/hardware/lpc43_emc.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_ethernet.h b/soc/arm/lpc43xx/hardware/lpc43_ethernet.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_ethernet.h rename to soc/arm/lpc43xx/hardware/lpc43_ethernet.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_evntmntr.h b/soc/arm/lpc43xx/hardware/lpc43_evntmntr.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_evntmntr.h rename to soc/arm/lpc43xx/hardware/lpc43_evntmntr.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_evntrtr.h b/soc/arm/lpc43xx/hardware/lpc43_evntrtr.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_evntrtr.h rename to soc/arm/lpc43xx/hardware/lpc43_evntrtr.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_flash.h b/soc/arm/lpc43xx/hardware/lpc43_flash.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_flash.h rename to soc/arm/lpc43xx/hardware/lpc43_flash.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_gima.h b/soc/arm/lpc43xx/hardware/lpc43_gima.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_gima.h rename to soc/arm/lpc43xx/hardware/lpc43_gima.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_gpdma.h b/soc/arm/lpc43xx/hardware/lpc43_gpdma.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_gpdma.h rename to soc/arm/lpc43xx/hardware/lpc43_gpdma.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_gpio.h b/soc/arm/lpc43xx/hardware/lpc43_gpio.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_gpio.h rename to soc/arm/lpc43xx/hardware/lpc43_gpio.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_i2c.h b/soc/arm/lpc43xx/hardware/lpc43_i2c.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_i2c.h rename to soc/arm/lpc43xx/hardware/lpc43_i2c.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_i2s.h b/soc/arm/lpc43xx/hardware/lpc43_i2s.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_i2s.h rename to soc/arm/lpc43xx/hardware/lpc43_i2s.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_lcd.h b/soc/arm/lpc43xx/hardware/lpc43_lcd.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_lcd.h rename to soc/arm/lpc43xx/hardware/lpc43_lcd.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_mcpwm.h b/soc/arm/lpc43xx/hardware/lpc43_mcpwm.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_mcpwm.h rename to soc/arm/lpc43xx/hardware/lpc43_mcpwm.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_otp.h b/soc/arm/lpc43xx/hardware/lpc43_otp.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_otp.h rename to soc/arm/lpc43xx/hardware/lpc43_otp.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_pmc.h b/soc/arm/lpc43xx/hardware/lpc43_pmc.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_pmc.h rename to soc/arm/lpc43xx/hardware/lpc43_pmc.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_qei.h b/soc/arm/lpc43xx/hardware/lpc43_qei.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_qei.h rename to soc/arm/lpc43xx/hardware/lpc43_qei.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_rgu.h b/soc/arm/lpc43xx/hardware/lpc43_rgu.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_rgu.h rename to soc/arm/lpc43xx/hardware/lpc43_rgu.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_rit.h b/soc/arm/lpc43xx/hardware/lpc43_rit.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_rit.h rename to soc/arm/lpc43xx/hardware/lpc43_rit.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_rtc.h b/soc/arm/lpc43xx/hardware/lpc43_rtc.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_rtc.h rename to soc/arm/lpc43xx/hardware/lpc43_rtc.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_sct.h b/soc/arm/lpc43xx/hardware/lpc43_sct.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_sct.h rename to soc/arm/lpc43xx/hardware/lpc43_sct.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_scu.h b/soc/arm/lpc43xx/hardware/lpc43_scu.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_scu.h rename to soc/arm/lpc43xx/hardware/lpc43_scu.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_sdmmc.h b/soc/arm/lpc43xx/hardware/lpc43_sdmmc.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_sdmmc.h rename to soc/arm/lpc43xx/hardware/lpc43_sdmmc.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_sgpio.h b/soc/arm/lpc43xx/hardware/lpc43_sgpio.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_sgpio.h rename to soc/arm/lpc43xx/hardware/lpc43_sgpio.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_spi.h b/soc/arm/lpc43xx/hardware/lpc43_spi.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_spi.h rename to soc/arm/lpc43xx/hardware/lpc43_spi.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_spifi.h b/soc/arm/lpc43xx/hardware/lpc43_spifi.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_spifi.h rename to soc/arm/lpc43xx/hardware/lpc43_spifi.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_ssp.h b/soc/arm/lpc43xx/hardware/lpc43_ssp.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_ssp.h rename to soc/arm/lpc43xx/hardware/lpc43_ssp.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_timer.h b/soc/arm/lpc43xx/hardware/lpc43_timer.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_timer.h rename to soc/arm/lpc43xx/hardware/lpc43_timer.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_uart.h b/soc/arm/lpc43xx/hardware/lpc43_uart.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_uart.h rename to soc/arm/lpc43xx/hardware/lpc43_uart.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_usb0.h b/soc/arm/lpc43xx/hardware/lpc43_usb0.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_usb0.h rename to soc/arm/lpc43xx/hardware/lpc43_usb0.h diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_wwdt.h b/soc/arm/lpc43xx/hardware/lpc43_wwdt.h similarity index 100% rename from arch/arm/src/lpc43xx/hardware/lpc43_wwdt.h rename to soc/arm/lpc43xx/hardware/lpc43_wwdt.h diff --git a/arch/arm/src/lpc43xx/lpc43_adc.c b/soc/arm/lpc43xx/lpc43_adc.c similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_adc.c rename to soc/arm/lpc43xx/lpc43_adc.c diff --git a/arch/arm/src/lpc43xx/lpc43_adc.h b/soc/arm/lpc43xx/lpc43_adc.h similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_adc.h rename to soc/arm/lpc43xx/lpc43_adc.h diff --git a/arch/arm/src/lpc43xx/lpc43_aes.c b/soc/arm/lpc43xx/lpc43_aes.c similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_aes.c rename to soc/arm/lpc43xx/lpc43_aes.c diff --git a/arch/arm/src/lpc43xx/lpc43_allocateheap.c b/soc/arm/lpc43xx/lpc43_allocateheap.c similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_allocateheap.c rename to soc/arm/lpc43xx/lpc43_allocateheap.c diff --git a/arch/arm/src/lpc43xx/lpc43_can.c b/soc/arm/lpc43xx/lpc43_can.c similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_can.c rename to soc/arm/lpc43xx/lpc43_can.c diff --git a/arch/arm/src/lpc43xx/lpc43_can.h b/soc/arm/lpc43xx/lpc43_can.h similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_can.h rename to soc/arm/lpc43xx/lpc43_can.h diff --git a/arch/arm/src/lpc43xx/lpc43_ccu.h b/soc/arm/lpc43xx/lpc43_ccu.h similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_ccu.h rename to soc/arm/lpc43xx/lpc43_ccu.h diff --git a/arch/arm/src/lpc43xx/lpc43_cgu.c b/soc/arm/lpc43xx/lpc43_cgu.c similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_cgu.c rename to soc/arm/lpc43xx/lpc43_cgu.c diff --git a/arch/arm/src/lpc43xx/lpc43_cgu.h b/soc/arm/lpc43xx/lpc43_cgu.h similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_cgu.h rename to soc/arm/lpc43xx/lpc43_cgu.h diff --git a/arch/arm/src/lpc43xx/lpc43_clrpend.c b/soc/arm/lpc43xx/lpc43_clrpend.c similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_clrpend.c rename to soc/arm/lpc43xx/lpc43_clrpend.c diff --git a/arch/arm/src/lpc43xx/lpc43_config.h b/soc/arm/lpc43xx/lpc43_config.h similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_config.h rename to soc/arm/lpc43xx/lpc43_config.h diff --git a/arch/arm/src/lpc43xx/lpc43_creg.h b/soc/arm/lpc43xx/lpc43_creg.h similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_creg.h rename to soc/arm/lpc43xx/lpc43_creg.h diff --git a/arch/arm/src/lpc43xx/lpc43_crypto.c b/soc/arm/lpc43xx/lpc43_crypto.c similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_crypto.c rename to soc/arm/lpc43xx/lpc43_crypto.c diff --git a/arch/arm/src/lpc43xx/lpc43_dac.c b/soc/arm/lpc43xx/lpc43_dac.c similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_dac.c rename to soc/arm/lpc43xx/lpc43_dac.c diff --git a/arch/arm/src/lpc43xx/lpc43_dac.h b/soc/arm/lpc43xx/lpc43_dac.h similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_dac.h rename to soc/arm/lpc43xx/lpc43_dac.h diff --git a/arch/arm/src/lpc43xx/lpc43_debug.c b/soc/arm/lpc43xx/lpc43_debug.c similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_debug.c rename to soc/arm/lpc43xx/lpc43_debug.c diff --git a/arch/arm/src/lpc43xx/lpc43_ehci.c b/soc/arm/lpc43xx/lpc43_ehci.c similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_ehci.c rename to soc/arm/lpc43xx/lpc43_ehci.c diff --git a/arch/arm/src/lpc43xx/lpc43_ehci.h b/soc/arm/lpc43xx/lpc43_ehci.h similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_ehci.h rename to soc/arm/lpc43xx/lpc43_ehci.h diff --git a/arch/arm/src/lpc43xx/lpc43_emacram.h b/soc/arm/lpc43xx/lpc43_emacram.h similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_emacram.h rename to soc/arm/lpc43xx/lpc43_emacram.h diff --git a/arch/arm/src/lpc43xx/lpc43_emc.c b/soc/arm/lpc43xx/lpc43_emc.c similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_emc.c rename to soc/arm/lpc43xx/lpc43_emc.c diff --git a/arch/arm/src/lpc43xx/lpc43_emc.h b/soc/arm/lpc43xx/lpc43_emc.h similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_emc.h rename to soc/arm/lpc43xx/lpc43_emc.h diff --git a/arch/arm/src/lpc43xx/lpc43_ethernet.c b/soc/arm/lpc43xx/lpc43_ethernet.c similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_ethernet.c rename to soc/arm/lpc43xx/lpc43_ethernet.c diff --git a/arch/arm/src/lpc43xx/lpc43_ethernet.h b/soc/arm/lpc43xx/lpc43_ethernet.h similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_ethernet.h rename to soc/arm/lpc43xx/lpc43_ethernet.h diff --git a/arch/arm/src/lpc43xx/lpc43_gpdma.c b/soc/arm/lpc43xx/lpc43_gpdma.c similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_gpdma.c rename to soc/arm/lpc43xx/lpc43_gpdma.c diff --git a/arch/arm/src/lpc43xx/lpc43_gpdma.h b/soc/arm/lpc43xx/lpc43_gpdma.h similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_gpdma.h rename to soc/arm/lpc43xx/lpc43_gpdma.h diff --git a/arch/arm/src/lpc43xx/lpc43_gpio.c b/soc/arm/lpc43xx/lpc43_gpio.c similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_gpio.c rename to soc/arm/lpc43xx/lpc43_gpio.c diff --git a/arch/arm/src/lpc43xx/lpc43_gpio.h b/soc/arm/lpc43xx/lpc43_gpio.h similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_gpio.h rename to soc/arm/lpc43xx/lpc43_gpio.h diff --git a/arch/arm/src/lpc43xx/lpc43_gpioint.c b/soc/arm/lpc43xx/lpc43_gpioint.c similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_gpioint.c rename to soc/arm/lpc43xx/lpc43_gpioint.c diff --git a/arch/arm/src/lpc43xx/lpc43_gpioint.h b/soc/arm/lpc43xx/lpc43_gpioint.h similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_gpioint.h rename to soc/arm/lpc43xx/lpc43_gpioint.h diff --git a/arch/arm/src/lpc43xx/lpc43_i2c.c b/soc/arm/lpc43xx/lpc43_i2c.c similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_i2c.c rename to soc/arm/lpc43xx/lpc43_i2c.c diff --git a/arch/arm/src/lpc43xx/lpc43_i2c.h b/soc/arm/lpc43xx/lpc43_i2c.h similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_i2c.h rename to soc/arm/lpc43xx/lpc43_i2c.h diff --git a/arch/arm/src/lpc43xx/lpc43_idle.c b/soc/arm/lpc43xx/lpc43_idle.c similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_idle.c rename to soc/arm/lpc43xx/lpc43_idle.c diff --git a/arch/arm/src/lpc43xx/lpc43_irq.c b/soc/arm/lpc43xx/lpc43_irq.c similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_irq.c rename to soc/arm/lpc43xx/lpc43_irq.c diff --git a/arch/arm/src/lpc43xx/lpc43_irq.h b/soc/arm/lpc43xx/lpc43_irq.h similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_irq.h rename to soc/arm/lpc43xx/lpc43_irq.h diff --git a/arch/arm/src/lpc43xx/lpc43_mpuinit.c b/soc/arm/lpc43xx/lpc43_mpuinit.c similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_mpuinit.c rename to soc/arm/lpc43xx/lpc43_mpuinit.c diff --git a/arch/arm/src/lpc43xx/lpc43_mpuinit.h b/soc/arm/lpc43xx/lpc43_mpuinit.h similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_mpuinit.h rename to soc/arm/lpc43xx/lpc43_mpuinit.h diff --git a/arch/arm/src/lpc43xx/lpc43_pinconfig.c b/soc/arm/lpc43xx/lpc43_pinconfig.c similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_pinconfig.c rename to soc/arm/lpc43xx/lpc43_pinconfig.c diff --git a/arch/arm/src/lpc43xx/lpc43_pinconfig.h b/soc/arm/lpc43xx/lpc43_pinconfig.h similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_pinconfig.h rename to soc/arm/lpc43xx/lpc43_pinconfig.h diff --git a/arch/arm/src/lpc43xx/lpc43_rgu.c b/soc/arm/lpc43xx/lpc43_rgu.c similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_rgu.c rename to soc/arm/lpc43xx/lpc43_rgu.c diff --git a/arch/arm/src/lpc43xx/lpc43_rgu.h b/soc/arm/lpc43xx/lpc43_rgu.h similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_rgu.h rename to soc/arm/lpc43xx/lpc43_rgu.h diff --git a/arch/arm/src/lpc43xx/lpc43_rit.c b/soc/arm/lpc43xx/lpc43_rit.c similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_rit.c rename to soc/arm/lpc43xx/lpc43_rit.c diff --git a/arch/arm/src/lpc43xx/lpc43_rit.h b/soc/arm/lpc43xx/lpc43_rit.h similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_rit.h rename to soc/arm/lpc43xx/lpc43_rit.h diff --git a/arch/arm/src/lpc43xx/lpc43_rtc.c b/soc/arm/lpc43xx/lpc43_rtc.c similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_rtc.c rename to soc/arm/lpc43xx/lpc43_rtc.c diff --git a/arch/arm/src/lpc43xx/lpc43_rtc.h b/soc/arm/lpc43xx/lpc43_rtc.h similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_rtc.h rename to soc/arm/lpc43xx/lpc43_rtc.h diff --git a/arch/arm/src/lpc43xx/lpc43_scu.h b/soc/arm/lpc43xx/lpc43_scu.h similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_scu.h rename to soc/arm/lpc43xx/lpc43_scu.h diff --git a/arch/arm/src/lpc43xx/lpc43_sdmmc.c b/soc/arm/lpc43xx/lpc43_sdmmc.c similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_sdmmc.c rename to soc/arm/lpc43xx/lpc43_sdmmc.c diff --git a/arch/arm/src/lpc43xx/lpc43_sdmmc.h b/soc/arm/lpc43xx/lpc43_sdmmc.h similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_sdmmc.h rename to soc/arm/lpc43xx/lpc43_sdmmc.h diff --git a/arch/arm/src/lpc43xx/lpc43_serial.c b/soc/arm/lpc43xx/lpc43_serial.c similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_serial.c rename to soc/arm/lpc43xx/lpc43_serial.c diff --git a/arch/arm/src/lpc43xx/lpc43_serial.h b/soc/arm/lpc43xx/lpc43_serial.h similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_serial.h rename to soc/arm/lpc43xx/lpc43_serial.h diff --git a/arch/arm/src/lpc43xx/lpc43_spi.c b/soc/arm/lpc43xx/lpc43_spi.c similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_spi.c rename to soc/arm/lpc43xx/lpc43_spi.c diff --git a/arch/arm/src/lpc43xx/lpc43_spi.h b/soc/arm/lpc43xx/lpc43_spi.h similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_spi.h rename to soc/arm/lpc43xx/lpc43_spi.h diff --git a/arch/arm/src/lpc43xx/lpc43_spifi.c b/soc/arm/lpc43xx/lpc43_spifi.c similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_spifi.c rename to soc/arm/lpc43xx/lpc43_spifi.c diff --git a/arch/arm/src/lpc43xx/lpc43_spifi.h b/soc/arm/lpc43xx/lpc43_spifi.h similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_spifi.h rename to soc/arm/lpc43xx/lpc43_spifi.h diff --git a/arch/arm/src/lpc43xx/lpc43_ssp.c b/soc/arm/lpc43xx/lpc43_ssp.c similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_ssp.c rename to soc/arm/lpc43xx/lpc43_ssp.c diff --git a/arch/arm/src/lpc43xx/lpc43_ssp.h b/soc/arm/lpc43xx/lpc43_ssp.h similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_ssp.h rename to soc/arm/lpc43xx/lpc43_ssp.h diff --git a/arch/arm/src/lpc43xx/lpc43_start.c b/soc/arm/lpc43xx/lpc43_start.c similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_start.c rename to soc/arm/lpc43xx/lpc43_start.c diff --git a/arch/arm/src/lpc43xx/lpc43_start.h b/soc/arm/lpc43xx/lpc43_start.h similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_start.h rename to soc/arm/lpc43xx/lpc43_start.h diff --git a/arch/arm/src/lpc43xx/lpc43_tickless_rit.c b/soc/arm/lpc43xx/lpc43_tickless_rit.c similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_tickless_rit.c rename to soc/arm/lpc43xx/lpc43_tickless_rit.c diff --git a/arch/arm/src/lpc43xx/lpc43_timer.c b/soc/arm/lpc43xx/lpc43_timer.c similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_timer.c rename to soc/arm/lpc43xx/lpc43_timer.c diff --git a/arch/arm/src/lpc43xx/lpc43_timer.h b/soc/arm/lpc43xx/lpc43_timer.h similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_timer.h rename to soc/arm/lpc43xx/lpc43_timer.h diff --git a/arch/arm/src/lpc43xx/lpc43_timerisr.c b/soc/arm/lpc43xx/lpc43_timerisr.c similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_timerisr.c rename to soc/arm/lpc43xx/lpc43_timerisr.c diff --git a/arch/arm/src/lpc43xx/lpc43_uart.c b/soc/arm/lpc43xx/lpc43_uart.c similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_uart.c rename to soc/arm/lpc43xx/lpc43_uart.c diff --git a/arch/arm/src/lpc43xx/lpc43_uart.h b/soc/arm/lpc43xx/lpc43_uart.h similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_uart.h rename to soc/arm/lpc43xx/lpc43_uart.h diff --git a/arch/arm/src/lpc43xx/lpc43_usb0dev.c b/soc/arm/lpc43xx/lpc43_usb0dev.c similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_usb0dev.c rename to soc/arm/lpc43xx/lpc43_usb0dev.c diff --git a/arch/arm/src/lpc43xx/lpc43_usb0dev.h b/soc/arm/lpc43xx/lpc43_usb0dev.h similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_usb0dev.h rename to soc/arm/lpc43xx/lpc43_usb0dev.h diff --git a/arch/arm/src/lpc43xx/lpc43_usbram.h b/soc/arm/lpc43xx/lpc43_usbram.h similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_usbram.h rename to soc/arm/lpc43xx/lpc43_usbram.h diff --git a/arch/arm/src/lpc43xx/lpc43_userspace.c b/soc/arm/lpc43xx/lpc43_userspace.c similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_userspace.c rename to soc/arm/lpc43xx/lpc43_userspace.c diff --git a/arch/arm/src/lpc43xx/lpc43_userspace.h b/soc/arm/lpc43xx/lpc43_userspace.h similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_userspace.h rename to soc/arm/lpc43xx/lpc43_userspace.h diff --git a/arch/arm/src/lpc43xx/lpc43_wdt.h b/soc/arm/lpc43xx/lpc43_wdt.h similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_wdt.h rename to soc/arm/lpc43xx/lpc43_wdt.h diff --git a/arch/arm/src/lpc43xx/lpc43_wwdt.c b/soc/arm/lpc43xx/lpc43_wwdt.c similarity index 100% rename from arch/arm/src/lpc43xx/lpc43_wwdt.c rename to soc/arm/lpc43xx/lpc43_wwdt.c diff --git a/arch/arm/src/lpc43xx/spifi/changelog.txt b/soc/arm/lpc43xx/spifi/changelog.txt similarity index 100% rename from arch/arm/src/lpc43xx/spifi/changelog.txt rename to soc/arm/lpc43xx/spifi/changelog.txt diff --git a/arch/arm/src/lpc43xx/spifi/inc/private/spifilib_chiphw.h b/soc/arm/lpc43xx/spifi/inc/private/spifilib_chiphw.h similarity index 100% rename from arch/arm/src/lpc43xx/spifi/inc/private/spifilib_chiphw.h rename to soc/arm/lpc43xx/spifi/inc/private/spifilib_chiphw.h diff --git a/arch/arm/src/lpc43xx/spifi/inc/spifilib_api.h b/soc/arm/lpc43xx/spifi/inc/spifilib_api.h similarity index 100% rename from arch/arm/src/lpc43xx/spifi/inc/spifilib_api.h rename to soc/arm/lpc43xx/spifi/inc/spifilib_api.h diff --git a/arch/arm/src/lpc43xx/spifi/inc/spifilib_dev.h b/soc/arm/lpc43xx/spifi/inc/spifilib_dev.h similarity index 100% rename from arch/arm/src/lpc43xx/spifi/inc/spifilib_dev.h rename to soc/arm/lpc43xx/spifi/inc/spifilib_dev.h diff --git a/arch/arm/src/lpc43xx/spifi/src/Make.defs b/soc/arm/lpc43xx/spifi/src/Make.defs similarity index 100% rename from arch/arm/src/lpc43xx/spifi/src/Make.defs rename to soc/arm/lpc43xx/spifi/src/Make.defs diff --git a/arch/arm/src/lpc43xx/spifi/src/spifilib_dev_common.c b/soc/arm/lpc43xx/spifi/src/spifilib_dev_common.c similarity index 100% rename from arch/arm/src/lpc43xx/spifi/src/spifilib_dev_common.c rename to soc/arm/lpc43xx/spifi/src/spifilib_dev_common.c diff --git a/arch/arm/src/lpc43xx/spifi/src/spifilib_fam_standard_cmd.c b/soc/arm/lpc43xx/spifi/src/spifilib_fam_standard_cmd.c similarity index 100% rename from arch/arm/src/lpc43xx/spifi/src/spifilib_fam_standard_cmd.c rename to soc/arm/lpc43xx/spifi/src/spifilib_fam_standard_cmd.c diff --git a/arch/arm/src/lpc54xx/Kconfig b/soc/arm/lpc54xx/Kconfig similarity index 100% rename from arch/arm/src/lpc54xx/Kconfig rename to soc/arm/lpc54xx/Kconfig diff --git a/arch/arm/src/lpc54xx/Make.defs b/soc/arm/lpc54xx/Make.defs similarity index 100% rename from arch/arm/src/lpc54xx/Make.defs rename to soc/arm/lpc54xx/Make.defs diff --git a/arch/arm/src/lpc54xx/chip.h b/soc/arm/lpc54xx/chip.h similarity index 100% rename from arch/arm/src/lpc54xx/chip.h rename to soc/arm/lpc54xx/chip.h diff --git a/arch/arm/src/lpc54xx/hardware/lpc546x_memorymap.h b/soc/arm/lpc54xx/hardware/lpc546x_memorymap.h similarity index 100% rename from arch/arm/src/lpc54xx/hardware/lpc546x_memorymap.h rename to soc/arm/lpc54xx/hardware/lpc546x_memorymap.h diff --git a/arch/arm/src/lpc54xx/hardware/lpc546x_pinmux.h b/soc/arm/lpc54xx/hardware/lpc546x_pinmux.h similarity index 100% rename from arch/arm/src/lpc54xx/hardware/lpc546x_pinmux.h rename to soc/arm/lpc54xx/hardware/lpc546x_pinmux.h diff --git a/arch/arm/src/lpc54xx/hardware/lpc54_dma.h b/soc/arm/lpc54xx/hardware/lpc54_dma.h similarity index 100% rename from arch/arm/src/lpc54xx/hardware/lpc54_dma.h rename to soc/arm/lpc54xx/hardware/lpc54_dma.h diff --git a/arch/arm/src/lpc54xx/hardware/lpc54_emc.h b/soc/arm/lpc54xx/hardware/lpc54_emc.h similarity index 100% rename from arch/arm/src/lpc54xx/hardware/lpc54_emc.h rename to soc/arm/lpc54xx/hardware/lpc54_emc.h diff --git a/arch/arm/src/lpc54xx/hardware/lpc54_ethernet.h b/soc/arm/lpc54xx/hardware/lpc54_ethernet.h similarity index 100% rename from arch/arm/src/lpc54xx/hardware/lpc54_ethernet.h rename to soc/arm/lpc54xx/hardware/lpc54_ethernet.h diff --git a/arch/arm/src/lpc54xx/hardware/lpc54_flexcomm.h b/soc/arm/lpc54xx/hardware/lpc54_flexcomm.h similarity index 100% rename from arch/arm/src/lpc54xx/hardware/lpc54_flexcomm.h rename to soc/arm/lpc54xx/hardware/lpc54_flexcomm.h diff --git a/arch/arm/src/lpc54xx/hardware/lpc54_gint.h b/soc/arm/lpc54xx/hardware/lpc54_gint.h similarity index 100% rename from arch/arm/src/lpc54xx/hardware/lpc54_gint.h rename to soc/arm/lpc54xx/hardware/lpc54_gint.h diff --git a/arch/arm/src/lpc54xx/hardware/lpc54_gpio.h b/soc/arm/lpc54xx/hardware/lpc54_gpio.h similarity index 100% rename from arch/arm/src/lpc54xx/hardware/lpc54_gpio.h rename to soc/arm/lpc54xx/hardware/lpc54_gpio.h diff --git a/arch/arm/src/lpc54xx/hardware/lpc54_i2c.h b/soc/arm/lpc54xx/hardware/lpc54_i2c.h similarity index 100% rename from arch/arm/src/lpc54xx/hardware/lpc54_i2c.h rename to soc/arm/lpc54xx/hardware/lpc54_i2c.h diff --git a/arch/arm/src/lpc54xx/hardware/lpc54_inputmux.h b/soc/arm/lpc54xx/hardware/lpc54_inputmux.h similarity index 100% rename from arch/arm/src/lpc54xx/hardware/lpc54_inputmux.h rename to soc/arm/lpc54xx/hardware/lpc54_inputmux.h diff --git a/arch/arm/src/lpc54xx/hardware/lpc54_iocon.h b/soc/arm/lpc54xx/hardware/lpc54_iocon.h similarity index 100% rename from arch/arm/src/lpc54xx/hardware/lpc54_iocon.h rename to soc/arm/lpc54xx/hardware/lpc54_iocon.h diff --git a/arch/arm/src/lpc54xx/hardware/lpc54_lcd.h b/soc/arm/lpc54xx/hardware/lpc54_lcd.h similarity index 100% rename from arch/arm/src/lpc54xx/hardware/lpc54_lcd.h rename to soc/arm/lpc54xx/hardware/lpc54_lcd.h diff --git a/arch/arm/src/lpc54xx/hardware/lpc54_memorymap.h b/soc/arm/lpc54xx/hardware/lpc54_memorymap.h similarity index 100% rename from arch/arm/src/lpc54xx/hardware/lpc54_memorymap.h rename to soc/arm/lpc54xx/hardware/lpc54_memorymap.h diff --git a/arch/arm/src/lpc54xx/hardware/lpc54_pinmux.h b/soc/arm/lpc54xx/hardware/lpc54_pinmux.h similarity index 100% rename from arch/arm/src/lpc54xx/hardware/lpc54_pinmux.h rename to soc/arm/lpc54xx/hardware/lpc54_pinmux.h diff --git a/arch/arm/src/lpc54xx/hardware/lpc54_pint.h b/soc/arm/lpc54xx/hardware/lpc54_pint.h similarity index 100% rename from arch/arm/src/lpc54xx/hardware/lpc54_pint.h rename to soc/arm/lpc54xx/hardware/lpc54_pint.h diff --git a/arch/arm/src/lpc54xx/hardware/lpc54_rit.h b/soc/arm/lpc54xx/hardware/lpc54_rit.h similarity index 100% rename from arch/arm/src/lpc54xx/hardware/lpc54_rit.h rename to soc/arm/lpc54xx/hardware/lpc54_rit.h diff --git a/arch/arm/src/lpc54xx/hardware/lpc54_rom.h b/soc/arm/lpc54xx/hardware/lpc54_rom.h similarity index 100% rename from arch/arm/src/lpc54xx/hardware/lpc54_rom.h rename to soc/arm/lpc54xx/hardware/lpc54_rom.h diff --git a/arch/arm/src/lpc54xx/hardware/lpc54_rtc.h b/soc/arm/lpc54xx/hardware/lpc54_rtc.h similarity index 100% rename from arch/arm/src/lpc54xx/hardware/lpc54_rtc.h rename to soc/arm/lpc54xx/hardware/lpc54_rtc.h diff --git a/arch/arm/src/lpc54xx/hardware/lpc54_sdmmc.h b/soc/arm/lpc54xx/hardware/lpc54_sdmmc.h similarity index 100% rename from arch/arm/src/lpc54xx/hardware/lpc54_sdmmc.h rename to soc/arm/lpc54xx/hardware/lpc54_sdmmc.h diff --git a/arch/arm/src/lpc54xx/hardware/lpc54_spi.h b/soc/arm/lpc54xx/hardware/lpc54_spi.h similarity index 100% rename from arch/arm/src/lpc54xx/hardware/lpc54_spi.h rename to soc/arm/lpc54xx/hardware/lpc54_spi.h diff --git a/arch/arm/src/lpc54xx/hardware/lpc54_syscon.h b/soc/arm/lpc54xx/hardware/lpc54_syscon.h similarity index 100% rename from arch/arm/src/lpc54xx/hardware/lpc54_syscon.h rename to soc/arm/lpc54xx/hardware/lpc54_syscon.h diff --git a/arch/arm/src/lpc54xx/hardware/lpc54_usart.h b/soc/arm/lpc54xx/hardware/lpc54_usart.h similarity index 100% rename from arch/arm/src/lpc54xx/hardware/lpc54_usart.h rename to soc/arm/lpc54xx/hardware/lpc54_usart.h diff --git a/arch/arm/src/lpc54xx/hardware/lpc54_usb0_ohci.h b/soc/arm/lpc54xx/hardware/lpc54_usb0_ohci.h similarity index 100% rename from arch/arm/src/lpc54xx/hardware/lpc54_usb0_ohci.h rename to soc/arm/lpc54xx/hardware/lpc54_usb0_ohci.h diff --git a/arch/arm/src/lpc54xx/hardware/lpc54_wwdt.h b/soc/arm/lpc54xx/hardware/lpc54_wwdt.h similarity index 100% rename from arch/arm/src/lpc54xx/hardware/lpc54_wwdt.h rename to soc/arm/lpc54xx/hardware/lpc54_wwdt.h diff --git a/arch/arm/src/lpc54xx/lpc546x_enableclk.h b/soc/arm/lpc54xx/lpc546x_enableclk.h similarity index 100% rename from arch/arm/src/lpc54xx/lpc546x_enableclk.h rename to soc/arm/lpc54xx/lpc546x_enableclk.h diff --git a/arch/arm/src/lpc54xx/lpc546x_power.h b/soc/arm/lpc54xx/lpc546x_power.h similarity index 100% rename from arch/arm/src/lpc54xx/lpc546x_power.h rename to soc/arm/lpc54xx/lpc546x_power.h diff --git a/arch/arm/src/lpc54xx/lpc546x_reset.h b/soc/arm/lpc54xx/lpc546x_reset.h similarity index 100% rename from arch/arm/src/lpc54xx/lpc546x_reset.h rename to soc/arm/lpc54xx/lpc546x_reset.h diff --git a/arch/arm/src/lpc54xx/lpc54_allocateheap.c b/soc/arm/lpc54xx/lpc54_allocateheap.c similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_allocateheap.c rename to soc/arm/lpc54xx/lpc54_allocateheap.c diff --git a/arch/arm/src/lpc54xx/lpc54_clockconfig.c b/soc/arm/lpc54xx/lpc54_clockconfig.c similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_clockconfig.c rename to soc/arm/lpc54xx/lpc54_clockconfig.c diff --git a/arch/arm/src/lpc54xx/lpc54_clockconfig.h b/soc/arm/lpc54xx/lpc54_clockconfig.h similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_clockconfig.h rename to soc/arm/lpc54xx/lpc54_clockconfig.h diff --git a/arch/arm/src/lpc54xx/lpc54_clrpend.c b/soc/arm/lpc54xx/lpc54_clrpend.c similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_clrpend.c rename to soc/arm/lpc54xx/lpc54_clrpend.c diff --git a/arch/arm/src/lpc54xx/lpc54_config.h b/soc/arm/lpc54xx/lpc54_config.h similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_config.h rename to soc/arm/lpc54xx/lpc54_config.h diff --git a/arch/arm/src/lpc54xx/lpc54_dma.c b/soc/arm/lpc54xx/lpc54_dma.c similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_dma.c rename to soc/arm/lpc54xx/lpc54_dma.c diff --git a/arch/arm/src/lpc54xx/lpc54_dma.h b/soc/arm/lpc54xx/lpc54_dma.h similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_dma.h rename to soc/arm/lpc54xx/lpc54_dma.h diff --git a/arch/arm/src/lpc54xx/lpc54_emc.c b/soc/arm/lpc54xx/lpc54_emc.c similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_emc.c rename to soc/arm/lpc54xx/lpc54_emc.c diff --git a/arch/arm/src/lpc54xx/lpc54_emc.h b/soc/arm/lpc54xx/lpc54_emc.h similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_emc.h rename to soc/arm/lpc54xx/lpc54_emc.h diff --git a/arch/arm/src/lpc54xx/lpc54_enableclk.h b/soc/arm/lpc54xx/lpc54_enableclk.h similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_enableclk.h rename to soc/arm/lpc54xx/lpc54_enableclk.h diff --git a/arch/arm/src/lpc54xx/lpc54_ethernet.c b/soc/arm/lpc54xx/lpc54_ethernet.c similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_ethernet.c rename to soc/arm/lpc54xx/lpc54_ethernet.c diff --git a/arch/arm/src/lpc54xx/lpc54_gpio.c b/soc/arm/lpc54xx/lpc54_gpio.c similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_gpio.c rename to soc/arm/lpc54xx/lpc54_gpio.c diff --git a/arch/arm/src/lpc54xx/lpc54_gpio.h b/soc/arm/lpc54xx/lpc54_gpio.h similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_gpio.h rename to soc/arm/lpc54xx/lpc54_gpio.h diff --git a/arch/arm/src/lpc54xx/lpc54_gpioirq.c b/soc/arm/lpc54xx/lpc54_gpioirq.c similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_gpioirq.c rename to soc/arm/lpc54xx/lpc54_gpioirq.c diff --git a/arch/arm/src/lpc54xx/lpc54_i2c_master.c b/soc/arm/lpc54xx/lpc54_i2c_master.c similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_i2c_master.c rename to soc/arm/lpc54xx/lpc54_i2c_master.c diff --git a/arch/arm/src/lpc54xx/lpc54_i2c_master.h b/soc/arm/lpc54xx/lpc54_i2c_master.h similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_i2c_master.h rename to soc/arm/lpc54xx/lpc54_i2c_master.h diff --git a/arch/arm/src/lpc54xx/lpc54_idle.c b/soc/arm/lpc54xx/lpc54_idle.c similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_idle.c rename to soc/arm/lpc54xx/lpc54_idle.c diff --git a/arch/arm/src/lpc54xx/lpc54_irq.c b/soc/arm/lpc54xx/lpc54_irq.c similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_irq.c rename to soc/arm/lpc54xx/lpc54_irq.c diff --git a/arch/arm/src/lpc54xx/lpc54_irq.h b/soc/arm/lpc54xx/lpc54_irq.h similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_irq.h rename to soc/arm/lpc54xx/lpc54_irq.h diff --git a/arch/arm/src/lpc54xx/lpc54_lcd.c b/soc/arm/lpc54xx/lpc54_lcd.c similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_lcd.c rename to soc/arm/lpc54xx/lpc54_lcd.c diff --git a/arch/arm/src/lpc54xx/lpc54_lcd.h b/soc/arm/lpc54xx/lpc54_lcd.h similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_lcd.h rename to soc/arm/lpc54xx/lpc54_lcd.h diff --git a/arch/arm/src/lpc54xx/lpc54_lowputc.c b/soc/arm/lpc54xx/lpc54_lowputc.c similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_lowputc.c rename to soc/arm/lpc54xx/lpc54_lowputc.c diff --git a/arch/arm/src/lpc54xx/lpc54_lowputc.h b/soc/arm/lpc54xx/lpc54_lowputc.h similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_lowputc.h rename to soc/arm/lpc54xx/lpc54_lowputc.h diff --git a/arch/arm/src/lpc54xx/lpc54_mpuinit.c b/soc/arm/lpc54xx/lpc54_mpuinit.c similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_mpuinit.c rename to soc/arm/lpc54xx/lpc54_mpuinit.c diff --git a/arch/arm/src/lpc54xx/lpc54_mpuinit.h b/soc/arm/lpc54xx/lpc54_mpuinit.h similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_mpuinit.h rename to soc/arm/lpc54xx/lpc54_mpuinit.h diff --git a/arch/arm/src/lpc54xx/lpc54_power.h b/soc/arm/lpc54xx/lpc54_power.h similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_power.h rename to soc/arm/lpc54xx/lpc54_power.h diff --git a/arch/arm/src/lpc54xx/lpc54_reset.c b/soc/arm/lpc54xx/lpc54_reset.c similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_reset.c rename to soc/arm/lpc54xx/lpc54_reset.c diff --git a/arch/arm/src/lpc54xx/lpc54_reset.h b/soc/arm/lpc54xx/lpc54_reset.h similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_reset.h rename to soc/arm/lpc54xx/lpc54_reset.h diff --git a/arch/arm/src/lpc54xx/lpc54_rng.c b/soc/arm/lpc54xx/lpc54_rng.c similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_rng.c rename to soc/arm/lpc54xx/lpc54_rng.c diff --git a/arch/arm/src/lpc54xx/lpc54_rtc.c b/soc/arm/lpc54xx/lpc54_rtc.c similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_rtc.c rename to soc/arm/lpc54xx/lpc54_rtc.c diff --git a/arch/arm/src/lpc54xx/lpc54_rtc.h b/soc/arm/lpc54xx/lpc54_rtc.h similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_rtc.h rename to soc/arm/lpc54xx/lpc54_rtc.h diff --git a/arch/arm/src/lpc54xx/lpc54_rtc_lowerhalf.c b/soc/arm/lpc54xx/lpc54_rtc_lowerhalf.c similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_rtc_lowerhalf.c rename to soc/arm/lpc54xx/lpc54_rtc_lowerhalf.c diff --git a/arch/arm/src/lpc54xx/lpc54_sdmmc.c b/soc/arm/lpc54xx/lpc54_sdmmc.c similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_sdmmc.c rename to soc/arm/lpc54xx/lpc54_sdmmc.c diff --git a/arch/arm/src/lpc54xx/lpc54_sdmmc.h b/soc/arm/lpc54xx/lpc54_sdmmc.h similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_sdmmc.h rename to soc/arm/lpc54xx/lpc54_sdmmc.h diff --git a/arch/arm/src/lpc54xx/lpc54_serial.c b/soc/arm/lpc54xx/lpc54_serial.c similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_serial.c rename to soc/arm/lpc54xx/lpc54_serial.c diff --git a/arch/arm/src/lpc54xx/lpc54_serial.h b/soc/arm/lpc54xx/lpc54_serial.h similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_serial.h rename to soc/arm/lpc54xx/lpc54_serial.h diff --git a/arch/arm/src/lpc54xx/lpc54_spi_master.c b/soc/arm/lpc54xx/lpc54_spi_master.c similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_spi_master.c rename to soc/arm/lpc54xx/lpc54_spi_master.c diff --git a/arch/arm/src/lpc54xx/lpc54_spi_master.h b/soc/arm/lpc54xx/lpc54_spi_master.h similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_spi_master.h rename to soc/arm/lpc54xx/lpc54_spi_master.h diff --git a/arch/arm/src/lpc54xx/lpc54_start.c b/soc/arm/lpc54xx/lpc54_start.c similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_start.c rename to soc/arm/lpc54xx/lpc54_start.c diff --git a/arch/arm/src/lpc54xx/lpc54_start.h b/soc/arm/lpc54xx/lpc54_start.h similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_start.h rename to soc/arm/lpc54xx/lpc54_start.h diff --git a/arch/arm/src/lpc54xx/lpc54_tickless.c b/soc/arm/lpc54xx/lpc54_tickless.c similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_tickless.c rename to soc/arm/lpc54xx/lpc54_tickless.c diff --git a/arch/arm/src/lpc54xx/lpc54_timerisr.c b/soc/arm/lpc54xx/lpc54_timerisr.c similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_timerisr.c rename to soc/arm/lpc54xx/lpc54_timerisr.c diff --git a/arch/arm/src/lpc54xx/lpc54_usb0_ohci.c b/soc/arm/lpc54xx/lpc54_usb0_ohci.c similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_usb0_ohci.c rename to soc/arm/lpc54xx/lpc54_usb0_ohci.c diff --git a/arch/arm/src/lpc54xx/lpc54_usb0_ohci.h b/soc/arm/lpc54xx/lpc54_usb0_ohci.h similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_usb0_ohci.h rename to soc/arm/lpc54xx/lpc54_usb0_ohci.h diff --git a/arch/arm/src/lpc54xx/lpc54_userspace.c b/soc/arm/lpc54xx/lpc54_userspace.c similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_userspace.c rename to soc/arm/lpc54xx/lpc54_userspace.c diff --git a/arch/arm/src/lpc54xx/lpc54_userspace.h b/soc/arm/lpc54xx/lpc54_userspace.h similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_userspace.h rename to soc/arm/lpc54xx/lpc54_userspace.h diff --git a/arch/arm/src/lpc54xx/lpc54_wwdt.c b/soc/arm/lpc54xx/lpc54_wwdt.c similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_wwdt.c rename to soc/arm/lpc54xx/lpc54_wwdt.c diff --git a/arch/arm/src/lpc54xx/lpc54_wwdt.h b/soc/arm/lpc54xx/lpc54_wwdt.h similarity index 100% rename from arch/arm/src/lpc54xx/lpc54_wwdt.h rename to soc/arm/lpc54xx/lpc54_wwdt.h diff --git a/arch/arm/src/max326xx/Kconfig b/soc/arm/max326xx/Kconfig similarity index 100% rename from arch/arm/src/max326xx/Kconfig rename to soc/arm/max326xx/Kconfig diff --git a/arch/arm/src/max326xx/Make.defs b/soc/arm/max326xx/Make.defs similarity index 100% rename from arch/arm/src/max326xx/Make.defs rename to soc/arm/max326xx/Make.defs diff --git a/arch/arm/src/max326xx/chip.h b/soc/arm/max326xx/chip.h similarity index 100% rename from arch/arm/src/max326xx/chip.h rename to soc/arm/max326xx/chip.h diff --git a/arch/arm/src/max326xx/common/max326_clrpend.c b/soc/arm/max326xx/common/max326_clrpend.c similarity index 100% rename from arch/arm/src/max326xx/common/max326_clrpend.c rename to soc/arm/max326xx/common/max326_clrpend.c diff --git a/arch/arm/src/max326xx/common/max326_idle.c b/soc/arm/max326xx/common/max326_idle.c similarity index 100% rename from arch/arm/src/max326xx/common/max326_idle.c rename to soc/arm/max326xx/common/max326_idle.c diff --git a/arch/arm/src/max326xx/common/max326_irq.c b/soc/arm/max326xx/common/max326_irq.c similarity index 100% rename from arch/arm/src/max326xx/common/max326_irq.c rename to soc/arm/max326xx/common/max326_irq.c diff --git a/arch/arm/src/max326xx/common/max326_mpuinit.c b/soc/arm/max326xx/common/max326_mpuinit.c similarity index 100% rename from arch/arm/src/max326xx/common/max326_mpuinit.c rename to soc/arm/max326xx/common/max326_mpuinit.c diff --git a/arch/arm/src/max326xx/common/max326_rtc_lowerhalf.c b/soc/arm/max326xx/common/max326_rtc_lowerhalf.c similarity index 100% rename from arch/arm/src/max326xx/common/max326_rtc_lowerhalf.c rename to soc/arm/max326xx/common/max326_rtc_lowerhalf.c diff --git a/arch/arm/src/max326xx/common/max326_start.c b/soc/arm/max326xx/common/max326_start.c similarity index 100% rename from arch/arm/src/max326xx/common/max326_start.c rename to soc/arm/max326xx/common/max326_start.c diff --git a/arch/arm/src/max326xx/common/max326_timerisr.c b/soc/arm/max326xx/common/max326_timerisr.c similarity index 100% rename from arch/arm/src/max326xx/common/max326_timerisr.c rename to soc/arm/max326xx/common/max326_timerisr.c diff --git a/arch/arm/src/max326xx/common/max326_userspace.c b/soc/arm/max326xx/common/max326_userspace.c similarity index 100% rename from arch/arm/src/max326xx/common/max326_userspace.c rename to soc/arm/max326xx/common/max326_userspace.c diff --git a/arch/arm/src/max326xx/hardware/max32620_30_memorymap.h b/soc/arm/max326xx/hardware/max32620_30_memorymap.h similarity index 100% rename from arch/arm/src/max326xx/hardware/max32620_30_memorymap.h rename to soc/arm/max326xx/hardware/max32620_30_memorymap.h diff --git a/arch/arm/src/max326xx/hardware/max32660_flc.h b/soc/arm/max326xx/hardware/max32660_flc.h similarity index 100% rename from arch/arm/src/max326xx/hardware/max32660_flc.h rename to soc/arm/max326xx/hardware/max32660_flc.h diff --git a/arch/arm/src/max326xx/hardware/max32660_gcr.h b/soc/arm/max326xx/hardware/max32660_gcr.h similarity index 100% rename from arch/arm/src/max326xx/hardware/max32660_gcr.h rename to soc/arm/max326xx/hardware/max32660_gcr.h diff --git a/arch/arm/src/max326xx/hardware/max32660_gpio.h b/soc/arm/max326xx/hardware/max32660_gpio.h similarity index 100% rename from arch/arm/src/max326xx/hardware/max32660_gpio.h rename to soc/arm/max326xx/hardware/max32660_gpio.h diff --git a/arch/arm/src/max326xx/hardware/max32660_i2c.h b/soc/arm/max326xx/hardware/max32660_i2c.h similarity index 100% rename from arch/arm/src/max326xx/hardware/max32660_i2c.h rename to soc/arm/max326xx/hardware/max32660_i2c.h diff --git a/arch/arm/src/max326xx/hardware/max32660_memorymap.h b/soc/arm/max326xx/hardware/max32660_memorymap.h similarity index 100% rename from arch/arm/src/max326xx/hardware/max32660_memorymap.h rename to soc/arm/max326xx/hardware/max32660_memorymap.h diff --git a/arch/arm/src/max326xx/hardware/max32660_pinmux.h b/soc/arm/max326xx/hardware/max32660_pinmux.h similarity index 100% rename from arch/arm/src/max326xx/hardware/max32660_pinmux.h rename to soc/arm/max326xx/hardware/max32660_pinmux.h diff --git a/arch/arm/src/max326xx/hardware/max32660_rtc.h b/soc/arm/max326xx/hardware/max32660_rtc.h similarity index 100% rename from arch/arm/src/max326xx/hardware/max32660_rtc.h rename to soc/arm/max326xx/hardware/max32660_rtc.h diff --git a/arch/arm/src/max326xx/hardware/max32660_spi.h b/soc/arm/max326xx/hardware/max32660_spi.h similarity index 100% rename from arch/arm/src/max326xx/hardware/max32660_spi.h rename to soc/arm/max326xx/hardware/max32660_spi.h diff --git a/arch/arm/src/max326xx/hardware/max32660_spimss.h b/soc/arm/max326xx/hardware/max32660_spimss.h similarity index 100% rename from arch/arm/src/max326xx/hardware/max32660_spimss.h rename to soc/arm/max326xx/hardware/max32660_spimss.h diff --git a/arch/arm/src/max326xx/hardware/max32660_tmr.h b/soc/arm/max326xx/hardware/max32660_tmr.h similarity index 100% rename from arch/arm/src/max326xx/hardware/max32660_tmr.h rename to soc/arm/max326xx/hardware/max32660_tmr.h diff --git a/arch/arm/src/max326xx/hardware/max32660_uart.h b/soc/arm/max326xx/hardware/max32660_uart.h similarity index 100% rename from arch/arm/src/max326xx/hardware/max32660_uart.h rename to soc/arm/max326xx/hardware/max32660_uart.h diff --git a/arch/arm/src/max326xx/hardware/max32660_wdt.h b/soc/arm/max326xx/hardware/max32660_wdt.h similarity index 100% rename from arch/arm/src/max326xx/hardware/max32660_wdt.h rename to soc/arm/max326xx/hardware/max32660_wdt.h diff --git a/arch/arm/src/max326xx/hardware/max32690_gcr.h b/soc/arm/max326xx/hardware/max32690_gcr.h similarity index 100% rename from arch/arm/src/max326xx/hardware/max32690_gcr.h rename to soc/arm/max326xx/hardware/max32690_gcr.h diff --git a/arch/arm/src/max326xx/hardware/max32690_memorymap.h b/soc/arm/max326xx/hardware/max32690_memorymap.h similarity index 100% rename from arch/arm/src/max326xx/hardware/max32690_memorymap.h rename to soc/arm/max326xx/hardware/max32690_memorymap.h diff --git a/arch/arm/src/max326xx/hardware/max326_dma.h b/soc/arm/max326xx/hardware/max326_dma.h similarity index 100% rename from arch/arm/src/max326xx/hardware/max326_dma.h rename to soc/arm/max326xx/hardware/max326_dma.h diff --git a/arch/arm/src/max326xx/hardware/max326_fcr.h b/soc/arm/max326xx/hardware/max326_fcr.h similarity index 100% rename from arch/arm/src/max326xx/hardware/max326_fcr.h rename to soc/arm/max326xx/hardware/max326_fcr.h diff --git a/arch/arm/src/max326xx/hardware/max326_flc.h b/soc/arm/max326xx/hardware/max326_flc.h similarity index 100% rename from arch/arm/src/max326xx/hardware/max326_flc.h rename to soc/arm/max326xx/hardware/max326_flc.h diff --git a/arch/arm/src/max326xx/hardware/max326_gcr.h b/soc/arm/max326xx/hardware/max326_gcr.h similarity index 100% rename from arch/arm/src/max326xx/hardware/max326_gcr.h rename to soc/arm/max326xx/hardware/max326_gcr.h diff --git a/arch/arm/src/max326xx/hardware/max326_gpio.h b/soc/arm/max326xx/hardware/max326_gpio.h similarity index 100% rename from arch/arm/src/max326xx/hardware/max326_gpio.h rename to soc/arm/max326xx/hardware/max326_gpio.h diff --git a/arch/arm/src/max326xx/hardware/max326_icc.h b/soc/arm/max326xx/hardware/max326_icc.h similarity index 100% rename from arch/arm/src/max326xx/hardware/max326_icc.h rename to soc/arm/max326xx/hardware/max326_icc.h diff --git a/arch/arm/src/max326xx/hardware/max326_memorymap.h b/soc/arm/max326xx/hardware/max326_memorymap.h similarity index 100% rename from arch/arm/src/max326xx/hardware/max326_memorymap.h rename to soc/arm/max326xx/hardware/max326_memorymap.h diff --git a/arch/arm/src/max326xx/hardware/max326_pinmux.h b/soc/arm/max326xx/hardware/max326_pinmux.h similarity index 100% rename from arch/arm/src/max326xx/hardware/max326_pinmux.h rename to soc/arm/max326xx/hardware/max326_pinmux.h diff --git a/arch/arm/src/max326xx/hardware/max326_pwrseq.h b/soc/arm/max326xx/hardware/max326_pwrseq.h similarity index 100% rename from arch/arm/src/max326xx/hardware/max326_pwrseq.h rename to soc/arm/max326xx/hardware/max326_pwrseq.h diff --git a/arch/arm/src/max326xx/hardware/max326_rtc.h b/soc/arm/max326xx/hardware/max326_rtc.h similarity index 100% rename from arch/arm/src/max326xx/hardware/max326_rtc.h rename to soc/arm/max326xx/hardware/max326_rtc.h diff --git a/arch/arm/src/max326xx/hardware/max326_sir.h b/soc/arm/max326xx/hardware/max326_sir.h similarity index 100% rename from arch/arm/src/max326xx/hardware/max326_sir.h rename to soc/arm/max326xx/hardware/max326_sir.h diff --git a/arch/arm/src/max326xx/hardware/max326_spi.h b/soc/arm/max326xx/hardware/max326_spi.h similarity index 100% rename from arch/arm/src/max326xx/hardware/max326_spi.h rename to soc/arm/max326xx/hardware/max326_spi.h diff --git a/arch/arm/src/max326xx/hardware/max326_tmr.h b/soc/arm/max326xx/hardware/max326_tmr.h similarity index 100% rename from arch/arm/src/max326xx/hardware/max326_tmr.h rename to soc/arm/max326xx/hardware/max326_tmr.h diff --git a/arch/arm/src/max326xx/hardware/max326_uart.h b/soc/arm/max326xx/hardware/max326_uart.h similarity index 100% rename from arch/arm/src/max326xx/hardware/max326_uart.h rename to soc/arm/max326xx/hardware/max326_uart.h diff --git a/arch/arm/src/max326xx/hardware/max326_wdt.h b/soc/arm/max326xx/hardware/max326_wdt.h similarity index 100% rename from arch/arm/src/max326xx/hardware/max326_wdt.h rename to soc/arm/max326xx/hardware/max326_wdt.h diff --git a/arch/arm/src/max326xx/max32620_30/max32620_30_clockconfig.h b/soc/arm/max326xx/max32620_30/max32620_30_clockconfig.h similarity index 100% rename from arch/arm/src/max326xx/max32620_30/max32620_30_clockconfig.h rename to soc/arm/max326xx/max32620_30/max32620_30_clockconfig.h diff --git a/arch/arm/src/max326xx/max32660/max32660_clockconfig.c b/soc/arm/max326xx/max32660/max32660_clockconfig.c similarity index 100% rename from arch/arm/src/max326xx/max32660/max32660_clockconfig.c rename to soc/arm/max326xx/max32660/max32660_clockconfig.c diff --git a/arch/arm/src/max326xx/max32660/max32660_clockconfig.h b/soc/arm/max326xx/max32660/max32660_clockconfig.h similarity index 100% rename from arch/arm/src/max326xx/max32660/max32660_clockconfig.h rename to soc/arm/max326xx/max32660/max32660_clockconfig.h diff --git a/arch/arm/src/max326xx/max32660/max32660_dma.c b/soc/arm/max326xx/max32660/max32660_dma.c similarity index 100% rename from arch/arm/src/max326xx/max32660/max32660_dma.c rename to soc/arm/max326xx/max32660/max32660_dma.c diff --git a/arch/arm/src/max326xx/max32660/max32660_dma.h b/soc/arm/max326xx/max32660/max32660_dma.h similarity index 100% rename from arch/arm/src/max326xx/max32660/max32660_dma.h rename to soc/arm/max326xx/max32660/max32660_dma.h diff --git a/arch/arm/src/max326xx/max32660/max32660_gpio.c b/soc/arm/max326xx/max32660/max32660_gpio.c similarity index 100% rename from arch/arm/src/max326xx/max32660/max32660_gpio.c rename to soc/arm/max326xx/max32660/max32660_gpio.c diff --git a/arch/arm/src/max326xx/max32660/max32660_gpio.h b/soc/arm/max326xx/max32660/max32660_gpio.h similarity index 100% rename from arch/arm/src/max326xx/max32660/max32660_gpio.h rename to soc/arm/max326xx/max32660/max32660_gpio.h diff --git a/arch/arm/src/max326xx/max32660/max32660_gpioirq.c b/soc/arm/max326xx/max32660/max32660_gpioirq.c similarity index 100% rename from arch/arm/src/max326xx/max32660/max32660_gpioirq.c rename to soc/arm/max326xx/max32660/max32660_gpioirq.c diff --git a/arch/arm/src/max326xx/max32660/max32660_icc.c b/soc/arm/max326xx/max32660/max32660_icc.c similarity index 100% rename from arch/arm/src/max326xx/max32660/max32660_icc.c rename to soc/arm/max326xx/max32660/max32660_icc.c diff --git a/arch/arm/src/max326xx/max32660/max32660_lowputc.c b/soc/arm/max326xx/max32660/max32660_lowputc.c similarity index 100% rename from arch/arm/src/max326xx/max32660/max32660_lowputc.c rename to soc/arm/max326xx/max32660/max32660_lowputc.c diff --git a/arch/arm/src/max326xx/max32660/max32660_periphclks.h b/soc/arm/max326xx/max32660/max32660_periphclks.h similarity index 100% rename from arch/arm/src/max326xx/max32660/max32660_periphclks.h rename to soc/arm/max326xx/max32660/max32660_periphclks.h diff --git a/arch/arm/src/max326xx/max32660/max32660_rtc.c b/soc/arm/max326xx/max32660/max32660_rtc.c similarity index 100% rename from arch/arm/src/max326xx/max32660/max32660_rtc.c rename to soc/arm/max326xx/max32660/max32660_rtc.c diff --git a/arch/arm/src/max326xx/max32660/max32660_serial.c b/soc/arm/max326xx/max32660/max32660_serial.c similarity index 100% rename from arch/arm/src/max326xx/max32660/max32660_serial.c rename to soc/arm/max326xx/max32660/max32660_serial.c diff --git a/arch/arm/src/max326xx/max32660/max32660_spim.c b/soc/arm/max326xx/max32660/max32660_spim.c similarity index 100% rename from arch/arm/src/max326xx/max32660/max32660_spim.c rename to soc/arm/max326xx/max32660/max32660_spim.c diff --git a/arch/arm/src/max326xx/max32660/max32660_wdt.c b/soc/arm/max326xx/max32660/max32660_wdt.c similarity index 100% rename from arch/arm/src/max326xx/max32660/max32660_wdt.c rename to soc/arm/max326xx/max32660/max32660_wdt.c diff --git a/arch/arm/src/max326xx/max32690/max32690_gpio.c b/soc/arm/max326xx/max32690/max32690_gpio.c similarity index 100% rename from arch/arm/src/max326xx/max32690/max32690_gpio.c rename to soc/arm/max326xx/max32690/max32690_gpio.c diff --git a/arch/arm/src/max326xx/max32690/max32690_gpio.h b/soc/arm/max326xx/max32690/max32690_gpio.h similarity index 100% rename from arch/arm/src/max326xx/max32690/max32690_gpio.h rename to soc/arm/max326xx/max32690/max32690_gpio.h diff --git a/arch/arm/src/max326xx/max32690/max32690_gpioirq.c b/soc/arm/max326xx/max32690/max32690_gpioirq.c similarity index 100% rename from arch/arm/src/max326xx/max32690/max32690_gpioirq.c rename to soc/arm/max326xx/max32690/max32690_gpioirq.c diff --git a/arch/arm/src/max326xx/max32690/max32690_icc.c b/soc/arm/max326xx/max32690/max32690_icc.c similarity index 100% rename from arch/arm/src/max326xx/max32690/max32690_icc.c rename to soc/arm/max326xx/max32690/max32690_icc.c diff --git a/arch/arm/src/max326xx/max32690/max32690_periphclks.h b/soc/arm/max326xx/max32690/max32690_periphclks.h similarity index 100% rename from arch/arm/src/max326xx/max32690/max32690_periphclks.h rename to soc/arm/max326xx/max32690/max32690_periphclks.h diff --git a/arch/arm/src/max326xx/max326_clockconfig.h b/soc/arm/max326xx/max326_clockconfig.h similarity index 100% rename from arch/arm/src/max326xx/max326_clockconfig.h rename to soc/arm/max326xx/max326_clockconfig.h diff --git a/arch/arm/src/max326xx/max326_config.h b/soc/arm/max326xx/max326_config.h similarity index 100% rename from arch/arm/src/max326xx/max326_config.h rename to soc/arm/max326xx/max326_config.h diff --git a/arch/arm/src/max326xx/max326_dma.h b/soc/arm/max326xx/max326_dma.h similarity index 100% rename from arch/arm/src/max326xx/max326_dma.h rename to soc/arm/max326xx/max326_dma.h diff --git a/arch/arm/src/max326xx/max326_gpio.h b/soc/arm/max326xx/max326_gpio.h similarity index 100% rename from arch/arm/src/max326xx/max326_gpio.h rename to soc/arm/max326xx/max326_gpio.h diff --git a/arch/arm/src/max326xx/max326_icc.h b/soc/arm/max326xx/max326_icc.h similarity index 100% rename from arch/arm/src/max326xx/max326_icc.h rename to soc/arm/max326xx/max326_icc.h diff --git a/arch/arm/src/max326xx/max326_irq.h b/soc/arm/max326xx/max326_irq.h similarity index 100% rename from arch/arm/src/max326xx/max326_irq.h rename to soc/arm/max326xx/max326_irq.h diff --git a/arch/arm/src/max326xx/max326_lowputc.h b/soc/arm/max326xx/max326_lowputc.h similarity index 100% rename from arch/arm/src/max326xx/max326_lowputc.h rename to soc/arm/max326xx/max326_lowputc.h diff --git a/arch/arm/src/max326xx/max326_mpuinit.h b/soc/arm/max326xx/max326_mpuinit.h similarity index 100% rename from arch/arm/src/max326xx/max326_mpuinit.h rename to soc/arm/max326xx/max326_mpuinit.h diff --git a/arch/arm/src/max326xx/max326_periphclks.h b/soc/arm/max326xx/max326_periphclks.h similarity index 100% rename from arch/arm/src/max326xx/max326_periphclks.h rename to soc/arm/max326xx/max326_periphclks.h diff --git a/arch/arm/src/max326xx/max326_rtc.h b/soc/arm/max326xx/max326_rtc.h similarity index 100% rename from arch/arm/src/max326xx/max326_rtc.h rename to soc/arm/max326xx/max326_rtc.h diff --git a/arch/arm/src/max326xx/max326_serial.h b/soc/arm/max326xx/max326_serial.h similarity index 100% rename from arch/arm/src/max326xx/max326_serial.h rename to soc/arm/max326xx/max326_serial.h diff --git a/arch/arm/src/max326xx/max326_spim.h b/soc/arm/max326xx/max326_spim.h similarity index 100% rename from arch/arm/src/max326xx/max326_spim.h rename to soc/arm/max326xx/max326_spim.h diff --git a/arch/arm/src/max326xx/max326_start.h b/soc/arm/max326xx/max326_start.h similarity index 100% rename from arch/arm/src/max326xx/max326_start.h rename to soc/arm/max326xx/max326_start.h diff --git a/arch/arm/src/max326xx/max326_userspace.h b/soc/arm/max326xx/max326_userspace.h similarity index 100% rename from arch/arm/src/max326xx/max326_userspace.h rename to soc/arm/max326xx/max326_userspace.h diff --git a/arch/arm/src/max326xx/max326_wdt.h b/soc/arm/max326xx/max326_wdt.h similarity index 100% rename from arch/arm/src/max326xx/max326_wdt.h rename to soc/arm/max326xx/max326_wdt.h diff --git a/arch/arm/src/mcx-nxxx/CMakeLists.txt b/soc/arm/mcx-nxxx/CMakeLists.txt similarity index 100% rename from arch/arm/src/mcx-nxxx/CMakeLists.txt rename to soc/arm/mcx-nxxx/CMakeLists.txt diff --git a/arch/arm/src/mcx-nxxx/Kconfig b/soc/arm/mcx-nxxx/Kconfig similarity index 100% rename from arch/arm/src/mcx-nxxx/Kconfig rename to soc/arm/mcx-nxxx/Kconfig diff --git a/arch/arm/src/mcx-nxxx/Make.defs b/soc/arm/mcx-nxxx/Make.defs similarity index 100% rename from arch/arm/src/mcx-nxxx/Make.defs rename to soc/arm/mcx-nxxx/Make.defs diff --git a/arch/arm/src/mcx-nxxx/chip.h b/soc/arm/mcx-nxxx/chip.h similarity index 100% rename from arch/arm/src/mcx-nxxx/chip.h rename to soc/arm/mcx-nxxx/chip.h diff --git a/arch/arm/src/mcx-nxxx/hardware/n236/n236_clock.h b/soc/arm/mcx-nxxx/hardware/n236/n236_clock.h similarity index 100% rename from arch/arm/src/mcx-nxxx/hardware/n236/n236_clock.h rename to soc/arm/mcx-nxxx/hardware/n236/n236_clock.h diff --git a/arch/arm/src/mcx-nxxx/hardware/n236/n236_gpio.h b/soc/arm/mcx-nxxx/hardware/n236/n236_gpio.h similarity index 100% rename from arch/arm/src/mcx-nxxx/hardware/n236/n236_gpio.h rename to soc/arm/mcx-nxxx/hardware/n236/n236_gpio.h diff --git a/arch/arm/src/mcx-nxxx/hardware/n236/n236_memorymap.h b/soc/arm/mcx-nxxx/hardware/n236/n236_memorymap.h similarity index 100% rename from arch/arm/src/mcx-nxxx/hardware/n236/n236_memorymap.h rename to soc/arm/mcx-nxxx/hardware/n236/n236_memorymap.h diff --git a/arch/arm/src/mcx-nxxx/hardware/nxxx_clock.h b/soc/arm/mcx-nxxx/hardware/nxxx_clock.h similarity index 100% rename from arch/arm/src/mcx-nxxx/hardware/nxxx_clock.h rename to soc/arm/mcx-nxxx/hardware/nxxx_clock.h diff --git a/arch/arm/src/mcx-nxxx/hardware/nxxx_flexcomm.h b/soc/arm/mcx-nxxx/hardware/nxxx_flexcomm.h similarity index 100% rename from arch/arm/src/mcx-nxxx/hardware/nxxx_flexcomm.h rename to soc/arm/mcx-nxxx/hardware/nxxx_flexcomm.h diff --git a/arch/arm/src/mcx-nxxx/hardware/nxxx_fmu.h b/soc/arm/mcx-nxxx/hardware/nxxx_fmu.h similarity index 100% rename from arch/arm/src/mcx-nxxx/hardware/nxxx_fmu.h rename to soc/arm/mcx-nxxx/hardware/nxxx_fmu.h diff --git a/arch/arm/src/mcx-nxxx/hardware/nxxx_gpio.h b/soc/arm/mcx-nxxx/hardware/nxxx_gpio.h similarity index 100% rename from arch/arm/src/mcx-nxxx/hardware/nxxx_gpio.h rename to soc/arm/mcx-nxxx/hardware/nxxx_gpio.h diff --git a/arch/arm/src/mcx-nxxx/hardware/nxxx_lpi2c.h b/soc/arm/mcx-nxxx/hardware/nxxx_lpi2c.h similarity index 100% rename from arch/arm/src/mcx-nxxx/hardware/nxxx_lpi2c.h rename to soc/arm/mcx-nxxx/hardware/nxxx_lpi2c.h diff --git a/arch/arm/src/mcx-nxxx/hardware/nxxx_lptmr.h b/soc/arm/mcx-nxxx/hardware/nxxx_lptmr.h similarity index 100% rename from arch/arm/src/mcx-nxxx/hardware/nxxx_lptmr.h rename to soc/arm/mcx-nxxx/hardware/nxxx_lptmr.h diff --git a/arch/arm/src/mcx-nxxx/hardware/nxxx_lpuart.h b/soc/arm/mcx-nxxx/hardware/nxxx_lpuart.h similarity index 100% rename from arch/arm/src/mcx-nxxx/hardware/nxxx_lpuart.h rename to soc/arm/mcx-nxxx/hardware/nxxx_lpuart.h diff --git a/arch/arm/src/mcx-nxxx/hardware/nxxx_memorymap.h b/soc/arm/mcx-nxxx/hardware/nxxx_memorymap.h similarity index 100% rename from arch/arm/src/mcx-nxxx/hardware/nxxx_memorymap.h rename to soc/arm/mcx-nxxx/hardware/nxxx_memorymap.h diff --git a/arch/arm/src/mcx-nxxx/hardware/nxxx_port.h b/soc/arm/mcx-nxxx/hardware/nxxx_port.h similarity index 100% rename from arch/arm/src/mcx-nxxx/hardware/nxxx_port.h rename to soc/arm/mcx-nxxx/hardware/nxxx_port.h diff --git a/arch/arm/src/mcx-nxxx/hardware/nxxx_scg.h b/soc/arm/mcx-nxxx/hardware/nxxx_scg.h similarity index 100% rename from arch/arm/src/mcx-nxxx/hardware/nxxx_scg.h rename to soc/arm/mcx-nxxx/hardware/nxxx_scg.h diff --git a/arch/arm/src/mcx-nxxx/hardware/nxxx_spc.h b/soc/arm/mcx-nxxx/hardware/nxxx_spc.h similarity index 100% rename from arch/arm/src/mcx-nxxx/hardware/nxxx_spc.h rename to soc/arm/mcx-nxxx/hardware/nxxx_spc.h diff --git a/arch/arm/src/mcx-nxxx/nxxx_clockconfig.c b/soc/arm/mcx-nxxx/nxxx_clockconfig.c similarity index 100% rename from arch/arm/src/mcx-nxxx/nxxx_clockconfig.c rename to soc/arm/mcx-nxxx/nxxx_clockconfig.c diff --git a/arch/arm/src/mcx-nxxx/nxxx_clockconfig.h b/soc/arm/mcx-nxxx/nxxx_clockconfig.h similarity index 100% rename from arch/arm/src/mcx-nxxx/nxxx_clockconfig.h rename to soc/arm/mcx-nxxx/nxxx_clockconfig.h diff --git a/arch/arm/src/mcx-nxxx/nxxx_gpio.c b/soc/arm/mcx-nxxx/nxxx_gpio.c similarity index 100% rename from arch/arm/src/mcx-nxxx/nxxx_gpio.c rename to soc/arm/mcx-nxxx/nxxx_gpio.c diff --git a/arch/arm/src/mcx-nxxx/nxxx_gpio.h b/soc/arm/mcx-nxxx/nxxx_gpio.h similarity index 100% rename from arch/arm/src/mcx-nxxx/nxxx_gpio.h rename to soc/arm/mcx-nxxx/nxxx_gpio.h diff --git a/arch/arm/src/mcx-nxxx/nxxx_gpiobase.c b/soc/arm/mcx-nxxx/nxxx_gpiobase.c similarity index 100% rename from arch/arm/src/mcx-nxxx/nxxx_gpiobase.c rename to soc/arm/mcx-nxxx/nxxx_gpiobase.c diff --git a/arch/arm/src/mcx-nxxx/nxxx_gpioirq.c b/soc/arm/mcx-nxxx/nxxx_gpioirq.c similarity index 100% rename from arch/arm/src/mcx-nxxx/nxxx_gpioirq.c rename to soc/arm/mcx-nxxx/nxxx_gpioirq.c diff --git a/arch/arm/src/mcx-nxxx/nxxx_idle.c b/soc/arm/mcx-nxxx/nxxx_idle.c similarity index 100% rename from arch/arm/src/mcx-nxxx/nxxx_idle.c rename to soc/arm/mcx-nxxx/nxxx_idle.c diff --git a/arch/arm/src/mcx-nxxx/nxxx_irq.c b/soc/arm/mcx-nxxx/nxxx_irq.c similarity index 100% rename from arch/arm/src/mcx-nxxx/nxxx_irq.c rename to soc/arm/mcx-nxxx/nxxx_irq.c diff --git a/arch/arm/src/mcx-nxxx/nxxx_lowputc.c b/soc/arm/mcx-nxxx/nxxx_lowputc.c similarity index 100% rename from arch/arm/src/mcx-nxxx/nxxx_lowputc.c rename to soc/arm/mcx-nxxx/nxxx_lowputc.c diff --git a/arch/arm/src/mcx-nxxx/nxxx_lowputc.h b/soc/arm/mcx-nxxx/nxxx_lowputc.h similarity index 100% rename from arch/arm/src/mcx-nxxx/nxxx_lowputc.h rename to soc/arm/mcx-nxxx/nxxx_lowputc.h diff --git a/arch/arm/src/mcx-nxxx/nxxx_lpi2c.c b/soc/arm/mcx-nxxx/nxxx_lpi2c.c similarity index 100% rename from arch/arm/src/mcx-nxxx/nxxx_lpi2c.c rename to soc/arm/mcx-nxxx/nxxx_lpi2c.c diff --git a/arch/arm/src/mcx-nxxx/nxxx_lpi2c.h b/soc/arm/mcx-nxxx/nxxx_lpi2c.h similarity index 100% rename from arch/arm/src/mcx-nxxx/nxxx_lpi2c.h rename to soc/arm/mcx-nxxx/nxxx_lpi2c.h diff --git a/arch/arm/src/mcx-nxxx/nxxx_lpuart.c b/soc/arm/mcx-nxxx/nxxx_lpuart.c similarity index 100% rename from arch/arm/src/mcx-nxxx/nxxx_lpuart.c rename to soc/arm/mcx-nxxx/nxxx_lpuart.c diff --git a/arch/arm/src/mcx-nxxx/nxxx_port.c b/soc/arm/mcx-nxxx/nxxx_port.c similarity index 100% rename from arch/arm/src/mcx-nxxx/nxxx_port.c rename to soc/arm/mcx-nxxx/nxxx_port.c diff --git a/arch/arm/src/mcx-nxxx/nxxx_port.h b/soc/arm/mcx-nxxx/nxxx_port.h similarity index 100% rename from arch/arm/src/mcx-nxxx/nxxx_port.h rename to soc/arm/mcx-nxxx/nxxx_port.h diff --git a/arch/arm/src/mcx-nxxx/nxxx_serial.h b/soc/arm/mcx-nxxx/nxxx_serial.h similarity index 100% rename from arch/arm/src/mcx-nxxx/nxxx_serial.h rename to soc/arm/mcx-nxxx/nxxx_serial.h diff --git a/arch/arm/src/mcx-nxxx/nxxx_start.c b/soc/arm/mcx-nxxx/nxxx_start.c similarity index 100% rename from arch/arm/src/mcx-nxxx/nxxx_start.c rename to soc/arm/mcx-nxxx/nxxx_start.c diff --git a/arch/arm/src/mcx-nxxx/nxxx_timerisr.c b/soc/arm/mcx-nxxx/nxxx_timerisr.c similarity index 100% rename from arch/arm/src/mcx-nxxx/nxxx_timerisr.c rename to soc/arm/mcx-nxxx/nxxx_timerisr.c diff --git a/arch/arm/src/moxart/Kconfig b/soc/arm/moxart/Kconfig similarity index 100% rename from arch/arm/src/moxart/Kconfig rename to soc/arm/moxart/Kconfig diff --git a/arch/arm/src/moxart/Make.defs b/soc/arm/moxart/Make.defs similarity index 100% rename from arch/arm/src/moxart/Make.defs rename to soc/arm/moxart/Make.defs diff --git a/arch/arm/src/moxart/chip.h b/soc/arm/moxart/chip.h similarity index 100% rename from arch/arm/src/moxart/chip.h rename to soc/arm/moxart/chip.h diff --git a/arch/arm/src/moxart/moxart_16550.c b/soc/arm/moxart/moxart_16550.c similarity index 100% rename from arch/arm/src/moxart/moxart_16550.c rename to soc/arm/moxart/moxart_16550.c diff --git a/arch/arm/src/moxart/moxart_head.S b/soc/arm/moxart/moxart_head.S similarity index 100% rename from arch/arm/src/moxart/moxart_head.S rename to soc/arm/moxart/moxart_head.S diff --git a/arch/arm/src/moxart/moxart_idle.c b/soc/arm/moxart/moxart_idle.c similarity index 100% rename from arch/arm/src/moxart/moxart_idle.c rename to soc/arm/moxart/moxart_idle.c diff --git a/arch/arm/src/moxart/moxart_irq.c b/soc/arm/moxart/moxart_irq.c similarity index 100% rename from arch/arm/src/moxart/moxart_irq.c rename to soc/arm/moxart/moxart_irq.c diff --git a/arch/arm/src/moxart/moxart_lowputc.S b/soc/arm/moxart/moxart_lowputc.S similarity index 100% rename from arch/arm/src/moxart/moxart_lowputc.S rename to soc/arm/moxart/moxart_lowputc.S diff --git a/arch/arm/src/moxart/moxart_systemreset.c b/soc/arm/moxart/moxart_systemreset.c similarity index 100% rename from arch/arm/src/moxart/moxart_systemreset.c rename to soc/arm/moxart/moxart_systemreset.c diff --git a/arch/arm/src/moxart/moxart_timer.c b/soc/arm/moxart/moxart_timer.c similarity index 100% rename from arch/arm/src/moxart/moxart_timer.c rename to soc/arm/moxart/moxart_timer.c diff --git a/arch/arm/src/mps/CMakeLists.txt b/soc/arm/mps/CMakeLists.txt similarity index 100% rename from arch/arm/src/mps/CMakeLists.txt rename to soc/arm/mps/CMakeLists.txt diff --git a/arch/arm/src/mps/Kconfig b/soc/arm/mps/Kconfig similarity index 100% rename from arch/arm/src/mps/Kconfig rename to soc/arm/mps/Kconfig diff --git a/arch/arm/src/mps/Make.defs b/soc/arm/mps/Make.defs similarity index 100% rename from arch/arm/src/mps/Make.defs rename to soc/arm/mps/Make.defs diff --git a/arch/arm/src/mps/chip.h b/soc/arm/mps/chip.h similarity index 100% rename from arch/arm/src/mps/chip.h rename to soc/arm/mps/chip.h diff --git a/arch/arm/src/mps/hardware/mps_memorymap.h b/soc/arm/mps/hardware/mps_memorymap.h similarity index 100% rename from arch/arm/src/mps/hardware/mps_memorymap.h rename to soc/arm/mps/hardware/mps_memorymap.h diff --git a/arch/arm/src/mps/mps_allocateheap.c b/soc/arm/mps/mps_allocateheap.c similarity index 100% rename from arch/arm/src/mps/mps_allocateheap.c rename to soc/arm/mps/mps_allocateheap.c diff --git a/arch/arm/src/mps/mps_irq.c b/soc/arm/mps/mps_irq.c similarity index 100% rename from arch/arm/src/mps/mps_irq.c rename to soc/arm/mps/mps_irq.c diff --git a/arch/arm/src/mps/mps_irq.h b/soc/arm/mps/mps_irq.h similarity index 100% rename from arch/arm/src/mps/mps_irq.h rename to soc/arm/mps/mps_irq.h diff --git a/arch/arm/src/mps/mps_serial.c b/soc/arm/mps/mps_serial.c similarity index 100% rename from arch/arm/src/mps/mps_serial.c rename to soc/arm/mps/mps_serial.c diff --git a/arch/arm/src/mps/mps_start.c b/soc/arm/mps/mps_start.c similarity index 100% rename from arch/arm/src/mps/mps_start.c rename to soc/arm/mps/mps_start.c diff --git a/arch/arm/src/mps/mps_timer.c b/soc/arm/mps/mps_timer.c similarity index 100% rename from arch/arm/src/mps/mps_timer.c rename to soc/arm/mps/mps_timer.c diff --git a/arch/arm/src/mps/mps_userspace.c b/soc/arm/mps/mps_userspace.c similarity index 100% rename from arch/arm/src/mps/mps_userspace.c rename to soc/arm/mps/mps_userspace.c diff --git a/arch/arm/src/mps/mps_userspace.h b/soc/arm/mps/mps_userspace.h similarity index 100% rename from arch/arm/src/mps/mps_userspace.h rename to soc/arm/mps/mps_userspace.h diff --git a/arch/arm/src/mx8mp/Kconfig b/soc/arm/mx8mp/Kconfig similarity index 100% rename from arch/arm/src/mx8mp/Kconfig rename to soc/arm/mx8mp/Kconfig diff --git a/arch/arm/src/mx8mp/Make.defs b/soc/arm/mx8mp/Make.defs similarity index 100% rename from arch/arm/src/mx8mp/Make.defs rename to soc/arm/mx8mp/Make.defs diff --git a/arch/arm/src/mx8mp/chip.h b/soc/arm/mx8mp/chip.h similarity index 100% rename from arch/arm/src/mx8mp/chip.h rename to soc/arm/mx8mp/chip.h diff --git a/arch/arm/src/mx8mp/hardware/mx8mp_ccm.h b/soc/arm/mx8mp/hardware/mx8mp_ccm.h similarity index 100% rename from arch/arm/src/mx8mp/hardware/mx8mp_ccm.h rename to soc/arm/mx8mp/hardware/mx8mp_ccm.h diff --git a/arch/arm/src/mx8mp/hardware/mx8mp_ecspi.h b/soc/arm/mx8mp/hardware/mx8mp_ecspi.h similarity index 100% rename from arch/arm/src/mx8mp/hardware/mx8mp_ecspi.h rename to soc/arm/mx8mp/hardware/mx8mp_ecspi.h diff --git a/arch/arm/src/mx8mp/hardware/mx8mp_gpc.h b/soc/arm/mx8mp/hardware/mx8mp_gpc.h similarity index 100% rename from arch/arm/src/mx8mp/hardware/mx8mp_gpc.h rename to soc/arm/mx8mp/hardware/mx8mp_gpc.h diff --git a/arch/arm/src/mx8mp/hardware/mx8mp_gpio.h b/soc/arm/mx8mp/hardware/mx8mp_gpio.h similarity index 100% rename from arch/arm/src/mx8mp/hardware/mx8mp_gpio.h rename to soc/arm/mx8mp/hardware/mx8mp_gpio.h diff --git a/arch/arm/src/mx8mp/hardware/mx8mp_i2c.h b/soc/arm/mx8mp/hardware/mx8mp_i2c.h similarity index 100% rename from arch/arm/src/mx8mp/hardware/mx8mp_i2c.h rename to soc/arm/mx8mp/hardware/mx8mp_i2c.h diff --git a/arch/arm/src/mx8mp/hardware/mx8mp_memorymap.h b/soc/arm/mx8mp/hardware/mx8mp_memorymap.h similarity index 100% rename from arch/arm/src/mx8mp/hardware/mx8mp_memorymap.h rename to soc/arm/mx8mp/hardware/mx8mp_memorymap.h diff --git a/arch/arm/src/mx8mp/hardware/mx8mp_mu.h b/soc/arm/mx8mp/hardware/mx8mp_mu.h similarity index 100% rename from arch/arm/src/mx8mp/hardware/mx8mp_mu.h rename to soc/arm/mx8mp/hardware/mx8mp_mu.h diff --git a/arch/arm/src/mx8mp/hardware/mx8mp_pinmux.h b/soc/arm/mx8mp/hardware/mx8mp_pinmux.h similarity index 100% rename from arch/arm/src/mx8mp/hardware/mx8mp_pinmux.h rename to soc/arm/mx8mp/hardware/mx8mp_pinmux.h diff --git a/arch/arm/src/mx8mp/hardware/mx8mp_rdc.h b/soc/arm/mx8mp/hardware/mx8mp_rdc.h similarity index 100% rename from arch/arm/src/mx8mp/hardware/mx8mp_rdc.h rename to soc/arm/mx8mp/hardware/mx8mp_rdc.h diff --git a/arch/arm/src/mx8mp/hardware/mx8mp_uart.h b/soc/arm/mx8mp/hardware/mx8mp_uart.h similarity index 100% rename from arch/arm/src/mx8mp/hardware/mx8mp_uart.h rename to soc/arm/mx8mp/hardware/mx8mp_uart.h diff --git a/arch/arm/src/mx8mp/mx8mp_allocateheap.c b/soc/arm/mx8mp/mx8mp_allocateheap.c similarity index 100% rename from arch/arm/src/mx8mp/mx8mp_allocateheap.c rename to soc/arm/mx8mp/mx8mp_allocateheap.c diff --git a/arch/arm/src/mx8mp/mx8mp_ccm.c b/soc/arm/mx8mp/mx8mp_ccm.c similarity index 100% rename from arch/arm/src/mx8mp/mx8mp_ccm.c rename to soc/arm/mx8mp/mx8mp_ccm.c diff --git a/arch/arm/src/mx8mp/mx8mp_ccm.h b/soc/arm/mx8mp/mx8mp_ccm.h similarity index 100% rename from arch/arm/src/mx8mp/mx8mp_ccm.h rename to soc/arm/mx8mp/mx8mp_ccm.h diff --git a/arch/arm/src/mx8mp/mx8mp_clockconfig.c b/soc/arm/mx8mp/mx8mp_clockconfig.c similarity index 100% rename from arch/arm/src/mx8mp/mx8mp_clockconfig.c rename to soc/arm/mx8mp/mx8mp_clockconfig.c diff --git a/arch/arm/src/mx8mp/mx8mp_clockconfig.h b/soc/arm/mx8mp/mx8mp_clockconfig.h similarity index 100% rename from arch/arm/src/mx8mp/mx8mp_clockconfig.h rename to soc/arm/mx8mp/mx8mp_clockconfig.h diff --git a/arch/arm/src/mx8mp/mx8mp_clrpend.c b/soc/arm/mx8mp/mx8mp_clrpend.c similarity index 100% rename from arch/arm/src/mx8mp/mx8mp_clrpend.c rename to soc/arm/mx8mp/mx8mp_clrpend.c diff --git a/arch/arm/src/mx8mp/mx8mp_config.h b/soc/arm/mx8mp/mx8mp_config.h similarity index 100% rename from arch/arm/src/mx8mp/mx8mp_config.h rename to soc/arm/mx8mp/mx8mp_config.h diff --git a/arch/arm/src/mx8mp/mx8mp_ecspi.c b/soc/arm/mx8mp/mx8mp_ecspi.c similarity index 100% rename from arch/arm/src/mx8mp/mx8mp_ecspi.c rename to soc/arm/mx8mp/mx8mp_ecspi.c diff --git a/arch/arm/src/mx8mp/mx8mp_ecspi.h b/soc/arm/mx8mp/mx8mp_ecspi.h similarity index 100% rename from arch/arm/src/mx8mp/mx8mp_ecspi.h rename to soc/arm/mx8mp/mx8mp_ecspi.h diff --git a/arch/arm/src/mx8mp/mx8mp_gpio.c b/soc/arm/mx8mp/mx8mp_gpio.c similarity index 100% rename from arch/arm/src/mx8mp/mx8mp_gpio.c rename to soc/arm/mx8mp/mx8mp_gpio.c diff --git a/arch/arm/src/mx8mp/mx8mp_gpio.h b/soc/arm/mx8mp/mx8mp_gpio.h similarity index 100% rename from arch/arm/src/mx8mp/mx8mp_gpio.h rename to soc/arm/mx8mp/mx8mp_gpio.h diff --git a/arch/arm/src/mx8mp/mx8mp_i2c.c b/soc/arm/mx8mp/mx8mp_i2c.c similarity index 100% rename from arch/arm/src/mx8mp/mx8mp_i2c.c rename to soc/arm/mx8mp/mx8mp_i2c.c diff --git a/arch/arm/src/mx8mp/mx8mp_i2c.h b/soc/arm/mx8mp/mx8mp_i2c.h similarity index 100% rename from arch/arm/src/mx8mp/mx8mp_i2c.h rename to soc/arm/mx8mp/mx8mp_i2c.h diff --git a/arch/arm/src/mx8mp/mx8mp_idle.c b/soc/arm/mx8mp/mx8mp_idle.c similarity index 100% rename from arch/arm/src/mx8mp/mx8mp_idle.c rename to soc/arm/mx8mp/mx8mp_idle.c diff --git a/arch/arm/src/mx8mp/mx8mp_iomuxc.c b/soc/arm/mx8mp/mx8mp_iomuxc.c similarity index 100% rename from arch/arm/src/mx8mp/mx8mp_iomuxc.c rename to soc/arm/mx8mp/mx8mp_iomuxc.c diff --git a/arch/arm/src/mx8mp/mx8mp_iomuxc.h b/soc/arm/mx8mp/mx8mp_iomuxc.h similarity index 100% rename from arch/arm/src/mx8mp/mx8mp_iomuxc.h rename to soc/arm/mx8mp/mx8mp_iomuxc.h diff --git a/arch/arm/src/mx8mp/mx8mp_ipc.c b/soc/arm/mx8mp/mx8mp_ipc.c similarity index 100% rename from arch/arm/src/mx8mp/mx8mp_ipc.c rename to soc/arm/mx8mp/mx8mp_ipc.c diff --git a/arch/arm/src/mx8mp/mx8mp_ipc.h b/soc/arm/mx8mp/mx8mp_ipc.h similarity index 100% rename from arch/arm/src/mx8mp/mx8mp_ipc.h rename to soc/arm/mx8mp/mx8mp_ipc.h diff --git a/arch/arm/src/mx8mp/mx8mp_irq.c b/soc/arm/mx8mp/mx8mp_irq.c similarity index 100% rename from arch/arm/src/mx8mp/mx8mp_irq.c rename to soc/arm/mx8mp/mx8mp_irq.c diff --git a/arch/arm/src/mx8mp/mx8mp_lowputc.c b/soc/arm/mx8mp/mx8mp_lowputc.c similarity index 100% rename from arch/arm/src/mx8mp/mx8mp_lowputc.c rename to soc/arm/mx8mp/mx8mp_lowputc.c diff --git a/arch/arm/src/mx8mp/mx8mp_lowputc.h b/soc/arm/mx8mp/mx8mp_lowputc.h similarity index 100% rename from arch/arm/src/mx8mp/mx8mp_lowputc.h rename to soc/arm/mx8mp/mx8mp_lowputc.h diff --git a/arch/arm/src/mx8mp/mx8mp_mpuinit.c b/soc/arm/mx8mp/mx8mp_mpuinit.c similarity index 100% rename from arch/arm/src/mx8mp/mx8mp_mpuinit.c rename to soc/arm/mx8mp/mx8mp_mpuinit.c diff --git a/arch/arm/src/mx8mp/mx8mp_mpuinit.h b/soc/arm/mx8mp/mx8mp_mpuinit.h similarity index 100% rename from arch/arm/src/mx8mp/mx8mp_mpuinit.h rename to soc/arm/mx8mp/mx8mp_mpuinit.h diff --git a/arch/arm/src/mx8mp/mx8mp_rptun.c b/soc/arm/mx8mp/mx8mp_rptun.c similarity index 100% rename from arch/arm/src/mx8mp/mx8mp_rptun.c rename to soc/arm/mx8mp/mx8mp_rptun.c diff --git a/arch/arm/src/mx8mp/mx8mp_rptun.h b/soc/arm/mx8mp/mx8mp_rptun.h similarity index 100% rename from arch/arm/src/mx8mp/mx8mp_rptun.h rename to soc/arm/mx8mp/mx8mp_rptun.h diff --git a/arch/arm/src/mx8mp/mx8mp_rsctable.c b/soc/arm/mx8mp/mx8mp_rsctable.c similarity index 100% rename from arch/arm/src/mx8mp/mx8mp_rsctable.c rename to soc/arm/mx8mp/mx8mp_rsctable.c diff --git a/arch/arm/src/mx8mp/mx8mp_rsctable.h b/soc/arm/mx8mp/mx8mp_rsctable.h similarity index 100% rename from arch/arm/src/mx8mp/mx8mp_rsctable.h rename to soc/arm/mx8mp/mx8mp_rsctable.h diff --git a/arch/arm/src/mx8mp/mx8mp_serial.c b/soc/arm/mx8mp/mx8mp_serial.c similarity index 100% rename from arch/arm/src/mx8mp/mx8mp_serial.c rename to soc/arm/mx8mp/mx8mp_serial.c diff --git a/arch/arm/src/mx8mp/mx8mp_serial.h b/soc/arm/mx8mp/mx8mp_serial.h similarity index 100% rename from arch/arm/src/mx8mp/mx8mp_serial.h rename to soc/arm/mx8mp/mx8mp_serial.h diff --git a/arch/arm/src/mx8mp/mx8mp_start.c b/soc/arm/mx8mp/mx8mp_start.c similarity index 100% rename from arch/arm/src/mx8mp/mx8mp_start.c rename to soc/arm/mx8mp/mx8mp_start.c diff --git a/arch/arm/src/mx8mp/mx8mp_start.h b/soc/arm/mx8mp/mx8mp_start.h similarity index 100% rename from arch/arm/src/mx8mp/mx8mp_start.h rename to soc/arm/mx8mp/mx8mp_start.h diff --git a/arch/arm/src/mx8mp/mx8mp_timerisr.c b/soc/arm/mx8mp/mx8mp_timerisr.c similarity index 100% rename from arch/arm/src/mx8mp/mx8mp_timerisr.c rename to soc/arm/mx8mp/mx8mp_timerisr.c diff --git a/arch/arm/src/mx8mp/mx8mp_userspace.h b/soc/arm/mx8mp/mx8mp_userspace.h similarity index 100% rename from arch/arm/src/mx8mp/mx8mp_userspace.h rename to soc/arm/mx8mp/mx8mp_userspace.h diff --git a/arch/arm/src/nrf52/.gitignore b/soc/arm/nrf52/.gitignore similarity index 100% rename from arch/arm/src/nrf52/.gitignore rename to soc/arm/nrf52/.gitignore diff --git a/arch/arm/src/nrf52/CMakeLists.txt b/soc/arm/nrf52/CMakeLists.txt similarity index 100% rename from arch/arm/src/nrf52/CMakeLists.txt rename to soc/arm/nrf52/CMakeLists.txt diff --git a/arch/arm/src/nrf52/Kconfig b/soc/arm/nrf52/Kconfig similarity index 100% rename from arch/arm/src/nrf52/Kconfig rename to soc/arm/nrf52/Kconfig diff --git a/arch/arm/src/nrf52/Make.defs b/soc/arm/nrf52/Make.defs similarity index 100% rename from arch/arm/src/nrf52/Make.defs rename to soc/arm/nrf52/Make.defs diff --git a/arch/arm/src/nrf52/chip.h b/soc/arm/nrf52/chip.h similarity index 100% rename from arch/arm/src/nrf52/chip.h rename to soc/arm/nrf52/chip.h diff --git a/arch/arm/src/nrf52/hardware/nrf52_clock.h b/soc/arm/nrf52/hardware/nrf52_clock.h similarity index 100% rename from arch/arm/src/nrf52/hardware/nrf52_clock.h rename to soc/arm/nrf52/hardware/nrf52_clock.h diff --git a/arch/arm/src/nrf52/hardware/nrf52_ficr.h b/soc/arm/nrf52/hardware/nrf52_ficr.h similarity index 100% rename from arch/arm/src/nrf52/hardware/nrf52_ficr.h rename to soc/arm/nrf52/hardware/nrf52_ficr.h diff --git a/arch/arm/src/nrf52/hardware/nrf52_gpio.h b/soc/arm/nrf52/hardware/nrf52_gpio.h similarity index 100% rename from arch/arm/src/nrf52/hardware/nrf52_gpio.h rename to soc/arm/nrf52/hardware/nrf52_gpio.h diff --git a/arch/arm/src/nrf52/hardware/nrf52_gpiote.h b/soc/arm/nrf52/hardware/nrf52_gpiote.h similarity index 100% rename from arch/arm/src/nrf52/hardware/nrf52_gpiote.h rename to soc/arm/nrf52/hardware/nrf52_gpiote.h diff --git a/arch/arm/src/nrf52/hardware/nrf52_memorymap.h b/soc/arm/nrf52/hardware/nrf52_memorymap.h similarity index 100% rename from arch/arm/src/nrf52/hardware/nrf52_memorymap.h rename to soc/arm/nrf52/hardware/nrf52_memorymap.h diff --git a/arch/arm/src/nrf52/hardware/nrf52_nfc.h b/soc/arm/nrf52/hardware/nrf52_nfc.h similarity index 100% rename from arch/arm/src/nrf52/hardware/nrf52_nfc.h rename to soc/arm/nrf52/hardware/nrf52_nfc.h diff --git a/arch/arm/src/nrf52/hardware/nrf52_nvmc.h b/soc/arm/nrf52/hardware/nrf52_nvmc.h similarity index 100% rename from arch/arm/src/nrf52/hardware/nrf52_nvmc.h rename to soc/arm/nrf52/hardware/nrf52_nvmc.h diff --git a/arch/arm/src/nrf52/hardware/nrf52_power.h b/soc/arm/nrf52/hardware/nrf52_power.h similarity index 100% rename from arch/arm/src/nrf52/hardware/nrf52_power.h rename to soc/arm/nrf52/hardware/nrf52_power.h diff --git a/arch/arm/src/nrf52/hardware/nrf52_ppi.h b/soc/arm/nrf52/hardware/nrf52_ppi.h similarity index 100% rename from arch/arm/src/nrf52/hardware/nrf52_ppi.h rename to soc/arm/nrf52/hardware/nrf52_ppi.h diff --git a/arch/arm/src/nrf52/hardware/nrf52_pwm.h b/soc/arm/nrf52/hardware/nrf52_pwm.h similarity index 100% rename from arch/arm/src/nrf52/hardware/nrf52_pwm.h rename to soc/arm/nrf52/hardware/nrf52_pwm.h diff --git a/arch/arm/src/nrf52/hardware/nrf52_qspi.h b/soc/arm/nrf52/hardware/nrf52_qspi.h similarity index 100% rename from arch/arm/src/nrf52/hardware/nrf52_qspi.h rename to soc/arm/nrf52/hardware/nrf52_qspi.h diff --git a/arch/arm/src/nrf52/hardware/nrf52_radio.h b/soc/arm/nrf52/hardware/nrf52_radio.h similarity index 100% rename from arch/arm/src/nrf52/hardware/nrf52_radio.h rename to soc/arm/nrf52/hardware/nrf52_radio.h diff --git a/arch/arm/src/nrf52/hardware/nrf52_rng.h b/soc/arm/nrf52/hardware/nrf52_rng.h similarity index 100% rename from arch/arm/src/nrf52/hardware/nrf52_rng.h rename to soc/arm/nrf52/hardware/nrf52_rng.h diff --git a/arch/arm/src/nrf52/hardware/nrf52_rtc.h b/soc/arm/nrf52/hardware/nrf52_rtc.h similarity index 100% rename from arch/arm/src/nrf52/hardware/nrf52_rtc.h rename to soc/arm/nrf52/hardware/nrf52_rtc.h diff --git a/arch/arm/src/nrf52/hardware/nrf52_saadc.h b/soc/arm/nrf52/hardware/nrf52_saadc.h similarity index 100% rename from arch/arm/src/nrf52/hardware/nrf52_saadc.h rename to soc/arm/nrf52/hardware/nrf52_saadc.h diff --git a/arch/arm/src/nrf52/hardware/nrf52_spi.h b/soc/arm/nrf52/hardware/nrf52_spi.h similarity index 100% rename from arch/arm/src/nrf52/hardware/nrf52_spi.h rename to soc/arm/nrf52/hardware/nrf52_spi.h diff --git a/arch/arm/src/nrf52/hardware/nrf52_temp.h b/soc/arm/nrf52/hardware/nrf52_temp.h similarity index 100% rename from arch/arm/src/nrf52/hardware/nrf52_temp.h rename to soc/arm/nrf52/hardware/nrf52_temp.h diff --git a/arch/arm/src/nrf52/hardware/nrf52_tim.h b/soc/arm/nrf52/hardware/nrf52_tim.h similarity index 100% rename from arch/arm/src/nrf52/hardware/nrf52_tim.h rename to soc/arm/nrf52/hardware/nrf52_tim.h diff --git a/arch/arm/src/nrf52/hardware/nrf52_twi.h b/soc/arm/nrf52/hardware/nrf52_twi.h similarity index 100% rename from arch/arm/src/nrf52/hardware/nrf52_twi.h rename to soc/arm/nrf52/hardware/nrf52_twi.h diff --git a/arch/arm/src/nrf52/hardware/nrf52_uarte.h b/soc/arm/nrf52/hardware/nrf52_uarte.h similarity index 100% rename from arch/arm/src/nrf52/hardware/nrf52_uarte.h rename to soc/arm/nrf52/hardware/nrf52_uarte.h diff --git a/arch/arm/src/nrf52/hardware/nrf52_uicr.h b/soc/arm/nrf52/hardware/nrf52_uicr.h similarity index 100% rename from arch/arm/src/nrf52/hardware/nrf52_uicr.h rename to soc/arm/nrf52/hardware/nrf52_uicr.h diff --git a/arch/arm/src/nrf52/hardware/nrf52_usbd.h b/soc/arm/nrf52/hardware/nrf52_usbd.h similarity index 100% rename from arch/arm/src/nrf52/hardware/nrf52_usbd.h rename to soc/arm/nrf52/hardware/nrf52_usbd.h diff --git a/arch/arm/src/nrf52/hardware/nrf52_utils.h b/soc/arm/nrf52/hardware/nrf52_utils.h similarity index 100% rename from arch/arm/src/nrf52/hardware/nrf52_utils.h rename to soc/arm/nrf52/hardware/nrf52_utils.h diff --git a/arch/arm/src/nrf52/hardware/nrf52_wdt.h b/soc/arm/nrf52/hardware/nrf52_wdt.h similarity index 100% rename from arch/arm/src/nrf52/hardware/nrf52_wdt.h rename to soc/arm/nrf52/hardware/nrf52_wdt.h diff --git a/arch/arm/src/nrf52/nrf52832_errdata.c b/soc/arm/nrf52/nrf52832_errdata.c similarity index 100% rename from arch/arm/src/nrf52/nrf52832_errdata.c rename to soc/arm/nrf52/nrf52832_errdata.c diff --git a/arch/arm/src/nrf52/nrf52_adc.c b/soc/arm/nrf52/nrf52_adc.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_adc.c rename to soc/arm/nrf52/nrf52_adc.c diff --git a/arch/arm/src/nrf52/nrf52_adc.h b/soc/arm/nrf52/nrf52_adc.h similarity index 100% rename from arch/arm/src/nrf52/nrf52_adc.h rename to soc/arm/nrf52/nrf52_adc.h diff --git a/arch/arm/src/nrf52/nrf52_allocateheap.c b/soc/arm/nrf52/nrf52_allocateheap.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_allocateheap.c rename to soc/arm/nrf52/nrf52_allocateheap.c diff --git a/arch/arm/src/nrf52/nrf52_clockconfig.c b/soc/arm/nrf52/nrf52_clockconfig.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_clockconfig.c rename to soc/arm/nrf52/nrf52_clockconfig.c diff --git a/arch/arm/src/nrf52/nrf52_clockconfig.h b/soc/arm/nrf52/nrf52_clockconfig.h similarity index 100% rename from arch/arm/src/nrf52/nrf52_clockconfig.h rename to soc/arm/nrf52/nrf52_clockconfig.h diff --git a/arch/arm/src/nrf52/nrf52_config.h b/soc/arm/nrf52/nrf52_config.h similarity index 100% rename from arch/arm/src/nrf52/nrf52_config.h rename to soc/arm/nrf52/nrf52_config.h diff --git a/arch/arm/src/nrf52/nrf52_flash.c b/soc/arm/nrf52/nrf52_flash.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_flash.c rename to soc/arm/nrf52/nrf52_flash.c diff --git a/arch/arm/src/nrf52/nrf52_gpio.c b/soc/arm/nrf52/nrf52_gpio.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_gpio.c rename to soc/arm/nrf52/nrf52_gpio.c diff --git a/arch/arm/src/nrf52/nrf52_gpio.h b/soc/arm/nrf52/nrf52_gpio.h similarity index 100% rename from arch/arm/src/nrf52/nrf52_gpio.h rename to soc/arm/nrf52/nrf52_gpio.h diff --git a/arch/arm/src/nrf52/nrf52_gpiote.c b/soc/arm/nrf52/nrf52_gpiote.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_gpiote.c rename to soc/arm/nrf52/nrf52_gpiote.c diff --git a/arch/arm/src/nrf52/nrf52_gpiote.h b/soc/arm/nrf52/nrf52_gpiote.h similarity index 100% rename from arch/arm/src/nrf52/nrf52_gpiote.h rename to soc/arm/nrf52/nrf52_gpiote.h diff --git a/arch/arm/src/nrf52/nrf52_i2c.c b/soc/arm/nrf52/nrf52_i2c.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_i2c.c rename to soc/arm/nrf52/nrf52_i2c.c diff --git a/arch/arm/src/nrf52/nrf52_i2c.h b/soc/arm/nrf52/nrf52_i2c.h similarity index 100% rename from arch/arm/src/nrf52/nrf52_i2c.h rename to soc/arm/nrf52/nrf52_i2c.h diff --git a/arch/arm/src/nrf52/nrf52_i2c_bitbang.c b/soc/arm/nrf52/nrf52_i2c_bitbang.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_i2c_bitbang.c rename to soc/arm/nrf52/nrf52_i2c_bitbang.c diff --git a/arch/arm/src/nrf52/nrf52_i2c_bitbang.h b/soc/arm/nrf52/nrf52_i2c_bitbang.h similarity index 100% rename from arch/arm/src/nrf52/nrf52_i2c_bitbang.h rename to soc/arm/nrf52/nrf52_i2c_bitbang.h diff --git a/arch/arm/src/nrf52/nrf52_idle.c b/soc/arm/nrf52/nrf52_idle.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_idle.c rename to soc/arm/nrf52/nrf52_idle.c diff --git a/arch/arm/src/nrf52/nrf52_ieee802154.c b/soc/arm/nrf52/nrf52_ieee802154.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_ieee802154.c rename to soc/arm/nrf52/nrf52_ieee802154.c diff --git a/arch/arm/src/nrf52/nrf52_ieee802154_priv.h b/soc/arm/nrf52/nrf52_ieee802154_priv.h similarity index 100% rename from arch/arm/src/nrf52/nrf52_ieee802154_priv.h rename to soc/arm/nrf52/nrf52_ieee802154_priv.h diff --git a/arch/arm/src/nrf52/nrf52_ieee802154_radio.c b/soc/arm/nrf52/nrf52_ieee802154_radio.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_ieee802154_radio.c rename to soc/arm/nrf52/nrf52_ieee802154_radio.c diff --git a/arch/arm/src/nrf52/nrf52_ieee802154_radio.h b/soc/arm/nrf52/nrf52_ieee802154_radio.h similarity index 100% rename from arch/arm/src/nrf52/nrf52_ieee802154_radio.h rename to soc/arm/nrf52/nrf52_ieee802154_radio.h diff --git a/arch/arm/src/nrf52/nrf52_ieee802154_rtc.c b/soc/arm/nrf52/nrf52_ieee802154_rtc.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_ieee802154_rtc.c rename to soc/arm/nrf52/nrf52_ieee802154_rtc.c diff --git a/arch/arm/src/nrf52/nrf52_ieee802154_rtc.h b/soc/arm/nrf52/nrf52_ieee802154_rtc.h similarity index 100% rename from arch/arm/src/nrf52/nrf52_ieee802154_rtc.h rename to soc/arm/nrf52/nrf52_ieee802154_rtc.h diff --git a/arch/arm/src/nrf52/nrf52_ieee802154_tim.c b/soc/arm/nrf52/nrf52_ieee802154_tim.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_ieee802154_tim.c rename to soc/arm/nrf52/nrf52_ieee802154_tim.c diff --git a/arch/arm/src/nrf52/nrf52_ieee802154_tim.h b/soc/arm/nrf52/nrf52_ieee802154_tim.h similarity index 100% rename from arch/arm/src/nrf52/nrf52_ieee802154_tim.h rename to soc/arm/nrf52/nrf52_ieee802154_tim.h diff --git a/arch/arm/src/nrf52/nrf52_ieee802154_trace.c b/soc/arm/nrf52/nrf52_ieee802154_trace.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_ieee802154_trace.c rename to soc/arm/nrf52/nrf52_ieee802154_trace.c diff --git a/arch/arm/src/nrf52/nrf52_ieee802154_trace.h b/soc/arm/nrf52/nrf52_ieee802154_trace.h similarity index 100% rename from arch/arm/src/nrf52/nrf52_ieee802154_trace.h rename to soc/arm/nrf52/nrf52_ieee802154_trace.h diff --git a/arch/arm/src/nrf52/nrf52_irq.c b/soc/arm/nrf52/nrf52_irq.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_irq.c rename to soc/arm/nrf52/nrf52_irq.c diff --git a/arch/arm/src/nrf52/nrf52_irq.h b/soc/arm/nrf52/nrf52_irq.h similarity index 100% rename from arch/arm/src/nrf52/nrf52_irq.h rename to soc/arm/nrf52/nrf52_irq.h diff --git a/arch/arm/src/nrf52/nrf52_lowputc.c b/soc/arm/nrf52/nrf52_lowputc.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_lowputc.c rename to soc/arm/nrf52/nrf52_lowputc.c diff --git a/arch/arm/src/nrf52/nrf52_lowputc.h b/soc/arm/nrf52/nrf52_lowputc.h similarity index 100% rename from arch/arm/src/nrf52/nrf52_lowputc.h rename to soc/arm/nrf52/nrf52_lowputc.h diff --git a/arch/arm/src/nrf52/nrf52_nvmc.c b/soc/arm/nrf52/nrf52_nvmc.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_nvmc.c rename to soc/arm/nrf52/nrf52_nvmc.c diff --git a/arch/arm/src/nrf52/nrf52_nvmc.h b/soc/arm/nrf52/nrf52_nvmc.h similarity index 100% rename from arch/arm/src/nrf52/nrf52_nvmc.h rename to soc/arm/nrf52/nrf52_nvmc.h diff --git a/arch/arm/src/nrf52/nrf52_pminitialize.c b/soc/arm/nrf52/nrf52_pminitialize.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_pminitialize.c rename to soc/arm/nrf52/nrf52_pminitialize.c diff --git a/arch/arm/src/nrf52/nrf52_ppi.c b/soc/arm/nrf52/nrf52_ppi.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_ppi.c rename to soc/arm/nrf52/nrf52_ppi.c diff --git a/arch/arm/src/nrf52/nrf52_ppi.h b/soc/arm/nrf52/nrf52_ppi.h similarity index 100% rename from arch/arm/src/nrf52/nrf52_ppi.h rename to soc/arm/nrf52/nrf52_ppi.h diff --git a/arch/arm/src/nrf52/nrf52_pwm.c b/soc/arm/nrf52/nrf52_pwm.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_pwm.c rename to soc/arm/nrf52/nrf52_pwm.c diff --git a/arch/arm/src/nrf52/nrf52_pwm.h b/soc/arm/nrf52/nrf52_pwm.h similarity index 100% rename from arch/arm/src/nrf52/nrf52_pwm.h rename to soc/arm/nrf52/nrf52_pwm.h diff --git a/arch/arm/src/nrf52/nrf52_qspi.c b/soc/arm/nrf52/nrf52_qspi.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_qspi.c rename to soc/arm/nrf52/nrf52_qspi.c diff --git a/arch/arm/src/nrf52/nrf52_qspi.h b/soc/arm/nrf52/nrf52_qspi.h similarity index 100% rename from arch/arm/src/nrf52/nrf52_qspi.h rename to soc/arm/nrf52/nrf52_qspi.h diff --git a/arch/arm/src/nrf52/nrf52_radio.c b/soc/arm/nrf52/nrf52_radio.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_radio.c rename to soc/arm/nrf52/nrf52_radio.c diff --git a/arch/arm/src/nrf52/nrf52_radio.h b/soc/arm/nrf52/nrf52_radio.h similarity index 100% rename from arch/arm/src/nrf52/nrf52_radio.h rename to soc/arm/nrf52/nrf52_radio.h diff --git a/arch/arm/src/nrf52/nrf52_radio_ieee802154.h b/soc/arm/nrf52/nrf52_radio_ieee802154.h similarity index 100% rename from arch/arm/src/nrf52/nrf52_radio_ieee802154.h rename to soc/arm/nrf52/nrf52_radio_ieee802154.h diff --git a/arch/arm/src/nrf52/nrf52_rng.c b/soc/arm/nrf52/nrf52_rng.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_rng.c rename to soc/arm/nrf52/nrf52_rng.c diff --git a/arch/arm/src/nrf52/nrf52_rtc.c b/soc/arm/nrf52/nrf52_rtc.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_rtc.c rename to soc/arm/nrf52/nrf52_rtc.c diff --git a/arch/arm/src/nrf52/nrf52_rtc.h b/soc/arm/nrf52/nrf52_rtc.h similarity index 100% rename from arch/arm/src/nrf52/nrf52_rtc.h rename to soc/arm/nrf52/nrf52_rtc.h diff --git a/arch/arm/src/nrf52/nrf52_sdc.c b/soc/arm/nrf52/nrf52_sdc.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_sdc.c rename to soc/arm/nrf52/nrf52_sdc.c diff --git a/arch/arm/src/nrf52/nrf52_sdc.h b/soc/arm/nrf52/nrf52_sdc.h similarity index 100% rename from arch/arm/src/nrf52/nrf52_sdc.h rename to soc/arm/nrf52/nrf52_sdc.h diff --git a/arch/arm/src/nrf52/nrf52_serial.c b/soc/arm/nrf52/nrf52_serial.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_serial.c rename to soc/arm/nrf52/nrf52_serial.c diff --git a/arch/arm/src/nrf52/nrf52_serial.h b/soc/arm/nrf52/nrf52_serial.h similarity index 100% rename from arch/arm/src/nrf52/nrf52_serial.h rename to soc/arm/nrf52/nrf52_serial.h diff --git a/arch/arm/src/nrf52/nrf52_spi.c b/soc/arm/nrf52/nrf52_spi.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_spi.c rename to soc/arm/nrf52/nrf52_spi.c diff --git a/arch/arm/src/nrf52/nrf52_spi.h b/soc/arm/nrf52/nrf52_spi.h similarity index 100% rename from arch/arm/src/nrf52/nrf52_spi.h rename to soc/arm/nrf52/nrf52_spi.h diff --git a/arch/arm/src/nrf52/nrf52_start.c b/soc/arm/nrf52/nrf52_start.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_start.c rename to soc/arm/nrf52/nrf52_start.c diff --git a/arch/arm/src/nrf52/nrf52_start.h b/soc/arm/nrf52/nrf52_start.h similarity index 100% rename from arch/arm/src/nrf52/nrf52_start.h rename to soc/arm/nrf52/nrf52_start.h diff --git a/arch/arm/src/nrf52/nrf52_systick.c b/soc/arm/nrf52/nrf52_systick.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_systick.c rename to soc/arm/nrf52/nrf52_systick.c diff --git a/arch/arm/src/nrf52/nrf52_tickless_rtc.c b/soc/arm/nrf52/nrf52_tickless_rtc.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_tickless_rtc.c rename to soc/arm/nrf52/nrf52_tickless_rtc.c diff --git a/arch/arm/src/nrf52/nrf52_tim.c b/soc/arm/nrf52/nrf52_tim.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_tim.c rename to soc/arm/nrf52/nrf52_tim.c diff --git a/arch/arm/src/nrf52/nrf52_tim.h b/soc/arm/nrf52/nrf52_tim.h similarity index 100% rename from arch/arm/src/nrf52/nrf52_tim.h rename to soc/arm/nrf52/nrf52_tim.h diff --git a/arch/arm/src/nrf52/nrf52_tim_lowerhalf.c b/soc/arm/nrf52/nrf52_tim_lowerhalf.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_tim_lowerhalf.c rename to soc/arm/nrf52/nrf52_tim_lowerhalf.c diff --git a/arch/arm/src/nrf52/nrf52_tim_lowerhalf.h b/soc/arm/nrf52/nrf52_tim_lowerhalf.h similarity index 100% rename from arch/arm/src/nrf52/nrf52_tim_lowerhalf.h rename to soc/arm/nrf52/nrf52_tim_lowerhalf.h diff --git a/arch/arm/src/nrf52/nrf52_uid.c b/soc/arm/nrf52/nrf52_uid.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_uid.c rename to soc/arm/nrf52/nrf52_uid.c diff --git a/arch/arm/src/nrf52/nrf52_uid.h b/soc/arm/nrf52/nrf52_uid.h similarity index 100% rename from arch/arm/src/nrf52/nrf52_uid.h rename to soc/arm/nrf52/nrf52_uid.h diff --git a/arch/arm/src/nrf52/nrf52_usbd.c b/soc/arm/nrf52/nrf52_usbd.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_usbd.c rename to soc/arm/nrf52/nrf52_usbd.c diff --git a/arch/arm/src/nrf52/nrf52_usbd.h b/soc/arm/nrf52/nrf52_usbd.h similarity index 100% rename from arch/arm/src/nrf52/nrf52_usbd.h rename to soc/arm/nrf52/nrf52_usbd.h diff --git a/arch/arm/src/nrf52/nrf52_utils.c b/soc/arm/nrf52/nrf52_utils.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_utils.c rename to soc/arm/nrf52/nrf52_utils.c diff --git a/arch/arm/src/nrf52/nrf52_wdt.c b/soc/arm/nrf52/nrf52_wdt.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_wdt.c rename to soc/arm/nrf52/nrf52_wdt.c diff --git a/arch/arm/src/nrf52/nrf52_wdt.h b/soc/arm/nrf52/nrf52_wdt.h similarity index 100% rename from arch/arm/src/nrf52/nrf52_wdt.h rename to soc/arm/nrf52/nrf52_wdt.h diff --git a/arch/arm/src/nrf52/nrf52_wdt_lowerhalf.c b/soc/arm/nrf52/nrf52_wdt_lowerhalf.c similarity index 100% rename from arch/arm/src/nrf52/nrf52_wdt_lowerhalf.c rename to soc/arm/nrf52/nrf52_wdt_lowerhalf.c diff --git a/arch/arm/src/nrf52/nrf52_wdt_lowerhalf.h b/soc/arm/nrf52/nrf52_wdt_lowerhalf.h similarity index 100% rename from arch/arm/src/nrf52/nrf52_wdt_lowerhalf.h rename to soc/arm/nrf52/nrf52_wdt_lowerhalf.h diff --git a/arch/arm/src/nrf52/sdc/README.md b/soc/arm/nrf52/sdc/README.md similarity index 100% rename from arch/arm/src/nrf52/sdc/README.md rename to soc/arm/nrf52/sdc/README.md diff --git a/arch/arm/src/nrf52/sdc/nrf.h b/soc/arm/nrf52/sdc/nrf.h similarity index 100% rename from arch/arm/src/nrf52/sdc/nrf.h rename to soc/arm/nrf52/sdc/nrf.h diff --git a/arch/arm/src/nrf52/sdc/nrf_peripherals.h b/soc/arm/nrf52/sdc/nrf_peripherals.h similarity index 100% rename from arch/arm/src/nrf52/sdc/nrf_peripherals.h rename to soc/arm/nrf52/sdc/nrf_peripherals.h diff --git a/arch/arm/src/nrf53/.gitignore b/soc/arm/nrf53/.gitignore similarity index 100% rename from arch/arm/src/nrf53/.gitignore rename to soc/arm/nrf53/.gitignore diff --git a/arch/arm/src/nrf53/CMakeLists.txt b/soc/arm/nrf53/CMakeLists.txt similarity index 100% rename from arch/arm/src/nrf53/CMakeLists.txt rename to soc/arm/nrf53/CMakeLists.txt diff --git a/arch/arm/src/nrf53/Kconfig b/soc/arm/nrf53/Kconfig similarity index 100% rename from arch/arm/src/nrf53/Kconfig rename to soc/arm/nrf53/Kconfig diff --git a/arch/arm/src/nrf53/Make.defs b/soc/arm/nrf53/Make.defs similarity index 100% rename from arch/arm/src/nrf53/Make.defs rename to soc/arm/nrf53/Make.defs diff --git a/arch/arm/src/nrf53/chip.h b/soc/arm/nrf53/chip.h similarity index 100% rename from arch/arm/src/nrf53/chip.h rename to soc/arm/nrf53/chip.h diff --git a/arch/arm/src/nrf53/hardware/nrf53_clock.h b/soc/arm/nrf53/hardware/nrf53_clock.h similarity index 100% rename from arch/arm/src/nrf53/hardware/nrf53_clock.h rename to soc/arm/nrf53/hardware/nrf53_clock.h diff --git a/arch/arm/src/nrf53/hardware/nrf53_ctrlap.h b/soc/arm/nrf53/hardware/nrf53_ctrlap.h similarity index 100% rename from arch/arm/src/nrf53/hardware/nrf53_ctrlap.h rename to soc/arm/nrf53/hardware/nrf53_ctrlap.h diff --git a/arch/arm/src/nrf53/hardware/nrf53_dppi.h b/soc/arm/nrf53/hardware/nrf53_dppi.h similarity index 100% rename from arch/arm/src/nrf53/hardware/nrf53_dppi.h rename to soc/arm/nrf53/hardware/nrf53_dppi.h diff --git a/arch/arm/src/nrf53/hardware/nrf53_ficr.h b/soc/arm/nrf53/hardware/nrf53_ficr.h similarity index 100% rename from arch/arm/src/nrf53/hardware/nrf53_ficr.h rename to soc/arm/nrf53/hardware/nrf53_ficr.h diff --git a/arch/arm/src/nrf53/hardware/nrf53_ficr_cpuapp.h b/soc/arm/nrf53/hardware/nrf53_ficr_cpuapp.h similarity index 100% rename from arch/arm/src/nrf53/hardware/nrf53_ficr_cpuapp.h rename to soc/arm/nrf53/hardware/nrf53_ficr_cpuapp.h diff --git a/arch/arm/src/nrf53/hardware/nrf53_ficr_cpunet.h b/soc/arm/nrf53/hardware/nrf53_ficr_cpunet.h similarity index 100% rename from arch/arm/src/nrf53/hardware/nrf53_ficr_cpunet.h rename to soc/arm/nrf53/hardware/nrf53_ficr_cpunet.h diff --git a/arch/arm/src/nrf53/hardware/nrf53_gpio.h b/soc/arm/nrf53/hardware/nrf53_gpio.h similarity index 100% rename from arch/arm/src/nrf53/hardware/nrf53_gpio.h rename to soc/arm/nrf53/hardware/nrf53_gpio.h diff --git a/arch/arm/src/nrf53/hardware/nrf53_gpiote.h b/soc/arm/nrf53/hardware/nrf53_gpiote.h similarity index 100% rename from arch/arm/src/nrf53/hardware/nrf53_gpiote.h rename to soc/arm/nrf53/hardware/nrf53_gpiote.h diff --git a/arch/arm/src/nrf53/hardware/nrf53_ipc.h b/soc/arm/nrf53/hardware/nrf53_ipc.h similarity index 100% rename from arch/arm/src/nrf53/hardware/nrf53_ipc.h rename to soc/arm/nrf53/hardware/nrf53_ipc.h diff --git a/arch/arm/src/nrf53/hardware/nrf53_memorymap.h b/soc/arm/nrf53/hardware/nrf53_memorymap.h similarity index 100% rename from arch/arm/src/nrf53/hardware/nrf53_memorymap.h rename to soc/arm/nrf53/hardware/nrf53_memorymap.h diff --git a/arch/arm/src/nrf53/hardware/nrf53_memorymap_cpuapp.h b/soc/arm/nrf53/hardware/nrf53_memorymap_cpuapp.h similarity index 100% rename from arch/arm/src/nrf53/hardware/nrf53_memorymap_cpuapp.h rename to soc/arm/nrf53/hardware/nrf53_memorymap_cpuapp.h diff --git a/arch/arm/src/nrf53/hardware/nrf53_memorymap_cpunet.h b/soc/arm/nrf53/hardware/nrf53_memorymap_cpunet.h similarity index 100% rename from arch/arm/src/nrf53/hardware/nrf53_memorymap_cpunet.h rename to soc/arm/nrf53/hardware/nrf53_memorymap_cpunet.h diff --git a/arch/arm/src/nrf53/hardware/nrf53_nvmc.h b/soc/arm/nrf53/hardware/nrf53_nvmc.h similarity index 100% rename from arch/arm/src/nrf53/hardware/nrf53_nvmc.h rename to soc/arm/nrf53/hardware/nrf53_nvmc.h diff --git a/arch/arm/src/nrf53/hardware/nrf53_osc.h b/soc/arm/nrf53/hardware/nrf53_osc.h similarity index 100% rename from arch/arm/src/nrf53/hardware/nrf53_osc.h rename to soc/arm/nrf53/hardware/nrf53_osc.h diff --git a/arch/arm/src/nrf53/hardware/nrf53_power.h b/soc/arm/nrf53/hardware/nrf53_power.h similarity index 100% rename from arch/arm/src/nrf53/hardware/nrf53_power.h rename to soc/arm/nrf53/hardware/nrf53_power.h diff --git a/arch/arm/src/nrf53/hardware/nrf53_pwm.h b/soc/arm/nrf53/hardware/nrf53_pwm.h similarity index 100% rename from arch/arm/src/nrf53/hardware/nrf53_pwm.h rename to soc/arm/nrf53/hardware/nrf53_pwm.h diff --git a/arch/arm/src/nrf53/hardware/nrf53_qspi.h b/soc/arm/nrf53/hardware/nrf53_qspi.h similarity index 100% rename from arch/arm/src/nrf53/hardware/nrf53_qspi.h rename to soc/arm/nrf53/hardware/nrf53_qspi.h diff --git a/arch/arm/src/nrf53/hardware/nrf53_reset.h b/soc/arm/nrf53/hardware/nrf53_reset.h similarity index 100% rename from arch/arm/src/nrf53/hardware/nrf53_reset.h rename to soc/arm/nrf53/hardware/nrf53_reset.h diff --git a/arch/arm/src/nrf53/hardware/nrf53_rtc.h b/soc/arm/nrf53/hardware/nrf53_rtc.h similarity index 100% rename from arch/arm/src/nrf53/hardware/nrf53_rtc.h rename to soc/arm/nrf53/hardware/nrf53_rtc.h diff --git a/arch/arm/src/nrf53/hardware/nrf53_saadc.h b/soc/arm/nrf53/hardware/nrf53_saadc.h similarity index 100% rename from arch/arm/src/nrf53/hardware/nrf53_saadc.h rename to soc/arm/nrf53/hardware/nrf53_saadc.h diff --git a/arch/arm/src/nrf53/hardware/nrf53_spi.h b/soc/arm/nrf53/hardware/nrf53_spi.h similarity index 100% rename from arch/arm/src/nrf53/hardware/nrf53_spi.h rename to soc/arm/nrf53/hardware/nrf53_spi.h diff --git a/arch/arm/src/nrf53/hardware/nrf53_spu.h b/soc/arm/nrf53/hardware/nrf53_spu.h similarity index 100% rename from arch/arm/src/nrf53/hardware/nrf53_spu.h rename to soc/arm/nrf53/hardware/nrf53_spu.h diff --git a/arch/arm/src/nrf53/hardware/nrf53_temp.h b/soc/arm/nrf53/hardware/nrf53_temp.h similarity index 100% rename from arch/arm/src/nrf53/hardware/nrf53_temp.h rename to soc/arm/nrf53/hardware/nrf53_temp.h diff --git a/arch/arm/src/nrf53/hardware/nrf53_tim.h b/soc/arm/nrf53/hardware/nrf53_tim.h similarity index 100% rename from arch/arm/src/nrf53/hardware/nrf53_tim.h rename to soc/arm/nrf53/hardware/nrf53_tim.h diff --git a/arch/arm/src/nrf53/hardware/nrf53_twi.h b/soc/arm/nrf53/hardware/nrf53_twi.h similarity index 100% rename from arch/arm/src/nrf53/hardware/nrf53_twi.h rename to soc/arm/nrf53/hardware/nrf53_twi.h diff --git a/arch/arm/src/nrf53/hardware/nrf53_uarte.h b/soc/arm/nrf53/hardware/nrf53_uarte.h similarity index 100% rename from arch/arm/src/nrf53/hardware/nrf53_uarte.h rename to soc/arm/nrf53/hardware/nrf53_uarte.h diff --git a/arch/arm/src/nrf53/hardware/nrf53_uicr.h b/soc/arm/nrf53/hardware/nrf53_uicr.h similarity index 100% rename from arch/arm/src/nrf53/hardware/nrf53_uicr.h rename to soc/arm/nrf53/hardware/nrf53_uicr.h diff --git a/arch/arm/src/nrf53/hardware/nrf53_uicr_cpuapp.h b/soc/arm/nrf53/hardware/nrf53_uicr_cpuapp.h similarity index 100% rename from arch/arm/src/nrf53/hardware/nrf53_uicr_cpuapp.h rename to soc/arm/nrf53/hardware/nrf53_uicr_cpuapp.h diff --git a/arch/arm/src/nrf53/hardware/nrf53_uicr_cpunet.h b/soc/arm/nrf53/hardware/nrf53_uicr_cpunet.h similarity index 100% rename from arch/arm/src/nrf53/hardware/nrf53_uicr_cpunet.h rename to soc/arm/nrf53/hardware/nrf53_uicr_cpunet.h diff --git a/arch/arm/src/nrf53/hardware/nrf53_usbd.h b/soc/arm/nrf53/hardware/nrf53_usbd.h similarity index 100% rename from arch/arm/src/nrf53/hardware/nrf53_usbd.h rename to soc/arm/nrf53/hardware/nrf53_usbd.h diff --git a/arch/arm/src/nrf53/hardware/nrf53_usbreg.h b/soc/arm/nrf53/hardware/nrf53_usbreg.h similarity index 100% rename from arch/arm/src/nrf53/hardware/nrf53_usbreg.h rename to soc/arm/nrf53/hardware/nrf53_usbreg.h diff --git a/arch/arm/src/nrf53/hardware/nrf53_utils.h b/soc/arm/nrf53/hardware/nrf53_utils.h similarity index 100% rename from arch/arm/src/nrf53/hardware/nrf53_utils.h rename to soc/arm/nrf53/hardware/nrf53_utils.h diff --git a/arch/arm/src/nrf53/hardware/nrf53_wdt.h b/soc/arm/nrf53/hardware/nrf53_wdt.h similarity index 100% rename from arch/arm/src/nrf53/hardware/nrf53_wdt.h rename to soc/arm/nrf53/hardware/nrf53_wdt.h diff --git a/arch/arm/src/nrf53/nrf53_adc.c b/soc/arm/nrf53/nrf53_adc.c similarity index 100% rename from arch/arm/src/nrf53/nrf53_adc.c rename to soc/arm/nrf53/nrf53_adc.c diff --git a/arch/arm/src/nrf53/nrf53_adc.h b/soc/arm/nrf53/nrf53_adc.h similarity index 100% rename from arch/arm/src/nrf53/nrf53_adc.h rename to soc/arm/nrf53/nrf53_adc.h diff --git a/arch/arm/src/nrf53/nrf53_allocateheap.c b/soc/arm/nrf53/nrf53_allocateheap.c similarity index 100% rename from arch/arm/src/nrf53/nrf53_allocateheap.c rename to soc/arm/nrf53/nrf53_allocateheap.c diff --git a/arch/arm/src/nrf53/nrf53_clockconfig.c b/soc/arm/nrf53/nrf53_clockconfig.c similarity index 100% rename from arch/arm/src/nrf53/nrf53_clockconfig.c rename to soc/arm/nrf53/nrf53_clockconfig.c diff --git a/arch/arm/src/nrf53/nrf53_clockconfig.h b/soc/arm/nrf53/nrf53_clockconfig.h similarity index 100% rename from arch/arm/src/nrf53/nrf53_clockconfig.h rename to soc/arm/nrf53/nrf53_clockconfig.h diff --git a/arch/arm/src/nrf53/nrf53_config.h b/soc/arm/nrf53/nrf53_config.h similarity index 100% rename from arch/arm/src/nrf53/nrf53_config.h rename to soc/arm/nrf53/nrf53_config.h diff --git a/arch/arm/src/nrf53/nrf53_cpunet.c b/soc/arm/nrf53/nrf53_cpunet.c similarity index 100% rename from arch/arm/src/nrf53/nrf53_cpunet.c rename to soc/arm/nrf53/nrf53_cpunet.c diff --git a/arch/arm/src/nrf53/nrf53_cpunet.h b/soc/arm/nrf53/nrf53_cpunet.h similarity index 100% rename from arch/arm/src/nrf53/nrf53_cpunet.h rename to soc/arm/nrf53/nrf53_cpunet.h diff --git a/arch/arm/src/nrf53/nrf53_flash.c b/soc/arm/nrf53/nrf53_flash.c similarity index 100% rename from arch/arm/src/nrf53/nrf53_flash.c rename to soc/arm/nrf53/nrf53_flash.c diff --git a/arch/arm/src/nrf53/nrf53_gpio.c b/soc/arm/nrf53/nrf53_gpio.c similarity index 100% rename from arch/arm/src/nrf53/nrf53_gpio.c rename to soc/arm/nrf53/nrf53_gpio.c diff --git a/arch/arm/src/nrf53/nrf53_gpio.h b/soc/arm/nrf53/nrf53_gpio.h similarity index 100% rename from arch/arm/src/nrf53/nrf53_gpio.h rename to soc/arm/nrf53/nrf53_gpio.h diff --git a/arch/arm/src/nrf53/nrf53_gpiote.c b/soc/arm/nrf53/nrf53_gpiote.c similarity index 100% rename from arch/arm/src/nrf53/nrf53_gpiote.c rename to soc/arm/nrf53/nrf53_gpiote.c diff --git a/arch/arm/src/nrf53/nrf53_gpiote.h b/soc/arm/nrf53/nrf53_gpiote.h similarity index 100% rename from arch/arm/src/nrf53/nrf53_gpiote.h rename to soc/arm/nrf53/nrf53_gpiote.h diff --git a/arch/arm/src/nrf53/nrf53_i2c.c b/soc/arm/nrf53/nrf53_i2c.c similarity index 100% rename from arch/arm/src/nrf53/nrf53_i2c.c rename to soc/arm/nrf53/nrf53_i2c.c diff --git a/arch/arm/src/nrf53/nrf53_i2c.h b/soc/arm/nrf53/nrf53_i2c.h similarity index 100% rename from arch/arm/src/nrf53/nrf53_i2c.h rename to soc/arm/nrf53/nrf53_i2c.h diff --git a/arch/arm/src/nrf53/nrf53_idle.c b/soc/arm/nrf53/nrf53_idle.c similarity index 100% rename from arch/arm/src/nrf53/nrf53_idle.c rename to soc/arm/nrf53/nrf53_idle.c diff --git a/arch/arm/src/nrf53/nrf53_ipc.c b/soc/arm/nrf53/nrf53_ipc.c similarity index 100% rename from arch/arm/src/nrf53/nrf53_ipc.c rename to soc/arm/nrf53/nrf53_ipc.c diff --git a/arch/arm/src/nrf53/nrf53_ipc.h b/soc/arm/nrf53/nrf53_ipc.h similarity index 100% rename from arch/arm/src/nrf53/nrf53_ipc.h rename to soc/arm/nrf53/nrf53_ipc.h diff --git a/arch/arm/src/nrf53/nrf53_irq.c b/soc/arm/nrf53/nrf53_irq.c similarity index 100% rename from arch/arm/src/nrf53/nrf53_irq.c rename to soc/arm/nrf53/nrf53_irq.c diff --git a/arch/arm/src/nrf53/nrf53_irq.h b/soc/arm/nrf53/nrf53_irq.h similarity index 100% rename from arch/arm/src/nrf53/nrf53_irq.h rename to soc/arm/nrf53/nrf53_irq.h diff --git a/arch/arm/src/nrf53/nrf53_lowputc.c b/soc/arm/nrf53/nrf53_lowputc.c similarity index 100% rename from arch/arm/src/nrf53/nrf53_lowputc.c rename to soc/arm/nrf53/nrf53_lowputc.c diff --git a/arch/arm/src/nrf53/nrf53_lowputc.h b/soc/arm/nrf53/nrf53_lowputc.h similarity index 100% rename from arch/arm/src/nrf53/nrf53_lowputc.h rename to soc/arm/nrf53/nrf53_lowputc.h diff --git a/arch/arm/src/nrf53/nrf53_oscconfig.c b/soc/arm/nrf53/nrf53_oscconfig.c similarity index 100% rename from arch/arm/src/nrf53/nrf53_oscconfig.c rename to soc/arm/nrf53/nrf53_oscconfig.c diff --git a/arch/arm/src/nrf53/nrf53_oscconfig.h b/soc/arm/nrf53/nrf53_oscconfig.h similarity index 100% rename from arch/arm/src/nrf53/nrf53_oscconfig.h rename to soc/arm/nrf53/nrf53_oscconfig.h diff --git a/arch/arm/src/nrf53/nrf53_pminitialize.c b/soc/arm/nrf53/nrf53_pminitialize.c similarity index 100% rename from arch/arm/src/nrf53/nrf53_pminitialize.c rename to soc/arm/nrf53/nrf53_pminitialize.c diff --git a/arch/arm/src/nrf53/nrf53_pwm.c b/soc/arm/nrf53/nrf53_pwm.c similarity index 100% rename from arch/arm/src/nrf53/nrf53_pwm.c rename to soc/arm/nrf53/nrf53_pwm.c diff --git a/arch/arm/src/nrf53/nrf53_pwm.h b/soc/arm/nrf53/nrf53_pwm.h similarity index 100% rename from arch/arm/src/nrf53/nrf53_pwm.h rename to soc/arm/nrf53/nrf53_pwm.h diff --git a/arch/arm/src/nrf53/nrf53_qspi.c b/soc/arm/nrf53/nrf53_qspi.c similarity index 100% rename from arch/arm/src/nrf53/nrf53_qspi.c rename to soc/arm/nrf53/nrf53_qspi.c diff --git a/arch/arm/src/nrf53/nrf53_qspi.h b/soc/arm/nrf53/nrf53_qspi.h similarity index 100% rename from arch/arm/src/nrf53/nrf53_qspi.h rename to soc/arm/nrf53/nrf53_qspi.h diff --git a/arch/arm/src/nrf53/nrf53_rptun.c b/soc/arm/nrf53/nrf53_rptun.c similarity index 100% rename from arch/arm/src/nrf53/nrf53_rptun.c rename to soc/arm/nrf53/nrf53_rptun.c diff --git a/arch/arm/src/nrf53/nrf53_rptun.h b/soc/arm/nrf53/nrf53_rptun.h similarity index 100% rename from arch/arm/src/nrf53/nrf53_rptun.h rename to soc/arm/nrf53/nrf53_rptun.h diff --git a/arch/arm/src/nrf53/nrf53_rtc.c b/soc/arm/nrf53/nrf53_rtc.c similarity index 100% rename from arch/arm/src/nrf53/nrf53_rtc.c rename to soc/arm/nrf53/nrf53_rtc.c diff --git a/arch/arm/src/nrf53/nrf53_rtc.h b/soc/arm/nrf53/nrf53_rtc.h similarity index 100% rename from arch/arm/src/nrf53/nrf53_rtc.h rename to soc/arm/nrf53/nrf53_rtc.h diff --git a/arch/arm/src/nrf53/nrf53_sdc.c b/soc/arm/nrf53/nrf53_sdc.c similarity index 100% rename from arch/arm/src/nrf53/nrf53_sdc.c rename to soc/arm/nrf53/nrf53_sdc.c diff --git a/arch/arm/src/nrf53/nrf53_sdc.h b/soc/arm/nrf53/nrf53_sdc.h similarity index 100% rename from arch/arm/src/nrf53/nrf53_sdc.h rename to soc/arm/nrf53/nrf53_sdc.h diff --git a/arch/arm/src/nrf53/nrf53_serial.c b/soc/arm/nrf53/nrf53_serial.c similarity index 100% rename from arch/arm/src/nrf53/nrf53_serial.c rename to soc/arm/nrf53/nrf53_serial.c diff --git a/arch/arm/src/nrf53/nrf53_serial.h b/soc/arm/nrf53/nrf53_serial.h similarity index 100% rename from arch/arm/src/nrf53/nrf53_serial.h rename to soc/arm/nrf53/nrf53_serial.h diff --git a/arch/arm/src/nrf53/nrf53_spi.c b/soc/arm/nrf53/nrf53_spi.c similarity index 100% rename from arch/arm/src/nrf53/nrf53_spi.c rename to soc/arm/nrf53/nrf53_spi.c diff --git a/arch/arm/src/nrf53/nrf53_spi.h b/soc/arm/nrf53/nrf53_spi.h similarity index 100% rename from arch/arm/src/nrf53/nrf53_spi.h rename to soc/arm/nrf53/nrf53_spi.h diff --git a/arch/arm/src/nrf53/nrf53_spu.c b/soc/arm/nrf53/nrf53_spu.c similarity index 100% rename from arch/arm/src/nrf53/nrf53_spu.c rename to soc/arm/nrf53/nrf53_spu.c diff --git a/arch/arm/src/nrf53/nrf53_spu.h b/soc/arm/nrf53/nrf53_spu.h similarity index 100% rename from arch/arm/src/nrf53/nrf53_spu.h rename to soc/arm/nrf53/nrf53_spu.h diff --git a/arch/arm/src/nrf53/nrf53_start.c b/soc/arm/nrf53/nrf53_start.c similarity index 100% rename from arch/arm/src/nrf53/nrf53_start.c rename to soc/arm/nrf53/nrf53_start.c diff --git a/arch/arm/src/nrf53/nrf53_start.h b/soc/arm/nrf53/nrf53_start.h similarity index 100% rename from arch/arm/src/nrf53/nrf53_start.h rename to soc/arm/nrf53/nrf53_start.h diff --git a/arch/arm/src/nrf53/nrf53_systick.c b/soc/arm/nrf53/nrf53_systick.c similarity index 100% rename from arch/arm/src/nrf53/nrf53_systick.c rename to soc/arm/nrf53/nrf53_systick.c diff --git a/arch/arm/src/nrf53/nrf53_tickless_rtc.c b/soc/arm/nrf53/nrf53_tickless_rtc.c similarity index 100% rename from arch/arm/src/nrf53/nrf53_tickless_rtc.c rename to soc/arm/nrf53/nrf53_tickless_rtc.c diff --git a/arch/arm/src/nrf53/nrf53_tim.c b/soc/arm/nrf53/nrf53_tim.c similarity index 100% rename from arch/arm/src/nrf53/nrf53_tim.c rename to soc/arm/nrf53/nrf53_tim.c diff --git a/arch/arm/src/nrf53/nrf53_tim.h b/soc/arm/nrf53/nrf53_tim.h similarity index 100% rename from arch/arm/src/nrf53/nrf53_tim.h rename to soc/arm/nrf53/nrf53_tim.h diff --git a/arch/arm/src/nrf53/nrf53_tim_lowerhalf.c b/soc/arm/nrf53/nrf53_tim_lowerhalf.c similarity index 100% rename from arch/arm/src/nrf53/nrf53_tim_lowerhalf.c rename to soc/arm/nrf53/nrf53_tim_lowerhalf.c diff --git a/arch/arm/src/nrf53/nrf53_tim_lowerhalf.h b/soc/arm/nrf53/nrf53_tim_lowerhalf.h similarity index 100% rename from arch/arm/src/nrf53/nrf53_tim_lowerhalf.h rename to soc/arm/nrf53/nrf53_tim_lowerhalf.h diff --git a/arch/arm/src/nrf53/nrf53_uid.c b/soc/arm/nrf53/nrf53_uid.c similarity index 100% rename from arch/arm/src/nrf53/nrf53_uid.c rename to soc/arm/nrf53/nrf53_uid.c diff --git a/arch/arm/src/nrf53/nrf53_uid.h b/soc/arm/nrf53/nrf53_uid.h similarity index 100% rename from arch/arm/src/nrf53/nrf53_uid.h rename to soc/arm/nrf53/nrf53_uid.h diff --git a/arch/arm/src/nrf53/nrf53_usbd.c b/soc/arm/nrf53/nrf53_usbd.c similarity index 100% rename from arch/arm/src/nrf53/nrf53_usbd.c rename to soc/arm/nrf53/nrf53_usbd.c diff --git a/arch/arm/src/nrf53/nrf53_usbd.h b/soc/arm/nrf53/nrf53_usbd.h similarity index 100% rename from arch/arm/src/nrf53/nrf53_usbd.h rename to soc/arm/nrf53/nrf53_usbd.h diff --git a/arch/arm/src/nrf53/nrf53_utils.c b/soc/arm/nrf53/nrf53_utils.c similarity index 100% rename from arch/arm/src/nrf53/nrf53_utils.c rename to soc/arm/nrf53/nrf53_utils.c diff --git a/arch/arm/src/nrf53/sdc/README.md b/soc/arm/nrf53/sdc/README.md similarity index 100% rename from arch/arm/src/nrf53/sdc/README.md rename to soc/arm/nrf53/sdc/README.md diff --git a/arch/arm/src/nrf53/sdc/nrf.h b/soc/arm/nrf53/sdc/nrf.h similarity index 100% rename from arch/arm/src/nrf53/sdc/nrf.h rename to soc/arm/nrf53/sdc/nrf.h diff --git a/arch/arm/src/nrf53/sdc/nrf_peripherals.h b/soc/arm/nrf53/sdc/nrf_peripherals.h similarity index 100% rename from arch/arm/src/nrf53/sdc/nrf_peripherals.h rename to soc/arm/nrf53/sdc/nrf_peripherals.h diff --git a/arch/arm/src/nrf91/.gitignore b/soc/arm/nrf91/.gitignore similarity index 100% rename from arch/arm/src/nrf91/.gitignore rename to soc/arm/nrf91/.gitignore diff --git a/arch/arm/src/nrf91/CMakeLists.txt b/soc/arm/nrf91/CMakeLists.txt similarity index 100% rename from arch/arm/src/nrf91/CMakeLists.txt rename to soc/arm/nrf91/CMakeLists.txt diff --git a/arch/arm/src/nrf91/Kconfig b/soc/arm/nrf91/Kconfig similarity index 100% rename from arch/arm/src/nrf91/Kconfig rename to soc/arm/nrf91/Kconfig diff --git a/arch/arm/src/nrf91/Make.defs b/soc/arm/nrf91/Make.defs similarity index 100% rename from arch/arm/src/nrf91/Make.defs rename to soc/arm/nrf91/Make.defs diff --git a/arch/arm/src/nrf91/chip.h b/soc/arm/nrf91/chip.h similarity index 100% rename from arch/arm/src/nrf91/chip.h rename to soc/arm/nrf91/chip.h diff --git a/arch/arm/src/nrf91/hardware/nrf91_clock.h b/soc/arm/nrf91/hardware/nrf91_clock.h similarity index 100% rename from arch/arm/src/nrf91/hardware/nrf91_clock.h rename to soc/arm/nrf91/hardware/nrf91_clock.h diff --git a/arch/arm/src/nrf91/hardware/nrf91_ficr.h b/soc/arm/nrf91/hardware/nrf91_ficr.h similarity index 100% rename from arch/arm/src/nrf91/hardware/nrf91_ficr.h rename to soc/arm/nrf91/hardware/nrf91_ficr.h diff --git a/arch/arm/src/nrf91/hardware/nrf91_gpio.h b/soc/arm/nrf91/hardware/nrf91_gpio.h similarity index 100% rename from arch/arm/src/nrf91/hardware/nrf91_gpio.h rename to soc/arm/nrf91/hardware/nrf91_gpio.h diff --git a/arch/arm/src/nrf91/hardware/nrf91_ipc.h b/soc/arm/nrf91/hardware/nrf91_ipc.h similarity index 100% rename from arch/arm/src/nrf91/hardware/nrf91_ipc.h rename to soc/arm/nrf91/hardware/nrf91_ipc.h diff --git a/arch/arm/src/nrf91/hardware/nrf91_memorymap.h b/soc/arm/nrf91/hardware/nrf91_memorymap.h similarity index 100% rename from arch/arm/src/nrf91/hardware/nrf91_memorymap.h rename to soc/arm/nrf91/hardware/nrf91_memorymap.h diff --git a/arch/arm/src/nrf91/hardware/nrf91_nvmc.h b/soc/arm/nrf91/hardware/nrf91_nvmc.h similarity index 100% rename from arch/arm/src/nrf91/hardware/nrf91_nvmc.h rename to soc/arm/nrf91/hardware/nrf91_nvmc.h diff --git a/arch/arm/src/nrf91/hardware/nrf91_power.h b/soc/arm/nrf91/hardware/nrf91_power.h similarity index 100% rename from arch/arm/src/nrf91/hardware/nrf91_power.h rename to soc/arm/nrf91/hardware/nrf91_power.h diff --git a/arch/arm/src/nrf91/hardware/nrf91_regulators.h b/soc/arm/nrf91/hardware/nrf91_regulators.h similarity index 100% rename from arch/arm/src/nrf91/hardware/nrf91_regulators.h rename to soc/arm/nrf91/hardware/nrf91_regulators.h diff --git a/arch/arm/src/nrf91/hardware/nrf91_rtc.h b/soc/arm/nrf91/hardware/nrf91_rtc.h similarity index 100% rename from arch/arm/src/nrf91/hardware/nrf91_rtc.h rename to soc/arm/nrf91/hardware/nrf91_rtc.h diff --git a/arch/arm/src/nrf91/hardware/nrf91_spi.h b/soc/arm/nrf91/hardware/nrf91_spi.h similarity index 100% rename from arch/arm/src/nrf91/hardware/nrf91_spi.h rename to soc/arm/nrf91/hardware/nrf91_spi.h diff --git a/arch/arm/src/nrf91/hardware/nrf91_spu.h b/soc/arm/nrf91/hardware/nrf91_spu.h similarity index 100% rename from arch/arm/src/nrf91/hardware/nrf91_spu.h rename to soc/arm/nrf91/hardware/nrf91_spu.h diff --git a/arch/arm/src/nrf91/hardware/nrf91_tim.h b/soc/arm/nrf91/hardware/nrf91_tim.h similarity index 100% rename from arch/arm/src/nrf91/hardware/nrf91_tim.h rename to soc/arm/nrf91/hardware/nrf91_tim.h diff --git a/arch/arm/src/nrf91/hardware/nrf91_twi.h b/soc/arm/nrf91/hardware/nrf91_twi.h similarity index 100% rename from arch/arm/src/nrf91/hardware/nrf91_twi.h rename to soc/arm/nrf91/hardware/nrf91_twi.h diff --git a/arch/arm/src/nrf91/hardware/nrf91_uarte.h b/soc/arm/nrf91/hardware/nrf91_uarte.h similarity index 100% rename from arch/arm/src/nrf91/hardware/nrf91_uarte.h rename to soc/arm/nrf91/hardware/nrf91_uarte.h diff --git a/arch/arm/src/nrf91/hardware/nrf91_uicr.h b/soc/arm/nrf91/hardware/nrf91_uicr.h similarity index 100% rename from arch/arm/src/nrf91/hardware/nrf91_uicr.h rename to soc/arm/nrf91/hardware/nrf91_uicr.h diff --git a/arch/arm/src/nrf91/hardware/nrf91_utils.h b/soc/arm/nrf91/hardware/nrf91_utils.h similarity index 100% rename from arch/arm/src/nrf91/hardware/nrf91_utils.h rename to soc/arm/nrf91/hardware/nrf91_utils.h diff --git a/arch/arm/src/nrf91/nrf91_allocateheap.c b/soc/arm/nrf91/nrf91_allocateheap.c similarity index 100% rename from arch/arm/src/nrf91/nrf91_allocateheap.c rename to soc/arm/nrf91/nrf91_allocateheap.c diff --git a/arch/arm/src/nrf91/nrf91_clockconfig.c b/soc/arm/nrf91/nrf91_clockconfig.c similarity index 100% rename from arch/arm/src/nrf91/nrf91_clockconfig.c rename to soc/arm/nrf91/nrf91_clockconfig.c diff --git a/arch/arm/src/nrf91/nrf91_clockconfig.h b/soc/arm/nrf91/nrf91_clockconfig.h similarity index 100% rename from arch/arm/src/nrf91/nrf91_clockconfig.h rename to soc/arm/nrf91/nrf91_clockconfig.h diff --git a/arch/arm/src/nrf91/nrf91_config.h b/soc/arm/nrf91/nrf91_config.h similarity index 100% rename from arch/arm/src/nrf91/nrf91_config.h rename to soc/arm/nrf91/nrf91_config.h diff --git a/arch/arm/src/nrf91/nrf91_errata.c b/soc/arm/nrf91/nrf91_errata.c similarity index 100% rename from arch/arm/src/nrf91/nrf91_errata.c rename to soc/arm/nrf91/nrf91_errata.c diff --git a/arch/arm/src/nrf91/nrf91_errata.h b/soc/arm/nrf91/nrf91_errata.h similarity index 100% rename from arch/arm/src/nrf91/nrf91_errata.h rename to soc/arm/nrf91/nrf91_errata.h diff --git a/arch/arm/src/nrf91/nrf91_flash.c b/soc/arm/nrf91/nrf91_flash.c similarity index 100% rename from arch/arm/src/nrf91/nrf91_flash.c rename to soc/arm/nrf91/nrf91_flash.c diff --git a/arch/arm/src/nrf91/nrf91_gpio.c b/soc/arm/nrf91/nrf91_gpio.c similarity index 100% rename from arch/arm/src/nrf91/nrf91_gpio.c rename to soc/arm/nrf91/nrf91_gpio.c diff --git a/arch/arm/src/nrf91/nrf91_gpio.h b/soc/arm/nrf91/nrf91_gpio.h similarity index 100% rename from arch/arm/src/nrf91/nrf91_gpio.h rename to soc/arm/nrf91/nrf91_gpio.h diff --git a/arch/arm/src/nrf91/nrf91_i2c.c b/soc/arm/nrf91/nrf91_i2c.c similarity index 100% rename from arch/arm/src/nrf91/nrf91_i2c.c rename to soc/arm/nrf91/nrf91_i2c.c diff --git a/arch/arm/src/nrf91/nrf91_i2c.h b/soc/arm/nrf91/nrf91_i2c.h similarity index 100% rename from arch/arm/src/nrf91/nrf91_i2c.h rename to soc/arm/nrf91/nrf91_i2c.h diff --git a/arch/arm/src/nrf91/nrf91_idle.c b/soc/arm/nrf91/nrf91_idle.c similarity index 100% rename from arch/arm/src/nrf91/nrf91_idle.c rename to soc/arm/nrf91/nrf91_idle.c diff --git a/arch/arm/src/nrf91/nrf91_irq.c b/soc/arm/nrf91/nrf91_irq.c similarity index 100% rename from arch/arm/src/nrf91/nrf91_irq.c rename to soc/arm/nrf91/nrf91_irq.c diff --git a/arch/arm/src/nrf91/nrf91_irq.h b/soc/arm/nrf91/nrf91_irq.h similarity index 100% rename from arch/arm/src/nrf91/nrf91_irq.h rename to soc/arm/nrf91/nrf91_irq.h diff --git a/arch/arm/src/nrf91/nrf91_lowputc.c b/soc/arm/nrf91/nrf91_lowputc.c similarity index 100% rename from arch/arm/src/nrf91/nrf91_lowputc.c rename to soc/arm/nrf91/nrf91_lowputc.c diff --git a/arch/arm/src/nrf91/nrf91_lowputc.h b/soc/arm/nrf91/nrf91_lowputc.h similarity index 100% rename from arch/arm/src/nrf91/nrf91_lowputc.h rename to soc/arm/nrf91/nrf91_lowputc.h diff --git a/arch/arm/src/nrf91/nrf91_modem.c b/soc/arm/nrf91/nrf91_modem.c similarity index 100% rename from arch/arm/src/nrf91/nrf91_modem.c rename to soc/arm/nrf91/nrf91_modem.c diff --git a/arch/arm/src/nrf91/nrf91_modem.h b/soc/arm/nrf91/nrf91_modem.h similarity index 100% rename from arch/arm/src/nrf91/nrf91_modem.h rename to soc/arm/nrf91/nrf91_modem.h diff --git a/arch/arm/src/nrf91/nrf91_modem_at.c b/soc/arm/nrf91/nrf91_modem_at.c similarity index 100% rename from arch/arm/src/nrf91/nrf91_modem_at.c rename to soc/arm/nrf91/nrf91_modem_at.c diff --git a/arch/arm/src/nrf91/nrf91_modem_at.h b/soc/arm/nrf91/nrf91_modem_at.h similarity index 100% rename from arch/arm/src/nrf91/nrf91_modem_at.h rename to soc/arm/nrf91/nrf91_modem_at.h diff --git a/arch/arm/src/nrf91/nrf91_modem_gnss.c b/soc/arm/nrf91/nrf91_modem_gnss.c similarity index 100% rename from arch/arm/src/nrf91/nrf91_modem_gnss.c rename to soc/arm/nrf91/nrf91_modem_gnss.c diff --git a/arch/arm/src/nrf91/nrf91_modem_gnss.h b/soc/arm/nrf91/nrf91_modem_gnss.h similarity index 100% rename from arch/arm/src/nrf91/nrf91_modem_gnss.h rename to soc/arm/nrf91/nrf91_modem_gnss.h diff --git a/arch/arm/src/nrf91/nrf91_modem_os.c b/soc/arm/nrf91/nrf91_modem_os.c similarity index 100% rename from arch/arm/src/nrf91/nrf91_modem_os.c rename to soc/arm/nrf91/nrf91_modem_os.c diff --git a/arch/arm/src/nrf91/nrf91_modem_sock.c b/soc/arm/nrf91/nrf91_modem_sock.c similarity index 100% rename from arch/arm/src/nrf91/nrf91_modem_sock.c rename to soc/arm/nrf91/nrf91_modem_sock.c diff --git a/arch/arm/src/nrf91/nrf91_nrfx_ipc.c b/soc/arm/nrf91/nrf91_nrfx_ipc.c similarity index 100% rename from arch/arm/src/nrf91/nrf91_nrfx_ipc.c rename to soc/arm/nrf91/nrf91_nrfx_ipc.c diff --git a/arch/arm/src/nrf91/nrf91_nrfx_ipc.h b/soc/arm/nrf91/nrf91_nrfx_ipc.h similarity index 100% rename from arch/arm/src/nrf91/nrf91_nrfx_ipc.h rename to soc/arm/nrf91/nrf91_nrfx_ipc.h diff --git a/arch/arm/src/nrf91/nrf91_rtc.c b/soc/arm/nrf91/nrf91_rtc.c similarity index 100% rename from arch/arm/src/nrf91/nrf91_rtc.c rename to soc/arm/nrf91/nrf91_rtc.c diff --git a/arch/arm/src/nrf91/nrf91_rtc.h b/soc/arm/nrf91/nrf91_rtc.h similarity index 100% rename from arch/arm/src/nrf91/nrf91_rtc.h rename to soc/arm/nrf91/nrf91_rtc.h diff --git a/arch/arm/src/nrf91/nrf91_serial.c b/soc/arm/nrf91/nrf91_serial.c similarity index 100% rename from arch/arm/src/nrf91/nrf91_serial.c rename to soc/arm/nrf91/nrf91_serial.c diff --git a/arch/arm/src/nrf91/nrf91_serial.h b/soc/arm/nrf91/nrf91_serial.h similarity index 100% rename from arch/arm/src/nrf91/nrf91_serial.h rename to soc/arm/nrf91/nrf91_serial.h diff --git a/arch/arm/src/nrf91/nrf91_spi.c b/soc/arm/nrf91/nrf91_spi.c similarity index 100% rename from arch/arm/src/nrf91/nrf91_spi.c rename to soc/arm/nrf91/nrf91_spi.c diff --git a/arch/arm/src/nrf91/nrf91_spi.h b/soc/arm/nrf91/nrf91_spi.h similarity index 100% rename from arch/arm/src/nrf91/nrf91_spi.h rename to soc/arm/nrf91/nrf91_spi.h diff --git a/arch/arm/src/nrf91/nrf91_spu.c b/soc/arm/nrf91/nrf91_spu.c similarity index 100% rename from arch/arm/src/nrf91/nrf91_spu.c rename to soc/arm/nrf91/nrf91_spu.c diff --git a/arch/arm/src/nrf91/nrf91_spu.h b/soc/arm/nrf91/nrf91_spu.h similarity index 100% rename from arch/arm/src/nrf91/nrf91_spu.h rename to soc/arm/nrf91/nrf91_spu.h diff --git a/arch/arm/src/nrf91/nrf91_start.c b/soc/arm/nrf91/nrf91_start.c similarity index 100% rename from arch/arm/src/nrf91/nrf91_start.c rename to soc/arm/nrf91/nrf91_start.c diff --git a/arch/arm/src/nrf91/nrf91_start.h b/soc/arm/nrf91/nrf91_start.h similarity index 100% rename from arch/arm/src/nrf91/nrf91_start.h rename to soc/arm/nrf91/nrf91_start.h diff --git a/arch/arm/src/nrf91/nrf91_systick.c b/soc/arm/nrf91/nrf91_systick.c similarity index 100% rename from arch/arm/src/nrf91/nrf91_systick.c rename to soc/arm/nrf91/nrf91_systick.c diff --git a/arch/arm/src/nrf91/nrf91_tickless_rtc.c b/soc/arm/nrf91/nrf91_tickless_rtc.c similarity index 100% rename from arch/arm/src/nrf91/nrf91_tickless_rtc.c rename to soc/arm/nrf91/nrf91_tickless_rtc.c diff --git a/arch/arm/src/nrf91/nrf91_tim.c b/soc/arm/nrf91/nrf91_tim.c similarity index 100% rename from arch/arm/src/nrf91/nrf91_tim.c rename to soc/arm/nrf91/nrf91_tim.c diff --git a/arch/arm/src/nrf91/nrf91_tim.h b/soc/arm/nrf91/nrf91_tim.h similarity index 100% rename from arch/arm/src/nrf91/nrf91_tim.h rename to soc/arm/nrf91/nrf91_tim.h diff --git a/arch/arm/src/nrf91/nrf91_tim_lowerhalf.c b/soc/arm/nrf91/nrf91_tim_lowerhalf.c similarity index 100% rename from arch/arm/src/nrf91/nrf91_tim_lowerhalf.c rename to soc/arm/nrf91/nrf91_tim_lowerhalf.c diff --git a/arch/arm/src/nrf91/nrf91_tim_lowerhalf.h b/soc/arm/nrf91/nrf91_tim_lowerhalf.h similarity index 100% rename from arch/arm/src/nrf91/nrf91_tim_lowerhalf.h rename to soc/arm/nrf91/nrf91_tim_lowerhalf.h diff --git a/arch/arm/src/nrf91/nrf91_uid.c b/soc/arm/nrf91/nrf91_uid.c similarity index 100% rename from arch/arm/src/nrf91/nrf91_uid.c rename to soc/arm/nrf91/nrf91_uid.c diff --git a/arch/arm/src/nrf91/nrf91_uid.h b/soc/arm/nrf91/nrf91_uid.h similarity index 100% rename from arch/arm/src/nrf91/nrf91_uid.h rename to soc/arm/nrf91/nrf91_uid.h diff --git a/arch/arm/src/nrf91/nrf91_utils.c b/soc/arm/nrf91/nrf91_utils.c similarity index 100% rename from arch/arm/src/nrf91/nrf91_utils.c rename to soc/arm/nrf91/nrf91_utils.c diff --git a/arch/arm/src/nuc1xx/Kconfig b/soc/arm/nuc1xx/Kconfig similarity index 100% rename from arch/arm/src/nuc1xx/Kconfig rename to soc/arm/nuc1xx/Kconfig diff --git a/arch/arm/src/nuc1xx/Make.defs b/soc/arm/nuc1xx/Make.defs similarity index 100% rename from arch/arm/src/nuc1xx/Make.defs rename to soc/arm/nuc1xx/Make.defs diff --git a/arch/arm/src/nuc1xx/chip.h b/soc/arm/nuc1xx/chip.h similarity index 100% rename from arch/arm/src/nuc1xx/chip.h rename to soc/arm/nuc1xx/chip.h diff --git a/arch/arm/src/nuc1xx/hardware/nuc_adc.h b/soc/arm/nuc1xx/hardware/nuc_adc.h similarity index 100% rename from arch/arm/src/nuc1xx/hardware/nuc_adc.h rename to soc/arm/nuc1xx/hardware/nuc_adc.h diff --git a/arch/arm/src/nuc1xx/hardware/nuc_clk.h b/soc/arm/nuc1xx/hardware/nuc_clk.h similarity index 100% rename from arch/arm/src/nuc1xx/hardware/nuc_clk.h rename to soc/arm/nuc1xx/hardware/nuc_clk.h diff --git a/arch/arm/src/nuc1xx/hardware/nuc_cmp.h b/soc/arm/nuc1xx/hardware/nuc_cmp.h similarity index 100% rename from arch/arm/src/nuc1xx/hardware/nuc_cmp.h rename to soc/arm/nuc1xx/hardware/nuc_cmp.h diff --git a/arch/arm/src/nuc1xx/hardware/nuc_config.h b/soc/arm/nuc1xx/hardware/nuc_config.h similarity index 100% rename from arch/arm/src/nuc1xx/hardware/nuc_config.h rename to soc/arm/nuc1xx/hardware/nuc_config.h diff --git a/arch/arm/src/nuc1xx/hardware/nuc_ebi.h b/soc/arm/nuc1xx/hardware/nuc_ebi.h similarity index 100% rename from arch/arm/src/nuc1xx/hardware/nuc_ebi.h rename to soc/arm/nuc1xx/hardware/nuc_ebi.h diff --git a/arch/arm/src/nuc1xx/hardware/nuc_gcr.h b/soc/arm/nuc1xx/hardware/nuc_gcr.h similarity index 100% rename from arch/arm/src/nuc1xx/hardware/nuc_gcr.h rename to soc/arm/nuc1xx/hardware/nuc_gcr.h diff --git a/arch/arm/src/nuc1xx/hardware/nuc_gpio.h b/soc/arm/nuc1xx/hardware/nuc_gpio.h similarity index 100% rename from arch/arm/src/nuc1xx/hardware/nuc_gpio.h rename to soc/arm/nuc1xx/hardware/nuc_gpio.h diff --git a/arch/arm/src/nuc1xx/hardware/nuc_i2c.h b/soc/arm/nuc1xx/hardware/nuc_i2c.h similarity index 100% rename from arch/arm/src/nuc1xx/hardware/nuc_i2c.h rename to soc/arm/nuc1xx/hardware/nuc_i2c.h diff --git a/arch/arm/src/nuc1xx/hardware/nuc_i2s.h b/soc/arm/nuc1xx/hardware/nuc_i2s.h similarity index 100% rename from arch/arm/src/nuc1xx/hardware/nuc_i2s.h rename to soc/arm/nuc1xx/hardware/nuc_i2s.h diff --git a/arch/arm/src/nuc1xx/hardware/nuc_memorymap.h b/soc/arm/nuc1xx/hardware/nuc_memorymap.h similarity index 100% rename from arch/arm/src/nuc1xx/hardware/nuc_memorymap.h rename to soc/arm/nuc1xx/hardware/nuc_memorymap.h diff --git a/arch/arm/src/nuc1xx/hardware/nuc_pdma.h b/soc/arm/nuc1xx/hardware/nuc_pdma.h similarity index 100% rename from arch/arm/src/nuc1xx/hardware/nuc_pdma.h rename to soc/arm/nuc1xx/hardware/nuc_pdma.h diff --git a/arch/arm/src/nuc1xx/hardware/nuc_ps2d.h b/soc/arm/nuc1xx/hardware/nuc_ps2d.h similarity index 100% rename from arch/arm/src/nuc1xx/hardware/nuc_ps2d.h rename to soc/arm/nuc1xx/hardware/nuc_ps2d.h diff --git a/arch/arm/src/nuc1xx/hardware/nuc_pwm.h b/soc/arm/nuc1xx/hardware/nuc_pwm.h similarity index 100% rename from arch/arm/src/nuc1xx/hardware/nuc_pwm.h rename to soc/arm/nuc1xx/hardware/nuc_pwm.h diff --git a/arch/arm/src/nuc1xx/hardware/nuc_rtc.h b/soc/arm/nuc1xx/hardware/nuc_rtc.h similarity index 100% rename from arch/arm/src/nuc1xx/hardware/nuc_rtc.h rename to soc/arm/nuc1xx/hardware/nuc_rtc.h diff --git a/arch/arm/src/nuc1xx/hardware/nuc_spi.h b/soc/arm/nuc1xx/hardware/nuc_spi.h similarity index 100% rename from arch/arm/src/nuc1xx/hardware/nuc_spi.h rename to soc/arm/nuc1xx/hardware/nuc_spi.h diff --git a/arch/arm/src/nuc1xx/hardware/nuc_tmr.h b/soc/arm/nuc1xx/hardware/nuc_tmr.h similarity index 100% rename from arch/arm/src/nuc1xx/hardware/nuc_tmr.h rename to soc/arm/nuc1xx/hardware/nuc_tmr.h diff --git a/arch/arm/src/nuc1xx/hardware/nuc_uart.h b/soc/arm/nuc1xx/hardware/nuc_uart.h similarity index 100% rename from arch/arm/src/nuc1xx/hardware/nuc_uart.h rename to soc/arm/nuc1xx/hardware/nuc_uart.h diff --git a/arch/arm/src/nuc1xx/hardware/nuc_usbd.h b/soc/arm/nuc1xx/hardware/nuc_usbd.h similarity index 100% rename from arch/arm/src/nuc1xx/hardware/nuc_usbd.h rename to soc/arm/nuc1xx/hardware/nuc_usbd.h diff --git a/arch/arm/src/nuc1xx/hardware/nuc_wdt.h b/soc/arm/nuc1xx/hardware/nuc_wdt.h similarity index 100% rename from arch/arm/src/nuc1xx/hardware/nuc_wdt.h rename to soc/arm/nuc1xx/hardware/nuc_wdt.h diff --git a/arch/arm/src/nuc1xx/nuc_clockconfig.c b/soc/arm/nuc1xx/nuc_clockconfig.c similarity index 100% rename from arch/arm/src/nuc1xx/nuc_clockconfig.c rename to soc/arm/nuc1xx/nuc_clockconfig.c diff --git a/arch/arm/src/nuc1xx/nuc_clockconfig.h b/soc/arm/nuc1xx/nuc_clockconfig.h similarity index 100% rename from arch/arm/src/nuc1xx/nuc_clockconfig.h rename to soc/arm/nuc1xx/nuc_clockconfig.h diff --git a/arch/arm/src/nuc1xx/nuc_config.h b/soc/arm/nuc1xx/nuc_config.h similarity index 100% rename from arch/arm/src/nuc1xx/nuc_config.h rename to soc/arm/nuc1xx/nuc_config.h diff --git a/arch/arm/src/nuc1xx/nuc_dumpgpio.c b/soc/arm/nuc1xx/nuc_dumpgpio.c similarity index 100% rename from arch/arm/src/nuc1xx/nuc_dumpgpio.c rename to soc/arm/nuc1xx/nuc_dumpgpio.c diff --git a/arch/arm/src/nuc1xx/nuc_gpio.c b/soc/arm/nuc1xx/nuc_gpio.c similarity index 100% rename from arch/arm/src/nuc1xx/nuc_gpio.c rename to soc/arm/nuc1xx/nuc_gpio.c diff --git a/arch/arm/src/nuc1xx/nuc_gpio.h b/soc/arm/nuc1xx/nuc_gpio.h similarity index 100% rename from arch/arm/src/nuc1xx/nuc_gpio.h rename to soc/arm/nuc1xx/nuc_gpio.h diff --git a/arch/arm/src/nuc1xx/nuc_idle.c b/soc/arm/nuc1xx/nuc_idle.c similarity index 100% rename from arch/arm/src/nuc1xx/nuc_idle.c rename to soc/arm/nuc1xx/nuc_idle.c diff --git a/arch/arm/src/nuc1xx/nuc_irq.c b/soc/arm/nuc1xx/nuc_irq.c similarity index 100% rename from arch/arm/src/nuc1xx/nuc_irq.c rename to soc/arm/nuc1xx/nuc_irq.c diff --git a/arch/arm/src/nuc1xx/nuc_irq.h b/soc/arm/nuc1xx/nuc_irq.h similarity index 100% rename from arch/arm/src/nuc1xx/nuc_irq.h rename to soc/arm/nuc1xx/nuc_irq.h diff --git a/arch/arm/src/nuc1xx/nuc_lowputc.c b/soc/arm/nuc1xx/nuc_lowputc.c similarity index 100% rename from arch/arm/src/nuc1xx/nuc_lowputc.c rename to soc/arm/nuc1xx/nuc_lowputc.c diff --git a/arch/arm/src/nuc1xx/nuc_lowputc.h b/soc/arm/nuc1xx/nuc_lowputc.h similarity index 100% rename from arch/arm/src/nuc1xx/nuc_lowputc.h rename to soc/arm/nuc1xx/nuc_lowputc.h diff --git a/arch/arm/src/nuc1xx/nuc_serial.c b/soc/arm/nuc1xx/nuc_serial.c similarity index 100% rename from arch/arm/src/nuc1xx/nuc_serial.c rename to soc/arm/nuc1xx/nuc_serial.c diff --git a/arch/arm/src/nuc1xx/nuc_serial.h b/soc/arm/nuc1xx/nuc_serial.h similarity index 100% rename from arch/arm/src/nuc1xx/nuc_serial.h rename to soc/arm/nuc1xx/nuc_serial.h diff --git a/arch/arm/src/nuc1xx/nuc_start.c b/soc/arm/nuc1xx/nuc_start.c similarity index 100% rename from arch/arm/src/nuc1xx/nuc_start.c rename to soc/arm/nuc1xx/nuc_start.c diff --git a/arch/arm/src/nuc1xx/nuc_start.h b/soc/arm/nuc1xx/nuc_start.h similarity index 100% rename from arch/arm/src/nuc1xx/nuc_start.h rename to soc/arm/nuc1xx/nuc_start.h diff --git a/arch/arm/src/nuc1xx/nuc_timerisr.c b/soc/arm/nuc1xx/nuc_timerisr.c similarity index 100% rename from arch/arm/src/nuc1xx/nuc_timerisr.c rename to soc/arm/nuc1xx/nuc_timerisr.c diff --git a/arch/arm/src/nuc1xx/nuc_userspace.c b/soc/arm/nuc1xx/nuc_userspace.c similarity index 100% rename from arch/arm/src/nuc1xx/nuc_userspace.c rename to soc/arm/nuc1xx/nuc_userspace.c diff --git a/arch/arm/src/nuc1xx/nuc_userspace.h b/soc/arm/nuc1xx/nuc_userspace.h similarity index 100% rename from arch/arm/src/nuc1xx/nuc_userspace.h rename to soc/arm/nuc1xx/nuc_userspace.h diff --git a/arch/arm/src/phy62xx/Kconfig b/soc/arm/phy62xx/Kconfig similarity index 100% rename from arch/arm/src/phy62xx/Kconfig rename to soc/arm/phy62xx/Kconfig diff --git a/arch/arm/src/phy62xx/Make.defs b/soc/arm/phy62xx/Make.defs similarity index 100% rename from arch/arm/src/phy62xx/Make.defs rename to soc/arm/phy62xx/Make.defs diff --git a/arch/arm/src/phy62xx/bb_rom_sym_m0.gdbsym b/soc/arm/phy62xx/bb_rom_sym_m0.gdbsym similarity index 100% rename from arch/arm/src/phy62xx/bb_rom_sym_m0.gdbsym rename to soc/arm/phy62xx/bb_rom_sym_m0.gdbsym diff --git a/arch/arm/src/phy62xx/ble/ble_controller.h b/soc/arm/phy62xx/ble/ble_controller.h similarity index 100% rename from arch/arm/src/phy62xx/ble/ble_controller.h rename to soc/arm/phy62xx/ble/ble_controller.h diff --git a/arch/arm/src/phy62xx/bus_dev.h b/soc/arm/phy62xx/bus_dev.h similarity index 100% rename from arch/arm/src/phy62xx/bus_dev.h rename to soc/arm/phy62xx/bus_dev.h diff --git a/arch/arm/src/phy62xx/chip.h b/soc/arm/phy62xx/chip.h similarity index 100% rename from arch/arm/src/phy62xx/chip.h rename to soc/arm/phy62xx/chip.h diff --git a/arch/arm/src/phy62xx/clock.c b/soc/arm/phy62xx/clock.c similarity index 100% rename from arch/arm/src/phy62xx/clock.c rename to soc/arm/phy62xx/clock.c diff --git a/arch/arm/src/phy62xx/clock.h b/soc/arm/phy62xx/clock.h similarity index 100% rename from arch/arm/src/phy62xx/clock.h rename to soc/arm/phy62xx/clock.h diff --git a/arch/arm/src/phy62xx/core_bumbee_m0.h b/soc/arm/phy62xx/core_bumbee_m0.h similarity index 100% rename from arch/arm/src/phy62xx/core_bumbee_m0.h rename to soc/arm/phy62xx/core_bumbee_m0.h diff --git a/arch/arm/src/phy62xx/error.h b/soc/arm/phy62xx/error.h similarity index 100% rename from arch/arm/src/phy62xx/error.h rename to soc/arm/phy62xx/error.h diff --git a/arch/arm/src/phy62xx/flash.c b/soc/arm/phy62xx/flash.c similarity index 100% rename from arch/arm/src/phy62xx/flash.c rename to soc/arm/phy62xx/flash.c diff --git a/arch/arm/src/phy62xx/flash.h b/soc/arm/phy62xx/flash.h similarity index 100% rename from arch/arm/src/phy62xx/flash.h rename to soc/arm/phy62xx/flash.h diff --git a/arch/arm/src/phy62xx/global_config.h b/soc/arm/phy62xx/global_config.h similarity index 100% rename from arch/arm/src/phy62xx/global_config.h rename to soc/arm/phy62xx/global_config.h diff --git a/arch/arm/src/phy62xx/gpio.c b/soc/arm/phy62xx/gpio.c similarity index 100% rename from arch/arm/src/phy62xx/gpio.c rename to soc/arm/phy62xx/gpio.c diff --git a/arch/arm/src/phy62xx/gpio.h b/soc/arm/phy62xx/gpio.h similarity index 100% rename from arch/arm/src/phy62xx/gpio.h rename to soc/arm/phy62xx/gpio.h diff --git a/arch/arm/src/phy62xx/idle.c b/soc/arm/phy62xx/idle.c similarity index 100% rename from arch/arm/src/phy62xx/idle.c rename to soc/arm/phy62xx/idle.c diff --git a/arch/arm/src/phy62xx/irq.c b/soc/arm/phy62xx/irq.c similarity index 100% rename from arch/arm/src/phy62xx/irq.c rename to soc/arm/phy62xx/irq.c diff --git a/arch/arm/src/phy62xx/jump_function.h b/soc/arm/phy62xx/jump_function.h similarity index 100% rename from arch/arm/src/phy62xx/jump_function.h rename to soc/arm/phy62xx/jump_function.h diff --git a/arch/arm/src/phy62xx/jump_table.c b/soc/arm/phy62xx/jump_table.c similarity index 100% rename from arch/arm/src/phy62xx/jump_table.c rename to soc/arm/phy62xx/jump_table.c diff --git a/arch/arm/src/phy62xx/log.h b/soc/arm/phy62xx/log.h similarity index 100% rename from arch/arm/src/phy62xx/log.h rename to soc/arm/phy62xx/log.h diff --git a/arch/arm/src/phy62xx/mcu.h b/soc/arm/phy62xx/mcu.h similarity index 100% rename from arch/arm/src/phy62xx/mcu.h rename to soc/arm/phy62xx/mcu.h diff --git a/arch/arm/src/phy62xx/mcu_phy_bumbee.h b/soc/arm/phy62xx/mcu_phy_bumbee.h similarity index 100% rename from arch/arm/src/phy62xx/mcu_phy_bumbee.h rename to soc/arm/phy62xx/mcu_phy_bumbee.h diff --git a/arch/arm/src/phy62xx/my_printf.c b/soc/arm/phy62xx/my_printf.c similarity index 100% rename from arch/arm/src/phy62xx/my_printf.c rename to soc/arm/phy62xx/my_printf.c diff --git a/arch/arm/src/phy62xx/phy6222_patch.c b/soc/arm/phy62xx/phy6222_patch.c similarity index 100% rename from arch/arm/src/phy62xx/phy6222_patch.c rename to soc/arm/phy62xx/phy6222_patch.c diff --git a/arch/arm/src/phy62xx/phy62xx_ble.c b/soc/arm/phy62xx/phy62xx_ble.c similarity index 100% rename from arch/arm/src/phy62xx/phy62xx_ble.c rename to soc/arm/phy62xx/phy62xx_ble.c diff --git a/arch/arm/src/phy62xx/phy62xx_ble.h b/soc/arm/phy62xx/phy62xx_ble.h similarity index 100% rename from arch/arm/src/phy62xx/phy62xx_ble.h rename to soc/arm/phy62xx/phy62xx_ble.h diff --git a/arch/arm/src/phy62xx/phy62xx_exception.S b/soc/arm/phy62xx/phy62xx_exception.S similarity index 100% rename from arch/arm/src/phy62xx/phy62xx_exception.S rename to soc/arm/phy62xx/phy62xx_exception.S diff --git a/arch/arm/src/phy62xx/phy62xx_hardfault.c b/soc/arm/phy62xx/phy62xx_hardfault.c similarity index 100% rename from arch/arm/src/phy62xx/phy62xx_hardfault.c rename to soc/arm/phy62xx/phy62xx_hardfault.c diff --git a/arch/arm/src/phy62xx/phy62xx_start.S b/soc/arm/phy62xx/phy62xx_start.S similarity index 100% rename from arch/arm/src/phy62xx/phy62xx_start.S rename to soc/arm/phy62xx/phy62xx_start.S diff --git a/arch/arm/src/phy62xx/phyplus_gpio.c b/soc/arm/phy62xx/phyplus_gpio.c similarity index 100% rename from arch/arm/src/phy62xx/phyplus_gpio.c rename to soc/arm/phy62xx/phyplus_gpio.c diff --git a/arch/arm/src/phy62xx/phyplus_gpio.h b/soc/arm/phy62xx/phyplus_gpio.h similarity index 100% rename from arch/arm/src/phy62xx/phyplus_gpio.h rename to soc/arm/phy62xx/phyplus_gpio.h diff --git a/arch/arm/src/phy62xx/phyplus_stub.c b/soc/arm/phy62xx/phyplus_stub.c similarity index 100% rename from arch/arm/src/phy62xx/phyplus_stub.c rename to soc/arm/phy62xx/phyplus_stub.c diff --git a/arch/arm/src/phy62xx/phyplus_stub.h b/soc/arm/phy62xx/phyplus_stub.h similarity index 100% rename from arch/arm/src/phy62xx/phyplus_stub.h rename to soc/arm/phy62xx/phyplus_stub.h diff --git a/arch/arm/src/phy62xx/phyplus_tim.c b/soc/arm/phy62xx/phyplus_tim.c similarity index 100% rename from arch/arm/src/phy62xx/phyplus_tim.c rename to soc/arm/phy62xx/phyplus_tim.c diff --git a/arch/arm/src/phy62xx/phyplus_tim.h b/soc/arm/phy62xx/phyplus_tim.h similarity index 100% rename from arch/arm/src/phy62xx/phyplus_tim.h rename to soc/arm/phy62xx/phyplus_tim.h diff --git a/arch/arm/src/phy62xx/phyplus_timer_lowerhalf.c b/soc/arm/phy62xx/phyplus_timer_lowerhalf.c similarity index 100% rename from arch/arm/src/phy62xx/phyplus_timer_lowerhalf.c rename to soc/arm/phy62xx/phyplus_timer_lowerhalf.c diff --git a/arch/arm/src/phy62xx/phyplus_timer_lowerhalf.h b/soc/arm/phy62xx/phyplus_timer_lowerhalf.h similarity index 100% rename from arch/arm/src/phy62xx/phyplus_timer_lowerhalf.h rename to soc/arm/phy62xx/phyplus_timer_lowerhalf.h diff --git a/arch/arm/src/phy62xx/phyplus_timerisr.c b/soc/arm/phy62xx/phyplus_timerisr.c similarity index 100% rename from arch/arm/src/phy62xx/phyplus_timerisr.c rename to soc/arm/phy62xx/phyplus_timerisr.c diff --git a/arch/arm/src/phy62xx/phyplus_timerisr.h b/soc/arm/phy62xx/phyplus_timerisr.h similarity index 100% rename from arch/arm/src/phy62xx/phyplus_timerisr.h rename to soc/arm/phy62xx/phyplus_timerisr.h diff --git a/arch/arm/src/phy62xx/phyplus_wdt.c b/soc/arm/phy62xx/phyplus_wdt.c similarity index 100% rename from arch/arm/src/phy62xx/phyplus_wdt.c rename to soc/arm/phy62xx/phyplus_wdt.c diff --git a/arch/arm/src/phy62xx/phyplus_wdt.h b/soc/arm/phy62xx/phyplus_wdt.h similarity index 100% rename from arch/arm/src/phy62xx/phyplus_wdt.h rename to soc/arm/phy62xx/phyplus_wdt.h diff --git a/arch/arm/src/phy62xx/pplus_mtd_flash.c b/soc/arm/phy62xx/pplus_mtd_flash.c similarity index 100% rename from arch/arm/src/phy62xx/pplus_mtd_flash.c rename to soc/arm/phy62xx/pplus_mtd_flash.c diff --git a/arch/arm/src/phy62xx/pplus_mtd_flash.h b/soc/arm/phy62xx/pplus_mtd_flash.h similarity index 100% rename from arch/arm/src/phy62xx/pplus_mtd_flash.h rename to soc/arm/phy62xx/pplus_mtd_flash.h diff --git a/arch/arm/src/phy62xx/pwrmgr.c b/soc/arm/phy62xx/pwrmgr.c similarity index 100% rename from arch/arm/src/phy62xx/pwrmgr.c rename to soc/arm/phy62xx/pwrmgr.c diff --git a/arch/arm/src/phy62xx/pwrmgr.h b/soc/arm/phy62xx/pwrmgr.h similarity index 100% rename from arch/arm/src/phy62xx/pwrmgr.h rename to soc/arm/phy62xx/pwrmgr.h diff --git a/arch/arm/src/phy62xx/rom_sym_def.h b/soc/arm/phy62xx/rom_sym_def.h similarity index 100% rename from arch/arm/src/phy62xx/rom_sym_def.h rename to soc/arm/phy62xx/rom_sym_def.h diff --git a/arch/arm/src/phy62xx/start.c b/soc/arm/phy62xx/start.c similarity index 100% rename from arch/arm/src/phy62xx/start.c rename to soc/arm/phy62xx/start.c diff --git a/arch/arm/src/phy62xx/start.h b/soc/arm/phy62xx/start.h similarity index 100% rename from arch/arm/src/phy62xx/start.h rename to soc/arm/phy62xx/start.h diff --git a/arch/arm/src/phy62xx/systick.c b/soc/arm/phy62xx/systick.c similarity index 100% rename from arch/arm/src/phy62xx/systick.c rename to soc/arm/phy62xx/systick.c diff --git a/arch/arm/src/phy62xx/timer.c b/soc/arm/phy62xx/timer.c similarity index 100% rename from arch/arm/src/phy62xx/timer.c rename to soc/arm/phy62xx/timer.c diff --git a/arch/arm/src/phy62xx/timer.h b/soc/arm/phy62xx/timer.h similarity index 100% rename from arch/arm/src/phy62xx/timer.h rename to soc/arm/phy62xx/timer.h diff --git a/arch/arm/src/phy62xx/types.h b/soc/arm/phy62xx/types.h similarity index 100% rename from arch/arm/src/phy62xx/types.h rename to soc/arm/phy62xx/types.h diff --git a/arch/arm/src/phy62xx/uart.c b/soc/arm/phy62xx/uart.c similarity index 100% rename from arch/arm/src/phy62xx/uart.c rename to soc/arm/phy62xx/uart.c diff --git a/arch/arm/src/phy62xx/uart.h b/soc/arm/phy62xx/uart.h similarity index 100% rename from arch/arm/src/phy62xx/uart.h rename to soc/arm/phy62xx/uart.h diff --git a/arch/arm/src/phy62xx/version.h b/soc/arm/phy62xx/version.h similarity index 100% rename from arch/arm/src/phy62xx/version.h rename to soc/arm/phy62xx/version.h diff --git a/arch/arm/src/qemu/CMakeLists.txt b/soc/arm/qemu/CMakeLists.txt similarity index 100% rename from arch/arm/src/qemu/CMakeLists.txt rename to soc/arm/qemu/CMakeLists.txt diff --git a/arch/arm/src/qemu/Kconfig b/soc/arm/qemu/Kconfig similarity index 100% rename from arch/arm/src/qemu/Kconfig rename to soc/arm/qemu/Kconfig diff --git a/arch/arm/src/qemu/Make.defs b/soc/arm/qemu/Make.defs similarity index 100% rename from arch/arm/src/qemu/Make.defs rename to soc/arm/qemu/Make.defs diff --git a/arch/arm/src/qemu/chip.h b/soc/arm/qemu/chip.h similarity index 100% rename from arch/arm/src/qemu/chip.h rename to soc/arm/qemu/chip.h diff --git a/arch/arm/src/qemu/hardware/qemu_memorymap.h b/soc/arm/qemu/hardware/qemu_memorymap.h similarity index 100% rename from arch/arm/src/qemu/hardware/qemu_memorymap.h rename to soc/arm/qemu/hardware/qemu_memorymap.h diff --git a/arch/arm/src/qemu/qemu_allocateheap.c b/soc/arm/qemu/qemu_allocateheap.c similarity index 100% rename from arch/arm/src/qemu/qemu_allocateheap.c rename to soc/arm/qemu/qemu_allocateheap.c diff --git a/arch/arm/src/qemu/qemu_boot.c b/soc/arm/qemu/qemu_boot.c similarity index 100% rename from arch/arm/src/qemu/qemu_boot.c rename to soc/arm/qemu/qemu_boot.c diff --git a/arch/arm/src/qemu/qemu_cpuboot.c b/soc/arm/qemu/qemu_cpuboot.c similarity index 100% rename from arch/arm/src/qemu/qemu_cpuboot.c rename to soc/arm/qemu/qemu_cpuboot.c diff --git a/arch/arm/src/qemu/qemu_idle.c b/soc/arm/qemu/qemu_idle.c similarity index 100% rename from arch/arm/src/qemu/qemu_idle.c rename to soc/arm/qemu/qemu_idle.c diff --git a/arch/arm/src/qemu/qemu_irq.c b/soc/arm/qemu/qemu_irq.c similarity index 100% rename from arch/arm/src/qemu/qemu_irq.c rename to soc/arm/qemu/qemu_irq.c diff --git a/arch/arm/src/qemu/qemu_irq.h b/soc/arm/qemu/qemu_irq.h similarity index 100% rename from arch/arm/src/qemu/qemu_irq.h rename to soc/arm/qemu/qemu_irq.h diff --git a/arch/arm/src/qemu/qemu_memorymap.c b/soc/arm/qemu/qemu_memorymap.c similarity index 100% rename from arch/arm/src/qemu/qemu_memorymap.c rename to soc/arm/qemu/qemu_memorymap.c diff --git a/arch/arm/src/qemu/qemu_memorymap.h b/soc/arm/qemu/qemu_memorymap.h similarity index 100% rename from arch/arm/src/qemu/qemu_memorymap.h rename to soc/arm/qemu/qemu_memorymap.h diff --git a/arch/arm/src/qemu/qemu_pgalloc.c b/soc/arm/qemu/qemu_pgalloc.c similarity index 100% rename from arch/arm/src/qemu/qemu_pgalloc.c rename to soc/arm/qemu/qemu_pgalloc.c diff --git a/arch/arm/src/qemu/qemu_serial.c b/soc/arm/qemu/qemu_serial.c similarity index 100% rename from arch/arm/src/qemu/qemu_serial.c rename to soc/arm/qemu/qemu_serial.c diff --git a/arch/arm/src/qemu/qemu_timer.c b/soc/arm/qemu/qemu_timer.c similarity index 100% rename from arch/arm/src/qemu/qemu_timer.c rename to soc/arm/qemu/qemu_timer.c diff --git a/arch/arm/src/qemu/qemu_userspace.c b/soc/arm/qemu/qemu_userspace.c similarity index 100% rename from arch/arm/src/qemu/qemu_userspace.c rename to soc/arm/qemu/qemu_userspace.c diff --git a/arch/arm/src/qemu/qemu_userspace.h b/soc/arm/qemu/qemu_userspace.h similarity index 100% rename from arch/arm/src/qemu/qemu_userspace.h rename to soc/arm/qemu/qemu_userspace.h diff --git a/arch/arm/src/ra4/CMakeLists.txt b/soc/arm/ra4/CMakeLists.txt similarity index 100% rename from arch/arm/src/ra4/CMakeLists.txt rename to soc/arm/ra4/CMakeLists.txt diff --git a/arch/arm/src/ra4/Kconfig b/soc/arm/ra4/Kconfig similarity index 100% rename from arch/arm/src/ra4/Kconfig rename to soc/arm/ra4/Kconfig diff --git a/arch/arm/src/ra4/Make.defs b/soc/arm/ra4/Make.defs similarity index 100% rename from arch/arm/src/ra4/Make.defs rename to soc/arm/ra4/Make.defs diff --git a/arch/arm/src/ra4/chip.h b/soc/arm/ra4/chip.h similarity index 100% rename from arch/arm/src/ra4/chip.h rename to soc/arm/ra4/chip.h diff --git a/arch/arm/src/ra4/hardware/ra4m1_icu.h b/soc/arm/ra4/hardware/ra4m1_icu.h similarity index 100% rename from arch/arm/src/ra4/hardware/ra4m1_icu.h rename to soc/arm/ra4/hardware/ra4m1_icu.h diff --git a/arch/arm/src/ra4/hardware/ra4m1_memorymap.h b/soc/arm/ra4/hardware/ra4m1_memorymap.h similarity index 100% rename from arch/arm/src/ra4/hardware/ra4m1_memorymap.h rename to soc/arm/ra4/hardware/ra4m1_memorymap.h diff --git a/arch/arm/src/ra4/hardware/ra4m1_mstp.h b/soc/arm/ra4/hardware/ra4m1_mstp.h similarity index 100% rename from arch/arm/src/ra4/hardware/ra4m1_mstp.h rename to soc/arm/ra4/hardware/ra4m1_mstp.h diff --git a/arch/arm/src/ra4/hardware/ra4m1_pinmap.h b/soc/arm/ra4/hardware/ra4m1_pinmap.h similarity index 100% rename from arch/arm/src/ra4/hardware/ra4m1_pinmap.h rename to soc/arm/ra4/hardware/ra4m1_pinmap.h diff --git a/arch/arm/src/ra4/hardware/ra_flash.h b/soc/arm/ra4/hardware/ra_flash.h similarity index 100% rename from arch/arm/src/ra4/hardware/ra_flash.h rename to soc/arm/ra4/hardware/ra_flash.h diff --git a/arch/arm/src/ra4/hardware/ra_gpio.h b/soc/arm/ra4/hardware/ra_gpio.h similarity index 100% rename from arch/arm/src/ra4/hardware/ra_gpio.h rename to soc/arm/ra4/hardware/ra_gpio.h diff --git a/arch/arm/src/ra4/hardware/ra_icu.h b/soc/arm/ra4/hardware/ra_icu.h similarity index 100% rename from arch/arm/src/ra4/hardware/ra_icu.h rename to soc/arm/ra4/hardware/ra_icu.h diff --git a/arch/arm/src/ra4/hardware/ra_memorymap.h b/soc/arm/ra4/hardware/ra_memorymap.h similarity index 100% rename from arch/arm/src/ra4/hardware/ra_memorymap.h rename to soc/arm/ra4/hardware/ra_memorymap.h diff --git a/arch/arm/src/ra4/hardware/ra_mpu.h b/soc/arm/ra4/hardware/ra_mpu.h similarity index 100% rename from arch/arm/src/ra4/hardware/ra_mpu.h rename to soc/arm/ra4/hardware/ra_mpu.h diff --git a/arch/arm/src/ra4/hardware/ra_mstp.h b/soc/arm/ra4/hardware/ra_mstp.h similarity index 100% rename from arch/arm/src/ra4/hardware/ra_mstp.h rename to soc/arm/ra4/hardware/ra_mstp.h diff --git a/arch/arm/src/ra4/hardware/ra_option_setting.h b/soc/arm/ra4/hardware/ra_option_setting.h similarity index 100% rename from arch/arm/src/ra4/hardware/ra_option_setting.h rename to soc/arm/ra4/hardware/ra_option_setting.h diff --git a/arch/arm/src/ra4/hardware/ra_pinmap.h b/soc/arm/ra4/hardware/ra_pinmap.h similarity index 100% rename from arch/arm/src/ra4/hardware/ra_pinmap.h rename to soc/arm/ra4/hardware/ra_pinmap.h diff --git a/arch/arm/src/ra4/hardware/ra_sci.h b/soc/arm/ra4/hardware/ra_sci.h similarity index 100% rename from arch/arm/src/ra4/hardware/ra_sci.h rename to soc/arm/ra4/hardware/ra_sci.h diff --git a/arch/arm/src/ra4/hardware/ra_system.h b/soc/arm/ra4/hardware/ra_system.h similarity index 100% rename from arch/arm/src/ra4/hardware/ra_system.h rename to soc/arm/ra4/hardware/ra_system.h diff --git a/arch/arm/src/ra4/ra_allocateheap.c b/soc/arm/ra4/ra_allocateheap.c similarity index 100% rename from arch/arm/src/ra4/ra_allocateheap.c rename to soc/arm/ra4/ra_allocateheap.c diff --git a/arch/arm/src/ra4/ra_clockconfig.c b/soc/arm/ra4/ra_clockconfig.c similarity index 100% rename from arch/arm/src/ra4/ra_clockconfig.c rename to soc/arm/ra4/ra_clockconfig.c diff --git a/arch/arm/src/ra4/ra_clockconfig.h b/soc/arm/ra4/ra_clockconfig.h similarity index 100% rename from arch/arm/src/ra4/ra_clockconfig.h rename to soc/arm/ra4/ra_clockconfig.h diff --git a/arch/arm/src/ra4/ra_gpio.c b/soc/arm/ra4/ra_gpio.c similarity index 100% rename from arch/arm/src/ra4/ra_gpio.c rename to soc/arm/ra4/ra_gpio.c diff --git a/arch/arm/src/ra4/ra_gpio.h b/soc/arm/ra4/ra_gpio.h similarity index 100% rename from arch/arm/src/ra4/ra_gpio.h rename to soc/arm/ra4/ra_gpio.h diff --git a/arch/arm/src/ra4/ra_icu.c b/soc/arm/ra4/ra_icu.c similarity index 100% rename from arch/arm/src/ra4/ra_icu.c rename to soc/arm/ra4/ra_icu.c diff --git a/arch/arm/src/ra4/ra_icu.h b/soc/arm/ra4/ra_icu.h similarity index 100% rename from arch/arm/src/ra4/ra_icu.h rename to soc/arm/ra4/ra_icu.h diff --git a/arch/arm/src/ra4/ra_irq.c b/soc/arm/ra4/ra_irq.c similarity index 100% rename from arch/arm/src/ra4/ra_irq.c rename to soc/arm/ra4/ra_irq.c diff --git a/arch/arm/src/ra4/ra_lowputc.c b/soc/arm/ra4/ra_lowputc.c similarity index 100% rename from arch/arm/src/ra4/ra_lowputc.c rename to soc/arm/ra4/ra_lowputc.c diff --git a/arch/arm/src/ra4/ra_lowputc.h b/soc/arm/ra4/ra_lowputc.h similarity index 100% rename from arch/arm/src/ra4/ra_lowputc.h rename to soc/arm/ra4/ra_lowputc.h diff --git a/arch/arm/src/ra4/ra_serial.c b/soc/arm/ra4/ra_serial.c similarity index 100% rename from arch/arm/src/ra4/ra_serial.c rename to soc/arm/ra4/ra_serial.c diff --git a/arch/arm/src/ra4/ra_start.c b/soc/arm/ra4/ra_start.c similarity index 100% rename from arch/arm/src/ra4/ra_start.c rename to soc/arm/ra4/ra_start.c diff --git a/arch/arm/src/ra4/ra_start.h b/soc/arm/ra4/ra_start.h similarity index 100% rename from arch/arm/src/ra4/ra_start.h rename to soc/arm/ra4/ra_start.h diff --git a/arch/arm/src/ra4/ra_timerisr.c b/soc/arm/ra4/ra_timerisr.c similarity index 100% rename from arch/arm/src/ra4/ra_timerisr.c rename to soc/arm/ra4/ra_timerisr.c diff --git a/soc/arm/rp2040/.gitignore b/soc/arm/rp2040/.gitignore new file mode 100644 index 0000000000..ce98633950 --- /dev/null +++ b/soc/arm/rp2040/.gitignore @@ -0,0 +1 @@ +rp2040_boot_stage2.S diff --git a/soc/arm/rp2040/CMakeLists.txt b/soc/arm/rp2040/CMakeLists.txt new file mode 100644 index 0000000000..5b8b5f5102 --- /dev/null +++ b/soc/arm/rp2040/CMakeLists.txt @@ -0,0 +1,123 @@ +# ############################################################################## +# arch/arm/src/rp2040/CMakeLists.txt +# +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed to the Apache Software Foundation (ASF) under one or more contributor +# license agreements. See the NOTICE file distributed with this work for +# additional information regarding copyright ownership. The ASF licenses this +# file to you under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +# +# ############################################################################## + +list( + APPEND + SRCS + rp2040_idle.c + rp2040_irq.c + rp2040_uart.c + rp2040_serial.c + rp2040_start.c + rp2040_timerisr.c + rp2040_gpio.c + rp2040_pio.c + rp2040_clock.c + rp2040_xosc.c + rp2040_pll.c) + +if(CONFIG_SMP) + list(APPEND SRCS rp2040_cpustart.c rp2040_smpcall.c rp2040_cpuidlestack.c + rp2040_testset.c) +endif() + +if(CONFIG_ARCH_HAVE_MULTICPU) + list(APPEND SRCS rp2040_cpuindex.c) +endif() + +if(CONFIG_RP2040_DMAC) + list(APPEND SRCS rp2040_dmac.c) +endif() + +if(CONFIG_RP2040_SPI) + list(APPEND SRCS rp2040_spi.c) +endif() + +if(CONFIG_RP2040_PWM) + list(APPEND SRCS rp2040_pwm.c) +endif() + +if(CONFIG_RP2040_I2C) + list(APPEND SRCS rp2040_i2c.c) +endif() + +if(CONFIG_RP2040_I2C_SLAVE) + list(APPEND SRCS rp2040_i2c_slave.c) +endif() + +if(CONFIG_RP2040_I2S) + list(APPEND SRCS rp2040_i2s.c rp2040_i2s_pio.c) +endif() + +if(CONFIG_USBDEV) + list(APPEND SRCS rp2040_usbdev.c) +endif() + +if(CONFIG_WS2812) + list(APPEND SRCS rp2040_ws2812.c) +endif() + +if(CONFIG_ADC) + list(APPEND SRCS rp2040_adc.c) +endif() + +if(CONFIG_IEEE80211_INFINEON_CYW43439) + list(APPEND SRCS rp2040_cyw43439.c) +endif() + +if(CONFIG_WATCHDOG) + list(APPEND SRCS rp2040_wdt.c) +endif() + +if(CONFIG_RP2040_FLASH_FILE_SYSTEM) + list(APPEND SRCS rp2040_flash_mtd.c rp2040_flash_initialize.S) +endif() + +if(CONFIG_RP2040_FLASH_BOOT) + + # Set the Pico SDK path using the environment variable + + if(NOT DEFINED ENV{PICO_SDK_PATH}) + message( + FATAL_ERROR + "PICO_SDK_PATH environment variable is not set. Please set it to the path of your Pico SDK installation." + ) + else() + message(STATUS "PICO_SDK_PATH environment variable is set.") + + set(PICO_SDK_PATH $ENV{PICO_SDK_PATH}) + include(${CMAKE_CURRENT_SOURCE_DIR}/boot2/rp2040_boot_stage2.cmake) + + set(PATH_CHIP_RP2040 ${CMAKE_BINARY_DIR}/arch/${CONFIG_ARCH}/src/chip) + pico_define_boot_stage2(rp2040_boot_stage2 ${PATH_CHIP_RP2040}) + + if(EXISTS ${PATH_CHIP_RP2040}/rp2040_boot_stage2.S) + list(APPEND SRCS ${PATH_CHIP_RP2040}/rp2040_boot_stage2.S) + target_sources(nuttx PRIVATE ${PATH_CHIP_RP2040}/rp2040_boot_stage2.S) + else() + message( + FATAL_ERROR "No rp2040_boot_stage2.S found at ${PATH_CHIP_RP2040}") + endif() + endif() +endif() + +target_sources(arch PRIVATE ${SRCS}) diff --git a/arch/arm/src/rp2040/Kconfig b/soc/arm/rp2040/Kconfig similarity index 100% rename from arch/arm/src/rp2040/Kconfig rename to soc/arm/rp2040/Kconfig diff --git a/arch/arm/src/rp2040/Make.defs b/soc/arm/rp2040/Make.defs similarity index 100% rename from arch/arm/src/rp2040/Make.defs rename to soc/arm/rp2040/Make.defs diff --git a/arch/arm/src/rp2040/boot2/Make.defs b/soc/arm/rp2040/boot2/Make.defs similarity index 100% rename from arch/arm/src/rp2040/boot2/Make.defs rename to soc/arm/rp2040/boot2/Make.defs diff --git a/arch/arm/src/rp2040/boot2/pico/config.h b/soc/arm/rp2040/boot2/pico/config.h similarity index 100% rename from arch/arm/src/rp2040/boot2/pico/config.h rename to soc/arm/rp2040/boot2/pico/config.h diff --git a/soc/arm/rp2040/boot2/rp2040_boot_stage2.cmake b/soc/arm/rp2040/boot2/rp2040_boot_stage2.cmake new file mode 100644 index 0000000000..f6b4330e0d --- /dev/null +++ b/soc/arm/rp2040/boot2/rp2040_boot_stage2.cmake @@ -0,0 +1,113 @@ +# ############################################################################## +# arch/arm/src/rp2040/boot2/rp2040_boot_stage2.cmake +# +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed to the Apache Software Foundation (ASF) under one or more contributor +# license agreements. See the NOTICE file distributed with this work for +# additional information regarding copyright ownership. The ASF licenses this +# file to you under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +# +# ############################################################################## + +# ~~~ +# pico_define_boot_stage2 +# +# Description: Define a boot stage 2 for the Raspberry Pi rp2040. +# +# Parameters: +# NAME : The name of the boot stage 2 +# path_chip : The full path of the CMake build /${CONFIG_ARCH}/src/chip +# ~~~ + +function(pico_define_boot_stage2 NAME path_chip) + + set(PICO_BOOT_STAGE2_DIR "${PICO_SDK_PATH}/src/rp2040/boot_stage2") + set(BOOT2SRC "${PICO_BOOT_STAGE2_DIR}/boot2_${CONFIG_RP2040_FLASH_CHIP}.S") + + string(REPLACE "." "-" NUTTX_BOARD_NAME "${NUTTX_BOARD}") + + set(BOOT2CFLAGSLIST + "-T${NUTTX_BOARD_DIR}/scripts/${NUTTX_BOARD_NAME}-flash.ld" + -DPICO_BOARD=\"pico\" -DPICO_BUILD=1 -DPICO_NO_HARDWARE=0 + -DPICO_ON_DEVICE=1) + + list(APPEND BOOT2CFLAGSLIST -I${path_chip}/boot2) + list(APPEND BOOT2CFLAGSLIST -I${PICO_BOOT_STAGE2_DIR}/asminclude) + list(APPEND BOOT2CFLAGSLIST + -I${PICO_SDK_PATH}/src/rp2040/hardware_regs/include) + list(APPEND BOOT2CFLAGSLIST + -I${PICO_SDK_PATH}/src/rp2_common/hardware_base/include) + list(APPEND BOOT2CFLAGSLIST + -I${PICO_SDK_PATH}/src/common/pico_base_headers/include) + list(APPEND BOOT2CFLAGSLIST -I${PICO_SDK_PATH}/src/boards/include) + list(APPEND BOOT2CFLAGSLIST + -I${PICO_SDK_PATH}/src/rp2040/pico_platform/include) + + list(APPEND BOOT2CFLAGSLIST + -I${PICO_SDK_PATH}/src/rp2_common/pico_platform_common/include) + list(APPEND BOOT2CFLAGSLIST + -I${PICO_SDK_PATH}/src/rp2_common/pico_platform_compiler/include) + list(APPEND BOOT2CFLAGSLIST + -I${PICO_SDK_PATH}/src/rp2_common/pico_platform_sections/include) + list(APPEND BOOT2CFLAGSLIST + -I${PICO_SDK_PATH}/src/rp2_common/pico_platform_panic/include) + list(APPEND BOOT2CFLAGSLIST -Wl,--no-warn-rwx-segments) + + string(REPLACE ";" " " BOOT2CFLAGS "${BOOT2CFLAGSLIST}") + + set(ORIGINAL_ELF ${path_chip}/${NAME}.elf) + + execute_process( + COMMAND ${CMAKE_COMMAND} -E touch + ${PICO_SDK_PATH}/src/common/pico_base_headers/include/pico/version.h + ) + execute_process( + COMMAND + ${CMAKE_COMMAND} -E touch + ${PICO_SDK_PATH}/src/common/pico_base_headers/include/pico/config_autogen.h + ) + + set(builtin + "${CMAKE_C_COMPILER} -nostdlib ${BOOT2CFLAGS} -o ${ORIGINAL_ELF} ${BOOT2SRC}" + ) + + if(CMAKE_HOST_SYSTEM_NAME MATCHES "Windows") + execute_process(COMMAND cmd /c "${builtin}" RESULT_VARIABLE resultVar) + else() + execute_process(COMMAND sh -c "${builtin}" RESULT_VARIABLE resultVar) + endif() + + execute_process( + COMMAND ${CMAKE_COMMAND} -E remove -f + ${PICO_SDK_PATH}/src/common/pico_base_headers/include/pico/version.h + ) + execute_process( + COMMAND + ${CMAKE_COMMAND} -E remove -f + ${PICO_SDK_PATH}/src/common/pico_base_headers/include/pico/config_autogen.h + ) + + if(resultVar AND NOT resultVar EQUAL 0) + message(FATAL_ERROR "Failed: ${resultVar}") + else() + set(ORIGINAL_BIN ${path_chip}/${NAME}.bin) + set(PADDED_CHECKSUMMED_ASM ${path_chip}/${NAME}.S) + + execute_process(COMMAND ${CMAKE_OBJCOPY} -Obinary ${ORIGINAL_ELF} + ${ORIGINAL_BIN}) + execute_process( + COMMAND ${Python3_EXECUTABLE} ${PICO_BOOT_STAGE2_DIR}/pad_checksum -s + 0xffffffff ${ORIGINAL_BIN} ${PADDED_CHECKSUMMED_ASM}) + endif() +endfunction() diff --git a/arch/arm/src/rp2040/chip.h b/soc/arm/rp2040/chip.h similarity index 100% rename from arch/arm/src/rp2040/chip.h rename to soc/arm/rp2040/chip.h diff --git a/arch/arm/src/rp2040/hardware/rp2040_adc.h b/soc/arm/rp2040/hardware/rp2040_adc.h similarity index 100% rename from arch/arm/src/rp2040/hardware/rp2040_adc.h rename to soc/arm/rp2040/hardware/rp2040_adc.h diff --git a/arch/arm/src/rp2040/hardware/rp2040_address_mapped.h b/soc/arm/rp2040/hardware/rp2040_address_mapped.h similarity index 100% rename from arch/arm/src/rp2040/hardware/rp2040_address_mapped.h rename to soc/arm/rp2040/hardware/rp2040_address_mapped.h diff --git a/arch/arm/src/rp2040/hardware/rp2040_clocks.h b/soc/arm/rp2040/hardware/rp2040_clocks.h similarity index 100% rename from arch/arm/src/rp2040/hardware/rp2040_clocks.h rename to soc/arm/rp2040/hardware/rp2040_clocks.h diff --git a/arch/arm/src/rp2040/hardware/rp2040_dma.h b/soc/arm/rp2040/hardware/rp2040_dma.h similarity index 100% rename from arch/arm/src/rp2040/hardware/rp2040_dma.h rename to soc/arm/rp2040/hardware/rp2040_dma.h diff --git a/arch/arm/src/rp2040/hardware/rp2040_i2c.h b/soc/arm/rp2040/hardware/rp2040_i2c.h similarity index 100% rename from arch/arm/src/rp2040/hardware/rp2040_i2c.h rename to soc/arm/rp2040/hardware/rp2040_i2c.h diff --git a/arch/arm/src/rp2040/hardware/rp2040_io_bank0.h b/soc/arm/rp2040/hardware/rp2040_io_bank0.h similarity index 100% rename from arch/arm/src/rp2040/hardware/rp2040_io_bank0.h rename to soc/arm/rp2040/hardware/rp2040_io_bank0.h diff --git a/arch/arm/src/rp2040/hardware/rp2040_memorymap.h b/soc/arm/rp2040/hardware/rp2040_memorymap.h similarity index 100% rename from arch/arm/src/rp2040/hardware/rp2040_memorymap.h rename to soc/arm/rp2040/hardware/rp2040_memorymap.h diff --git a/arch/arm/src/rp2040/hardware/rp2040_pads_bank0.h b/soc/arm/rp2040/hardware/rp2040_pads_bank0.h similarity index 100% rename from arch/arm/src/rp2040/hardware/rp2040_pads_bank0.h rename to soc/arm/rp2040/hardware/rp2040_pads_bank0.h diff --git a/arch/arm/src/rp2040/hardware/rp2040_pio.h b/soc/arm/rp2040/hardware/rp2040_pio.h similarity index 100% rename from arch/arm/src/rp2040/hardware/rp2040_pio.h rename to soc/arm/rp2040/hardware/rp2040_pio.h diff --git a/arch/arm/src/rp2040/hardware/rp2040_pll.h b/soc/arm/rp2040/hardware/rp2040_pll.h similarity index 100% rename from arch/arm/src/rp2040/hardware/rp2040_pll.h rename to soc/arm/rp2040/hardware/rp2040_pll.h diff --git a/arch/arm/src/rp2040/hardware/rp2040_psm.h b/soc/arm/rp2040/hardware/rp2040_psm.h similarity index 100% rename from arch/arm/src/rp2040/hardware/rp2040_psm.h rename to soc/arm/rp2040/hardware/rp2040_psm.h diff --git a/arch/arm/src/rp2040/hardware/rp2040_pwm.h b/soc/arm/rp2040/hardware/rp2040_pwm.h similarity index 100% rename from arch/arm/src/rp2040/hardware/rp2040_pwm.h rename to soc/arm/rp2040/hardware/rp2040_pwm.h diff --git a/arch/arm/src/rp2040/hardware/rp2040_resets.h b/soc/arm/rp2040/hardware/rp2040_resets.h similarity index 100% rename from arch/arm/src/rp2040/hardware/rp2040_resets.h rename to soc/arm/rp2040/hardware/rp2040_resets.h diff --git a/arch/arm/src/rp2040/hardware/rp2040_rosc.h b/soc/arm/rp2040/hardware/rp2040_rosc.h similarity index 100% rename from arch/arm/src/rp2040/hardware/rp2040_rosc.h rename to soc/arm/rp2040/hardware/rp2040_rosc.h diff --git a/arch/arm/src/rp2040/hardware/rp2040_sio.h b/soc/arm/rp2040/hardware/rp2040_sio.h similarity index 100% rename from arch/arm/src/rp2040/hardware/rp2040_sio.h rename to soc/arm/rp2040/hardware/rp2040_sio.h diff --git a/arch/arm/src/rp2040/hardware/rp2040_spi.h b/soc/arm/rp2040/hardware/rp2040_spi.h similarity index 100% rename from arch/arm/src/rp2040/hardware/rp2040_spi.h rename to soc/arm/rp2040/hardware/rp2040_spi.h diff --git a/arch/arm/src/rp2040/hardware/rp2040_uart01.h b/soc/arm/rp2040/hardware/rp2040_uart01.h similarity index 100% rename from arch/arm/src/rp2040/hardware/rp2040_uart01.h rename to soc/arm/rp2040/hardware/rp2040_uart01.h diff --git a/arch/arm/src/rp2040/hardware/rp2040_usbctrl_dpsram.h b/soc/arm/rp2040/hardware/rp2040_usbctrl_dpsram.h similarity index 100% rename from arch/arm/src/rp2040/hardware/rp2040_usbctrl_dpsram.h rename to soc/arm/rp2040/hardware/rp2040_usbctrl_dpsram.h diff --git a/arch/arm/src/rp2040/hardware/rp2040_usbctrl_regs.h b/soc/arm/rp2040/hardware/rp2040_usbctrl_regs.h similarity index 100% rename from arch/arm/src/rp2040/hardware/rp2040_usbctrl_regs.h rename to soc/arm/rp2040/hardware/rp2040_usbctrl_regs.h diff --git a/arch/arm/src/rp2040/hardware/rp2040_watchdog.h b/soc/arm/rp2040/hardware/rp2040_watchdog.h similarity index 100% rename from arch/arm/src/rp2040/hardware/rp2040_watchdog.h rename to soc/arm/rp2040/hardware/rp2040_watchdog.h diff --git a/arch/arm/src/rp2040/hardware/rp2040_xosc.h b/soc/arm/rp2040/hardware/rp2040_xosc.h similarity index 100% rename from arch/arm/src/rp2040/hardware/rp2040_xosc.h rename to soc/arm/rp2040/hardware/rp2040_xosc.h diff --git a/arch/arm/src/rp2040/rp2040_adc.c b/soc/arm/rp2040/rp2040_adc.c similarity index 100% rename from arch/arm/src/rp2040/rp2040_adc.c rename to soc/arm/rp2040/rp2040_adc.c diff --git a/arch/arm/src/rp2040/rp2040_adc.h b/soc/arm/rp2040/rp2040_adc.h similarity index 100% rename from arch/arm/src/rp2040/rp2040_adc.h rename to soc/arm/rp2040/rp2040_adc.h diff --git a/arch/arm/src/rp2040/rp2040_clock.c b/soc/arm/rp2040/rp2040_clock.c similarity index 100% rename from arch/arm/src/rp2040/rp2040_clock.c rename to soc/arm/rp2040/rp2040_clock.c diff --git a/arch/arm/src/rp2040/rp2040_clock.h b/soc/arm/rp2040/rp2040_clock.h similarity index 100% rename from arch/arm/src/rp2040/rp2040_clock.h rename to soc/arm/rp2040/rp2040_clock.h diff --git a/arch/arm/src/rp2040/rp2040_config.h b/soc/arm/rp2040/rp2040_config.h similarity index 100% rename from arch/arm/src/rp2040/rp2040_config.h rename to soc/arm/rp2040/rp2040_config.h diff --git a/arch/arm/src/rp2040/rp2040_cpuidlestack.c b/soc/arm/rp2040/rp2040_cpuidlestack.c similarity index 100% rename from arch/arm/src/rp2040/rp2040_cpuidlestack.c rename to soc/arm/rp2040/rp2040_cpuidlestack.c diff --git a/arch/arm/src/rp2040/rp2040_cpuindex.c b/soc/arm/rp2040/rp2040_cpuindex.c similarity index 100% rename from arch/arm/src/rp2040/rp2040_cpuindex.c rename to soc/arm/rp2040/rp2040_cpuindex.c diff --git a/arch/arm/src/rp2040/rp2040_cpustart.c b/soc/arm/rp2040/rp2040_cpustart.c similarity index 100% rename from arch/arm/src/rp2040/rp2040_cpustart.c rename to soc/arm/rp2040/rp2040_cpustart.c diff --git a/arch/arm/src/rp2040/rp2040_cyw43439.c b/soc/arm/rp2040/rp2040_cyw43439.c similarity index 100% rename from arch/arm/src/rp2040/rp2040_cyw43439.c rename to soc/arm/rp2040/rp2040_cyw43439.c diff --git a/arch/arm/src/rp2040/rp2040_cyw43439.h b/soc/arm/rp2040/rp2040_cyw43439.h similarity index 100% rename from arch/arm/src/rp2040/rp2040_cyw43439.h rename to soc/arm/rp2040/rp2040_cyw43439.h diff --git a/arch/arm/src/rp2040/rp2040_dmac.c b/soc/arm/rp2040/rp2040_dmac.c similarity index 100% rename from arch/arm/src/rp2040/rp2040_dmac.c rename to soc/arm/rp2040/rp2040_dmac.c diff --git a/arch/arm/src/rp2040/rp2040_dmac.h b/soc/arm/rp2040/rp2040_dmac.h similarity index 100% rename from arch/arm/src/rp2040/rp2040_dmac.h rename to soc/arm/rp2040/rp2040_dmac.h diff --git a/arch/arm/src/rp2040/rp2040_flash_initialize.S b/soc/arm/rp2040/rp2040_flash_initialize.S similarity index 100% rename from arch/arm/src/rp2040/rp2040_flash_initialize.S rename to soc/arm/rp2040/rp2040_flash_initialize.S diff --git a/arch/arm/src/rp2040/rp2040_flash_mtd.c b/soc/arm/rp2040/rp2040_flash_mtd.c similarity index 100% rename from arch/arm/src/rp2040/rp2040_flash_mtd.c rename to soc/arm/rp2040/rp2040_flash_mtd.c diff --git a/arch/arm/src/rp2040/rp2040_flash_mtd.h b/soc/arm/rp2040/rp2040_flash_mtd.h similarity index 100% rename from arch/arm/src/rp2040/rp2040_flash_mtd.h rename to soc/arm/rp2040/rp2040_flash_mtd.h diff --git a/arch/arm/src/rp2040/rp2040_gpio.c b/soc/arm/rp2040/rp2040_gpio.c similarity index 100% rename from arch/arm/src/rp2040/rp2040_gpio.c rename to soc/arm/rp2040/rp2040_gpio.c diff --git a/arch/arm/src/rp2040/rp2040_gpio.h b/soc/arm/rp2040/rp2040_gpio.h similarity index 100% rename from arch/arm/src/rp2040/rp2040_gpio.h rename to soc/arm/rp2040/rp2040_gpio.h diff --git a/arch/arm/src/rp2040/rp2040_i2c.c b/soc/arm/rp2040/rp2040_i2c.c similarity index 100% rename from arch/arm/src/rp2040/rp2040_i2c.c rename to soc/arm/rp2040/rp2040_i2c.c diff --git a/arch/arm/src/rp2040/rp2040_i2c.h b/soc/arm/rp2040/rp2040_i2c.h similarity index 100% rename from arch/arm/src/rp2040/rp2040_i2c.h rename to soc/arm/rp2040/rp2040_i2c.h diff --git a/arch/arm/src/rp2040/rp2040_i2c_slave.c b/soc/arm/rp2040/rp2040_i2c_slave.c similarity index 100% rename from arch/arm/src/rp2040/rp2040_i2c_slave.c rename to soc/arm/rp2040/rp2040_i2c_slave.c diff --git a/arch/arm/src/rp2040/rp2040_i2s.c b/soc/arm/rp2040/rp2040_i2s.c similarity index 100% rename from arch/arm/src/rp2040/rp2040_i2s.c rename to soc/arm/rp2040/rp2040_i2s.c diff --git a/arch/arm/src/rp2040/rp2040_i2s.h b/soc/arm/rp2040/rp2040_i2s.h similarity index 100% rename from arch/arm/src/rp2040/rp2040_i2s.h rename to soc/arm/rp2040/rp2040_i2s.h diff --git a/arch/arm/src/rp2040/rp2040_i2s_pio.c b/soc/arm/rp2040/rp2040_i2s_pio.c similarity index 100% rename from arch/arm/src/rp2040/rp2040_i2s_pio.c rename to soc/arm/rp2040/rp2040_i2s_pio.c diff --git a/arch/arm/src/rp2040/rp2040_i2s_pio.h b/soc/arm/rp2040/rp2040_i2s_pio.h similarity index 100% rename from arch/arm/src/rp2040/rp2040_i2s_pio.h rename to soc/arm/rp2040/rp2040_i2s_pio.h diff --git a/arch/arm/src/rp2040/rp2040_idle.c b/soc/arm/rp2040/rp2040_idle.c similarity index 100% rename from arch/arm/src/rp2040/rp2040_idle.c rename to soc/arm/rp2040/rp2040_idle.c diff --git a/arch/arm/src/rp2040/rp2040_irq.c b/soc/arm/rp2040/rp2040_irq.c similarity index 100% rename from arch/arm/src/rp2040/rp2040_irq.c rename to soc/arm/rp2040/rp2040_irq.c diff --git a/arch/arm/src/rp2040/rp2040_pio.c b/soc/arm/rp2040/rp2040_pio.c similarity index 100% rename from arch/arm/src/rp2040/rp2040_pio.c rename to soc/arm/rp2040/rp2040_pio.c diff --git a/arch/arm/src/rp2040/rp2040_pio.h b/soc/arm/rp2040/rp2040_pio.h similarity index 100% rename from arch/arm/src/rp2040/rp2040_pio.h rename to soc/arm/rp2040/rp2040_pio.h diff --git a/arch/arm/src/rp2040/rp2040_pio_instructions.h b/soc/arm/rp2040/rp2040_pio_instructions.h similarity index 100% rename from arch/arm/src/rp2040/rp2040_pio_instructions.h rename to soc/arm/rp2040/rp2040_pio_instructions.h diff --git a/arch/arm/src/rp2040/rp2040_pll.c b/soc/arm/rp2040/rp2040_pll.c similarity index 100% rename from arch/arm/src/rp2040/rp2040_pll.c rename to soc/arm/rp2040/rp2040_pll.c diff --git a/arch/arm/src/rp2040/rp2040_pll.h b/soc/arm/rp2040/rp2040_pll.h similarity index 100% rename from arch/arm/src/rp2040/rp2040_pll.h rename to soc/arm/rp2040/rp2040_pll.h diff --git a/arch/arm/src/rp2040/rp2040_pwm.c b/soc/arm/rp2040/rp2040_pwm.c similarity index 100% rename from arch/arm/src/rp2040/rp2040_pwm.c rename to soc/arm/rp2040/rp2040_pwm.c diff --git a/arch/arm/src/rp2040/rp2040_pwm.h b/soc/arm/rp2040/rp2040_pwm.h similarity index 100% rename from arch/arm/src/rp2040/rp2040_pwm.h rename to soc/arm/rp2040/rp2040_pwm.h diff --git a/arch/arm/src/rp2040/rp2040_rom.h b/soc/arm/rp2040/rp2040_rom.h similarity index 100% rename from arch/arm/src/rp2040/rp2040_rom.h rename to soc/arm/rp2040/rp2040_rom.h diff --git a/arch/arm/src/rp2040/rp2040_serial.c b/soc/arm/rp2040/rp2040_serial.c similarity index 100% rename from arch/arm/src/rp2040/rp2040_serial.c rename to soc/arm/rp2040/rp2040_serial.c diff --git a/arch/arm/src/rp2040/rp2040_serial.h b/soc/arm/rp2040/rp2040_serial.h similarity index 100% rename from arch/arm/src/rp2040/rp2040_serial.h rename to soc/arm/rp2040/rp2040_serial.h diff --git a/arch/arm/src/rp2040/rp2040_smpcall.c b/soc/arm/rp2040/rp2040_smpcall.c similarity index 100% rename from arch/arm/src/rp2040/rp2040_smpcall.c rename to soc/arm/rp2040/rp2040_smpcall.c diff --git a/arch/arm/src/rp2040/rp2040_spi.c b/soc/arm/rp2040/rp2040_spi.c similarity index 100% rename from arch/arm/src/rp2040/rp2040_spi.c rename to soc/arm/rp2040/rp2040_spi.c diff --git a/arch/arm/src/rp2040/rp2040_spi.h b/soc/arm/rp2040/rp2040_spi.h similarity index 100% rename from arch/arm/src/rp2040/rp2040_spi.h rename to soc/arm/rp2040/rp2040_spi.h diff --git a/arch/arm/src/rp2040/rp2040_start.c b/soc/arm/rp2040/rp2040_start.c similarity index 100% rename from arch/arm/src/rp2040/rp2040_start.c rename to soc/arm/rp2040/rp2040_start.c diff --git a/arch/arm/src/rp2040/rp2040_testset.c b/soc/arm/rp2040/rp2040_testset.c similarity index 100% rename from arch/arm/src/rp2040/rp2040_testset.c rename to soc/arm/rp2040/rp2040_testset.c diff --git a/arch/arm/src/rp2040/rp2040_timerisr.c b/soc/arm/rp2040/rp2040_timerisr.c similarity index 100% rename from arch/arm/src/rp2040/rp2040_timerisr.c rename to soc/arm/rp2040/rp2040_timerisr.c diff --git a/arch/arm/src/rp2040/rp2040_uart.c b/soc/arm/rp2040/rp2040_uart.c similarity index 100% rename from arch/arm/src/rp2040/rp2040_uart.c rename to soc/arm/rp2040/rp2040_uart.c diff --git a/arch/arm/src/rp2040/rp2040_uart.h b/soc/arm/rp2040/rp2040_uart.h similarity index 100% rename from arch/arm/src/rp2040/rp2040_uart.h rename to soc/arm/rp2040/rp2040_uart.h diff --git a/arch/arm/src/rp2040/rp2040_usbdev.c b/soc/arm/rp2040/rp2040_usbdev.c similarity index 100% rename from arch/arm/src/rp2040/rp2040_usbdev.c rename to soc/arm/rp2040/rp2040_usbdev.c diff --git a/arch/arm/src/rp2040/rp2040_usbdev.h b/soc/arm/rp2040/rp2040_usbdev.h similarity index 100% rename from arch/arm/src/rp2040/rp2040_usbdev.h rename to soc/arm/rp2040/rp2040_usbdev.h diff --git a/arch/arm/src/rp2040/rp2040_wdt.c b/soc/arm/rp2040/rp2040_wdt.c similarity index 100% rename from arch/arm/src/rp2040/rp2040_wdt.c rename to soc/arm/rp2040/rp2040_wdt.c diff --git a/arch/arm/src/rp2040/rp2040_wdt.h b/soc/arm/rp2040/rp2040_wdt.h similarity index 100% rename from arch/arm/src/rp2040/rp2040_wdt.h rename to soc/arm/rp2040/rp2040_wdt.h diff --git a/arch/arm/src/rp2040/rp2040_ws2812.c b/soc/arm/rp2040/rp2040_ws2812.c similarity index 100% rename from arch/arm/src/rp2040/rp2040_ws2812.c rename to soc/arm/rp2040/rp2040_ws2812.c diff --git a/arch/arm/src/rp2040/rp2040_ws2812.h b/soc/arm/rp2040/rp2040_ws2812.h similarity index 100% rename from arch/arm/src/rp2040/rp2040_ws2812.h rename to soc/arm/rp2040/rp2040_ws2812.h diff --git a/arch/arm/src/rp2040/rp2040_ws2812.pio b/soc/arm/rp2040/rp2040_ws2812.pio similarity index 100% rename from arch/arm/src/rp2040/rp2040_ws2812.pio rename to soc/arm/rp2040/rp2040_ws2812.pio diff --git a/arch/arm/src/rp2040/rp2040_xosc.c b/soc/arm/rp2040/rp2040_xosc.c similarity index 100% rename from arch/arm/src/rp2040/rp2040_xosc.c rename to soc/arm/rp2040/rp2040_xosc.c diff --git a/arch/arm/src/rp2040/rp2040_xosc.h b/soc/arm/rp2040/rp2040_xosc.h similarity index 100% rename from arch/arm/src/rp2040/rp2040_xosc.h rename to soc/arm/rp2040/rp2040_xosc.h diff --git a/arch/arm/src/armv7-m/CMakeLists.txt b/soc/arm/rp23xx/CMakeLists.txt similarity index 50% rename from arch/arm/src/armv7-m/CMakeLists.txt rename to soc/arm/rp23xx/CMakeLists.txt index c8d415ea92..1b54235cc6 100644 --- a/arch/arm/src/armv7-m/CMakeLists.txt +++ b/soc/arm/rp23xx/CMakeLists.txt @@ -1,5 +1,5 @@ # ############################################################################## -# arch/arm/src/armv7-m/CMakeLists.txt +# arch/arm/src/rp23xx/CMakeLists.txt # # SPDX-License-Identifier: Apache-2.0 # @@ -20,57 +20,69 @@ # # ############################################################################## -# TODO: do not use config to detect this +list( + APPEND + SRCS + rp23xx_idle.c + rp23xx_irq.c + rp23xx_uart.c + rp23xx_serial.c + rp23xx_start.c + rp23xx_timerisr.c + rp23xx_gpio.c + rp23xx_pio.c + rp23xx_clock.c + rp23xx_xosc.c + rp23xx_pll.c) -set(SRCS - arm_exception.S - arm_saveusercontext.S - arm_busfault.c - arm_dbgmonitor.c - arm_cache.c - arm_cpuinfo.c - arm_doirq.c - arm_hardfault.c - arm_initialstate.c - arm_itm.c - arm_memfault.c - arm_perf.c - arm_schedulesigaction.c - arm_sigdeliver.c - arm_svcall.c - arm_systemreset.c - arm_tcbinfo.c - arm_trigger_irq.c - arm_usagefault.c - arm_vectors.c - arm_dbgmonitor.c) - -if(CONFIG_ARMV7M_SYSTICK) - list(APPEND SRCS arm_systick.c) +if(CONFIG_SMP) + list(APPEND SRCS rp23xx_cpustart.c rp23xx_smpcall.c rp23xx_cpuidlestack.c + rp23xx_testset.c) endif() -if(CONFIG_ARMV7M_ITMSYSLOG) - list(APPEND SRCS arm_itm_syslog.c) +if(CONFIG_ARCH_HAVE_MULTICPU) + list(APPEND SRCS rp23xx_cpuindex.c) endif() -if(CONFIG_ARMV7M_STACKCHECK) - list(APPEND SRCS arm_stackcheck.c) +if(CONFIG_RP23XX_DMAC) + list(APPEND SRCS rp23xx_dmac.c) endif() -if(CONFIG_ARCH_FPU) - list(APPEND SRCS arm_fpuconfig.c arm_fpucmp.c) +if(CONFIG_RP23XX_SPI) + list(APPEND SRCS rp23xx_spi.c) endif() -if(CONFIG_ARCH_RAMVECTORS) - list(APPEND SRCS arm_ramvec_initialize.c arm_ramvec_attach.c) +if(CONFIG_RP23XX_PWM) + list(APPEND SRCS rp23xx_pwm.c) endif() -if(CONFIG_ARM_MPU OR CONFIG_ARM_MPU_EARLY_RESET) - list(APPEND SRCS arm_mpu.c) +if(CONFIG_RP23XX_I2C) + list(APPEND SRCS rp23xx_i2c.c) endif() -if(CONFIG_ARM_COREDUMP_REGION) - list(APPEND SRCS arm_dumpnvic.c) +if(CONFIG_RP23XX_I2C_SLAVE) + list(APPEND SRCS rp23xx_i2c_slave.c) +endif() + +if(CONFIG_RP23XX_I2S) + list(APPEND SRCS rp23xx_i2s.c) + list(APPEND SRCS rp23xx_i2s_pio.c) +endif() + +if(CONFIG_USBDEV) + list(APPEND SRCS rp23xx_usbdev.c) +endif() + +if(CONFIG_WS2812) + list(APPEND SRCS rp23xx_ws2812.c) +endif() + +if(CONFIG_ADC) + list(APPEND SRCS rp23xx_adc.c) +endif() + +if(CONFIG_WATCHDOG) + list(APPEND SRCS rp23xx_wdt.c) endif() target_sources(arch PRIVATE ${SRCS}) diff --git a/arch/arm/src/rp23xx/Kconfig b/soc/arm/rp23xx/Kconfig similarity index 100% rename from arch/arm/src/rp23xx/Kconfig rename to soc/arm/rp23xx/Kconfig diff --git a/arch/arm/src/rp23xx/Make.defs b/soc/arm/rp23xx/Make.defs similarity index 100% rename from arch/arm/src/rp23xx/Make.defs rename to soc/arm/rp23xx/Make.defs diff --git a/arch/arm/src/rp23xx/chip.h b/soc/arm/rp23xx/chip.h similarity index 100% rename from arch/arm/src/rp23xx/chip.h rename to soc/arm/rp23xx/chip.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_accessctrl.h b/soc/arm/rp23xx/hardware/rp23xx_accessctrl.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_accessctrl.h rename to soc/arm/rp23xx/hardware/rp23xx_accessctrl.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_adc.h b/soc/arm/rp23xx/hardware/rp23xx_adc.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_adc.h rename to soc/arm/rp23xx/hardware/rp23xx_adc.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_bootram.h b/soc/arm/rp23xx/hardware/rp23xx_bootram.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_bootram.h rename to soc/arm/rp23xx/hardware/rp23xx_bootram.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_busctrl.h b/soc/arm/rp23xx/hardware/rp23xx_busctrl.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_busctrl.h rename to soc/arm/rp23xx/hardware/rp23xx_busctrl.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_clocks.h b/soc/arm/rp23xx/hardware/rp23xx_clocks.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_clocks.h rename to soc/arm/rp23xx/hardware/rp23xx_clocks.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_coresight_trace.h b/soc/arm/rp23xx/hardware/rp23xx_coresight_trace.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_coresight_trace.h rename to soc/arm/rp23xx/hardware/rp23xx_coresight_trace.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_dma.h b/soc/arm/rp23xx/hardware/rp23xx_dma.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_dma.h rename to soc/arm/rp23xx/hardware/rp23xx_dma.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_dreq.h b/soc/arm/rp23xx/hardware/rp23xx_dreq.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_dreq.h rename to soc/arm/rp23xx/hardware/rp23xx_dreq.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_glitch_detector.h b/soc/arm/rp23xx/hardware/rp23xx_glitch_detector.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_glitch_detector.h rename to soc/arm/rp23xx/hardware/rp23xx_glitch_detector.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_hstx_ctrl.h b/soc/arm/rp23xx/hardware/rp23xx_hstx_ctrl.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_hstx_ctrl.h rename to soc/arm/rp23xx/hardware/rp23xx_hstx_ctrl.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_hstx_fifo.h b/soc/arm/rp23xx/hardware/rp23xx_hstx_fifo.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_hstx_fifo.h rename to soc/arm/rp23xx/hardware/rp23xx_hstx_fifo.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_i2c.h b/soc/arm/rp23xx/hardware/rp23xx_i2c.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_i2c.h rename to soc/arm/rp23xx/hardware/rp23xx_i2c.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_intctrl.h b/soc/arm/rp23xx/hardware/rp23xx_intctrl.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_intctrl.h rename to soc/arm/rp23xx/hardware/rp23xx_intctrl.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_io_bank0.h b/soc/arm/rp23xx/hardware/rp23xx_io_bank0.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_io_bank0.h rename to soc/arm/rp23xx/hardware/rp23xx_io_bank0.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_io_qspi.h b/soc/arm/rp23xx/hardware/rp23xx_io_qspi.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_io_qspi.h rename to soc/arm/rp23xx/hardware/rp23xx_io_qspi.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_m33.h b/soc/arm/rp23xx/hardware/rp23xx_m33.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_m33.h rename to soc/arm/rp23xx/hardware/rp23xx_m33.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_m33_eppb.h b/soc/arm/rp23xx/hardware/rp23xx_m33_eppb.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_m33_eppb.h rename to soc/arm/rp23xx/hardware/rp23xx_m33_eppb.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_memorymap.h b/soc/arm/rp23xx/hardware/rp23xx_memorymap.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_memorymap.h rename to soc/arm/rp23xx/hardware/rp23xx_memorymap.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_otp.h b/soc/arm/rp23xx/hardware/rp23xx_otp.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_otp.h rename to soc/arm/rp23xx/hardware/rp23xx_otp.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_otp_data.h b/soc/arm/rp23xx/hardware/rp23xx_otp_data.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_otp_data.h rename to soc/arm/rp23xx/hardware/rp23xx_otp_data.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_pads_bank0.h b/soc/arm/rp23xx/hardware/rp23xx_pads_bank0.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_pads_bank0.h rename to soc/arm/rp23xx/hardware/rp23xx_pads_bank0.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_pads_qspi.h b/soc/arm/rp23xx/hardware/rp23xx_pads_qspi.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_pads_qspi.h rename to soc/arm/rp23xx/hardware/rp23xx_pads_qspi.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_pio.h b/soc/arm/rp23xx/hardware/rp23xx_pio.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_pio.h rename to soc/arm/rp23xx/hardware/rp23xx_pio.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_pll.h b/soc/arm/rp23xx/hardware/rp23xx_pll.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_pll.h rename to soc/arm/rp23xx/hardware/rp23xx_pll.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_powman.h b/soc/arm/rp23xx/hardware/rp23xx_powman.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_powman.h rename to soc/arm/rp23xx/hardware/rp23xx_powman.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_psm.h b/soc/arm/rp23xx/hardware/rp23xx_psm.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_psm.h rename to soc/arm/rp23xx/hardware/rp23xx_psm.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_pwm.h b/soc/arm/rp23xx/hardware/rp23xx_pwm.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_pwm.h rename to soc/arm/rp23xx/hardware/rp23xx_pwm.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_qmi.h b/soc/arm/rp23xx/hardware/rp23xx_qmi.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_qmi.h rename to soc/arm/rp23xx/hardware/rp23xx_qmi.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_resets.h b/soc/arm/rp23xx/hardware/rp23xx_resets.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_resets.h rename to soc/arm/rp23xx/hardware/rp23xx_resets.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_rosc.h b/soc/arm/rp23xx/hardware/rp23xx_rosc.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_rosc.h rename to soc/arm/rp23xx/hardware/rp23xx_rosc.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_rp_ap.h b/soc/arm/rp23xx/hardware/rp23xx_rp_ap.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_rp_ap.h rename to soc/arm/rp23xx/hardware/rp23xx_rp_ap.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_sha256.h b/soc/arm/rp23xx/hardware/rp23xx_sha256.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_sha256.h rename to soc/arm/rp23xx/hardware/rp23xx_sha256.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_sio.h b/soc/arm/rp23xx/hardware/rp23xx_sio.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_sio.h rename to soc/arm/rp23xx/hardware/rp23xx_sio.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_spi.h b/soc/arm/rp23xx/hardware/rp23xx_spi.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_spi.h rename to soc/arm/rp23xx/hardware/rp23xx_spi.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_tbman.h b/soc/arm/rp23xx/hardware/rp23xx_tbman.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_tbman.h rename to soc/arm/rp23xx/hardware/rp23xx_tbman.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_ticks.h b/soc/arm/rp23xx/hardware/rp23xx_ticks.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_ticks.h rename to soc/arm/rp23xx/hardware/rp23xx_ticks.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_timer.h b/soc/arm/rp23xx/hardware/rp23xx_timer.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_timer.h rename to soc/arm/rp23xx/hardware/rp23xx_timer.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_trng.h b/soc/arm/rp23xx/hardware/rp23xx_trng.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_trng.h rename to soc/arm/rp23xx/hardware/rp23xx_trng.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_uart.h b/soc/arm/rp23xx/hardware/rp23xx_uart.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_uart.h rename to soc/arm/rp23xx/hardware/rp23xx_uart.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_usbctrl_dpsram.h b/soc/arm/rp23xx/hardware/rp23xx_usbctrl_dpsram.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_usbctrl_dpsram.h rename to soc/arm/rp23xx/hardware/rp23xx_usbctrl_dpsram.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_usbctrl_regs.h b/soc/arm/rp23xx/hardware/rp23xx_usbctrl_regs.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_usbctrl_regs.h rename to soc/arm/rp23xx/hardware/rp23xx_usbctrl_regs.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_watchdog.h b/soc/arm/rp23xx/hardware/rp23xx_watchdog.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_watchdog.h rename to soc/arm/rp23xx/hardware/rp23xx_watchdog.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_xip.h b/soc/arm/rp23xx/hardware/rp23xx_xip.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_xip.h rename to soc/arm/rp23xx/hardware/rp23xx_xip.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_xip_aux.h b/soc/arm/rp23xx/hardware/rp23xx_xip_aux.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_xip_aux.h rename to soc/arm/rp23xx/hardware/rp23xx_xip_aux.h diff --git a/arch/arm/src/rp23xx/hardware/rp23xx_xosc.h b/soc/arm/rp23xx/hardware/rp23xx_xosc.h similarity index 100% rename from arch/arm/src/rp23xx/hardware/rp23xx_xosc.h rename to soc/arm/rp23xx/hardware/rp23xx_xosc.h diff --git a/arch/arm/src/rp23xx/rp23xx_adc.c b/soc/arm/rp23xx/rp23xx_adc.c similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_adc.c rename to soc/arm/rp23xx/rp23xx_adc.c diff --git a/arch/arm/src/rp23xx/rp23xx_adc.h b/soc/arm/rp23xx/rp23xx_adc.h similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_adc.h rename to soc/arm/rp23xx/rp23xx_adc.h diff --git a/arch/arm/src/rp23xx/rp23xx_clock.c b/soc/arm/rp23xx/rp23xx_clock.c similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_clock.c rename to soc/arm/rp23xx/rp23xx_clock.c diff --git a/arch/arm/src/rp23xx/rp23xx_clock.h b/soc/arm/rp23xx/rp23xx_clock.h similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_clock.h rename to soc/arm/rp23xx/rp23xx_clock.h diff --git a/arch/arm/src/rp23xx/rp23xx_config.h b/soc/arm/rp23xx/rp23xx_config.h similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_config.h rename to soc/arm/rp23xx/rp23xx_config.h diff --git a/arch/arm/src/rp23xx/rp23xx_cpuidlestack.c b/soc/arm/rp23xx/rp23xx_cpuidlestack.c similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_cpuidlestack.c rename to soc/arm/rp23xx/rp23xx_cpuidlestack.c diff --git a/arch/arm/src/rp23xx/rp23xx_cpuindex.c b/soc/arm/rp23xx/rp23xx_cpuindex.c similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_cpuindex.c rename to soc/arm/rp23xx/rp23xx_cpuindex.c diff --git a/arch/arm/src/rp23xx/rp23xx_cpustart.c b/soc/arm/rp23xx/rp23xx_cpustart.c similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_cpustart.c rename to soc/arm/rp23xx/rp23xx_cpustart.c diff --git a/arch/arm/src/rp23xx/rp23xx_dmac.c b/soc/arm/rp23xx/rp23xx_dmac.c similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_dmac.c rename to soc/arm/rp23xx/rp23xx_dmac.c diff --git a/arch/arm/src/rp23xx/rp23xx_dmac.h b/soc/arm/rp23xx/rp23xx_dmac.h similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_dmac.h rename to soc/arm/rp23xx/rp23xx_dmac.h diff --git a/arch/arm/src/rp23xx/rp23xx_gpio.c b/soc/arm/rp23xx/rp23xx_gpio.c similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_gpio.c rename to soc/arm/rp23xx/rp23xx_gpio.c diff --git a/arch/arm/src/rp23xx/rp23xx_gpio.h b/soc/arm/rp23xx/rp23xx_gpio.h similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_gpio.h rename to soc/arm/rp23xx/rp23xx_gpio.h diff --git a/arch/arm/src/rp23xx/rp23xx_heaps.c b/soc/arm/rp23xx/rp23xx_heaps.c similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_heaps.c rename to soc/arm/rp23xx/rp23xx_heaps.c diff --git a/arch/arm/src/rp23xx/rp23xx_i2c.c b/soc/arm/rp23xx/rp23xx_i2c.c similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_i2c.c rename to soc/arm/rp23xx/rp23xx_i2c.c diff --git a/arch/arm/src/rp23xx/rp23xx_i2c.h b/soc/arm/rp23xx/rp23xx_i2c.h similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_i2c.h rename to soc/arm/rp23xx/rp23xx_i2c.h diff --git a/arch/arm/src/rp23xx/rp23xx_i2c_slave.c b/soc/arm/rp23xx/rp23xx_i2c_slave.c similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_i2c_slave.c rename to soc/arm/rp23xx/rp23xx_i2c_slave.c diff --git a/arch/arm/src/rp23xx/rp23xx_i2s.c b/soc/arm/rp23xx/rp23xx_i2s.c similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_i2s.c rename to soc/arm/rp23xx/rp23xx_i2s.c diff --git a/arch/arm/src/rp23xx/rp23xx_i2s.h b/soc/arm/rp23xx/rp23xx_i2s.h similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_i2s.h rename to soc/arm/rp23xx/rp23xx_i2s.h diff --git a/arch/arm/src/rp23xx/rp23xx_i2s_pio.c b/soc/arm/rp23xx/rp23xx_i2s_pio.c similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_i2s_pio.c rename to soc/arm/rp23xx/rp23xx_i2s_pio.c diff --git a/arch/arm/src/rp23xx/rp23xx_i2s_pio.h b/soc/arm/rp23xx/rp23xx_i2s_pio.h similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_i2s_pio.h rename to soc/arm/rp23xx/rp23xx_i2s_pio.h diff --git a/arch/arm/src/rp23xx/rp23xx_idle.c b/soc/arm/rp23xx/rp23xx_idle.c similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_idle.c rename to soc/arm/rp23xx/rp23xx_idle.c diff --git a/arch/arm/src/rp23xx/rp23xx_irq.c b/soc/arm/rp23xx/rp23xx_irq.c similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_irq.c rename to soc/arm/rp23xx/rp23xx_irq.c diff --git a/arch/arm/src/rp23xx/rp23xx_pio.c b/soc/arm/rp23xx/rp23xx_pio.c similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_pio.c rename to soc/arm/rp23xx/rp23xx_pio.c diff --git a/arch/arm/src/rp23xx/rp23xx_pio.h b/soc/arm/rp23xx/rp23xx_pio.h similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_pio.h rename to soc/arm/rp23xx/rp23xx_pio.h diff --git a/arch/arm/src/rp23xx/rp23xx_pio_instructions.h b/soc/arm/rp23xx/rp23xx_pio_instructions.h similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_pio_instructions.h rename to soc/arm/rp23xx/rp23xx_pio_instructions.h diff --git a/arch/arm/src/rp23xx/rp23xx_pll.c b/soc/arm/rp23xx/rp23xx_pll.c similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_pll.c rename to soc/arm/rp23xx/rp23xx_pll.c diff --git a/arch/arm/src/rp23xx/rp23xx_pll.h b/soc/arm/rp23xx/rp23xx_pll.h similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_pll.h rename to soc/arm/rp23xx/rp23xx_pll.h diff --git a/arch/arm/src/rp23xx/rp23xx_pwm.c b/soc/arm/rp23xx/rp23xx_pwm.c similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_pwm.c rename to soc/arm/rp23xx/rp23xx_pwm.c diff --git a/arch/arm/src/rp23xx/rp23xx_pwm.h b/soc/arm/rp23xx/rp23xx_pwm.h similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_pwm.h rename to soc/arm/rp23xx/rp23xx_pwm.h diff --git a/arch/arm/src/rp23xx/rp23xx_rom.h b/soc/arm/rp23xx/rp23xx_rom.h similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_rom.h rename to soc/arm/rp23xx/rp23xx_rom.h diff --git a/arch/arm/src/rp23xx/rp23xx_serial.c b/soc/arm/rp23xx/rp23xx_serial.c similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_serial.c rename to soc/arm/rp23xx/rp23xx_serial.c diff --git a/arch/arm/src/rp23xx/rp23xx_serial.h b/soc/arm/rp23xx/rp23xx_serial.h similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_serial.h rename to soc/arm/rp23xx/rp23xx_serial.h diff --git a/arch/arm/src/rp23xx/rp23xx_smpcall.c b/soc/arm/rp23xx/rp23xx_smpcall.c similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_smpcall.c rename to soc/arm/rp23xx/rp23xx_smpcall.c diff --git a/arch/arm/src/rp23xx/rp23xx_spi.c b/soc/arm/rp23xx/rp23xx_spi.c similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_spi.c rename to soc/arm/rp23xx/rp23xx_spi.c diff --git a/arch/arm/src/rp23xx/rp23xx_spi.h b/soc/arm/rp23xx/rp23xx_spi.h similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_spi.h rename to soc/arm/rp23xx/rp23xx_spi.h diff --git a/arch/arm/src/rp23xx/rp23xx_start.c b/soc/arm/rp23xx/rp23xx_start.c similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_start.c rename to soc/arm/rp23xx/rp23xx_start.c diff --git a/arch/arm/src/rp23xx/rp23xx_testset.c b/soc/arm/rp23xx/rp23xx_testset.c similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_testset.c rename to soc/arm/rp23xx/rp23xx_testset.c diff --git a/arch/arm/src/rp23xx/rp23xx_timerisr.c b/soc/arm/rp23xx/rp23xx_timerisr.c similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_timerisr.c rename to soc/arm/rp23xx/rp23xx_timerisr.c diff --git a/arch/arm/src/rp23xx/rp23xx_uart.c b/soc/arm/rp23xx/rp23xx_uart.c similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_uart.c rename to soc/arm/rp23xx/rp23xx_uart.c diff --git a/arch/arm/src/rp23xx/rp23xx_uart.h b/soc/arm/rp23xx/rp23xx_uart.h similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_uart.h rename to soc/arm/rp23xx/rp23xx_uart.h diff --git a/arch/arm/src/rp23xx/rp23xx_usbdev.c b/soc/arm/rp23xx/rp23xx_usbdev.c similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_usbdev.c rename to soc/arm/rp23xx/rp23xx_usbdev.c diff --git a/arch/arm/src/rp23xx/rp23xx_usbdev.h b/soc/arm/rp23xx/rp23xx_usbdev.h similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_usbdev.h rename to soc/arm/rp23xx/rp23xx_usbdev.h diff --git a/arch/arm/src/rp23xx/rp23xx_wdt.c b/soc/arm/rp23xx/rp23xx_wdt.c similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_wdt.c rename to soc/arm/rp23xx/rp23xx_wdt.c diff --git a/arch/arm/src/rp23xx/rp23xx_wdt.h b/soc/arm/rp23xx/rp23xx_wdt.h similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_wdt.h rename to soc/arm/rp23xx/rp23xx_wdt.h diff --git a/arch/arm/src/rp23xx/rp23xx_ws2812.c b/soc/arm/rp23xx/rp23xx_ws2812.c similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_ws2812.c rename to soc/arm/rp23xx/rp23xx_ws2812.c diff --git a/arch/arm/src/rp23xx/rp23xx_ws2812.h b/soc/arm/rp23xx/rp23xx_ws2812.h similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_ws2812.h rename to soc/arm/rp23xx/rp23xx_ws2812.h diff --git a/arch/arm/src/rp23xx/rp23xx_ws2812.pio b/soc/arm/rp23xx/rp23xx_ws2812.pio similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_ws2812.pio rename to soc/arm/rp23xx/rp23xx_ws2812.pio diff --git a/arch/arm/src/rp23xx/rp23xx_xosc.c b/soc/arm/rp23xx/rp23xx_xosc.c similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_xosc.c rename to soc/arm/rp23xx/rp23xx_xosc.c diff --git a/arch/arm/src/rp23xx/rp23xx_xosc.h b/soc/arm/rp23xx/rp23xx_xosc.h similarity index 100% rename from arch/arm/src/rp23xx/rp23xx_xosc.h rename to soc/arm/rp23xx/rp23xx_xosc.h diff --git a/arch/arm/src/rtl8720c/Kconfig b/soc/arm/rtl8720c/Kconfig similarity index 100% rename from arch/arm/src/rtl8720c/Kconfig rename to soc/arm/rtl8720c/Kconfig diff --git a/arch/arm/src/rtl8720c/Make.defs b/soc/arm/rtl8720c/Make.defs similarity index 100% rename from arch/arm/src/rtl8720c/Make.defs rename to soc/arm/rtl8720c/Make.defs diff --git a/arch/arm/src/rtl8720c/amebaZ.c b/soc/arm/rtl8720c/amebaZ.c similarity index 100% rename from arch/arm/src/rtl8720c/amebaZ.c rename to soc/arm/rtl8720c/amebaZ.c diff --git a/arch/arm/src/rtl8720c/ameba_efuse.c b/soc/arm/rtl8720c/ameba_efuse.c similarity index 100% rename from arch/arm/src/rtl8720c/ameba_efuse.c rename to soc/arm/rtl8720c/ameba_efuse.c diff --git a/arch/arm/src/rtl8720c/ameba_efuse.h b/soc/arm/rtl8720c/ameba_efuse.h similarity index 100% rename from arch/arm/src/rtl8720c/ameba_efuse.h rename to soc/arm/rtl8720c/ameba_efuse.h diff --git a/arch/arm/src/rtl8720c/ameba_flash.c b/soc/arm/rtl8720c/ameba_flash.c similarity index 100% rename from arch/arm/src/rtl8720c/ameba_flash.c rename to soc/arm/rtl8720c/ameba_flash.c diff --git a/arch/arm/src/rtl8720c/ameba_flash.h b/soc/arm/rtl8720c/ameba_flash.h similarity index 100% rename from arch/arm/src/rtl8720c/ameba_flash.h rename to soc/arm/rtl8720c/ameba_flash.h diff --git a/arch/arm/src/rtl8720c/ameba_hci.c b/soc/arm/rtl8720c/ameba_hci.c similarity index 100% rename from arch/arm/src/rtl8720c/ameba_hci.c rename to soc/arm/rtl8720c/ameba_hci.c diff --git a/arch/arm/src/rtl8720c/ameba_heap.c b/soc/arm/rtl8720c/ameba_heap.c similarity index 100% rename from arch/arm/src/rtl8720c/ameba_heap.c rename to soc/arm/rtl8720c/ameba_heap.c diff --git a/arch/arm/src/rtl8720c/ameba_idle.c b/soc/arm/rtl8720c/ameba_idle.c similarity index 100% rename from arch/arm/src/rtl8720c/ameba_idle.c rename to soc/arm/rtl8720c/ameba_idle.c diff --git a/arch/arm/src/rtl8720c/ameba_lto.S b/soc/arm/rtl8720c/ameba_lto.S similarity index 100% rename from arch/arm/src/rtl8720c/ameba_lto.S rename to soc/arm/rtl8720c/ameba_lto.S diff --git a/arch/arm/src/rtl8720c/ameba_nvic.c b/soc/arm/rtl8720c/ameba_nvic.c similarity index 100% rename from arch/arm/src/rtl8720c/ameba_nvic.c rename to soc/arm/rtl8720c/ameba_nvic.c diff --git a/arch/arm/src/rtl8720c/ameba_start.c b/soc/arm/rtl8720c/ameba_start.c similarity index 100% rename from arch/arm/src/rtl8720c/ameba_start.c rename to soc/arm/rtl8720c/ameba_start.c diff --git a/arch/arm/src/rtl8720c/ameba_uart.c b/soc/arm/rtl8720c/ameba_uart.c similarity index 100% rename from arch/arm/src/rtl8720c/ameba_uart.c rename to soc/arm/rtl8720c/ameba_uart.c diff --git a/arch/arm/src/rtl8720c/ameba_uart.h b/soc/arm/rtl8720c/ameba_uart.h similarity index 100% rename from arch/arm/src/rtl8720c/ameba_uart.h rename to soc/arm/rtl8720c/ameba_uart.h diff --git a/arch/arm/src/rtl8720c/ameba_vectors.c b/soc/arm/rtl8720c/ameba_vectors.c similarity index 100% rename from arch/arm/src/rtl8720c/ameba_vectors.c rename to soc/arm/rtl8720c/ameba_vectors.c diff --git a/arch/arm/src/rtl8720c/ameba_wdt.c b/soc/arm/rtl8720c/ameba_wdt.c similarity index 100% rename from arch/arm/src/rtl8720c/ameba_wdt.c rename to soc/arm/rtl8720c/ameba_wdt.c diff --git a/arch/arm/src/rtl8720c/amebaz_coex.c b/soc/arm/rtl8720c/amebaz_coex.c similarity index 100% rename from arch/arm/src/rtl8720c/amebaz_coex.c rename to soc/arm/rtl8720c/amebaz_coex.c diff --git a/arch/arm/src/rtl8720c/amebaz_coex.h b/soc/arm/rtl8720c/amebaz_coex.h similarity index 100% rename from arch/arm/src/rtl8720c/amebaz_coex.h rename to soc/arm/rtl8720c/amebaz_coex.h diff --git a/arch/arm/src/rtl8720c/amebaz_depend.c b/soc/arm/rtl8720c/amebaz_depend.c similarity index 100% rename from arch/arm/src/rtl8720c/amebaz_depend.c rename to soc/arm/rtl8720c/amebaz_depend.c diff --git a/arch/arm/src/rtl8720c/amebaz_depend.h b/soc/arm/rtl8720c/amebaz_depend.h similarity index 100% rename from arch/arm/src/rtl8720c/amebaz_depend.h rename to soc/arm/rtl8720c/amebaz_depend.h diff --git a/arch/arm/src/rtl8720c/amebaz_driver.c b/soc/arm/rtl8720c/amebaz_driver.c similarity index 100% rename from arch/arm/src/rtl8720c/amebaz_driver.c rename to soc/arm/rtl8720c/amebaz_driver.c diff --git a/arch/arm/src/rtl8720c/amebaz_driver.h b/soc/arm/rtl8720c/amebaz_driver.h similarity index 100% rename from arch/arm/src/rtl8720c/amebaz_driver.h rename to soc/arm/rtl8720c/amebaz_driver.h diff --git a/arch/arm/src/rtl8720c/amebaz_firmware.c b/soc/arm/rtl8720c/amebaz_firmware.c similarity index 100% rename from arch/arm/src/rtl8720c/amebaz_firmware.c rename to soc/arm/rtl8720c/amebaz_firmware.c diff --git a/arch/arm/src/rtl8720c/amebaz_hci_board.c b/soc/arm/rtl8720c/amebaz_hci_board.c similarity index 100% rename from arch/arm/src/rtl8720c/amebaz_hci_board.c rename to soc/arm/rtl8720c/amebaz_hci_board.c diff --git a/arch/arm/src/rtl8720c/amebaz_hci_board.h b/soc/arm/rtl8720c/amebaz_hci_board.h similarity index 100% rename from arch/arm/src/rtl8720c/amebaz_hci_board.h rename to soc/arm/rtl8720c/amebaz_hci_board.h diff --git a/arch/arm/src/rtl8720c/amebaz_netdev.c b/soc/arm/rtl8720c/amebaz_netdev.c similarity index 100% rename from arch/arm/src/rtl8720c/amebaz_netdev.c rename to soc/arm/rtl8720c/amebaz_netdev.c diff --git a/arch/arm/src/rtl8720c/amebaz_netdev.h b/soc/arm/rtl8720c/amebaz_netdev.h similarity index 100% rename from arch/arm/src/rtl8720c/amebaz_netdev.h rename to soc/arm/rtl8720c/amebaz_netdev.h diff --git a/arch/arm/src/rtl8720c/amebaz_wlan.c b/soc/arm/rtl8720c/amebaz_wlan.c similarity index 100% rename from arch/arm/src/rtl8720c/amebaz_wlan.c rename to soc/arm/rtl8720c/amebaz_wlan.c diff --git a/arch/arm/src/rtl8720c/amebaz_wlan.h b/soc/arm/rtl8720c/amebaz_wlan.h similarity index 100% rename from arch/arm/src/rtl8720c/amebaz_wlan.h rename to soc/arm/rtl8720c/amebaz_wlan.h diff --git a/arch/arm/src/rtl8720c/chip.h b/soc/arm/rtl8720c/chip.h similarity index 100% rename from arch/arm/src/rtl8720c/chip.h rename to soc/arm/rtl8720c/chip.h diff --git a/arch/arm/src/rtl8720c/include/chip.h b/soc/arm/rtl8720c/include/chip.h similarity index 100% rename from arch/arm/src/rtl8720c/include/chip.h rename to soc/arm/rtl8720c/include/chip.h diff --git a/arch/arm/src/rtl8720c/include/irq.h b/soc/arm/rtl8720c/include/irq.h similarity index 100% rename from arch/arm/src/rtl8720c/include/irq.h rename to soc/arm/rtl8720c/include/irq.h diff --git a/arch/arm/src/s32k1xx/Kconfig b/soc/arm/s32k1xx/Kconfig similarity index 100% rename from arch/arm/src/s32k1xx/Kconfig rename to soc/arm/s32k1xx/Kconfig diff --git a/arch/arm/src/s32k1xx/Make.defs b/soc/arm/s32k1xx/Make.defs similarity index 100% rename from arch/arm/src/s32k1xx/Make.defs rename to soc/arm/s32k1xx/Make.defs diff --git a/arch/arm/src/s32k1xx/chip.h b/soc/arm/s32k1xx/chip.h similarity index 100% rename from arch/arm/src/s32k1xx/chip.h rename to soc/arm/s32k1xx/chip.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k116_pinmux.h b/soc/arm/s32k1xx/hardware/s32k116_pinmux.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k116_pinmux.h rename to soc/arm/s32k1xx/hardware/s32k116_pinmux.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k118_pinmux.h b/soc/arm/s32k1xx/hardware/s32k118_pinmux.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k118_pinmux.h rename to soc/arm/s32k1xx/hardware/s32k118_pinmux.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k11x_dmamux.h b/soc/arm/s32k1xx/hardware/s32k11x_dmamux.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k11x_dmamux.h rename to soc/arm/s32k1xx/hardware/s32k11x_dmamux.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k142_pinmux.h b/soc/arm/s32k1xx/hardware/s32k142_pinmux.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k142_pinmux.h rename to soc/arm/s32k1xx/hardware/s32k142_pinmux.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k144_pinmux.h b/soc/arm/s32k1xx/hardware/s32k144_pinmux.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k144_pinmux.h rename to soc/arm/s32k1xx/hardware/s32k144_pinmux.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k146_pinmux.h b/soc/arm/s32k1xx/hardware/s32k146_pinmux.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k146_pinmux.h rename to soc/arm/s32k1xx/hardware/s32k146_pinmux.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k148_pinmux.h b/soc/arm/s32k1xx/hardware/s32k148_pinmux.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k148_pinmux.h rename to soc/arm/s32k1xx/hardware/s32k148_pinmux.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k14x_dmamux.h b/soc/arm/s32k1xx/hardware/s32k14x_dmamux.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k14x_dmamux.h rename to soc/arm/s32k1xx/hardware/s32k14x_dmamux.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k1xx_cmu.h b/soc/arm/s32k1xx/hardware/s32k1xx_cmu.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k1xx_cmu.h rename to soc/arm/s32k1xx/hardware/s32k1xx_cmu.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k1xx_crc.h b/soc/arm/s32k1xx/hardware/s32k1xx_crc.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k1xx_crc.h rename to soc/arm/s32k1xx/hardware/s32k1xx_crc.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k1xx_dmamux.h b/soc/arm/s32k1xx/hardware/s32k1xx_dmamux.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k1xx_dmamux.h rename to soc/arm/s32k1xx/hardware/s32k1xx_dmamux.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k1xx_edma.h b/soc/arm/s32k1xx/hardware/s32k1xx_edma.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k1xx_edma.h rename to soc/arm/s32k1xx/hardware/s32k1xx_edma.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k1xx_enet.h b/soc/arm/s32k1xx/hardware/s32k1xx_enet.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k1xx_enet.h rename to soc/arm/s32k1xx/hardware/s32k1xx_enet.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k1xx_ewm.h b/soc/arm/s32k1xx/hardware/s32k1xx_ewm.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k1xx_ewm.h rename to soc/arm/s32k1xx/hardware/s32k1xx_ewm.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k1xx_flashcfg.h b/soc/arm/s32k1xx/hardware/s32k1xx_flashcfg.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k1xx_flashcfg.h rename to soc/arm/s32k1xx/hardware/s32k1xx_flashcfg.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k1xx_flexcan.h b/soc/arm/s32k1xx/hardware/s32k1xx_flexcan.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k1xx_flexcan.h rename to soc/arm/s32k1xx/hardware/s32k1xx_flexcan.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k1xx_flexio.h b/soc/arm/s32k1xx/hardware/s32k1xx_flexio.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k1xx_flexio.h rename to soc/arm/s32k1xx/hardware/s32k1xx_flexio.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k1xx_ftfc.h b/soc/arm/s32k1xx/hardware/s32k1xx_ftfc.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k1xx_ftfc.h rename to soc/arm/s32k1xx/hardware/s32k1xx_ftfc.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k1xx_ftm.h b/soc/arm/s32k1xx/hardware/s32k1xx_ftm.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k1xx_ftm.h rename to soc/arm/s32k1xx/hardware/s32k1xx_ftm.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k1xx_gpio.h b/soc/arm/s32k1xx/hardware/s32k1xx_gpio.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k1xx_gpio.h rename to soc/arm/s32k1xx/hardware/s32k1xx_gpio.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k1xx_lmem.h b/soc/arm/s32k1xx/hardware/s32k1xx_lmem.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k1xx_lmem.h rename to soc/arm/s32k1xx/hardware/s32k1xx_lmem.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k1xx_lpi2c.h b/soc/arm/s32k1xx/hardware/s32k1xx_lpi2c.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k1xx_lpi2c.h rename to soc/arm/s32k1xx/hardware/s32k1xx_lpi2c.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k1xx_lpspi.h b/soc/arm/s32k1xx/hardware/s32k1xx_lpspi.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k1xx_lpspi.h rename to soc/arm/s32k1xx/hardware/s32k1xx_lpspi.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k1xx_lpuart.h b/soc/arm/s32k1xx/hardware/s32k1xx_lpuart.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k1xx_lpuart.h rename to soc/arm/s32k1xx/hardware/s32k1xx_lpuart.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k1xx_mcm.h b/soc/arm/s32k1xx/hardware/s32k1xx_mcm.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k1xx_mcm.h rename to soc/arm/s32k1xx/hardware/s32k1xx_mcm.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k1xx_memorymap.h b/soc/arm/s32k1xx/hardware/s32k1xx_memorymap.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k1xx_memorymap.h rename to soc/arm/s32k1xx/hardware/s32k1xx_memorymap.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k1xx_mpu.h b/soc/arm/s32k1xx/hardware/s32k1xx_mpu.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k1xx_mpu.h rename to soc/arm/s32k1xx/hardware/s32k1xx_mpu.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k1xx_pcc.h b/soc/arm/s32k1xx/hardware/s32k1xx_pcc.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k1xx_pcc.h rename to soc/arm/s32k1xx/hardware/s32k1xx_pcc.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k1xx_pinmux.h b/soc/arm/s32k1xx/hardware/s32k1xx_pinmux.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k1xx_pinmux.h rename to soc/arm/s32k1xx/hardware/s32k1xx_pinmux.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k1xx_pmc.h b/soc/arm/s32k1xx/hardware/s32k1xx_pmc.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k1xx_pmc.h rename to soc/arm/s32k1xx/hardware/s32k1xx_pmc.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k1xx_port.h b/soc/arm/s32k1xx/hardware/s32k1xx_port.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k1xx_port.h rename to soc/arm/s32k1xx/hardware/s32k1xx_port.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k1xx_rcm.h b/soc/arm/s32k1xx/hardware/s32k1xx_rcm.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k1xx_rcm.h rename to soc/arm/s32k1xx/hardware/s32k1xx_rcm.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k1xx_rtc.h b/soc/arm/s32k1xx/hardware/s32k1xx_rtc.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k1xx_rtc.h rename to soc/arm/s32k1xx/hardware/s32k1xx_rtc.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k1xx_scg.h b/soc/arm/s32k1xx/hardware/s32k1xx_scg.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k1xx_scg.h rename to soc/arm/s32k1xx/hardware/s32k1xx_scg.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k1xx_sim.h b/soc/arm/s32k1xx/hardware/s32k1xx_sim.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k1xx_sim.h rename to soc/arm/s32k1xx/hardware/s32k1xx_sim.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k1xx_smc.h b/soc/arm/s32k1xx/hardware/s32k1xx_smc.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k1xx_smc.h rename to soc/arm/s32k1xx/hardware/s32k1xx_smc.h diff --git a/arch/arm/src/s32k1xx/hardware/s32k1xx_wdog.h b/soc/arm/s32k1xx/hardware/s32k1xx_wdog.h similarity index 100% rename from arch/arm/src/s32k1xx/hardware/s32k1xx_wdog.h rename to soc/arm/s32k1xx/hardware/s32k1xx_wdog.h diff --git a/arch/arm/src/s32k1xx/s32k11x/Make.defs b/soc/arm/s32k1xx/s32k11x/Make.defs similarity index 100% rename from arch/arm/src/s32k1xx/s32k11x/Make.defs rename to soc/arm/s32k1xx/s32k11x/Make.defs diff --git a/arch/arm/src/s32k1xx/s32k11x/s32k11x_clockmapping.c b/soc/arm/s32k1xx/s32k11x/s32k11x_clockmapping.c similarity index 100% rename from arch/arm/src/s32k1xx/s32k11x/s32k11x_clockmapping.c rename to soc/arm/s32k1xx/s32k11x/s32k11x_clockmapping.c diff --git a/arch/arm/src/s32k1xx/s32k11x/s32k11x_clocknames.h b/soc/arm/s32k1xx/s32k11x/s32k11x_clocknames.h similarity index 100% rename from arch/arm/src/s32k1xx/s32k11x/s32k11x_clocknames.h rename to soc/arm/s32k1xx/s32k11x/s32k11x_clocknames.h diff --git a/arch/arm/src/s32k1xx/s32k11x/s32k11x_irq.c b/soc/arm/s32k1xx/s32k11x/s32k11x_irq.c similarity index 100% rename from arch/arm/src/s32k1xx/s32k11x/s32k11x_irq.c rename to soc/arm/s32k1xx/s32k11x/s32k11x_irq.c diff --git a/arch/arm/src/s32k1xx/s32k11x/s32k11x_irq.h b/soc/arm/s32k1xx/s32k11x/s32k11x_irq.h similarity index 100% rename from arch/arm/src/s32k1xx/s32k11x/s32k11x_irq.h rename to soc/arm/s32k1xx/s32k11x/s32k11x_irq.h diff --git a/arch/arm/src/s32k1xx/s32k11x/s32k11x_periphfeatures.c b/soc/arm/s32k1xx/s32k11x/s32k11x_periphfeatures.c similarity index 100% rename from arch/arm/src/s32k1xx/s32k11x/s32k11x_periphfeatures.c rename to soc/arm/s32k1xx/s32k11x/s32k11x_periphfeatures.c diff --git a/arch/arm/src/s32k1xx/s32k11x/s32k11x_timerisr.c b/soc/arm/s32k1xx/s32k11x/s32k11x_timerisr.c similarity index 100% rename from arch/arm/src/s32k1xx/s32k11x/s32k11x_timerisr.c rename to soc/arm/s32k1xx/s32k11x/s32k11x_timerisr.c diff --git a/arch/arm/src/s32k1xx/s32k14x/Make.defs b/soc/arm/s32k1xx/s32k14x/Make.defs similarity index 100% rename from arch/arm/src/s32k1xx/s32k14x/Make.defs rename to soc/arm/s32k1xx/s32k14x/Make.defs diff --git a/arch/arm/src/s32k1xx/s32k14x/s32k14x_clockmapping.c b/soc/arm/s32k1xx/s32k14x/s32k14x_clockmapping.c similarity index 100% rename from arch/arm/src/s32k1xx/s32k14x/s32k14x_clockmapping.c rename to soc/arm/s32k1xx/s32k14x/s32k14x_clockmapping.c diff --git a/arch/arm/src/s32k1xx/s32k14x/s32k14x_clocknames.h b/soc/arm/s32k1xx/s32k14x/s32k14x_clocknames.h similarity index 100% rename from arch/arm/src/s32k1xx/s32k14x/s32k14x_clocknames.h rename to soc/arm/s32k1xx/s32k14x/s32k14x_clocknames.h diff --git a/arch/arm/src/s32k1xx/s32k14x/s32k14x_clrpend.c b/soc/arm/s32k1xx/s32k14x/s32k14x_clrpend.c similarity index 100% rename from arch/arm/src/s32k1xx/s32k14x/s32k14x_clrpend.c rename to soc/arm/s32k1xx/s32k14x/s32k14x_clrpend.c diff --git a/arch/arm/src/s32k1xx/s32k14x/s32k14x_irq.c b/soc/arm/s32k1xx/s32k14x/s32k14x_irq.c similarity index 100% rename from arch/arm/src/s32k1xx/s32k14x/s32k14x_irq.c rename to soc/arm/s32k1xx/s32k14x/s32k14x_irq.c diff --git a/arch/arm/src/s32k1xx/s32k14x/s32k14x_irq.h b/soc/arm/s32k1xx/s32k14x/s32k14x_irq.h similarity index 100% rename from arch/arm/src/s32k1xx/s32k14x/s32k14x_irq.h rename to soc/arm/s32k1xx/s32k14x/s32k14x_irq.h diff --git a/arch/arm/src/s32k1xx/s32k14x/s32k14x_periphfeatures.c b/soc/arm/s32k1xx/s32k14x/s32k14x_periphfeatures.c similarity index 100% rename from arch/arm/src/s32k1xx/s32k14x/s32k14x_periphfeatures.c rename to soc/arm/s32k1xx/s32k14x/s32k14x_periphfeatures.c diff --git a/arch/arm/src/s32k1xx/s32k14x/s32k14x_timerisr.c b/soc/arm/s32k1xx/s32k14x/s32k14x_timerisr.c similarity index 100% rename from arch/arm/src/s32k1xx/s32k14x/s32k14x_timerisr.c rename to soc/arm/s32k1xx/s32k14x/s32k14x_timerisr.c diff --git a/arch/arm/src/s32k1xx/s32k1xx_clockconfig.c b/soc/arm/s32k1xx/s32k1xx_clockconfig.c similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_clockconfig.c rename to soc/arm/s32k1xx/s32k1xx_clockconfig.c diff --git a/arch/arm/src/s32k1xx/s32k1xx_clockconfig.h b/soc/arm/s32k1xx/s32k1xx_clockconfig.h similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_clockconfig.h rename to soc/arm/s32k1xx/s32k1xx_clockconfig.h diff --git a/arch/arm/src/s32k1xx/s32k1xx_config.h b/soc/arm/s32k1xx/s32k1xx_config.h similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_config.h rename to soc/arm/s32k1xx/s32k1xx_config.h diff --git a/arch/arm/src/s32k1xx/s32k1xx_edma.c b/soc/arm/s32k1xx/s32k1xx_edma.c similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_edma.c rename to soc/arm/s32k1xx/s32k1xx_edma.c diff --git a/arch/arm/src/s32k1xx/s32k1xx_edma.h b/soc/arm/s32k1xx/s32k1xx_edma.h similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_edma.h rename to soc/arm/s32k1xx/s32k1xx_edma.h diff --git a/arch/arm/src/s32k1xx/s32k1xx_eeeprom.c b/soc/arm/s32k1xx/s32k1xx_eeeprom.c similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_eeeprom.c rename to soc/arm/s32k1xx/s32k1xx_eeeprom.c diff --git a/arch/arm/src/s32k1xx/s32k1xx_eeeprom.h b/soc/arm/s32k1xx/s32k1xx_eeeprom.h similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_eeeprom.h rename to soc/arm/s32k1xx/s32k1xx_eeeprom.h diff --git a/arch/arm/src/s32k1xx/s32k1xx_enet.c b/soc/arm/s32k1xx/s32k1xx_enet.c similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_enet.c rename to soc/arm/s32k1xx/s32k1xx_enet.c diff --git a/arch/arm/src/s32k1xx/s32k1xx_enet.h b/soc/arm/s32k1xx/s32k1xx_enet.h similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_enet.h rename to soc/arm/s32k1xx/s32k1xx_enet.h diff --git a/arch/arm/src/s32k1xx/s32k1xx_flashcfg.c b/soc/arm/s32k1xx/s32k1xx_flashcfg.c similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_flashcfg.c rename to soc/arm/s32k1xx/s32k1xx_flashcfg.c diff --git a/arch/arm/src/s32k1xx/s32k1xx_flexcan.c b/soc/arm/s32k1xx/s32k1xx_flexcan.c similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_flexcan.c rename to soc/arm/s32k1xx/s32k1xx_flexcan.c diff --git a/arch/arm/src/s32k1xx/s32k1xx_flexcan.h b/soc/arm/s32k1xx/s32k1xx_flexcan.h similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_flexcan.h rename to soc/arm/s32k1xx/s32k1xx_flexcan.h diff --git a/arch/arm/src/s32k1xx/s32k1xx_flexio_i2c.c b/soc/arm/s32k1xx/s32k1xx_flexio_i2c.c similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_flexio_i2c.c rename to soc/arm/s32k1xx/s32k1xx_flexio_i2c.c diff --git a/arch/arm/src/s32k1xx/s32k1xx_flexio_i2c.h b/soc/arm/s32k1xx/s32k1xx_flexio_i2c.h similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_flexio_i2c.h rename to soc/arm/s32k1xx/s32k1xx_flexio_i2c.h diff --git a/arch/arm/src/s32k1xx/s32k1xx_idle.c b/soc/arm/s32k1xx/s32k1xx_idle.c similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_idle.c rename to soc/arm/s32k1xx/s32k1xx_idle.c diff --git a/arch/arm/src/s32k1xx/s32k1xx_lowputc.c b/soc/arm/s32k1xx/s32k1xx_lowputc.c similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_lowputc.c rename to soc/arm/s32k1xx/s32k1xx_lowputc.c diff --git a/arch/arm/src/s32k1xx/s32k1xx_lowputc.h b/soc/arm/s32k1xx/s32k1xx_lowputc.h similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_lowputc.h rename to soc/arm/s32k1xx/s32k1xx_lowputc.h diff --git a/arch/arm/src/s32k1xx/s32k1xx_lpi2c.c b/soc/arm/s32k1xx/s32k1xx_lpi2c.c similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_lpi2c.c rename to soc/arm/s32k1xx/s32k1xx_lpi2c.c diff --git a/arch/arm/src/s32k1xx/s32k1xx_lpi2c.h b/soc/arm/s32k1xx/s32k1xx_lpi2c.h similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_lpi2c.h rename to soc/arm/s32k1xx/s32k1xx_lpi2c.h diff --git a/arch/arm/src/s32k1xx/s32k1xx_lpi2c_slave.c b/soc/arm/s32k1xx/s32k1xx_lpi2c_slave.c similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_lpi2c_slave.c rename to soc/arm/s32k1xx/s32k1xx_lpi2c_slave.c diff --git a/arch/arm/src/s32k1xx/s32k1xx_lpi2c_slave.h b/soc/arm/s32k1xx/s32k1xx_lpi2c_slave.h similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_lpi2c_slave.h rename to soc/arm/s32k1xx/s32k1xx_lpi2c_slave.h diff --git a/arch/arm/src/s32k1xx/s32k1xx_lpspi.c b/soc/arm/s32k1xx/s32k1xx_lpspi.c similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_lpspi.c rename to soc/arm/s32k1xx/s32k1xx_lpspi.c diff --git a/arch/arm/src/s32k1xx/s32k1xx_lpspi.h b/soc/arm/s32k1xx/s32k1xx_lpspi.h similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_lpspi.h rename to soc/arm/s32k1xx/s32k1xx_lpspi.h diff --git a/arch/arm/src/s32k1xx/s32k1xx_periphclocks.c b/soc/arm/s32k1xx/s32k1xx_periphclocks.c similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_periphclocks.c rename to soc/arm/s32k1xx/s32k1xx_periphclocks.c diff --git a/arch/arm/src/s32k1xx/s32k1xx_periphclocks.h b/soc/arm/s32k1xx/s32k1xx_periphclocks.h similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_periphclocks.h rename to soc/arm/s32k1xx/s32k1xx_periphclocks.h diff --git a/arch/arm/src/s32k1xx/s32k1xx_pin.c b/soc/arm/s32k1xx/s32k1xx_pin.c similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_pin.c rename to soc/arm/s32k1xx/s32k1xx_pin.c diff --git a/arch/arm/src/s32k1xx/s32k1xx_pin.h b/soc/arm/s32k1xx/s32k1xx_pin.h similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_pin.h rename to soc/arm/s32k1xx/s32k1xx_pin.h diff --git a/arch/arm/src/s32k1xx/s32k1xx_pindma.c b/soc/arm/s32k1xx/s32k1xx_pindma.c similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_pindma.c rename to soc/arm/s32k1xx/s32k1xx_pindma.c diff --git a/arch/arm/src/s32k1xx/s32k1xx_pindump.c b/soc/arm/s32k1xx/s32k1xx_pindump.c similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_pindump.c rename to soc/arm/s32k1xx/s32k1xx_pindump.c diff --git a/arch/arm/src/s32k1xx/s32k1xx_pingpio.c b/soc/arm/s32k1xx/s32k1xx_pingpio.c similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_pingpio.c rename to soc/arm/s32k1xx/s32k1xx_pingpio.c diff --git a/arch/arm/src/s32k1xx/s32k1xx_pinirq.c b/soc/arm/s32k1xx/s32k1xx_pinirq.c similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_pinirq.c rename to soc/arm/s32k1xx/s32k1xx_pinirq.c diff --git a/arch/arm/src/s32k1xx/s32k1xx_pminitialize.c b/soc/arm/s32k1xx/s32k1xx_pminitialize.c similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_pminitialize.c rename to soc/arm/s32k1xx/s32k1xx_pminitialize.c diff --git a/arch/arm/src/s32k1xx/s32k1xx_progmem.c b/soc/arm/s32k1xx/s32k1xx_progmem.c similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_progmem.c rename to soc/arm/s32k1xx/s32k1xx_progmem.c diff --git a/arch/arm/src/s32k1xx/s32k1xx_progmem.h b/soc/arm/s32k1xx/s32k1xx_progmem.h similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_progmem.h rename to soc/arm/s32k1xx/s32k1xx_progmem.h diff --git a/arch/arm/src/s32k1xx/s32k1xx_pwm.c b/soc/arm/s32k1xx/s32k1xx_pwm.c similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_pwm.c rename to soc/arm/s32k1xx/s32k1xx_pwm.c diff --git a/arch/arm/src/s32k1xx/s32k1xx_pwm.h b/soc/arm/s32k1xx/s32k1xx_pwm.h similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_pwm.h rename to soc/arm/s32k1xx/s32k1xx_pwm.h diff --git a/arch/arm/src/s32k1xx/s32k1xx_resetcause_procfs.c b/soc/arm/s32k1xx/s32k1xx_resetcause_procfs.c similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_resetcause_procfs.c rename to soc/arm/s32k1xx/s32k1xx_resetcause_procfs.c diff --git a/arch/arm/src/s32k1xx/s32k1xx_resetcause_procfs.h b/soc/arm/s32k1xx/s32k1xx_resetcause_procfs.h similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_resetcause_procfs.h rename to soc/arm/s32k1xx/s32k1xx_resetcause_procfs.h diff --git a/arch/arm/src/s32k1xx/s32k1xx_rtc.c b/soc/arm/s32k1xx/s32k1xx_rtc.c similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_rtc.c rename to soc/arm/s32k1xx/s32k1xx_rtc.c diff --git a/arch/arm/src/s32k1xx/s32k1xx_rtc.h b/soc/arm/s32k1xx/s32k1xx_rtc.h similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_rtc.h rename to soc/arm/s32k1xx/s32k1xx_rtc.h diff --git a/arch/arm/src/s32k1xx/s32k1xx_serial.c b/soc/arm/s32k1xx/s32k1xx_serial.c similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_serial.c rename to soc/arm/s32k1xx/s32k1xx_serial.c diff --git a/arch/arm/src/s32k1xx/s32k1xx_serial.h b/soc/arm/s32k1xx/s32k1xx_serial.h similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_serial.h rename to soc/arm/s32k1xx/s32k1xx_serial.h diff --git a/arch/arm/src/s32k1xx/s32k1xx_start.c b/soc/arm/s32k1xx/s32k1xx_start.c similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_start.c rename to soc/arm/s32k1xx/s32k1xx_start.c diff --git a/arch/arm/src/s32k1xx/s32k1xx_start.h b/soc/arm/s32k1xx/s32k1xx_start.h similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_start.h rename to soc/arm/s32k1xx/s32k1xx_start.h diff --git a/arch/arm/src/s32k1xx/s32k1xx_uid.c b/soc/arm/s32k1xx/s32k1xx_uid.c similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_uid.c rename to soc/arm/s32k1xx/s32k1xx_uid.c diff --git a/arch/arm/src/s32k1xx/s32k1xx_uid.h b/soc/arm/s32k1xx/s32k1xx_uid.h similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_uid.h rename to soc/arm/s32k1xx/s32k1xx_uid.h diff --git a/arch/arm/src/s32k1xx/s32k1xx_wdog.h b/soc/arm/s32k1xx/s32k1xx_wdog.h similarity index 100% rename from arch/arm/src/s32k1xx/s32k1xx_wdog.h rename to soc/arm/s32k1xx/s32k1xx_wdog.h diff --git a/arch/arm/src/s32k3xx/Kconfig b/soc/arm/s32k3xx/Kconfig similarity index 100% rename from arch/arm/src/s32k3xx/Kconfig rename to soc/arm/s32k3xx/Kconfig diff --git a/arch/arm/src/s32k3xx/Make.defs b/soc/arm/s32k3xx/Make.defs similarity index 100% rename from arch/arm/src/s32k3xx/Make.defs rename to soc/arm/s32k3xx/Make.defs diff --git a/arch/arm/src/s32k3xx/chip.h b/soc/arm/s32k3xx/chip.h similarity index 100% rename from arch/arm/src/s32k3xx/chip.h rename to soc/arm/s32k3xx/chip.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k344_pinmux.h b/soc/arm/s32k3xx/hardware/s32k344_pinmux.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k344_pinmux.h rename to soc/arm/s32k3xx/hardware/s32k344_pinmux.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_adc.h b/soc/arm/s32k3xx/hardware/s32k3xx_adc.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_adc.h rename to soc/arm/s32k3xx/hardware/s32k3xx_adc.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_axbs.h b/soc/arm/s32k3xx/hardware/s32k3xx_axbs.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_axbs.h rename to soc/arm/s32k3xx/hardware/s32k3xx_axbs.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_dcm.h b/soc/arm/s32k3xx/hardware/s32k3xx_dcm.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_dcm.h rename to soc/arm/s32k3xx/hardware/s32k3xx_dcm.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_dmamux.h b/soc/arm/s32k3xx/hardware/s32k3xx_dmamux.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_dmamux.h rename to soc/arm/s32k3xx/hardware/s32k3xx_dmamux.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_edma.h b/soc/arm/s32k3xx/hardware/s32k3xx_edma.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_edma.h rename to soc/arm/s32k3xx/hardware/s32k3xx_edma.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_eim.h b/soc/arm/s32k3xx/hardware/s32k3xx_eim.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_eim.h rename to soc/arm/s32k3xx/hardware/s32k3xx_eim.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_emac.h b/soc/arm/s32k3xx/hardware/s32k3xx_emac.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_emac.h rename to soc/arm/s32k3xx/hardware/s32k3xx_emac.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_emios.h b/soc/arm/s32k3xx/hardware/s32k3xx_emios.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_emios.h rename to soc/arm/s32k3xx/hardware/s32k3xx_emios.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_firc.h b/soc/arm/s32k3xx/hardware/s32k3xx_firc.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_firc.h rename to soc/arm/s32k3xx/hardware/s32k3xx_firc.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_flexcan.h b/soc/arm/s32k3xx/hardware/s32k3xx_flexcan.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_flexcan.h rename to soc/arm/s32k3xx/hardware/s32k3xx_flexcan.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_flexio.h b/soc/arm/s32k3xx/hardware/s32k3xx_flexio.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_flexio.h rename to soc/arm/s32k3xx/hardware/s32k3xx_flexio.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_fmu.h b/soc/arm/s32k3xx/hardware/s32k3xx_fmu.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_fmu.h rename to soc/arm/s32k3xx/hardware/s32k3xx_fmu.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_fs26.h b/soc/arm/s32k3xx/hardware/s32k3xx_fs26.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_fs26.h rename to soc/arm/s32k3xx/hardware/s32k3xx_fs26.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_fxosc.h b/soc/arm/s32k3xx/hardware/s32k3xx_fxosc.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_fxosc.h rename to soc/arm/s32k3xx/hardware/s32k3xx_fxosc.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_hse.h b/soc/arm/s32k3xx/hardware/s32k3xx_hse.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_hse.h rename to soc/arm/s32k3xx/hardware/s32k3xx_hse.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_intm.h b/soc/arm/s32k3xx/hardware/s32k3xx_intm.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_intm.h rename to soc/arm/s32k3xx/hardware/s32k3xx_intm.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_lpi2c.h b/soc/arm/s32k3xx/hardware/s32k3xx_lpi2c.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_lpi2c.h rename to soc/arm/s32k3xx/hardware/s32k3xx_lpi2c.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_lpspi.h b/soc/arm/s32k3xx/hardware/s32k3xx_lpspi.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_lpspi.h rename to soc/arm/s32k3xx/hardware/s32k3xx_lpspi.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_lpuart.h b/soc/arm/s32k3xx/hardware/s32k3xx_lpuart.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_lpuart.h rename to soc/arm/s32k3xx/hardware/s32k3xx_lpuart.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_mc_cgm.h b/soc/arm/s32k3xx/hardware/s32k3xx_mc_cgm.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_mc_cgm.h rename to soc/arm/s32k3xx/hardware/s32k3xx_mc_cgm.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_mc_me.h b/soc/arm/s32k3xx/hardware/s32k3xx_mc_me.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_mc_me.h rename to soc/arm/s32k3xx/hardware/s32k3xx_mc_me.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_mc_rgm.h b/soc/arm/s32k3xx/hardware/s32k3xx_mc_rgm.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_mc_rgm.h rename to soc/arm/s32k3xx/hardware/s32k3xx_mc_rgm.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_mcm.h b/soc/arm/s32k3xx/hardware/s32k3xx_mcm.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_mcm.h rename to soc/arm/s32k3xx/hardware/s32k3xx_mcm.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_memorymap.h b/soc/arm/s32k3xx/hardware/s32k3xx_memorymap.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_memorymap.h rename to soc/arm/s32k3xx/hardware/s32k3xx_memorymap.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_mscm.h b/soc/arm/s32k3xx/hardware/s32k3xx_mscm.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_mscm.h rename to soc/arm/s32k3xx/hardware/s32k3xx_mscm.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_mu.h b/soc/arm/s32k3xx/hardware/s32k3xx_mu.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_mu.h rename to soc/arm/s32k3xx/hardware/s32k3xx_mu.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_pflash.h b/soc/arm/s32k3xx/hardware/s32k3xx_pflash.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_pflash.h rename to soc/arm/s32k3xx/hardware/s32k3xx_pflash.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_pinmux.h b/soc/arm/s32k3xx/hardware/s32k3xx_pinmux.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_pinmux.h rename to soc/arm/s32k3xx/hardware/s32k3xx_pinmux.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_pit.h b/soc/arm/s32k3xx/hardware/s32k3xx_pit.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_pit.h rename to soc/arm/s32k3xx/hardware/s32k3xx_pit.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_pll.h b/soc/arm/s32k3xx/hardware/s32k3xx_pll.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_pll.h rename to soc/arm/s32k3xx/hardware/s32k3xx_pll.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_pmc.h b/soc/arm/s32k3xx/hardware/s32k3xx_pmc.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_pmc.h rename to soc/arm/s32k3xx/hardware/s32k3xx_pmc.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_pramc.h b/soc/arm/s32k3xx/hardware/s32k3xx_pramc.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_pramc.h rename to soc/arm/s32k3xx/hardware/s32k3xx_pramc.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_qspi.h b/soc/arm/s32k3xx/hardware/s32k3xx_qspi.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_qspi.h rename to soc/arm/s32k3xx/hardware/s32k3xx_qspi.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_rtc.h b/soc/arm/s32k3xx/hardware/s32k3xx_rtc.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_rtc.h rename to soc/arm/s32k3xx/hardware/s32k3xx_rtc.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_sema42.h b/soc/arm/s32k3xx/hardware/s32k3xx_sema42.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_sema42.h rename to soc/arm/s32k3xx/hardware/s32k3xx_sema42.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_sirc.h b/soc/arm/s32k3xx/hardware/s32k3xx_sirc.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_sirc.h rename to soc/arm/s32k3xx/hardware/s32k3xx_sirc.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_siul2.h b/soc/arm/s32k3xx/hardware/s32k3xx_siul2.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_siul2.h rename to soc/arm/s32k3xx/hardware/s32k3xx_siul2.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_stm.h b/soc/arm/s32k3xx/hardware/s32k3xx_stm.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_stm.h rename to soc/arm/s32k3xx/hardware/s32k3xx_stm.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_swt.h b/soc/arm/s32k3xx/hardware/s32k3xx_swt.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_swt.h rename to soc/arm/s32k3xx/hardware/s32k3xx_swt.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_sxosc.h b/soc/arm/s32k3xx/hardware/s32k3xx_sxosc.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_sxosc.h rename to soc/arm/s32k3xx/hardware/s32k3xx_sxosc.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_tspc.h b/soc/arm/s32k3xx/hardware/s32k3xx_tspc.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_tspc.h rename to soc/arm/s32k3xx/hardware/s32k3xx_tspc.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_virtwrapper.h b/soc/arm/s32k3xx/hardware/s32k3xx_virtwrapper.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_virtwrapper.h rename to soc/arm/s32k3xx/hardware/s32k3xx_virtwrapper.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_wkpu.h b/soc/arm/s32k3xx/hardware/s32k3xx_wkpu.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_wkpu.h rename to soc/arm/s32k3xx/hardware/s32k3xx_wkpu.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_xbic.h b/soc/arm/s32k3xx/hardware/s32k3xx_xbic.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_xbic.h rename to soc/arm/s32k3xx/hardware/s32k3xx_xbic.h diff --git a/arch/arm/src/s32k3xx/hardware/s32k3xx_xrdc.h b/soc/arm/s32k3xx/hardware/s32k3xx_xrdc.h similarity index 100% rename from arch/arm/src/s32k3xx/hardware/s32k3xx_xrdc.h rename to soc/arm/s32k3xx/hardware/s32k3xx_xrdc.h diff --git a/arch/arm/src/s32k3xx/s32k3xx_allocateheap.c b/soc/arm/s32k3xx/s32k3xx_allocateheap.c similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_allocateheap.c rename to soc/arm/s32k3xx/s32k3xx_allocateheap.c diff --git a/arch/arm/src/s32k3xx/s32k3xx_clockconfig.c b/soc/arm/s32k3xx/s32k3xx_clockconfig.c similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_clockconfig.c rename to soc/arm/s32k3xx/s32k3xx_clockconfig.c diff --git a/arch/arm/src/s32k3xx/s32k3xx_clockconfig.h b/soc/arm/s32k3xx/s32k3xx_clockconfig.h similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_clockconfig.h rename to soc/arm/s32k3xx/s32k3xx_clockconfig.h diff --git a/arch/arm/src/s32k3xx/s32k3xx_clocknames.h b/soc/arm/s32k3xx/s32k3xx_clocknames.h similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_clocknames.h rename to soc/arm/s32k3xx/s32k3xx_clocknames.h diff --git a/arch/arm/src/s32k3xx/s32k3xx_clrpend.c b/soc/arm/s32k3xx/s32k3xx_clrpend.c similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_clrpend.c rename to soc/arm/s32k3xx/s32k3xx_clrpend.c diff --git a/arch/arm/src/s32k3xx/s32k3xx_config.h b/soc/arm/s32k3xx/s32k3xx_config.h similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_config.h rename to soc/arm/s32k3xx/s32k3xx_config.h diff --git a/arch/arm/src/s32k3xx/s32k3xx_edma.c b/soc/arm/s32k3xx/s32k3xx_edma.c similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_edma.c rename to soc/arm/s32k3xx/s32k3xx_edma.c diff --git a/arch/arm/src/s32k3xx/s32k3xx_edma.h b/soc/arm/s32k3xx/s32k3xx_edma.h similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_edma.h rename to soc/arm/s32k3xx/s32k3xx_edma.h diff --git a/arch/arm/src/s32k3xx/s32k3xx_emac.c b/soc/arm/s32k3xx/s32k3xx_emac.c similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_emac.c rename to soc/arm/s32k3xx/s32k3xx_emac.c diff --git a/arch/arm/src/s32k3xx/s32k3xx_emac.h b/soc/arm/s32k3xx/s32k3xx_emac.h similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_emac.h rename to soc/arm/s32k3xx/s32k3xx_emac.h diff --git a/arch/arm/src/s32k3xx/s32k3xx_flashboot.c b/soc/arm/s32k3xx/s32k3xx_flashboot.c similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_flashboot.c rename to soc/arm/s32k3xx/s32k3xx_flashboot.c diff --git a/arch/arm/src/s32k3xx/s32k3xx_flexcan.c b/soc/arm/s32k3xx/s32k3xx_flexcan.c similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_flexcan.c rename to soc/arm/s32k3xx/s32k3xx_flexcan.c diff --git a/arch/arm/src/s32k3xx/s32k3xx_flexcan.h b/soc/arm/s32k3xx/s32k3xx_flexcan.h similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_flexcan.h rename to soc/arm/s32k3xx/s32k3xx_flexcan.h diff --git a/arch/arm/src/s32k3xx/s32k3xx_fs26.c b/soc/arm/s32k3xx/s32k3xx_fs26.c similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_fs26.c rename to soc/arm/s32k3xx/s32k3xx_fs26.c diff --git a/arch/arm/src/s32k3xx/s32k3xx_fs26.h b/soc/arm/s32k3xx/s32k3xx_fs26.h similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_fs26.h rename to soc/arm/s32k3xx/s32k3xx_fs26.h diff --git a/arch/arm/src/s32k3xx/s32k3xx_idle.c b/soc/arm/s32k3xx/s32k3xx_idle.c similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_idle.c rename to soc/arm/s32k3xx/s32k3xx_idle.c diff --git a/arch/arm/src/s32k3xx/s32k3xx_irq.c b/soc/arm/s32k3xx/s32k3xx_irq.c similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_irq.c rename to soc/arm/s32k3xx/s32k3xx_irq.c diff --git a/arch/arm/src/s32k3xx/s32k3xx_irq.h b/soc/arm/s32k3xx/s32k3xx_irq.h similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_irq.h rename to soc/arm/s32k3xx/s32k3xx_irq.h diff --git a/arch/arm/src/s32k3xx/s32k3xx_lowputc.c b/soc/arm/s32k3xx/s32k3xx_lowputc.c similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_lowputc.c rename to soc/arm/s32k3xx/s32k3xx_lowputc.c diff --git a/arch/arm/src/s32k3xx/s32k3xx_lowputc.h b/soc/arm/s32k3xx/s32k3xx_lowputc.h similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_lowputc.h rename to soc/arm/s32k3xx/s32k3xx_lowputc.h diff --git a/arch/arm/src/s32k3xx/s32k3xx_lpi2c.c b/soc/arm/s32k3xx/s32k3xx_lpi2c.c similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_lpi2c.c rename to soc/arm/s32k3xx/s32k3xx_lpi2c.c diff --git a/arch/arm/src/s32k3xx/s32k3xx_lpi2c.h b/soc/arm/s32k3xx/s32k3xx_lpi2c.h similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_lpi2c.h rename to soc/arm/s32k3xx/s32k3xx_lpi2c.h diff --git a/arch/arm/src/s32k3xx/s32k3xx_lpspi.c b/soc/arm/s32k3xx/s32k3xx_lpspi.c similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_lpspi.c rename to soc/arm/s32k3xx/s32k3xx_lpspi.c diff --git a/arch/arm/src/s32k3xx/s32k3xx_lpspi.h b/soc/arm/s32k3xx/s32k3xx_lpspi.h similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_lpspi.h rename to soc/arm/s32k3xx/s32k3xx_lpspi.h diff --git a/arch/arm/src/s32k3xx/s32k3xx_mpuinit.c b/soc/arm/s32k3xx/s32k3xx_mpuinit.c similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_mpuinit.c rename to soc/arm/s32k3xx/s32k3xx_mpuinit.c diff --git a/arch/arm/src/s32k3xx/s32k3xx_mpuinit.h b/soc/arm/s32k3xx/s32k3xx_mpuinit.h similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_mpuinit.h rename to soc/arm/s32k3xx/s32k3xx_mpuinit.h diff --git a/arch/arm/src/s32k3xx/s32k3xx_periphclocks.c b/soc/arm/s32k3xx/s32k3xx_periphclocks.c similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_periphclocks.c rename to soc/arm/s32k3xx/s32k3xx_periphclocks.c diff --git a/arch/arm/src/s32k3xx/s32k3xx_periphclocks.h b/soc/arm/s32k3xx/s32k3xx_periphclocks.h similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_periphclocks.h rename to soc/arm/s32k3xx/s32k3xx_periphclocks.h diff --git a/arch/arm/src/s32k3xx/s32k3xx_pin.c b/soc/arm/s32k3xx/s32k3xx_pin.c similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_pin.c rename to soc/arm/s32k3xx/s32k3xx_pin.c diff --git a/arch/arm/src/s32k3xx/s32k3xx_pin.h b/soc/arm/s32k3xx/s32k3xx_pin.h similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_pin.h rename to soc/arm/s32k3xx/s32k3xx_pin.h diff --git a/arch/arm/src/s32k3xx/s32k3xx_pindma.c b/soc/arm/s32k3xx/s32k3xx_pindma.c similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_pindma.c rename to soc/arm/s32k3xx/s32k3xx_pindma.c diff --git a/arch/arm/src/s32k3xx/s32k3xx_pingpio.c b/soc/arm/s32k3xx/s32k3xx_pingpio.c similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_pingpio.c rename to soc/arm/s32k3xx/s32k3xx_pingpio.c diff --git a/arch/arm/src/s32k3xx/s32k3xx_pinirq.c b/soc/arm/s32k3xx/s32k3xx_pinirq.c similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_pinirq.c rename to soc/arm/s32k3xx/s32k3xx_pinirq.c diff --git a/arch/arm/src/s32k3xx/s32k3xx_progmem.c b/soc/arm/s32k3xx/s32k3xx_progmem.c similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_progmem.c rename to soc/arm/s32k3xx/s32k3xx_progmem.c diff --git a/arch/arm/src/s32k3xx/s32k3xx_progmem.h b/soc/arm/s32k3xx/s32k3xx_progmem.h similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_progmem.h rename to soc/arm/s32k3xx/s32k3xx_progmem.h diff --git a/arch/arm/src/s32k3xx/s32k3xx_qspi.c b/soc/arm/s32k3xx/s32k3xx_qspi.c similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_qspi.c rename to soc/arm/s32k3xx/s32k3xx_qspi.c diff --git a/arch/arm/src/s32k3xx/s32k3xx_qspi.h b/soc/arm/s32k3xx/s32k3xx_qspi.h similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_qspi.h rename to soc/arm/s32k3xx/s32k3xx_qspi.h diff --git a/arch/arm/src/s32k3xx/s32k3xx_serial.c b/soc/arm/s32k3xx/s32k3xx_serial.c similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_serial.c rename to soc/arm/s32k3xx/s32k3xx_serial.c diff --git a/arch/arm/src/s32k3xx/s32k3xx_serial.h b/soc/arm/s32k3xx/s32k3xx_serial.h similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_serial.h rename to soc/arm/s32k3xx/s32k3xx_serial.h diff --git a/arch/arm/src/s32k3xx/s32k3xx_start.c b/soc/arm/s32k3xx/s32k3xx_start.c similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_start.c rename to soc/arm/s32k3xx/s32k3xx_start.c diff --git a/arch/arm/src/s32k3xx/s32k3xx_start.h b/soc/arm/s32k3xx/s32k3xx_start.h similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_start.h rename to soc/arm/s32k3xx/s32k3xx_start.h diff --git a/arch/arm/src/s32k3xx/s32k3xx_swt.h b/soc/arm/s32k3xx/s32k3xx_swt.h similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_swt.h rename to soc/arm/s32k3xx/s32k3xx_swt.h diff --git a/arch/arm/src/s32k3xx/s32k3xx_timerisr.c b/soc/arm/s32k3xx/s32k3xx_timerisr.c similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_timerisr.c rename to soc/arm/s32k3xx/s32k3xx_timerisr.c diff --git a/arch/arm/src/s32k3xx/s32k3xx_userspace.c b/soc/arm/s32k3xx/s32k3xx_userspace.c similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_userspace.c rename to soc/arm/s32k3xx/s32k3xx_userspace.c diff --git a/arch/arm/src/s32k3xx/s32k3xx_userspace.h b/soc/arm/s32k3xx/s32k3xx_userspace.h similarity index 100% rename from arch/arm/src/s32k3xx/s32k3xx_userspace.h rename to soc/arm/s32k3xx/s32k3xx_userspace.h diff --git a/arch/arm/src/s32k3xx/startup.S b/soc/arm/s32k3xx/startup.S similarity index 100% rename from arch/arm/src/s32k3xx/startup.S rename to soc/arm/s32k3xx/startup.S diff --git a/arch/arm/src/sam34/Kconfig b/soc/arm/sam34/Kconfig similarity index 100% rename from arch/arm/src/sam34/Kconfig rename to soc/arm/sam34/Kconfig diff --git a/arch/arm/src/sam34/Make.defs b/soc/arm/sam34/Make.defs similarity index 100% rename from arch/arm/src/sam34/Make.defs rename to soc/arm/sam34/Make.defs diff --git a/arch/arm/src/sam34/chip.h b/soc/arm/sam34/chip.h similarity index 100% rename from arch/arm/src/sam34/chip.h rename to soc/arm/sam34/chip.h diff --git a/arch/arm/src/sam34/hardware/sam3u_memorymap.h b/soc/arm/sam34/hardware/sam3u_memorymap.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam3u_memorymap.h rename to soc/arm/sam34/hardware/sam3u_memorymap.h diff --git a/arch/arm/src/sam34/hardware/sam3u_pinmap.h b/soc/arm/sam34/hardware/sam3u_pinmap.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam3u_pinmap.h rename to soc/arm/sam34/hardware/sam3u_pinmap.h diff --git a/arch/arm/src/sam34/hardware/sam3u_pio.h b/soc/arm/sam34/hardware/sam3u_pio.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam3u_pio.h rename to soc/arm/sam34/hardware/sam3u_pio.h diff --git a/arch/arm/src/sam34/hardware/sam3x_memorymap.h b/soc/arm/sam34/hardware/sam3x_memorymap.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam3x_memorymap.h rename to soc/arm/sam34/hardware/sam3x_memorymap.h diff --git a/arch/arm/src/sam34/hardware/sam3x_pinmap.h b/soc/arm/sam34/hardware/sam3x_pinmap.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam3x_pinmap.h rename to soc/arm/sam34/hardware/sam3x_pinmap.h diff --git a/arch/arm/src/sam34/hardware/sam4cm_aes.h b/soc/arm/sam34/hardware/sam4cm_aes.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam4cm_aes.h rename to soc/arm/sam34/hardware/sam4cm_aes.h diff --git a/arch/arm/src/sam34/hardware/sam4cm_ipc.h b/soc/arm/sam34/hardware/sam4cm_ipc.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam4cm_ipc.h rename to soc/arm/sam34/hardware/sam4cm_ipc.h diff --git a/arch/arm/src/sam34/hardware/sam4cm_memorymap.h b/soc/arm/sam34/hardware/sam4cm_memorymap.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam4cm_memorymap.h rename to soc/arm/sam34/hardware/sam4cm_memorymap.h diff --git a/arch/arm/src/sam34/hardware/sam4cm_pinmap.h b/soc/arm/sam34/hardware/sam4cm_pinmap.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam4cm_pinmap.h rename to soc/arm/sam34/hardware/sam4cm_pinmap.h diff --git a/arch/arm/src/sam34/hardware/sam4cm_slcdc.h b/soc/arm/sam34/hardware/sam4cm_slcdc.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam4cm_slcdc.h rename to soc/arm/sam34/hardware/sam4cm_slcdc.h diff --git a/arch/arm/src/sam34/hardware/sam4cm_supc.h b/soc/arm/sam34/hardware/sam4cm_supc.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam4cm_supc.h rename to soc/arm/sam34/hardware/sam4cm_supc.h diff --git a/arch/arm/src/sam34/hardware/sam4e_memorymap.h b/soc/arm/sam34/hardware/sam4e_memorymap.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam4e_memorymap.h rename to soc/arm/sam34/hardware/sam4e_memorymap.h diff --git a/arch/arm/src/sam34/hardware/sam4e_pinmap.h b/soc/arm/sam34/hardware/sam4e_pinmap.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam4e_pinmap.h rename to soc/arm/sam34/hardware/sam4e_pinmap.h diff --git a/arch/arm/src/sam34/hardware/sam4e_pio.h b/soc/arm/sam34/hardware/sam4e_pio.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam4e_pio.h rename to soc/arm/sam34/hardware/sam4e_pio.h diff --git a/arch/arm/src/sam34/hardware/sam4l_bpm.h b/soc/arm/sam34/hardware/sam4l_bpm.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam4l_bpm.h rename to soc/arm/sam34/hardware/sam4l_bpm.h diff --git a/arch/arm/src/sam34/hardware/sam4l_bscif.h b/soc/arm/sam34/hardware/sam4l_bscif.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam4l_bscif.h rename to soc/arm/sam34/hardware/sam4l_bscif.h diff --git a/arch/arm/src/sam34/hardware/sam4l_flashcalw.h b/soc/arm/sam34/hardware/sam4l_flashcalw.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam4l_flashcalw.h rename to soc/arm/sam34/hardware/sam4l_flashcalw.h diff --git a/arch/arm/src/sam34/hardware/sam4l_gpio.h b/soc/arm/sam34/hardware/sam4l_gpio.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam4l_gpio.h rename to soc/arm/sam34/hardware/sam4l_gpio.h diff --git a/arch/arm/src/sam34/hardware/sam4l_lcdca.h b/soc/arm/sam34/hardware/sam4l_lcdca.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam4l_lcdca.h rename to soc/arm/sam34/hardware/sam4l_lcdca.h diff --git a/arch/arm/src/sam34/hardware/sam4l_memorymap.h b/soc/arm/sam34/hardware/sam4l_memorymap.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam4l_memorymap.h rename to soc/arm/sam34/hardware/sam4l_memorymap.h diff --git a/arch/arm/src/sam34/hardware/sam4l_pdca.h b/soc/arm/sam34/hardware/sam4l_pdca.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam4l_pdca.h rename to soc/arm/sam34/hardware/sam4l_pdca.h diff --git a/arch/arm/src/sam34/hardware/sam4l_picouart.h b/soc/arm/sam34/hardware/sam4l_picouart.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam4l_picouart.h rename to soc/arm/sam34/hardware/sam4l_picouart.h diff --git a/arch/arm/src/sam34/hardware/sam4l_pinmap.h b/soc/arm/sam34/hardware/sam4l_pinmap.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam4l_pinmap.h rename to soc/arm/sam34/hardware/sam4l_pinmap.h diff --git a/arch/arm/src/sam34/hardware/sam4l_pm.h b/soc/arm/sam34/hardware/sam4l_pm.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam4l_pm.h rename to soc/arm/sam34/hardware/sam4l_pm.h diff --git a/arch/arm/src/sam34/hardware/sam4l_scif.h b/soc/arm/sam34/hardware/sam4l_scif.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam4l_scif.h rename to soc/arm/sam34/hardware/sam4l_scif.h diff --git a/arch/arm/src/sam34/hardware/sam4l_usart.h b/soc/arm/sam34/hardware/sam4l_usart.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam4l_usart.h rename to soc/arm/sam34/hardware/sam4l_usart.h diff --git a/arch/arm/src/sam34/hardware/sam4l_wdt.h b/soc/arm/sam34/hardware/sam4l_wdt.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam4l_wdt.h rename to soc/arm/sam34/hardware/sam4l_wdt.h diff --git a/arch/arm/src/sam34/hardware/sam4s_memorymap.h b/soc/arm/sam34/hardware/sam4s_memorymap.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam4s_memorymap.h rename to soc/arm/sam34/hardware/sam4s_memorymap.h diff --git a/arch/arm/src/sam34/hardware/sam4s_pinmap.h b/soc/arm/sam34/hardware/sam4s_pinmap.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam4s_pinmap.h rename to soc/arm/sam34/hardware/sam4s_pinmap.h diff --git a/arch/arm/src/sam34/hardware/sam4s_pio.h b/soc/arm/sam34/hardware/sam4s_pio.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam4s_pio.h rename to soc/arm/sam34/hardware/sam4s_pio.h diff --git a/arch/arm/src/sam34/hardware/sam_acc.h b/soc/arm/sam34/hardware/sam_acc.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam_acc.h rename to soc/arm/sam34/hardware/sam_acc.h diff --git a/arch/arm/src/sam34/hardware/sam_adc.h b/soc/arm/sam34/hardware/sam_adc.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam_adc.h rename to soc/arm/sam34/hardware/sam_adc.h diff --git a/arch/arm/src/sam34/hardware/sam_aes.h b/soc/arm/sam34/hardware/sam_aes.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam_aes.h rename to soc/arm/sam34/hardware/sam_aes.h diff --git a/arch/arm/src/sam34/hardware/sam_afec.h b/soc/arm/sam34/hardware/sam_afec.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam_afec.h rename to soc/arm/sam34/hardware/sam_afec.h diff --git a/arch/arm/src/sam34/hardware/sam_can.h b/soc/arm/sam34/hardware/sam_can.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam_can.h rename to soc/arm/sam34/hardware/sam_can.h diff --git a/arch/arm/src/sam34/hardware/sam_chipid.h b/soc/arm/sam34/hardware/sam_chipid.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam_chipid.h rename to soc/arm/sam34/hardware/sam_chipid.h diff --git a/arch/arm/src/sam34/hardware/sam_cmcc.h b/soc/arm/sam34/hardware/sam_cmcc.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam_cmcc.h rename to soc/arm/sam34/hardware/sam_cmcc.h diff --git a/arch/arm/src/sam34/hardware/sam_dacc.h b/soc/arm/sam34/hardware/sam_dacc.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam_dacc.h rename to soc/arm/sam34/hardware/sam_dacc.h diff --git a/arch/arm/src/sam34/hardware/sam_dmac.h b/soc/arm/sam34/hardware/sam_dmac.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam_dmac.h rename to soc/arm/sam34/hardware/sam_dmac.h diff --git a/arch/arm/src/sam34/hardware/sam_eefc.h b/soc/arm/sam34/hardware/sam_eefc.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam_eefc.h rename to soc/arm/sam34/hardware/sam_eefc.h diff --git a/arch/arm/src/sam34/hardware/sam_emac.h b/soc/arm/sam34/hardware/sam_emac.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam_emac.h rename to soc/arm/sam34/hardware/sam_emac.h diff --git a/arch/arm/src/sam34/hardware/sam_gpbr.h b/soc/arm/sam34/hardware/sam_gpbr.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam_gpbr.h rename to soc/arm/sam34/hardware/sam_gpbr.h diff --git a/arch/arm/src/sam34/hardware/sam_hsmci.h b/soc/arm/sam34/hardware/sam_hsmci.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam_hsmci.h rename to soc/arm/sam34/hardware/sam_hsmci.h diff --git a/arch/arm/src/sam34/hardware/sam_matrix.h b/soc/arm/sam34/hardware/sam_matrix.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam_matrix.h rename to soc/arm/sam34/hardware/sam_matrix.h diff --git a/arch/arm/src/sam34/hardware/sam_memorymap.h b/soc/arm/sam34/hardware/sam_memorymap.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam_memorymap.h rename to soc/arm/sam34/hardware/sam_memorymap.h diff --git a/arch/arm/src/sam34/hardware/sam_pdc.h b/soc/arm/sam34/hardware/sam_pdc.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam_pdc.h rename to soc/arm/sam34/hardware/sam_pdc.h diff --git a/arch/arm/src/sam34/hardware/sam_pinmap.h b/soc/arm/sam34/hardware/sam_pinmap.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam_pinmap.h rename to soc/arm/sam34/hardware/sam_pinmap.h diff --git a/arch/arm/src/sam34/hardware/sam_pmc.h b/soc/arm/sam34/hardware/sam_pmc.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam_pmc.h rename to soc/arm/sam34/hardware/sam_pmc.h diff --git a/arch/arm/src/sam34/hardware/sam_pwm.h b/soc/arm/sam34/hardware/sam_pwm.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam_pwm.h rename to soc/arm/sam34/hardware/sam_pwm.h diff --git a/arch/arm/src/sam34/hardware/sam_rstc.h b/soc/arm/sam34/hardware/sam_rstc.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam_rstc.h rename to soc/arm/sam34/hardware/sam_rstc.h diff --git a/arch/arm/src/sam34/hardware/sam_rswdt.h b/soc/arm/sam34/hardware/sam_rswdt.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam_rswdt.h rename to soc/arm/sam34/hardware/sam_rswdt.h diff --git a/arch/arm/src/sam34/hardware/sam_rtc.h b/soc/arm/sam34/hardware/sam_rtc.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam_rtc.h rename to soc/arm/sam34/hardware/sam_rtc.h diff --git a/arch/arm/src/sam34/hardware/sam_rtt.h b/soc/arm/sam34/hardware/sam_rtt.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam_rtt.h rename to soc/arm/sam34/hardware/sam_rtt.h diff --git a/arch/arm/src/sam34/hardware/sam_smc.h b/soc/arm/sam34/hardware/sam_smc.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam_smc.h rename to soc/arm/sam34/hardware/sam_smc.h diff --git a/arch/arm/src/sam34/hardware/sam_spi.h b/soc/arm/sam34/hardware/sam_spi.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam_spi.h rename to soc/arm/sam34/hardware/sam_spi.h diff --git a/arch/arm/src/sam34/hardware/sam_ssc.h b/soc/arm/sam34/hardware/sam_ssc.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam_ssc.h rename to soc/arm/sam34/hardware/sam_ssc.h diff --git a/arch/arm/src/sam34/hardware/sam_supc.h b/soc/arm/sam34/hardware/sam_supc.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam_supc.h rename to soc/arm/sam34/hardware/sam_supc.h diff --git a/arch/arm/src/sam34/hardware/sam_tc.h b/soc/arm/sam34/hardware/sam_tc.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam_tc.h rename to soc/arm/sam34/hardware/sam_tc.h diff --git a/arch/arm/src/sam34/hardware/sam_twi.h b/soc/arm/sam34/hardware/sam_twi.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam_twi.h rename to soc/arm/sam34/hardware/sam_twi.h diff --git a/arch/arm/src/sam34/hardware/sam_uart.h b/soc/arm/sam34/hardware/sam_uart.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam_uart.h rename to soc/arm/sam34/hardware/sam_uart.h diff --git a/arch/arm/src/sam34/hardware/sam_udp.h b/soc/arm/sam34/hardware/sam_udp.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam_udp.h rename to soc/arm/sam34/hardware/sam_udp.h diff --git a/arch/arm/src/sam34/hardware/sam_udphs.h b/soc/arm/sam34/hardware/sam_udphs.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam_udphs.h rename to soc/arm/sam34/hardware/sam_udphs.h diff --git a/arch/arm/src/sam34/hardware/sam_wdt.h b/soc/arm/sam34/hardware/sam_wdt.h similarity index 100% rename from arch/arm/src/sam34/hardware/sam_wdt.h rename to soc/arm/sam34/hardware/sam_wdt.h diff --git a/arch/arm/src/sam34/sam3u_gpio.h b/soc/arm/sam34/sam3u_gpio.h similarity index 100% rename from arch/arm/src/sam34/sam3u_gpio.h rename to soc/arm/sam34/sam3u_gpio.h diff --git a/arch/arm/src/sam34/sam3u_periphclks.h b/soc/arm/sam34/sam3u_periphclks.h similarity index 100% rename from arch/arm/src/sam34/sam3u_periphclks.h rename to soc/arm/sam34/sam3u_periphclks.h diff --git a/arch/arm/src/sam34/sam3x_gpio.h b/soc/arm/sam34/sam3x_gpio.h similarity index 100% rename from arch/arm/src/sam34/sam3x_gpio.h rename to soc/arm/sam34/sam3x_gpio.h diff --git a/arch/arm/src/sam34/sam3x_periphclks.h b/soc/arm/sam34/sam3x_periphclks.h similarity index 100% rename from arch/arm/src/sam34/sam3x_periphclks.h rename to soc/arm/sam34/sam3x_periphclks.h diff --git a/arch/arm/src/sam34/sam4cm_cpuidlestack.c b/soc/arm/sam34/sam4cm_cpuidlestack.c similarity index 100% rename from arch/arm/src/sam34/sam4cm_cpuidlestack.c rename to soc/arm/sam34/sam4cm_cpuidlestack.c diff --git a/arch/arm/src/sam34/sam4cm_cpuindex.c b/soc/arm/sam34/sam4cm_cpuindex.c similarity index 100% rename from arch/arm/src/sam34/sam4cm_cpuindex.c rename to soc/arm/sam34/sam4cm_cpuindex.c diff --git a/arch/arm/src/sam34/sam4cm_cpustart.c b/soc/arm/sam34/sam4cm_cpustart.c similarity index 100% rename from arch/arm/src/sam34/sam4cm_cpustart.c rename to soc/arm/sam34/sam4cm_cpustart.c diff --git a/arch/arm/src/sam34/sam4cm_freerun.c b/soc/arm/sam34/sam4cm_freerun.c similarity index 100% rename from arch/arm/src/sam34/sam4cm_freerun.c rename to soc/arm/sam34/sam4cm_freerun.c diff --git a/arch/arm/src/sam34/sam4cm_freerun.h b/soc/arm/sam34/sam4cm_freerun.h similarity index 100% rename from arch/arm/src/sam34/sam4cm_freerun.h rename to soc/arm/sam34/sam4cm_freerun.h diff --git a/arch/arm/src/sam34/sam4cm_gpio.h b/soc/arm/sam34/sam4cm_gpio.h similarity index 100% rename from arch/arm/src/sam34/sam4cm_gpio.h rename to soc/arm/sam34/sam4cm_gpio.h diff --git a/arch/arm/src/sam34/sam4cm_idle.c b/soc/arm/sam34/sam4cm_idle.c similarity index 100% rename from arch/arm/src/sam34/sam4cm_idle.c rename to soc/arm/sam34/sam4cm_idle.c diff --git a/arch/arm/src/sam34/sam4cm_oneshot.c b/soc/arm/sam34/sam4cm_oneshot.c similarity index 100% rename from arch/arm/src/sam34/sam4cm_oneshot.c rename to soc/arm/sam34/sam4cm_oneshot.c diff --git a/arch/arm/src/sam34/sam4cm_oneshot.h b/soc/arm/sam34/sam4cm_oneshot.h similarity index 100% rename from arch/arm/src/sam34/sam4cm_oneshot.h rename to soc/arm/sam34/sam4cm_oneshot.h diff --git a/arch/arm/src/sam34/sam4cm_oneshot_lowerhalf.c b/soc/arm/sam34/sam4cm_oneshot_lowerhalf.c similarity index 100% rename from arch/arm/src/sam34/sam4cm_oneshot_lowerhalf.c rename to soc/arm/sam34/sam4cm_oneshot_lowerhalf.c diff --git a/arch/arm/src/sam34/sam4cm_periphclks.h b/soc/arm/sam34/sam4cm_periphclks.h similarity index 100% rename from arch/arm/src/sam34/sam4cm_periphclks.h rename to soc/arm/sam34/sam4cm_periphclks.h diff --git a/arch/arm/src/sam34/sam4cm_smpcall.c b/soc/arm/sam34/sam4cm_smpcall.c similarity index 100% rename from arch/arm/src/sam34/sam4cm_smpcall.c rename to soc/arm/sam34/sam4cm_smpcall.c diff --git a/arch/arm/src/sam34/sam4cm_supc.c b/soc/arm/sam34/sam4cm_supc.c similarity index 100% rename from arch/arm/src/sam34/sam4cm_supc.c rename to soc/arm/sam34/sam4cm_supc.c diff --git a/arch/arm/src/sam34/sam4cm_supc.h b/soc/arm/sam34/sam4cm_supc.h similarity index 100% rename from arch/arm/src/sam34/sam4cm_supc.h rename to soc/arm/sam34/sam4cm_supc.h diff --git a/arch/arm/src/sam34/sam4cm_tc.c b/soc/arm/sam34/sam4cm_tc.c similarity index 100% rename from arch/arm/src/sam34/sam4cm_tc.c rename to soc/arm/sam34/sam4cm_tc.c diff --git a/arch/arm/src/sam34/sam4cm_tc.h b/soc/arm/sam34/sam4cm_tc.h similarity index 100% rename from arch/arm/src/sam34/sam4cm_tc.h rename to soc/arm/sam34/sam4cm_tc.h diff --git a/arch/arm/src/sam34/sam4cm_tickless.c b/soc/arm/sam34/sam4cm_tickless.c similarity index 100% rename from arch/arm/src/sam34/sam4cm_tickless.c rename to soc/arm/sam34/sam4cm_tickless.c diff --git a/arch/arm/src/sam34/sam4e_gpio.h b/soc/arm/sam34/sam4e_gpio.h similarity index 100% rename from arch/arm/src/sam34/sam4e_gpio.h rename to soc/arm/sam34/sam4e_gpio.h diff --git a/arch/arm/src/sam34/sam4e_periphclks.h b/soc/arm/sam34/sam4e_periphclks.h similarity index 100% rename from arch/arm/src/sam34/sam4e_periphclks.h rename to soc/arm/sam34/sam4e_periphclks.h diff --git a/arch/arm/src/sam34/sam4l_clockconfig.c b/soc/arm/sam34/sam4l_clockconfig.c similarity index 100% rename from arch/arm/src/sam34/sam4l_clockconfig.c rename to soc/arm/sam34/sam4l_clockconfig.c diff --git a/arch/arm/src/sam34/sam4l_gpio.c b/soc/arm/sam34/sam4l_gpio.c similarity index 100% rename from arch/arm/src/sam34/sam4l_gpio.c rename to soc/arm/sam34/sam4l_gpio.c diff --git a/arch/arm/src/sam34/sam4l_gpio.h b/soc/arm/sam34/sam4l_gpio.h similarity index 100% rename from arch/arm/src/sam34/sam4l_gpio.h rename to soc/arm/sam34/sam4l_gpio.h diff --git a/arch/arm/src/sam34/sam4l_periphclks.c b/soc/arm/sam34/sam4l_periphclks.c similarity index 100% rename from arch/arm/src/sam34/sam4l_periphclks.c rename to soc/arm/sam34/sam4l_periphclks.c diff --git a/arch/arm/src/sam34/sam4l_periphclks.h b/soc/arm/sam34/sam4l_periphclks.h similarity index 100% rename from arch/arm/src/sam34/sam4l_periphclks.h rename to soc/arm/sam34/sam4l_periphclks.h diff --git a/arch/arm/src/sam34/sam4s_gpio.h b/soc/arm/sam34/sam4s_gpio.h similarity index 100% rename from arch/arm/src/sam34/sam4s_gpio.h rename to soc/arm/sam34/sam4s_gpio.h diff --git a/arch/arm/src/sam34/sam4s_nand.c b/soc/arm/sam34/sam4s_nand.c similarity index 100% rename from arch/arm/src/sam34/sam4s_nand.c rename to soc/arm/sam34/sam4s_nand.c diff --git a/arch/arm/src/sam34/sam4s_nand.h b/soc/arm/sam34/sam4s_nand.h similarity index 100% rename from arch/arm/src/sam34/sam4s_nand.h rename to soc/arm/sam34/sam4s_nand.h diff --git a/arch/arm/src/sam34/sam4s_periphclks.h b/soc/arm/sam34/sam4s_periphclks.h similarity index 100% rename from arch/arm/src/sam34/sam4s_periphclks.h rename to soc/arm/sam34/sam4s_periphclks.h diff --git a/arch/arm/src/sam34/sam_aes.c b/soc/arm/sam34/sam_aes.c similarity index 100% rename from arch/arm/src/sam34/sam_aes.c rename to soc/arm/sam34/sam_aes.c diff --git a/arch/arm/src/sam34/sam_aes.h b/soc/arm/sam34/sam_aes.h similarity index 100% rename from arch/arm/src/sam34/sam_aes.h rename to soc/arm/sam34/sam_aes.h diff --git a/arch/arm/src/sam34/sam_allocateheap.c b/soc/arm/sam34/sam_allocateheap.c similarity index 100% rename from arch/arm/src/sam34/sam_allocateheap.c rename to soc/arm/sam34/sam_allocateheap.c diff --git a/arch/arm/src/sam34/sam_clockconfig.c b/soc/arm/sam34/sam_clockconfig.c similarity index 100% rename from arch/arm/src/sam34/sam_clockconfig.c rename to soc/arm/sam34/sam_clockconfig.c diff --git a/arch/arm/src/sam34/sam_clockconfig.h b/soc/arm/sam34/sam_clockconfig.h similarity index 100% rename from arch/arm/src/sam34/sam_clockconfig.h rename to soc/arm/sam34/sam_clockconfig.h diff --git a/arch/arm/src/sam34/sam_cmcc.c b/soc/arm/sam34/sam_cmcc.c similarity index 100% rename from arch/arm/src/sam34/sam_cmcc.c rename to soc/arm/sam34/sam_cmcc.c diff --git a/arch/arm/src/sam34/sam_cmcc.h b/soc/arm/sam34/sam_cmcc.h similarity index 100% rename from arch/arm/src/sam34/sam_cmcc.h rename to soc/arm/sam34/sam_cmcc.h diff --git a/arch/arm/src/sam34/sam_crypto.c b/soc/arm/sam34/sam_crypto.c similarity index 100% rename from arch/arm/src/sam34/sam_crypto.c rename to soc/arm/sam34/sam_crypto.c diff --git a/arch/arm/src/sam34/sam_dmac.c b/soc/arm/sam34/sam_dmac.c similarity index 100% rename from arch/arm/src/sam34/sam_dmac.c rename to soc/arm/sam34/sam_dmac.c diff --git a/arch/arm/src/sam34/sam_dmac.h b/soc/arm/sam34/sam_dmac.h similarity index 100% rename from arch/arm/src/sam34/sam_dmac.h rename to soc/arm/sam34/sam_dmac.h diff --git a/arch/arm/src/sam34/sam_emac.c b/soc/arm/sam34/sam_emac.c similarity index 100% rename from arch/arm/src/sam34/sam_emac.c rename to soc/arm/sam34/sam_emac.c diff --git a/arch/arm/src/sam34/sam_emac.h b/soc/arm/sam34/sam_emac.h similarity index 100% rename from arch/arm/src/sam34/sam_emac.h rename to soc/arm/sam34/sam_emac.h diff --git a/arch/arm/src/sam34/sam_gpio.c b/soc/arm/sam34/sam_gpio.c similarity index 100% rename from arch/arm/src/sam34/sam_gpio.c rename to soc/arm/sam34/sam_gpio.c diff --git a/arch/arm/src/sam34/sam_gpio.h b/soc/arm/sam34/sam_gpio.h similarity index 100% rename from arch/arm/src/sam34/sam_gpio.h rename to soc/arm/sam34/sam_gpio.h diff --git a/arch/arm/src/sam34/sam_gpioirq.c b/soc/arm/sam34/sam_gpioirq.c similarity index 100% rename from arch/arm/src/sam34/sam_gpioirq.c rename to soc/arm/sam34/sam_gpioirq.c diff --git a/arch/arm/src/sam34/sam_hsmci.c b/soc/arm/sam34/sam_hsmci.c similarity index 100% rename from arch/arm/src/sam34/sam_hsmci.c rename to soc/arm/sam34/sam_hsmci.c diff --git a/arch/arm/src/sam34/sam_hsmci.h b/soc/arm/sam34/sam_hsmci.h similarity index 100% rename from arch/arm/src/sam34/sam_hsmci.h rename to soc/arm/sam34/sam_hsmci.h diff --git a/arch/arm/src/sam34/sam_irq.c b/soc/arm/sam34/sam_irq.c similarity index 100% rename from arch/arm/src/sam34/sam_irq.c rename to soc/arm/sam34/sam_irq.c diff --git a/arch/arm/src/sam34/sam_lowputc.c b/soc/arm/sam34/sam_lowputc.c similarity index 100% rename from arch/arm/src/sam34/sam_lowputc.c rename to soc/arm/sam34/sam_lowputc.c diff --git a/arch/arm/src/sam34/sam_lowputc.h b/soc/arm/sam34/sam_lowputc.h similarity index 100% rename from arch/arm/src/sam34/sam_lowputc.h rename to soc/arm/sam34/sam_lowputc.h diff --git a/arch/arm/src/sam34/sam_mpuinit.c b/soc/arm/sam34/sam_mpuinit.c similarity index 100% rename from arch/arm/src/sam34/sam_mpuinit.c rename to soc/arm/sam34/sam_mpuinit.c diff --git a/arch/arm/src/sam34/sam_mpuinit.h b/soc/arm/sam34/sam_mpuinit.h similarity index 100% rename from arch/arm/src/sam34/sam_mpuinit.h rename to soc/arm/sam34/sam_mpuinit.h diff --git a/arch/arm/src/sam34/sam_periphclks.h b/soc/arm/sam34/sam_periphclks.h similarity index 100% rename from arch/arm/src/sam34/sam_periphclks.h rename to soc/arm/sam34/sam_periphclks.h diff --git a/arch/arm/src/sam34/sam_rtc.c b/soc/arm/sam34/sam_rtc.c similarity index 100% rename from arch/arm/src/sam34/sam_rtc.c rename to soc/arm/sam34/sam_rtc.c diff --git a/arch/arm/src/sam34/sam_rtc.h b/soc/arm/sam34/sam_rtc.h similarity index 100% rename from arch/arm/src/sam34/sam_rtc.h rename to soc/arm/sam34/sam_rtc.h diff --git a/arch/arm/src/sam34/sam_rtt.c b/soc/arm/sam34/sam_rtt.c similarity index 100% rename from arch/arm/src/sam34/sam_rtt.c rename to soc/arm/sam34/sam_rtt.c diff --git a/arch/arm/src/sam34/sam_rtt.h b/soc/arm/sam34/sam_rtt.h similarity index 100% rename from arch/arm/src/sam34/sam_rtt.h rename to soc/arm/sam34/sam_rtt.h diff --git a/arch/arm/src/sam34/sam_serial.c b/soc/arm/sam34/sam_serial.c similarity index 100% rename from arch/arm/src/sam34/sam_serial.c rename to soc/arm/sam34/sam_serial.c diff --git a/arch/arm/src/sam34/sam_spi.c b/soc/arm/sam34/sam_spi.c similarity index 100% rename from arch/arm/src/sam34/sam_spi.c rename to soc/arm/sam34/sam_spi.c diff --git a/arch/arm/src/sam34/sam_spi.h b/soc/arm/sam34/sam_spi.h similarity index 100% rename from arch/arm/src/sam34/sam_spi.h rename to soc/arm/sam34/sam_spi.h diff --git a/arch/arm/src/sam34/sam_start.c b/soc/arm/sam34/sam_start.c similarity index 100% rename from arch/arm/src/sam34/sam_start.c rename to soc/arm/sam34/sam_start.c diff --git a/arch/arm/src/sam34/sam_start.h b/soc/arm/sam34/sam_start.h similarity index 100% rename from arch/arm/src/sam34/sam_start.h rename to soc/arm/sam34/sam_start.h diff --git a/arch/arm/src/sam34/sam_tc.c b/soc/arm/sam34/sam_tc.c similarity index 100% rename from arch/arm/src/sam34/sam_tc.c rename to soc/arm/sam34/sam_tc.c diff --git a/arch/arm/src/sam34/sam_tc.h b/soc/arm/sam34/sam_tc.h similarity index 100% rename from arch/arm/src/sam34/sam_tc.h rename to soc/arm/sam34/sam_tc.h diff --git a/arch/arm/src/sam34/sam_timerisr.c b/soc/arm/sam34/sam_timerisr.c similarity index 100% rename from arch/arm/src/sam34/sam_timerisr.c rename to soc/arm/sam34/sam_timerisr.c diff --git a/arch/arm/src/sam34/sam_twi.c b/soc/arm/sam34/sam_twi.c similarity index 100% rename from arch/arm/src/sam34/sam_twi.c rename to soc/arm/sam34/sam_twi.c diff --git a/arch/arm/src/sam34/sam_twi.h b/soc/arm/sam34/sam_twi.h similarity index 100% rename from arch/arm/src/sam34/sam_twi.h rename to soc/arm/sam34/sam_twi.h diff --git a/arch/arm/src/sam34/sam_udp.c b/soc/arm/sam34/sam_udp.c similarity index 100% rename from arch/arm/src/sam34/sam_udp.c rename to soc/arm/sam34/sam_udp.c diff --git a/arch/arm/src/sam34/sam_udp.h b/soc/arm/sam34/sam_udp.h similarity index 100% rename from arch/arm/src/sam34/sam_udp.h rename to soc/arm/sam34/sam_udp.h diff --git a/arch/arm/src/sam34/sam_userspace.c b/soc/arm/sam34/sam_userspace.c similarity index 100% rename from arch/arm/src/sam34/sam_userspace.c rename to soc/arm/sam34/sam_userspace.c diff --git a/arch/arm/src/sam34/sam_userspace.h b/soc/arm/sam34/sam_userspace.h similarity index 100% rename from arch/arm/src/sam34/sam_userspace.h rename to soc/arm/sam34/sam_userspace.h diff --git a/arch/arm/src/sam34/sam_vectors.c b/soc/arm/sam34/sam_vectors.c similarity index 100% rename from arch/arm/src/sam34/sam_vectors.c rename to soc/arm/sam34/sam_vectors.c diff --git a/arch/arm/src/sam34/sam_wdt.c b/soc/arm/sam34/sam_wdt.c similarity index 100% rename from arch/arm/src/sam34/sam_wdt.c rename to soc/arm/sam34/sam_wdt.c diff --git a/arch/arm/src/sam34/sam_wdt.h b/soc/arm/sam34/sam_wdt.h similarity index 100% rename from arch/arm/src/sam34/sam_wdt.h rename to soc/arm/sam34/sam_wdt.h diff --git a/arch/arm/src/sama5/Kconfig b/soc/arm/sama5/Kconfig similarity index 100% rename from arch/arm/src/sama5/Kconfig rename to soc/arm/sama5/Kconfig diff --git a/arch/arm/src/sama5/Make.defs b/soc/arm/sama5/Make.defs similarity index 100% rename from arch/arm/src/sama5/Make.defs rename to soc/arm/sama5/Make.defs diff --git a/arch/arm/src/sama5/chip.h b/soc/arm/sama5/chip.h similarity index 100% rename from arch/arm/src/sama5/chip.h rename to soc/arm/sama5/chip.h diff --git a/arch/arm/src/sama5/hardware/_sama5d2x_memorymap.h b/soc/arm/sama5/hardware/_sama5d2x_memorymap.h similarity index 100% rename from arch/arm/src/sama5/hardware/_sama5d2x_memorymap.h rename to soc/arm/sama5/hardware/_sama5d2x_memorymap.h diff --git a/arch/arm/src/sama5/hardware/_sama5d2x_pinmap.h b/soc/arm/sama5/hardware/_sama5d2x_pinmap.h similarity index 100% rename from arch/arm/src/sama5/hardware/_sama5d2x_pinmap.h rename to soc/arm/sama5/hardware/_sama5d2x_pinmap.h diff --git a/arch/arm/src/sama5/hardware/_sama5d2x_pio.h b/soc/arm/sama5/hardware/_sama5d2x_pio.h similarity index 100% rename from arch/arm/src/sama5/hardware/_sama5d2x_pio.h rename to soc/arm/sama5/hardware/_sama5d2x_pio.h diff --git a/arch/arm/src/sama5/hardware/_sama5d3x4x_pio.h b/soc/arm/sama5/hardware/_sama5d3x4x_pio.h similarity index 100% rename from arch/arm/src/sama5/hardware/_sama5d3x4x_pio.h rename to soc/arm/sama5/hardware/_sama5d3x4x_pio.h diff --git a/arch/arm/src/sama5/hardware/_sama5d3x_memorymap.h b/soc/arm/sama5/hardware/_sama5d3x_memorymap.h similarity index 100% rename from arch/arm/src/sama5/hardware/_sama5d3x_memorymap.h rename to soc/arm/sama5/hardware/_sama5d3x_memorymap.h diff --git a/arch/arm/src/sama5/hardware/_sama5d3x_mpddrc.h b/soc/arm/sama5/hardware/_sama5d3x_mpddrc.h similarity index 100% rename from arch/arm/src/sama5/hardware/_sama5d3x_mpddrc.h rename to soc/arm/sama5/hardware/_sama5d3x_mpddrc.h diff --git a/arch/arm/src/sama5/hardware/_sama5d3x_pinmap.h b/soc/arm/sama5/hardware/_sama5d3x_pinmap.h similarity index 100% rename from arch/arm/src/sama5/hardware/_sama5d3x_pinmap.h rename to soc/arm/sama5/hardware/_sama5d3x_pinmap.h diff --git a/arch/arm/src/sama5/hardware/_sama5d4x_memorymap.h b/soc/arm/sama5/hardware/_sama5d4x_memorymap.h similarity index 100% rename from arch/arm/src/sama5/hardware/_sama5d4x_memorymap.h rename to soc/arm/sama5/hardware/_sama5d4x_memorymap.h diff --git a/arch/arm/src/sama5/hardware/_sama5d4x_mpddrc.h b/soc/arm/sama5/hardware/_sama5d4x_mpddrc.h similarity index 100% rename from arch/arm/src/sama5/hardware/_sama5d4x_mpddrc.h rename to soc/arm/sama5/hardware/_sama5d4x_mpddrc.h diff --git a/arch/arm/src/sama5/hardware/_sama5d4x_pinmap.h b/soc/arm/sama5/hardware/_sama5d4x_pinmap.h similarity index 100% rename from arch/arm/src/sama5/hardware/_sama5d4x_pinmap.h rename to soc/arm/sama5/hardware/_sama5d4x_pinmap.h diff --git a/arch/arm/src/sama5/hardware/sam_adc.h b/soc/arm/sama5/hardware/sam_adc.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_adc.h rename to soc/arm/sama5/hardware/sam_adc.h diff --git a/arch/arm/src/sama5/hardware/sam_aic.h b/soc/arm/sama5/hardware/sam_aic.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_aic.h rename to soc/arm/sama5/hardware/sam_aic.h diff --git a/arch/arm/src/sama5/hardware/sam_aximx.h b/soc/arm/sama5/hardware/sam_aximx.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_aximx.h rename to soc/arm/sama5/hardware/sam_aximx.h diff --git a/arch/arm/src/sama5/hardware/sam_bsc.h b/soc/arm/sama5/hardware/sam_bsc.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_bsc.h rename to soc/arm/sama5/hardware/sam_bsc.h diff --git a/arch/arm/src/sama5/hardware/sam_can.h b/soc/arm/sama5/hardware/sam_can.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_can.h rename to soc/arm/sama5/hardware/sam_can.h diff --git a/arch/arm/src/sama5/hardware/sam_classd.h b/soc/arm/sama5/hardware/sam_classd.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_classd.h rename to soc/arm/sama5/hardware/sam_classd.h diff --git a/arch/arm/src/sama5/hardware/sam_dbgu.h b/soc/arm/sama5/hardware/sam_dbgu.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_dbgu.h rename to soc/arm/sama5/hardware/sam_dbgu.h diff --git a/arch/arm/src/sama5/hardware/sam_dmac.h b/soc/arm/sama5/hardware/sam_dmac.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_dmac.h rename to soc/arm/sama5/hardware/sam_dmac.h diff --git a/arch/arm/src/sama5/hardware/sam_ehci.h b/soc/arm/sama5/hardware/sam_ehci.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_ehci.h rename to soc/arm/sama5/hardware/sam_ehci.h diff --git a/arch/arm/src/sama5/hardware/sam_emac.h b/soc/arm/sama5/hardware/sam_emac.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_emac.h rename to soc/arm/sama5/hardware/sam_emac.h diff --git a/arch/arm/src/sama5/hardware/sam_emaca.h b/soc/arm/sama5/hardware/sam_emaca.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_emaca.h rename to soc/arm/sama5/hardware/sam_emaca.h diff --git a/arch/arm/src/sama5/hardware/sam_emacb.h b/soc/arm/sama5/hardware/sam_emacb.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_emacb.h rename to soc/arm/sama5/hardware/sam_emacb.h diff --git a/arch/arm/src/sama5/hardware/sam_flexcom.h b/soc/arm/sama5/hardware/sam_flexcom.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_flexcom.h rename to soc/arm/sama5/hardware/sam_flexcom.h diff --git a/arch/arm/src/sama5/hardware/sam_flexcom_spi.h b/soc/arm/sama5/hardware/sam_flexcom_spi.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_flexcom_spi.h rename to soc/arm/sama5/hardware/sam_flexcom_spi.h diff --git a/arch/arm/src/sama5/hardware/sam_flexcom_twi.h b/soc/arm/sama5/hardware/sam_flexcom_twi.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_flexcom_twi.h rename to soc/arm/sama5/hardware/sam_flexcom_twi.h diff --git a/arch/arm/src/sama5/hardware/sam_flexcom_usart.h b/soc/arm/sama5/hardware/sam_flexcom_usart.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_flexcom_usart.h rename to soc/arm/sama5/hardware/sam_flexcom_usart.h diff --git a/arch/arm/src/sama5/hardware/sam_gmac.h b/soc/arm/sama5/hardware/sam_gmac.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_gmac.h rename to soc/arm/sama5/hardware/sam_gmac.h diff --git a/arch/arm/src/sama5/hardware/sam_gpbr.h b/soc/arm/sama5/hardware/sam_gpbr.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_gpbr.h rename to soc/arm/sama5/hardware/sam_gpbr.h diff --git a/arch/arm/src/sama5/hardware/sam_hsmc.h b/soc/arm/sama5/hardware/sam_hsmc.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_hsmc.h rename to soc/arm/sama5/hardware/sam_hsmc.h diff --git a/arch/arm/src/sama5/hardware/sam_hsmci.h b/soc/arm/sama5/hardware/sam_hsmci.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_hsmci.h rename to soc/arm/sama5/hardware/sam_hsmci.h diff --git a/arch/arm/src/sama5/hardware/sam_isi.h b/soc/arm/sama5/hardware/sam_isi.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_isi.h rename to soc/arm/sama5/hardware/sam_isi.h diff --git a/arch/arm/src/sama5/hardware/sam_lcdc.h b/soc/arm/sama5/hardware/sam_lcdc.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_lcdc.h rename to soc/arm/sama5/hardware/sam_lcdc.h diff --git a/arch/arm/src/sama5/hardware/sam_matrix.h b/soc/arm/sama5/hardware/sam_matrix.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_matrix.h rename to soc/arm/sama5/hardware/sam_matrix.h diff --git a/arch/arm/src/sama5/hardware/sam_mcan.h b/soc/arm/sama5/hardware/sam_mcan.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_mcan.h rename to soc/arm/sama5/hardware/sam_mcan.h diff --git a/arch/arm/src/sama5/hardware/sam_memorymap.h b/soc/arm/sama5/hardware/sam_memorymap.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_memorymap.h rename to soc/arm/sama5/hardware/sam_memorymap.h diff --git a/arch/arm/src/sama5/hardware/sam_mpddrc.h b/soc/arm/sama5/hardware/sam_mpddrc.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_mpddrc.h rename to soc/arm/sama5/hardware/sam_mpddrc.h diff --git a/arch/arm/src/sama5/hardware/sam_ohci.h b/soc/arm/sama5/hardware/sam_ohci.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_ohci.h rename to soc/arm/sama5/hardware/sam_ohci.h diff --git a/arch/arm/src/sama5/hardware/sam_pinmap.h b/soc/arm/sama5/hardware/sam_pinmap.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_pinmap.h rename to soc/arm/sama5/hardware/sam_pinmap.h diff --git a/arch/arm/src/sama5/hardware/sam_pio.h b/soc/arm/sama5/hardware/sam_pio.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_pio.h rename to soc/arm/sama5/hardware/sam_pio.h diff --git a/arch/arm/src/sama5/hardware/sam_pit.h b/soc/arm/sama5/hardware/sam_pit.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_pit.h rename to soc/arm/sama5/hardware/sam_pit.h diff --git a/arch/arm/src/sama5/hardware/sam_pmc.h b/soc/arm/sama5/hardware/sam_pmc.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_pmc.h rename to soc/arm/sama5/hardware/sam_pmc.h diff --git a/arch/arm/src/sama5/hardware/sam_pwm.h b/soc/arm/sama5/hardware/sam_pwm.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_pwm.h rename to soc/arm/sama5/hardware/sam_pwm.h diff --git a/arch/arm/src/sama5/hardware/sam_qspi.h b/soc/arm/sama5/hardware/sam_qspi.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_qspi.h rename to soc/arm/sama5/hardware/sam_qspi.h diff --git a/arch/arm/src/sama5/hardware/sam_rstc.h b/soc/arm/sama5/hardware/sam_rstc.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_rstc.h rename to soc/arm/sama5/hardware/sam_rstc.h diff --git a/arch/arm/src/sama5/hardware/sam_rtc.h b/soc/arm/sama5/hardware/sam_rtc.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_rtc.h rename to soc/arm/sama5/hardware/sam_rtc.h diff --git a/arch/arm/src/sama5/hardware/sam_rxlp.h b/soc/arm/sama5/hardware/sam_rxlp.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_rxlp.h rename to soc/arm/sama5/hardware/sam_rxlp.h diff --git a/arch/arm/src/sama5/hardware/sam_sckc.h b/soc/arm/sama5/hardware/sam_sckc.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_sckc.h rename to soc/arm/sama5/hardware/sam_sckc.h diff --git a/arch/arm/src/sama5/hardware/sam_sdmmc.h b/soc/arm/sama5/hardware/sam_sdmmc.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_sdmmc.h rename to soc/arm/sama5/hardware/sam_sdmmc.h diff --git a/arch/arm/src/sama5/hardware/sam_sfc.h b/soc/arm/sama5/hardware/sam_sfc.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_sfc.h rename to soc/arm/sama5/hardware/sam_sfc.h diff --git a/arch/arm/src/sama5/hardware/sam_sfr.h b/soc/arm/sama5/hardware/sam_sfr.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_sfr.h rename to soc/arm/sama5/hardware/sam_sfr.h diff --git a/arch/arm/src/sama5/hardware/sam_spi.h b/soc/arm/sama5/hardware/sam_spi.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_spi.h rename to soc/arm/sama5/hardware/sam_spi.h diff --git a/arch/arm/src/sama5/hardware/sam_ssc.h b/soc/arm/sama5/hardware/sam_ssc.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_ssc.h rename to soc/arm/sama5/hardware/sam_ssc.h diff --git a/arch/arm/src/sama5/hardware/sam_tc.h b/soc/arm/sama5/hardware/sam_tc.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_tc.h rename to soc/arm/sama5/hardware/sam_tc.h diff --git a/arch/arm/src/sama5/hardware/sam_trng.h b/soc/arm/sama5/hardware/sam_trng.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_trng.h rename to soc/arm/sama5/hardware/sam_trng.h diff --git a/arch/arm/src/sama5/hardware/sam_twi.h b/soc/arm/sama5/hardware/sam_twi.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_twi.h rename to soc/arm/sama5/hardware/sam_twi.h diff --git a/arch/arm/src/sama5/hardware/sam_uart.h b/soc/arm/sama5/hardware/sam_uart.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_uart.h rename to soc/arm/sama5/hardware/sam_uart.h diff --git a/arch/arm/src/sama5/hardware/sam_udphs.h b/soc/arm/sama5/hardware/sam_udphs.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_udphs.h rename to soc/arm/sama5/hardware/sam_udphs.h diff --git a/arch/arm/src/sama5/hardware/sam_wdt.h b/soc/arm/sama5/hardware/sam_wdt.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_wdt.h rename to soc/arm/sama5/hardware/sam_wdt.h diff --git a/arch/arm/src/sama5/hardware/sam_xdmac.h b/soc/arm/sama5/hardware/sam_xdmac.h similarity index 100% rename from arch/arm/src/sama5/hardware/sam_xdmac.h rename to soc/arm/sama5/hardware/sam_xdmac.h diff --git a/arch/arm/src/sama5/hardware/sama5d2_sdmmc.h b/soc/arm/sama5/hardware/sama5d2_sdmmc.h similarity index 100% rename from arch/arm/src/sama5/hardware/sama5d2_sdmmc.h rename to soc/arm/sama5/hardware/sama5d2_sdmmc.h diff --git a/arch/arm/src/sama5/sam_adc.c b/soc/arm/sama5/sam_adc.c similarity index 100% rename from arch/arm/src/sama5/sam_adc.c rename to soc/arm/sama5/sam_adc.c diff --git a/arch/arm/src/sama5/sam_adc.h b/soc/arm/sama5/sam_adc.h similarity index 100% rename from arch/arm/src/sama5/sam_adc.h rename to soc/arm/sama5/sam_adc.h diff --git a/arch/arm/src/sama5/sam_allocateheap.c b/soc/arm/sama5/sam_allocateheap.c similarity index 100% rename from arch/arm/src/sama5/sam_allocateheap.c rename to soc/arm/sama5/sam_allocateheap.c diff --git a/arch/arm/src/sama5/sam_boot.c b/soc/arm/sama5/sam_boot.c similarity index 100% rename from arch/arm/src/sama5/sam_boot.c rename to soc/arm/sama5/sam_boot.c diff --git a/arch/arm/src/sama5/sam_boot.h b/soc/arm/sama5/sam_boot.h similarity index 100% rename from arch/arm/src/sama5/sam_boot.h rename to soc/arm/sama5/sam_boot.h diff --git a/arch/arm/src/sama5/sam_can.c b/soc/arm/sama5/sam_can.c similarity index 100% rename from arch/arm/src/sama5/sam_can.c rename to soc/arm/sama5/sam_can.c diff --git a/arch/arm/src/sama5/sam_can.h b/soc/arm/sama5/sam_can.h similarity index 100% rename from arch/arm/src/sama5/sam_can.h rename to soc/arm/sama5/sam_can.h diff --git a/arch/arm/src/sama5/sam_classd.c b/soc/arm/sama5/sam_classd.c similarity index 100% rename from arch/arm/src/sama5/sam_classd.c rename to soc/arm/sama5/sam_classd.c diff --git a/arch/arm/src/sama5/sam_classd.h b/soc/arm/sama5/sam_classd.h similarity index 100% rename from arch/arm/src/sama5/sam_classd.h rename to soc/arm/sama5/sam_classd.h diff --git a/arch/arm/src/sama5/sam_clockconfig.c b/soc/arm/sama5/sam_clockconfig.c similarity index 100% rename from arch/arm/src/sama5/sam_clockconfig.c rename to soc/arm/sama5/sam_clockconfig.c diff --git a/arch/arm/src/sama5/sam_clockconfig.h b/soc/arm/sama5/sam_clockconfig.h similarity index 100% rename from arch/arm/src/sama5/sam_clockconfig.h rename to soc/arm/sama5/sam_clockconfig.h diff --git a/arch/arm/src/sama5/sam_config.h b/soc/arm/sama5/sam_config.h similarity index 100% rename from arch/arm/src/sama5/sam_config.h rename to soc/arm/sama5/sam_config.h diff --git a/arch/arm/src/sama5/sam_dbgu.c b/soc/arm/sama5/sam_dbgu.c similarity index 100% rename from arch/arm/src/sama5/sam_dbgu.c rename to soc/arm/sama5/sam_dbgu.c diff --git a/arch/arm/src/sama5/sam_dbgu.h b/soc/arm/sama5/sam_dbgu.h similarity index 100% rename from arch/arm/src/sama5/sam_dbgu.h rename to soc/arm/sama5/sam_dbgu.h diff --git a/arch/arm/src/sama5/sam_dmac.c b/soc/arm/sama5/sam_dmac.c similarity index 100% rename from arch/arm/src/sama5/sam_dmac.c rename to soc/arm/sama5/sam_dmac.c diff --git a/arch/arm/src/sama5/sam_dmac.h b/soc/arm/sama5/sam_dmac.h similarity index 100% rename from arch/arm/src/sama5/sam_dmac.h rename to soc/arm/sama5/sam_dmac.h diff --git a/arch/arm/src/sama5/sam_ehci.c b/soc/arm/sama5/sam_ehci.c similarity index 100% rename from arch/arm/src/sama5/sam_ehci.c rename to soc/arm/sama5/sam_ehci.c diff --git a/arch/arm/src/sama5/sam_emaca.c b/soc/arm/sama5/sam_emaca.c similarity index 100% rename from arch/arm/src/sama5/sam_emaca.c rename to soc/arm/sama5/sam_emaca.c diff --git a/arch/arm/src/sama5/sam_emacb.c b/soc/arm/sama5/sam_emacb.c similarity index 100% rename from arch/arm/src/sama5/sam_emacb.c rename to soc/arm/sama5/sam_emacb.c diff --git a/arch/arm/src/sama5/sam_ethernet.c b/soc/arm/sama5/sam_ethernet.c similarity index 100% rename from arch/arm/src/sama5/sam_ethernet.c rename to soc/arm/sama5/sam_ethernet.c diff --git a/arch/arm/src/sama5/sam_ethernet.h b/soc/arm/sama5/sam_ethernet.h similarity index 100% rename from arch/arm/src/sama5/sam_ethernet.h rename to soc/arm/sama5/sam_ethernet.h diff --git a/arch/arm/src/sama5/sam_flexcom_serial.c b/soc/arm/sama5/sam_flexcom_serial.c similarity index 100% rename from arch/arm/src/sama5/sam_flexcom_serial.c rename to soc/arm/sama5/sam_flexcom_serial.c diff --git a/arch/arm/src/sama5/sam_flexcom_spi.c b/soc/arm/sama5/sam_flexcom_spi.c similarity index 100% rename from arch/arm/src/sama5/sam_flexcom_spi.c rename to soc/arm/sama5/sam_flexcom_spi.c diff --git a/arch/arm/src/sama5/sam_flexcom_spi.h b/soc/arm/sama5/sam_flexcom_spi.h similarity index 100% rename from arch/arm/src/sama5/sam_flexcom_spi.h rename to soc/arm/sama5/sam_flexcom_spi.h diff --git a/arch/arm/src/sama5/sam_freerun.c b/soc/arm/sama5/sam_freerun.c similarity index 100% rename from arch/arm/src/sama5/sam_freerun.c rename to soc/arm/sama5/sam_freerun.c diff --git a/arch/arm/src/sama5/sam_freerun.h b/soc/arm/sama5/sam_freerun.h similarity index 100% rename from arch/arm/src/sama5/sam_freerun.h rename to soc/arm/sama5/sam_freerun.h diff --git a/arch/arm/src/sama5/sam_gf1024.c b/soc/arm/sama5/sam_gf1024.c similarity index 100% rename from arch/arm/src/sama5/sam_gf1024.c rename to soc/arm/sama5/sam_gf1024.c diff --git a/arch/arm/src/sama5/sam_gf512.c b/soc/arm/sama5/sam_gf512.c similarity index 100% rename from arch/arm/src/sama5/sam_gf512.c rename to soc/arm/sama5/sam_gf512.c diff --git a/arch/arm/src/sama5/sam_gmac.c b/soc/arm/sama5/sam_gmac.c similarity index 100% rename from arch/arm/src/sama5/sam_gmac.c rename to soc/arm/sama5/sam_gmac.c diff --git a/arch/arm/src/sama5/sam_hsmci.c b/soc/arm/sama5/sam_hsmci.c similarity index 100% rename from arch/arm/src/sama5/sam_hsmci.c rename to soc/arm/sama5/sam_hsmci.c diff --git a/arch/arm/src/sama5/sam_hsmci.h b/soc/arm/sama5/sam_hsmci.h similarity index 100% rename from arch/arm/src/sama5/sam_hsmci.h rename to soc/arm/sama5/sam_hsmci.h diff --git a/arch/arm/src/sama5/sam_hsmci_clkdiv.c b/soc/arm/sama5/sam_hsmci_clkdiv.c similarity index 100% rename from arch/arm/src/sama5/sam_hsmci_clkdiv.c rename to soc/arm/sama5/sam_hsmci_clkdiv.c diff --git a/arch/arm/src/sama5/sam_irq.c b/soc/arm/sama5/sam_irq.c similarity index 100% rename from arch/arm/src/sama5/sam_irq.c rename to soc/arm/sama5/sam_irq.c diff --git a/arch/arm/src/sama5/sam_irq.h b/soc/arm/sama5/sam_irq.h similarity index 100% rename from arch/arm/src/sama5/sam_irq.h rename to soc/arm/sama5/sam_irq.h diff --git a/arch/arm/src/sama5/sam_isi.c b/soc/arm/sama5/sam_isi.c similarity index 100% rename from arch/arm/src/sama5/sam_isi.c rename to soc/arm/sama5/sam_isi.c diff --git a/arch/arm/src/sama5/sam_isi.h b/soc/arm/sama5/sam_isi.h similarity index 100% rename from arch/arm/src/sama5/sam_isi.h rename to soc/arm/sama5/sam_isi.h diff --git a/arch/arm/src/sama5/sam_lcd.c b/soc/arm/sama5/sam_lcd.c similarity index 100% rename from arch/arm/src/sama5/sam_lcd.c rename to soc/arm/sama5/sam_lcd.c diff --git a/arch/arm/src/sama5/sam_lcd.h b/soc/arm/sama5/sam_lcd.h similarity index 100% rename from arch/arm/src/sama5/sam_lcd.h rename to soc/arm/sama5/sam_lcd.h diff --git a/arch/arm/src/sama5/sam_lowputc.c b/soc/arm/sama5/sam_lowputc.c similarity index 100% rename from arch/arm/src/sama5/sam_lowputc.c rename to soc/arm/sama5/sam_lowputc.c diff --git a/arch/arm/src/sama5/sam_lowputc.h b/soc/arm/sama5/sam_lowputc.h similarity index 100% rename from arch/arm/src/sama5/sam_lowputc.h rename to soc/arm/sama5/sam_lowputc.h diff --git a/arch/arm/src/sama5/sam_mcan.c b/soc/arm/sama5/sam_mcan.c similarity index 100% rename from arch/arm/src/sama5/sam_mcan.c rename to soc/arm/sama5/sam_mcan.c diff --git a/arch/arm/src/sama5/sam_mcan.h b/soc/arm/sama5/sam_mcan.h similarity index 100% rename from arch/arm/src/sama5/sam_mcan.h rename to soc/arm/sama5/sam_mcan.h diff --git a/arch/arm/src/sama5/sam_memories.c b/soc/arm/sama5/sam_memories.c similarity index 100% rename from arch/arm/src/sama5/sam_memories.c rename to soc/arm/sama5/sam_memories.c diff --git a/arch/arm/src/sama5/sam_memories.h b/soc/arm/sama5/sam_memories.h similarity index 100% rename from arch/arm/src/sama5/sam_memories.h rename to soc/arm/sama5/sam_memories.h diff --git a/arch/arm/src/sama5/sam_memorymap.c b/soc/arm/sama5/sam_memorymap.c similarity index 100% rename from arch/arm/src/sama5/sam_memorymap.c rename to soc/arm/sama5/sam_memorymap.c diff --git a/arch/arm/src/sama5/sam_memorymap.h b/soc/arm/sama5/sam_memorymap.h similarity index 100% rename from arch/arm/src/sama5/sam_memorymap.h rename to soc/arm/sama5/sam_memorymap.h diff --git a/arch/arm/src/sama5/sam_nand.c b/soc/arm/sama5/sam_nand.c similarity index 100% rename from arch/arm/src/sama5/sam_nand.c rename to soc/arm/sama5/sam_nand.c diff --git a/arch/arm/src/sama5/sam_nand.h b/soc/arm/sama5/sam_nand.h similarity index 100% rename from arch/arm/src/sama5/sam_nand.h rename to soc/arm/sama5/sam_nand.h diff --git a/arch/arm/src/sama5/sam_ohci.c b/soc/arm/sama5/sam_ohci.c similarity index 100% rename from arch/arm/src/sama5/sam_ohci.c rename to soc/arm/sama5/sam_ohci.c diff --git a/arch/arm/src/sama5/sam_oneshot.c b/soc/arm/sama5/sam_oneshot.c similarity index 100% rename from arch/arm/src/sama5/sam_oneshot.c rename to soc/arm/sama5/sam_oneshot.c diff --git a/arch/arm/src/sama5/sam_oneshot.h b/soc/arm/sama5/sam_oneshot.h similarity index 100% rename from arch/arm/src/sama5/sam_oneshot.h rename to soc/arm/sama5/sam_oneshot.h diff --git a/arch/arm/src/sama5/sam_oneshot_lowerhalf.c b/soc/arm/sama5/sam_oneshot_lowerhalf.c similarity index 100% rename from arch/arm/src/sama5/sam_oneshot_lowerhalf.c rename to soc/arm/sama5/sam_oneshot_lowerhalf.c diff --git a/arch/arm/src/sama5/sam_pck.c b/soc/arm/sama5/sam_pck.c similarity index 100% rename from arch/arm/src/sama5/sam_pck.c rename to soc/arm/sama5/sam_pck.c diff --git a/arch/arm/src/sama5/sam_pck.h b/soc/arm/sama5/sam_pck.h similarity index 100% rename from arch/arm/src/sama5/sam_pck.h rename to soc/arm/sama5/sam_pck.h diff --git a/arch/arm/src/sama5/sam_periphclks.h b/soc/arm/sama5/sam_periphclks.h similarity index 100% rename from arch/arm/src/sama5/sam_periphclks.h rename to soc/arm/sama5/sam_periphclks.h diff --git a/arch/arm/src/sama5/sam_pgalloc.c b/soc/arm/sama5/sam_pgalloc.c similarity index 100% rename from arch/arm/src/sama5/sam_pgalloc.c rename to soc/arm/sama5/sam_pgalloc.c diff --git a/arch/arm/src/sama5/sam_pio.c b/soc/arm/sama5/sam_pio.c similarity index 100% rename from arch/arm/src/sama5/sam_pio.c rename to soc/arm/sama5/sam_pio.c diff --git a/arch/arm/src/sama5/sam_pio.h b/soc/arm/sama5/sam_pio.h similarity index 100% rename from arch/arm/src/sama5/sam_pio.h rename to soc/arm/sama5/sam_pio.h diff --git a/arch/arm/src/sama5/sam_pioirq.c b/soc/arm/sama5/sam_pioirq.c similarity index 100% rename from arch/arm/src/sama5/sam_pioirq.c rename to soc/arm/sama5/sam_pioirq.c diff --git a/arch/arm/src/sama5/sam_pmc.c b/soc/arm/sama5/sam_pmc.c similarity index 100% rename from arch/arm/src/sama5/sam_pmc.c rename to soc/arm/sama5/sam_pmc.c diff --git a/arch/arm/src/sama5/sam_pmc.h b/soc/arm/sama5/sam_pmc.h similarity index 100% rename from arch/arm/src/sama5/sam_pmc.h rename to soc/arm/sama5/sam_pmc.h diff --git a/arch/arm/src/sama5/sam_pmecc.c b/soc/arm/sama5/sam_pmecc.c similarity index 100% rename from arch/arm/src/sama5/sam_pmecc.c rename to soc/arm/sama5/sam_pmecc.c diff --git a/arch/arm/src/sama5/sam_pmecc.h b/soc/arm/sama5/sam_pmecc.h similarity index 100% rename from arch/arm/src/sama5/sam_pmecc.h rename to soc/arm/sama5/sam_pmecc.h diff --git a/arch/arm/src/sama5/sam_pwm.c b/soc/arm/sama5/sam_pwm.c similarity index 100% rename from arch/arm/src/sama5/sam_pwm.c rename to soc/arm/sama5/sam_pwm.c diff --git a/arch/arm/src/sama5/sam_pwm.h b/soc/arm/sama5/sam_pwm.h similarity index 100% rename from arch/arm/src/sama5/sam_pwm.h rename to soc/arm/sama5/sam_pwm.h diff --git a/arch/arm/src/sama5/sam_qspi.c b/soc/arm/sama5/sam_qspi.c similarity index 100% rename from arch/arm/src/sama5/sam_qspi.c rename to soc/arm/sama5/sam_qspi.c diff --git a/arch/arm/src/sama5/sam_qspi.h b/soc/arm/sama5/sam_qspi.h similarity index 100% rename from arch/arm/src/sama5/sam_qspi.h rename to soc/arm/sama5/sam_qspi.h diff --git a/arch/arm/src/sama5/sam_rtc.c b/soc/arm/sama5/sam_rtc.c similarity index 100% rename from arch/arm/src/sama5/sam_rtc.c rename to soc/arm/sama5/sam_rtc.c diff --git a/arch/arm/src/sama5/sam_rtc.h b/soc/arm/sama5/sam_rtc.h similarity index 100% rename from arch/arm/src/sama5/sam_rtc.h rename to soc/arm/sama5/sam_rtc.h diff --git a/arch/arm/src/sama5/sam_sckc.c b/soc/arm/sama5/sam_sckc.c similarity index 100% rename from arch/arm/src/sama5/sam_sckc.c rename to soc/arm/sama5/sam_sckc.c diff --git a/arch/arm/src/sama5/sam_sckc.h b/soc/arm/sama5/sam_sckc.h similarity index 100% rename from arch/arm/src/sama5/sam_sckc.h rename to soc/arm/sama5/sam_sckc.h diff --git a/arch/arm/src/sama5/sam_sdmmc.c b/soc/arm/sama5/sam_sdmmc.c similarity index 100% rename from arch/arm/src/sama5/sam_sdmmc.c rename to soc/arm/sama5/sam_sdmmc.c diff --git a/arch/arm/src/sama5/sam_sdmmc.h b/soc/arm/sama5/sam_sdmmc.h similarity index 100% rename from arch/arm/src/sama5/sam_sdmmc.h rename to soc/arm/sama5/sam_sdmmc.h diff --git a/arch/arm/src/sama5/sam_serial.c b/soc/arm/sama5/sam_serial.c similarity index 100% rename from arch/arm/src/sama5/sam_serial.c rename to soc/arm/sama5/sam_serial.c diff --git a/arch/arm/src/sama5/sam_serial.h b/soc/arm/sama5/sam_serial.h similarity index 100% rename from arch/arm/src/sama5/sam_serial.h rename to soc/arm/sama5/sam_serial.h diff --git a/arch/arm/src/sama5/sam_serialinit.c b/soc/arm/sama5/sam_serialinit.c similarity index 100% rename from arch/arm/src/sama5/sam_serialinit.c rename to soc/arm/sama5/sam_serialinit.c diff --git a/arch/arm/src/sama5/sam_sfc.c b/soc/arm/sama5/sam_sfc.c similarity index 100% rename from arch/arm/src/sama5/sam_sfc.c rename to soc/arm/sama5/sam_sfc.c diff --git a/arch/arm/src/sama5/sam_sfc.h b/soc/arm/sama5/sam_sfc.h similarity index 100% rename from arch/arm/src/sama5/sam_sfc.h rename to soc/arm/sama5/sam_sfc.h diff --git a/arch/arm/src/sama5/sam_spi.c b/soc/arm/sama5/sam_spi.c similarity index 100% rename from arch/arm/src/sama5/sam_spi.c rename to soc/arm/sama5/sam_spi.c diff --git a/arch/arm/src/sama5/sam_spi.h b/soc/arm/sama5/sam_spi.h similarity index 100% rename from arch/arm/src/sama5/sam_spi.h rename to soc/arm/sama5/sam_spi.h diff --git a/arch/arm/src/sama5/sam_ssc.c b/soc/arm/sama5/sam_ssc.c similarity index 100% rename from arch/arm/src/sama5/sam_ssc.c rename to soc/arm/sama5/sam_ssc.c diff --git a/arch/arm/src/sama5/sam_ssc.h b/soc/arm/sama5/sam_ssc.h similarity index 100% rename from arch/arm/src/sama5/sam_ssc.h rename to soc/arm/sama5/sam_ssc.h diff --git a/arch/arm/src/sama5/sam_systemreset.c b/soc/arm/sama5/sam_systemreset.c similarity index 100% rename from arch/arm/src/sama5/sam_systemreset.c rename to soc/arm/sama5/sam_systemreset.c diff --git a/arch/arm/src/sama5/sam_systemreset.h b/soc/arm/sama5/sam_systemreset.h similarity index 100% rename from arch/arm/src/sama5/sam_systemreset.h rename to soc/arm/sama5/sam_systemreset.h diff --git a/arch/arm/src/sama5/sam_tc.c b/soc/arm/sama5/sam_tc.c similarity index 100% rename from arch/arm/src/sama5/sam_tc.c rename to soc/arm/sama5/sam_tc.c diff --git a/arch/arm/src/sama5/sam_tc.h b/soc/arm/sama5/sam_tc.h similarity index 100% rename from arch/arm/src/sama5/sam_tc.h rename to soc/arm/sama5/sam_tc.h diff --git a/arch/arm/src/sama5/sam_tickless.c b/soc/arm/sama5/sam_tickless.c similarity index 100% rename from arch/arm/src/sama5/sam_tickless.c rename to soc/arm/sama5/sam_tickless.c diff --git a/arch/arm/src/sama5/sam_timerisr.c b/soc/arm/sama5/sam_timerisr.c similarity index 100% rename from arch/arm/src/sama5/sam_timerisr.c rename to soc/arm/sama5/sam_timerisr.c diff --git a/arch/arm/src/sama5/sam_trng.c b/soc/arm/sama5/sam_trng.c similarity index 100% rename from arch/arm/src/sama5/sam_trng.c rename to soc/arm/sama5/sam_trng.c diff --git a/arch/arm/src/sama5/sam_trng.h b/soc/arm/sama5/sam_trng.h similarity index 100% rename from arch/arm/src/sama5/sam_trng.h rename to soc/arm/sama5/sam_trng.h diff --git a/arch/arm/src/sama5/sam_tsd.c b/soc/arm/sama5/sam_tsd.c similarity index 100% rename from arch/arm/src/sama5/sam_tsd.c rename to soc/arm/sama5/sam_tsd.c diff --git a/arch/arm/src/sama5/sam_tsd.h b/soc/arm/sama5/sam_tsd.h similarity index 100% rename from arch/arm/src/sama5/sam_tsd.h rename to soc/arm/sama5/sam_tsd.h diff --git a/arch/arm/src/sama5/sam_twi.c b/soc/arm/sama5/sam_twi.c similarity index 100% rename from arch/arm/src/sama5/sam_twi.c rename to soc/arm/sama5/sam_twi.c diff --git a/arch/arm/src/sama5/sam_twi.h b/soc/arm/sama5/sam_twi.h similarity index 100% rename from arch/arm/src/sama5/sam_twi.h rename to soc/arm/sama5/sam_twi.h diff --git a/arch/arm/src/sama5/sam_udphs.c b/soc/arm/sama5/sam_udphs.c similarity index 100% rename from arch/arm/src/sama5/sam_udphs.c rename to soc/arm/sama5/sam_udphs.c diff --git a/arch/arm/src/sama5/sam_udphs.h b/soc/arm/sama5/sam_udphs.h similarity index 100% rename from arch/arm/src/sama5/sam_udphs.h rename to soc/arm/sama5/sam_udphs.h diff --git a/arch/arm/src/sama5/sam_usbhost.c b/soc/arm/sama5/sam_usbhost.c similarity index 100% rename from arch/arm/src/sama5/sam_usbhost.c rename to soc/arm/sama5/sam_usbhost.c diff --git a/arch/arm/src/sama5/sam_usbhost.h b/soc/arm/sama5/sam_usbhost.h similarity index 100% rename from arch/arm/src/sama5/sam_usbhost.h rename to soc/arm/sama5/sam_usbhost.h diff --git a/arch/arm/src/sama5/sam_wdt.c b/soc/arm/sama5/sam_wdt.c similarity index 100% rename from arch/arm/src/sama5/sam_wdt.c rename to soc/arm/sama5/sam_wdt.c diff --git a/arch/arm/src/sama5/sam_wdt.h b/soc/arm/sama5/sam_wdt.h similarity index 100% rename from arch/arm/src/sama5/sam_wdt.h rename to soc/arm/sama5/sam_wdt.h diff --git a/arch/arm/src/sama5/sam_xdmac.c b/soc/arm/sama5/sam_xdmac.c similarity index 100% rename from arch/arm/src/sama5/sam_xdmac.c rename to soc/arm/sama5/sam_xdmac.c diff --git a/arch/arm/src/sama5/sama5d2x_memorymap.c b/soc/arm/sama5/sama5d2x_memorymap.c similarity index 100% rename from arch/arm/src/sama5/sama5d2x_memorymap.c rename to soc/arm/sama5/sama5d2x_memorymap.c diff --git a/arch/arm/src/sama5/sama5d2x_periphclks.h b/soc/arm/sama5/sama5d2x_periphclks.h similarity index 100% rename from arch/arm/src/sama5/sama5d2x_periphclks.h rename to soc/arm/sama5/sama5d2x_periphclks.h diff --git a/arch/arm/src/sama5/sama5d2x_pio.c b/soc/arm/sama5/sama5d2x_pio.c similarity index 100% rename from arch/arm/src/sama5/sama5d2x_pio.c rename to soc/arm/sama5/sama5d2x_pio.c diff --git a/arch/arm/src/sama5/sama5d2x_pio.h b/soc/arm/sama5/sama5d2x_pio.h similarity index 100% rename from arch/arm/src/sama5/sama5d2x_pio.h rename to soc/arm/sama5/sama5d2x_pio.h diff --git a/arch/arm/src/sama5/sama5d3x4x_pio.c b/soc/arm/sama5/sama5d3x4x_pio.c similarity index 100% rename from arch/arm/src/sama5/sama5d3x4x_pio.c rename to soc/arm/sama5/sama5d3x4x_pio.c diff --git a/arch/arm/src/sama5/sama5d3x4x_pio.h b/soc/arm/sama5/sama5d3x4x_pio.h similarity index 100% rename from arch/arm/src/sama5/sama5d3x4x_pio.h rename to soc/arm/sama5/sama5d3x4x_pio.h diff --git a/arch/arm/src/sama5/sama5d3x_memorymap.c b/soc/arm/sama5/sama5d3x_memorymap.c similarity index 100% rename from arch/arm/src/sama5/sama5d3x_memorymap.c rename to soc/arm/sama5/sama5d3x_memorymap.c diff --git a/arch/arm/src/sama5/sama5d3x_periphclks.h b/soc/arm/sama5/sama5d3x_periphclks.h similarity index 100% rename from arch/arm/src/sama5/sama5d3x_periphclks.h rename to soc/arm/sama5/sama5d3x_periphclks.h diff --git a/arch/arm/src/sama5/sama5d4x_memorymap.c b/soc/arm/sama5/sama5d4x_memorymap.c similarity index 100% rename from arch/arm/src/sama5/sama5d4x_memorymap.c rename to soc/arm/sama5/sama5d4x_memorymap.c diff --git a/arch/arm/src/sama5/sama5d4x_periphclks.h b/soc/arm/sama5/sama5d4x_periphclks.h similarity index 100% rename from arch/arm/src/sama5/sama5d4x_periphclks.h rename to soc/arm/sama5/sama5d4x_periphclks.h diff --git a/arch/arm/src/samd2l2/Kconfig b/soc/arm/samd2l2/Kconfig similarity index 100% rename from arch/arm/src/samd2l2/Kconfig rename to soc/arm/samd2l2/Kconfig diff --git a/arch/arm/src/samd2l2/Make.defs b/soc/arm/samd2l2/Make.defs similarity index 100% rename from arch/arm/src/samd2l2/Make.defs rename to soc/arm/samd2l2/Make.defs diff --git a/arch/arm/src/samd2l2/chip.h b/soc/arm/samd2l2/chip.h similarity index 100% rename from arch/arm/src/samd2l2/chip.h rename to soc/arm/samd2l2/chip.h diff --git a/arch/arm/src/samd2l2/hardware/samd20_memorymap.h b/soc/arm/samd2l2/hardware/samd20_memorymap.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/samd20_memorymap.h rename to soc/arm/samd2l2/hardware/samd20_memorymap.h diff --git a/arch/arm/src/samd2l2/hardware/samd20_pinmap.h b/soc/arm/samd2l2/hardware/samd20_pinmap.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/samd20_pinmap.h rename to soc/arm/samd2l2/hardware/samd20_pinmap.h diff --git a/arch/arm/src/samd2l2/hardware/samd21_memorymap.h b/soc/arm/samd2l2/hardware/samd21_memorymap.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/samd21_memorymap.h rename to soc/arm/samd2l2/hardware/samd21_memorymap.h diff --git a/arch/arm/src/samd2l2/hardware/samd21_pinmap.h b/soc/arm/samd2l2/hardware/samd21_pinmap.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/samd21_pinmap.h rename to soc/arm/samd2l2/hardware/samd21_pinmap.h diff --git a/arch/arm/src/samd2l2/hardware/samd_ac.h b/soc/arm/samd2l2/hardware/samd_ac.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/samd_ac.h rename to soc/arm/samd2l2/hardware/samd_ac.h diff --git a/arch/arm/src/samd2l2/hardware/samd_adc.h b/soc/arm/samd2l2/hardware/samd_adc.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/samd_adc.h rename to soc/arm/samd2l2/hardware/samd_adc.h diff --git a/arch/arm/src/samd2l2/hardware/samd_dac.h b/soc/arm/samd2l2/hardware/samd_dac.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/samd_dac.h rename to soc/arm/samd2l2/hardware/samd_dac.h diff --git a/arch/arm/src/samd2l2/hardware/samd_dmac.h b/soc/arm/samd2l2/hardware/samd_dmac.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/samd_dmac.h rename to soc/arm/samd2l2/hardware/samd_dmac.h diff --git a/arch/arm/src/samd2l2/hardware/samd_eic.h b/soc/arm/samd2l2/hardware/samd_eic.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/samd_eic.h rename to soc/arm/samd2l2/hardware/samd_eic.h diff --git a/arch/arm/src/samd2l2/hardware/samd_evsys.h b/soc/arm/samd2l2/hardware/samd_evsys.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/samd_evsys.h rename to soc/arm/samd2l2/hardware/samd_evsys.h diff --git a/arch/arm/src/samd2l2/hardware/samd_fuses.h b/soc/arm/samd2l2/hardware/samd_fuses.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/samd_fuses.h rename to soc/arm/samd2l2/hardware/samd_fuses.h diff --git a/arch/arm/src/samd2l2/hardware/samd_gclk.h b/soc/arm/samd2l2/hardware/samd_gclk.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/samd_gclk.h rename to soc/arm/samd2l2/hardware/samd_gclk.h diff --git a/arch/arm/src/samd2l2/hardware/samd_i2c_master.h b/soc/arm/samd2l2/hardware/samd_i2c_master.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/samd_i2c_master.h rename to soc/arm/samd2l2/hardware/samd_i2c_master.h diff --git a/arch/arm/src/samd2l2/hardware/samd_i2c_slave.h b/soc/arm/samd2l2/hardware/samd_i2c_slave.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/samd_i2c_slave.h rename to soc/arm/samd2l2/hardware/samd_i2c_slave.h diff --git a/arch/arm/src/samd2l2/hardware/samd_i2s.h b/soc/arm/samd2l2/hardware/samd_i2s.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/samd_i2s.h rename to soc/arm/samd2l2/hardware/samd_i2s.h diff --git a/arch/arm/src/samd2l2/hardware/samd_nvmctrl.h b/soc/arm/samd2l2/hardware/samd_nvmctrl.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/samd_nvmctrl.h rename to soc/arm/samd2l2/hardware/samd_nvmctrl.h diff --git a/arch/arm/src/samd2l2/hardware/samd_pm.h b/soc/arm/samd2l2/hardware/samd_pm.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/samd_pm.h rename to soc/arm/samd2l2/hardware/samd_pm.h diff --git a/arch/arm/src/samd2l2/hardware/samd_port.h b/soc/arm/samd2l2/hardware/samd_port.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/samd_port.h rename to soc/arm/samd2l2/hardware/samd_port.h diff --git a/arch/arm/src/samd2l2/hardware/samd_sercom.h b/soc/arm/samd2l2/hardware/samd_sercom.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/samd_sercom.h rename to soc/arm/samd2l2/hardware/samd_sercom.h diff --git a/arch/arm/src/samd2l2/hardware/samd_spi.h b/soc/arm/samd2l2/hardware/samd_spi.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/samd_spi.h rename to soc/arm/samd2l2/hardware/samd_spi.h diff --git a/arch/arm/src/samd2l2/hardware/samd_sysctrl.h b/soc/arm/samd2l2/hardware/samd_sysctrl.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/samd_sysctrl.h rename to soc/arm/samd2l2/hardware/samd_sysctrl.h diff --git a/arch/arm/src/samd2l2/hardware/samd_tc.h b/soc/arm/samd2l2/hardware/samd_tc.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/samd_tc.h rename to soc/arm/samd2l2/hardware/samd_tc.h diff --git a/arch/arm/src/samd2l2/hardware/samd_tcc.h b/soc/arm/samd2l2/hardware/samd_tcc.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/samd_tcc.h rename to soc/arm/samd2l2/hardware/samd_tcc.h diff --git a/arch/arm/src/samd2l2/hardware/samd_usart.h b/soc/arm/samd2l2/hardware/samd_usart.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/samd_usart.h rename to soc/arm/samd2l2/hardware/samd_usart.h diff --git a/arch/arm/src/samd2l2/hardware/samd_wdt.h b/soc/arm/samd2l2/hardware/samd_wdt.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/samd_wdt.h rename to soc/arm/samd2l2/hardware/samd_wdt.h diff --git a/arch/arm/src/samd2l2/hardware/saml21_memorymap.h b/soc/arm/samd2l2/hardware/saml21_memorymap.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/saml21_memorymap.h rename to soc/arm/samd2l2/hardware/saml21_memorymap.h diff --git a/arch/arm/src/samd2l2/hardware/saml21_pinmap.h b/soc/arm/samd2l2/hardware/saml21_pinmap.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/saml21_pinmap.h rename to soc/arm/samd2l2/hardware/saml21_pinmap.h diff --git a/arch/arm/src/samd2l2/hardware/saml_adc.h b/soc/arm/samd2l2/hardware/saml_adc.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/saml_adc.h rename to soc/arm/samd2l2/hardware/saml_adc.h diff --git a/arch/arm/src/samd2l2/hardware/saml_aes.h b/soc/arm/samd2l2/hardware/saml_aes.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/saml_aes.h rename to soc/arm/samd2l2/hardware/saml_aes.h diff --git a/arch/arm/src/samd2l2/hardware/saml_dac.h b/soc/arm/samd2l2/hardware/saml_dac.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/saml_dac.h rename to soc/arm/samd2l2/hardware/saml_dac.h diff --git a/arch/arm/src/samd2l2/hardware/saml_dmac.h b/soc/arm/samd2l2/hardware/saml_dmac.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/saml_dmac.h rename to soc/arm/samd2l2/hardware/saml_dmac.h diff --git a/arch/arm/src/samd2l2/hardware/saml_eic.h b/soc/arm/samd2l2/hardware/saml_eic.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/saml_eic.h rename to soc/arm/samd2l2/hardware/saml_eic.h diff --git a/arch/arm/src/samd2l2/hardware/saml_evsys.h b/soc/arm/samd2l2/hardware/saml_evsys.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/saml_evsys.h rename to soc/arm/samd2l2/hardware/saml_evsys.h diff --git a/arch/arm/src/samd2l2/hardware/saml_fuses.h b/soc/arm/samd2l2/hardware/saml_fuses.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/saml_fuses.h rename to soc/arm/samd2l2/hardware/saml_fuses.h diff --git a/arch/arm/src/samd2l2/hardware/saml_gclk.h b/soc/arm/samd2l2/hardware/saml_gclk.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/saml_gclk.h rename to soc/arm/samd2l2/hardware/saml_gclk.h diff --git a/arch/arm/src/samd2l2/hardware/saml_i2c_master.h b/soc/arm/samd2l2/hardware/saml_i2c_master.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/saml_i2c_master.h rename to soc/arm/samd2l2/hardware/saml_i2c_master.h diff --git a/arch/arm/src/samd2l2/hardware/saml_i2c_slave.h b/soc/arm/samd2l2/hardware/saml_i2c_slave.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/saml_i2c_slave.h rename to soc/arm/samd2l2/hardware/saml_i2c_slave.h diff --git a/arch/arm/src/samd2l2/hardware/saml_mclk.h b/soc/arm/samd2l2/hardware/saml_mclk.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/saml_mclk.h rename to soc/arm/samd2l2/hardware/saml_mclk.h diff --git a/arch/arm/src/samd2l2/hardware/saml_nvmctrl.h b/soc/arm/samd2l2/hardware/saml_nvmctrl.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/saml_nvmctrl.h rename to soc/arm/samd2l2/hardware/saml_nvmctrl.h diff --git a/arch/arm/src/samd2l2/hardware/saml_opamp.h b/soc/arm/samd2l2/hardware/saml_opamp.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/saml_opamp.h rename to soc/arm/samd2l2/hardware/saml_opamp.h diff --git a/arch/arm/src/samd2l2/hardware/saml_osc32kctrl.h b/soc/arm/samd2l2/hardware/saml_osc32kctrl.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/saml_osc32kctrl.h rename to soc/arm/samd2l2/hardware/saml_osc32kctrl.h diff --git a/arch/arm/src/samd2l2/hardware/saml_oscctrl.h b/soc/arm/samd2l2/hardware/saml_oscctrl.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/saml_oscctrl.h rename to soc/arm/samd2l2/hardware/saml_oscctrl.h diff --git a/arch/arm/src/samd2l2/hardware/saml_pm.h b/soc/arm/samd2l2/hardware/saml_pm.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/saml_pm.h rename to soc/arm/samd2l2/hardware/saml_pm.h diff --git a/arch/arm/src/samd2l2/hardware/saml_port.h b/soc/arm/samd2l2/hardware/saml_port.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/saml_port.h rename to soc/arm/samd2l2/hardware/saml_port.h diff --git a/arch/arm/src/samd2l2/hardware/saml_rstc.h b/soc/arm/samd2l2/hardware/saml_rstc.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/saml_rstc.h rename to soc/arm/samd2l2/hardware/saml_rstc.h diff --git a/arch/arm/src/samd2l2/hardware/saml_sercom.h b/soc/arm/samd2l2/hardware/saml_sercom.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/saml_sercom.h rename to soc/arm/samd2l2/hardware/saml_sercom.h diff --git a/arch/arm/src/samd2l2/hardware/saml_spi.h b/soc/arm/samd2l2/hardware/saml_spi.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/saml_spi.h rename to soc/arm/samd2l2/hardware/saml_spi.h diff --git a/arch/arm/src/samd2l2/hardware/saml_supc.h b/soc/arm/samd2l2/hardware/saml_supc.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/saml_supc.h rename to soc/arm/samd2l2/hardware/saml_supc.h diff --git a/arch/arm/src/samd2l2/hardware/saml_trng.h b/soc/arm/samd2l2/hardware/saml_trng.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/saml_trng.h rename to soc/arm/samd2l2/hardware/saml_trng.h diff --git a/arch/arm/src/samd2l2/hardware/saml_usart.h b/soc/arm/samd2l2/hardware/saml_usart.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/saml_usart.h rename to soc/arm/samd2l2/hardware/saml_usart.h diff --git a/arch/arm/src/samd2l2/hardware/saml_usb.h b/soc/arm/samd2l2/hardware/saml_usb.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/saml_usb.h rename to soc/arm/samd2l2/hardware/saml_usb.h diff --git a/arch/arm/src/samd2l2/hardware/saml_wdt.h b/soc/arm/samd2l2/hardware/saml_wdt.h similarity index 100% rename from arch/arm/src/samd2l2/hardware/saml_wdt.h rename to soc/arm/samd2l2/hardware/saml_wdt.h diff --git a/arch/arm/src/samd2l2/sam_ac.c b/soc/arm/samd2l2/sam_ac.c similarity index 100% rename from arch/arm/src/samd2l2/sam_ac.c rename to soc/arm/samd2l2/sam_ac.c diff --git a/arch/arm/src/samd2l2/sam_ac.h b/soc/arm/samd2l2/sam_ac.h similarity index 100% rename from arch/arm/src/samd2l2/sam_ac.h rename to soc/arm/samd2l2/sam_ac.h diff --git a/arch/arm/src/samd2l2/sam_adc.c b/soc/arm/samd2l2/sam_adc.c similarity index 100% rename from arch/arm/src/samd2l2/sam_adc.c rename to soc/arm/samd2l2/sam_adc.c diff --git a/arch/arm/src/samd2l2/sam_adc.h b/soc/arm/samd2l2/sam_adc.h similarity index 100% rename from arch/arm/src/samd2l2/sam_adc.h rename to soc/arm/samd2l2/sam_adc.h diff --git a/arch/arm/src/samd2l2/sam_clockconfig.h b/soc/arm/samd2l2/sam_clockconfig.h similarity index 100% rename from arch/arm/src/samd2l2/sam_clockconfig.h rename to soc/arm/samd2l2/sam_clockconfig.h diff --git a/arch/arm/src/samd2l2/sam_config.h b/soc/arm/samd2l2/sam_config.h similarity index 100% rename from arch/arm/src/samd2l2/sam_config.h rename to soc/arm/samd2l2/sam_config.h diff --git a/arch/arm/src/samd2l2/sam_dac.h b/soc/arm/samd2l2/sam_dac.h similarity index 100% rename from arch/arm/src/samd2l2/sam_dac.h rename to soc/arm/samd2l2/sam_dac.h diff --git a/arch/arm/src/samd2l2/sam_dmac.c b/soc/arm/samd2l2/sam_dmac.c similarity index 100% rename from arch/arm/src/samd2l2/sam_dmac.c rename to soc/arm/samd2l2/sam_dmac.c diff --git a/arch/arm/src/samd2l2/sam_dmac.h b/soc/arm/samd2l2/sam_dmac.h similarity index 100% rename from arch/arm/src/samd2l2/sam_dmac.h rename to soc/arm/samd2l2/sam_dmac.h diff --git a/arch/arm/src/samd2l2/sam_eic.c b/soc/arm/samd2l2/sam_eic.c similarity index 100% rename from arch/arm/src/samd2l2/sam_eic.c rename to soc/arm/samd2l2/sam_eic.c diff --git a/arch/arm/src/samd2l2/sam_eic.h b/soc/arm/samd2l2/sam_eic.h similarity index 100% rename from arch/arm/src/samd2l2/sam_eic.h rename to soc/arm/samd2l2/sam_eic.h diff --git a/arch/arm/src/samd2l2/sam_evsys.h b/soc/arm/samd2l2/sam_evsys.h similarity index 100% rename from arch/arm/src/samd2l2/sam_evsys.h rename to soc/arm/samd2l2/sam_evsys.h diff --git a/arch/arm/src/samd2l2/sam_fuses.h b/soc/arm/samd2l2/sam_fuses.h similarity index 100% rename from arch/arm/src/samd2l2/sam_fuses.h rename to soc/arm/samd2l2/sam_fuses.h diff --git a/arch/arm/src/samd2l2/sam_gclk.h b/soc/arm/samd2l2/sam_gclk.h similarity index 100% rename from arch/arm/src/samd2l2/sam_gclk.h rename to soc/arm/samd2l2/sam_gclk.h diff --git a/arch/arm/src/samd2l2/sam_i2c_master.c b/soc/arm/samd2l2/sam_i2c_master.c similarity index 100% rename from arch/arm/src/samd2l2/sam_i2c_master.c rename to soc/arm/samd2l2/sam_i2c_master.c diff --git a/arch/arm/src/samd2l2/sam_i2c_master.h b/soc/arm/samd2l2/sam_i2c_master.h similarity index 100% rename from arch/arm/src/samd2l2/sam_i2c_master.h rename to soc/arm/samd2l2/sam_i2c_master.h diff --git a/arch/arm/src/samd2l2/sam_i2c_slave.h b/soc/arm/samd2l2/sam_i2c_slave.h similarity index 100% rename from arch/arm/src/samd2l2/sam_i2c_slave.h rename to soc/arm/samd2l2/sam_i2c_slave.h diff --git a/arch/arm/src/samd2l2/sam_idle.c b/soc/arm/samd2l2/sam_idle.c similarity index 100% rename from arch/arm/src/samd2l2/sam_idle.c rename to soc/arm/samd2l2/sam_idle.c diff --git a/arch/arm/src/samd2l2/sam_irq.c b/soc/arm/samd2l2/sam_irq.c similarity index 100% rename from arch/arm/src/samd2l2/sam_irq.c rename to soc/arm/samd2l2/sam_irq.c diff --git a/arch/arm/src/samd2l2/sam_irq.h b/soc/arm/samd2l2/sam_irq.h similarity index 100% rename from arch/arm/src/samd2l2/sam_irq.h rename to soc/arm/samd2l2/sam_irq.h diff --git a/arch/arm/src/samd2l2/sam_irqprio.c b/soc/arm/samd2l2/sam_irqprio.c similarity index 100% rename from arch/arm/src/samd2l2/sam_irqprio.c rename to soc/arm/samd2l2/sam_irqprio.c diff --git a/arch/arm/src/samd2l2/sam_lowputc.c b/soc/arm/samd2l2/sam_lowputc.c similarity index 100% rename from arch/arm/src/samd2l2/sam_lowputc.c rename to soc/arm/samd2l2/sam_lowputc.c diff --git a/arch/arm/src/samd2l2/sam_lowputc.h b/soc/arm/samd2l2/sam_lowputc.h similarity index 100% rename from arch/arm/src/samd2l2/sam_lowputc.h rename to soc/arm/samd2l2/sam_lowputc.h diff --git a/arch/arm/src/samd2l2/sam_periphclks.h b/soc/arm/samd2l2/sam_periphclks.h similarity index 100% rename from arch/arm/src/samd2l2/sam_periphclks.h rename to soc/arm/samd2l2/sam_periphclks.h diff --git a/arch/arm/src/samd2l2/sam_pinmap.h b/soc/arm/samd2l2/sam_pinmap.h similarity index 100% rename from arch/arm/src/samd2l2/sam_pinmap.h rename to soc/arm/samd2l2/sam_pinmap.h diff --git a/arch/arm/src/samd2l2/sam_pm.h b/soc/arm/samd2l2/sam_pm.h similarity index 100% rename from arch/arm/src/samd2l2/sam_pm.h rename to soc/arm/samd2l2/sam_pm.h diff --git a/arch/arm/src/samd2l2/sam_port.c b/soc/arm/samd2l2/sam_port.c similarity index 100% rename from arch/arm/src/samd2l2/sam_port.c rename to soc/arm/samd2l2/sam_port.c diff --git a/arch/arm/src/samd2l2/sam_port.h b/soc/arm/samd2l2/sam_port.h similarity index 100% rename from arch/arm/src/samd2l2/sam_port.h rename to soc/arm/samd2l2/sam_port.h diff --git a/arch/arm/src/samd2l2/sam_sercom.c b/soc/arm/samd2l2/sam_sercom.c similarity index 100% rename from arch/arm/src/samd2l2/sam_sercom.c rename to soc/arm/samd2l2/sam_sercom.c diff --git a/arch/arm/src/samd2l2/sam_sercom.h b/soc/arm/samd2l2/sam_sercom.h similarity index 100% rename from arch/arm/src/samd2l2/sam_sercom.h rename to soc/arm/samd2l2/sam_sercom.h diff --git a/arch/arm/src/samd2l2/sam_serial.c b/soc/arm/samd2l2/sam_serial.c similarity index 100% rename from arch/arm/src/samd2l2/sam_serial.c rename to soc/arm/samd2l2/sam_serial.c diff --git a/arch/arm/src/samd2l2/sam_serial.h b/soc/arm/samd2l2/sam_serial.h similarity index 100% rename from arch/arm/src/samd2l2/sam_serial.h rename to soc/arm/samd2l2/sam_serial.h diff --git a/arch/arm/src/samd2l2/sam_spi.c b/soc/arm/samd2l2/sam_spi.c similarity index 100% rename from arch/arm/src/samd2l2/sam_spi.c rename to soc/arm/samd2l2/sam_spi.c diff --git a/arch/arm/src/samd2l2/sam_spi.h b/soc/arm/samd2l2/sam_spi.h similarity index 100% rename from arch/arm/src/samd2l2/sam_spi.h rename to soc/arm/samd2l2/sam_spi.h diff --git a/arch/arm/src/samd2l2/sam_start.c b/soc/arm/samd2l2/sam_start.c similarity index 100% rename from arch/arm/src/samd2l2/sam_start.c rename to soc/arm/samd2l2/sam_start.c diff --git a/arch/arm/src/samd2l2/sam_start.h b/soc/arm/samd2l2/sam_start.h similarity index 100% rename from arch/arm/src/samd2l2/sam_start.h rename to soc/arm/samd2l2/sam_start.h diff --git a/arch/arm/src/samd2l2/sam_timerisr.c b/soc/arm/samd2l2/sam_timerisr.c similarity index 100% rename from arch/arm/src/samd2l2/sam_timerisr.c rename to soc/arm/samd2l2/sam_timerisr.c diff --git a/arch/arm/src/samd2l2/sam_usart.c b/soc/arm/samd2l2/sam_usart.c similarity index 100% rename from arch/arm/src/samd2l2/sam_usart.c rename to soc/arm/samd2l2/sam_usart.c diff --git a/arch/arm/src/samd2l2/sam_usart.h b/soc/arm/samd2l2/sam_usart.h similarity index 100% rename from arch/arm/src/samd2l2/sam_usart.h rename to soc/arm/samd2l2/sam_usart.h diff --git a/arch/arm/src/samd2l2/sam_usb.c b/soc/arm/samd2l2/sam_usb.c similarity index 100% rename from arch/arm/src/samd2l2/sam_usb.c rename to soc/arm/samd2l2/sam_usb.c diff --git a/arch/arm/src/samd2l2/sam_usb.h b/soc/arm/samd2l2/sam_usb.h similarity index 100% rename from arch/arm/src/samd2l2/sam_usb.h rename to soc/arm/samd2l2/sam_usb.h diff --git a/arch/arm/src/samd2l2/sam_userspace.c b/soc/arm/samd2l2/sam_userspace.c similarity index 100% rename from arch/arm/src/samd2l2/sam_userspace.c rename to soc/arm/samd2l2/sam_userspace.c diff --git a/arch/arm/src/samd2l2/sam_userspace.h b/soc/arm/samd2l2/sam_userspace.h similarity index 100% rename from arch/arm/src/samd2l2/sam_userspace.h rename to soc/arm/samd2l2/sam_userspace.h diff --git a/arch/arm/src/samd2l2/samd_clockconfig.c b/soc/arm/samd2l2/samd_clockconfig.c similarity index 100% rename from arch/arm/src/samd2l2/samd_clockconfig.c rename to soc/arm/samd2l2/samd_clockconfig.c diff --git a/arch/arm/src/samd2l2/samd_gclk.c b/soc/arm/samd2l2/samd_gclk.c similarity index 100% rename from arch/arm/src/samd2l2/samd_gclk.c rename to soc/arm/samd2l2/samd_gclk.c diff --git a/arch/arm/src/samd2l2/samd_periphclks.h b/soc/arm/samd2l2/samd_periphclks.h similarity index 100% rename from arch/arm/src/samd2l2/samd_periphclks.h rename to soc/arm/samd2l2/samd_periphclks.h diff --git a/arch/arm/src/samd2l2/saml_clockconfig.c b/soc/arm/samd2l2/saml_clockconfig.c similarity index 100% rename from arch/arm/src/samd2l2/saml_clockconfig.c rename to soc/arm/samd2l2/saml_clockconfig.c diff --git a/arch/arm/src/samd2l2/saml_gclk.c b/soc/arm/samd2l2/saml_gclk.c similarity index 100% rename from arch/arm/src/samd2l2/saml_gclk.c rename to soc/arm/samd2l2/saml_gclk.c diff --git a/arch/arm/src/samd2l2/saml_periphclks.h b/soc/arm/samd2l2/saml_periphclks.h similarity index 100% rename from arch/arm/src/samd2l2/saml_periphclks.h rename to soc/arm/samd2l2/saml_periphclks.h diff --git a/arch/arm/src/samd5e5/Kconfig b/soc/arm/samd5e5/Kconfig similarity index 100% rename from arch/arm/src/samd5e5/Kconfig rename to soc/arm/samd5e5/Kconfig diff --git a/arch/arm/src/samd5e5/Make.defs b/soc/arm/samd5e5/Make.defs similarity index 100% rename from arch/arm/src/samd5e5/Make.defs rename to soc/arm/samd5e5/Make.defs diff --git a/arch/arm/src/samd5e5/chip.h b/soc/arm/samd5e5/chip.h similarity index 100% rename from arch/arm/src/samd5e5/chip.h rename to soc/arm/samd5e5/chip.h diff --git a/arch/arm/src/samd5e5/hardware/sam_aes.h b/soc/arm/samd5e5/hardware/sam_aes.h similarity index 100% rename from arch/arm/src/samd5e5/hardware/sam_aes.h rename to soc/arm/samd5e5/hardware/sam_aes.h diff --git a/arch/arm/src/samd5e5/hardware/sam_cmcc.h b/soc/arm/samd5e5/hardware/sam_cmcc.h similarity index 100% rename from arch/arm/src/samd5e5/hardware/sam_cmcc.h rename to soc/arm/samd5e5/hardware/sam_cmcc.h diff --git a/arch/arm/src/samd5e5/hardware/sam_dmac.h b/soc/arm/samd5e5/hardware/sam_dmac.h similarity index 100% rename from arch/arm/src/samd5e5/hardware/sam_dmac.h rename to soc/arm/samd5e5/hardware/sam_dmac.h diff --git a/arch/arm/src/samd5e5/hardware/sam_eic.h b/soc/arm/samd5e5/hardware/sam_eic.h similarity index 100% rename from arch/arm/src/samd5e5/hardware/sam_eic.h rename to soc/arm/samd5e5/hardware/sam_eic.h diff --git a/arch/arm/src/samd5e5/hardware/sam_evsys.h b/soc/arm/samd5e5/hardware/sam_evsys.h similarity index 100% rename from arch/arm/src/samd5e5/hardware/sam_evsys.h rename to soc/arm/samd5e5/hardware/sam_evsys.h diff --git a/arch/arm/src/samd5e5/hardware/sam_fuses.h b/soc/arm/samd5e5/hardware/sam_fuses.h similarity index 100% rename from arch/arm/src/samd5e5/hardware/sam_fuses.h rename to soc/arm/samd5e5/hardware/sam_fuses.h diff --git a/arch/arm/src/samd5e5/hardware/sam_gclk.h b/soc/arm/samd5e5/hardware/sam_gclk.h similarity index 100% rename from arch/arm/src/samd5e5/hardware/sam_gclk.h rename to soc/arm/samd5e5/hardware/sam_gclk.h diff --git a/arch/arm/src/samd5e5/hardware/sam_gmac.h b/soc/arm/samd5e5/hardware/sam_gmac.h similarity index 100% rename from arch/arm/src/samd5e5/hardware/sam_gmac.h rename to soc/arm/samd5e5/hardware/sam_gmac.h diff --git a/arch/arm/src/samd5e5/hardware/sam_i2c_master.h b/soc/arm/samd5e5/hardware/sam_i2c_master.h similarity index 100% rename from arch/arm/src/samd5e5/hardware/sam_i2c_master.h rename to soc/arm/samd5e5/hardware/sam_i2c_master.h diff --git a/arch/arm/src/samd5e5/hardware/sam_i2c_slave.h b/soc/arm/samd5e5/hardware/sam_i2c_slave.h similarity index 100% rename from arch/arm/src/samd5e5/hardware/sam_i2c_slave.h rename to soc/arm/samd5e5/hardware/sam_i2c_slave.h diff --git a/arch/arm/src/samd5e5/hardware/sam_mclk.h b/soc/arm/samd5e5/hardware/sam_mclk.h similarity index 100% rename from arch/arm/src/samd5e5/hardware/sam_mclk.h rename to soc/arm/samd5e5/hardware/sam_mclk.h diff --git a/arch/arm/src/samd5e5/hardware/sam_memorymap.h b/soc/arm/samd5e5/hardware/sam_memorymap.h similarity index 100% rename from arch/arm/src/samd5e5/hardware/sam_memorymap.h rename to soc/arm/samd5e5/hardware/sam_memorymap.h diff --git a/arch/arm/src/samd5e5/hardware/sam_nvmctrl.h b/soc/arm/samd5e5/hardware/sam_nvmctrl.h similarity index 100% rename from arch/arm/src/samd5e5/hardware/sam_nvmctrl.h rename to soc/arm/samd5e5/hardware/sam_nvmctrl.h diff --git a/arch/arm/src/samd5e5/hardware/sam_osc32kctrl.h b/soc/arm/samd5e5/hardware/sam_osc32kctrl.h similarity index 100% rename from arch/arm/src/samd5e5/hardware/sam_osc32kctrl.h rename to soc/arm/samd5e5/hardware/sam_osc32kctrl.h diff --git a/arch/arm/src/samd5e5/hardware/sam_oscctrl.h b/soc/arm/samd5e5/hardware/sam_oscctrl.h similarity index 100% rename from arch/arm/src/samd5e5/hardware/sam_oscctrl.h rename to soc/arm/samd5e5/hardware/sam_oscctrl.h diff --git a/arch/arm/src/samd5e5/hardware/sam_pac.h b/soc/arm/samd5e5/hardware/sam_pac.h similarity index 100% rename from arch/arm/src/samd5e5/hardware/sam_pac.h rename to soc/arm/samd5e5/hardware/sam_pac.h diff --git a/arch/arm/src/samd5e5/hardware/sam_pinmap.h b/soc/arm/samd5e5/hardware/sam_pinmap.h similarity index 100% rename from arch/arm/src/samd5e5/hardware/sam_pinmap.h rename to soc/arm/samd5e5/hardware/sam_pinmap.h diff --git a/arch/arm/src/samd5e5/hardware/sam_pm.h b/soc/arm/samd5e5/hardware/sam_pm.h similarity index 100% rename from arch/arm/src/samd5e5/hardware/sam_pm.h rename to soc/arm/samd5e5/hardware/sam_pm.h diff --git a/arch/arm/src/samd5e5/hardware/sam_port.h b/soc/arm/samd5e5/hardware/sam_port.h similarity index 100% rename from arch/arm/src/samd5e5/hardware/sam_port.h rename to soc/arm/samd5e5/hardware/sam_port.h diff --git a/arch/arm/src/samd5e5/hardware/sam_rstc.h b/soc/arm/samd5e5/hardware/sam_rstc.h similarity index 100% rename from arch/arm/src/samd5e5/hardware/sam_rstc.h rename to soc/arm/samd5e5/hardware/sam_rstc.h diff --git a/arch/arm/src/samd5e5/hardware/sam_spi.h b/soc/arm/samd5e5/hardware/sam_spi.h similarity index 100% rename from arch/arm/src/samd5e5/hardware/sam_spi.h rename to soc/arm/samd5e5/hardware/sam_spi.h diff --git a/arch/arm/src/samd5e5/hardware/sam_supc.h b/soc/arm/samd5e5/hardware/sam_supc.h similarity index 100% rename from arch/arm/src/samd5e5/hardware/sam_supc.h rename to soc/arm/samd5e5/hardware/sam_supc.h diff --git a/arch/arm/src/samd5e5/hardware/sam_tc.h b/soc/arm/samd5e5/hardware/sam_tc.h similarity index 100% rename from arch/arm/src/samd5e5/hardware/sam_tc.h rename to soc/arm/samd5e5/hardware/sam_tc.h diff --git a/arch/arm/src/samd5e5/hardware/sam_trng.h b/soc/arm/samd5e5/hardware/sam_trng.h similarity index 100% rename from arch/arm/src/samd5e5/hardware/sam_trng.h rename to soc/arm/samd5e5/hardware/sam_trng.h diff --git a/arch/arm/src/samd5e5/hardware/sam_usart.h b/soc/arm/samd5e5/hardware/sam_usart.h similarity index 100% rename from arch/arm/src/samd5e5/hardware/sam_usart.h rename to soc/arm/samd5e5/hardware/sam_usart.h diff --git a/arch/arm/src/samd5e5/hardware/sam_usb.h b/soc/arm/samd5e5/hardware/sam_usb.h similarity index 100% rename from arch/arm/src/samd5e5/hardware/sam_usb.h rename to soc/arm/samd5e5/hardware/sam_usb.h diff --git a/arch/arm/src/samd5e5/hardware/sam_wdt.h b/soc/arm/samd5e5/hardware/sam_wdt.h similarity index 100% rename from arch/arm/src/samd5e5/hardware/sam_wdt.h rename to soc/arm/samd5e5/hardware/sam_wdt.h diff --git a/arch/arm/src/samd5e5/hardware/samd5e5_memorymap.h b/soc/arm/samd5e5/hardware/samd5e5_memorymap.h similarity index 100% rename from arch/arm/src/samd5e5/hardware/samd5e5_memorymap.h rename to soc/arm/samd5e5/hardware/samd5e5_memorymap.h diff --git a/arch/arm/src/samd5e5/hardware/samd5e5_pinmap.h b/soc/arm/samd5e5/hardware/samd5e5_pinmap.h similarity index 100% rename from arch/arm/src/samd5e5/hardware/samd5e5_pinmap.h rename to soc/arm/samd5e5/hardware/samd5e5_pinmap.h diff --git a/arch/arm/src/samd5e5/sam_clockconfig.c b/soc/arm/samd5e5/sam_clockconfig.c similarity index 100% rename from arch/arm/src/samd5e5/sam_clockconfig.c rename to soc/arm/samd5e5/sam_clockconfig.c diff --git a/arch/arm/src/samd5e5/sam_clockconfig.h b/soc/arm/samd5e5/sam_clockconfig.h similarity index 100% rename from arch/arm/src/samd5e5/sam_clockconfig.h rename to soc/arm/samd5e5/sam_clockconfig.h diff --git a/arch/arm/src/samd5e5/sam_cmcc.c b/soc/arm/samd5e5/sam_cmcc.c similarity index 100% rename from arch/arm/src/samd5e5/sam_cmcc.c rename to soc/arm/samd5e5/sam_cmcc.c diff --git a/arch/arm/src/samd5e5/sam_cmcc.h b/soc/arm/samd5e5/sam_cmcc.h similarity index 100% rename from arch/arm/src/samd5e5/sam_cmcc.h rename to soc/arm/samd5e5/sam_cmcc.h diff --git a/arch/arm/src/samd5e5/sam_config.h b/soc/arm/samd5e5/sam_config.h similarity index 100% rename from arch/arm/src/samd5e5/sam_config.h rename to soc/arm/samd5e5/sam_config.h diff --git a/arch/arm/src/samd5e5/sam_dmac.c b/soc/arm/samd5e5/sam_dmac.c similarity index 100% rename from arch/arm/src/samd5e5/sam_dmac.c rename to soc/arm/samd5e5/sam_dmac.c diff --git a/arch/arm/src/samd5e5/sam_dmac.h b/soc/arm/samd5e5/sam_dmac.h similarity index 100% rename from arch/arm/src/samd5e5/sam_dmac.h rename to soc/arm/samd5e5/sam_dmac.h diff --git a/arch/arm/src/samd5e5/sam_eic.c b/soc/arm/samd5e5/sam_eic.c similarity index 100% rename from arch/arm/src/samd5e5/sam_eic.c rename to soc/arm/samd5e5/sam_eic.c diff --git a/arch/arm/src/samd5e5/sam_eic.h b/soc/arm/samd5e5/sam_eic.h similarity index 100% rename from arch/arm/src/samd5e5/sam_eic.h rename to soc/arm/samd5e5/sam_eic.h diff --git a/arch/arm/src/samd5e5/sam_ethernet.c b/soc/arm/samd5e5/sam_ethernet.c similarity index 100% rename from arch/arm/src/samd5e5/sam_ethernet.c rename to soc/arm/samd5e5/sam_ethernet.c diff --git a/arch/arm/src/samd5e5/sam_ethernet.h b/soc/arm/samd5e5/sam_ethernet.h similarity index 100% rename from arch/arm/src/samd5e5/sam_ethernet.h rename to soc/arm/samd5e5/sam_ethernet.h diff --git a/arch/arm/src/samd5e5/sam_freerun.c b/soc/arm/samd5e5/sam_freerun.c similarity index 100% rename from arch/arm/src/samd5e5/sam_freerun.c rename to soc/arm/samd5e5/sam_freerun.c diff --git a/arch/arm/src/samd5e5/sam_freerun.h b/soc/arm/samd5e5/sam_freerun.h similarity index 100% rename from arch/arm/src/samd5e5/sam_freerun.h rename to soc/arm/samd5e5/sam_freerun.h diff --git a/arch/arm/src/samd5e5/sam_gclk.c b/soc/arm/samd5e5/sam_gclk.c similarity index 100% rename from arch/arm/src/samd5e5/sam_gclk.c rename to soc/arm/samd5e5/sam_gclk.c diff --git a/arch/arm/src/samd5e5/sam_gclk.h b/soc/arm/samd5e5/sam_gclk.h similarity index 100% rename from arch/arm/src/samd5e5/sam_gclk.h rename to soc/arm/samd5e5/sam_gclk.h diff --git a/arch/arm/src/samd5e5/sam_gmac.c b/soc/arm/samd5e5/sam_gmac.c similarity index 100% rename from arch/arm/src/samd5e5/sam_gmac.c rename to soc/arm/samd5e5/sam_gmac.c diff --git a/arch/arm/src/samd5e5/sam_i2c_master.c b/soc/arm/samd5e5/sam_i2c_master.c similarity index 100% rename from arch/arm/src/samd5e5/sam_i2c_master.c rename to soc/arm/samd5e5/sam_i2c_master.c diff --git a/arch/arm/src/samd5e5/sam_i2c_master.h b/soc/arm/samd5e5/sam_i2c_master.h similarity index 100% rename from arch/arm/src/samd5e5/sam_i2c_master.h rename to soc/arm/samd5e5/sam_i2c_master.h diff --git a/arch/arm/src/samd5e5/sam_idle.c b/soc/arm/samd5e5/sam_idle.c similarity index 100% rename from arch/arm/src/samd5e5/sam_idle.c rename to soc/arm/samd5e5/sam_idle.c diff --git a/arch/arm/src/samd5e5/sam_irq.c b/soc/arm/samd5e5/sam_irq.c similarity index 100% rename from arch/arm/src/samd5e5/sam_irq.c rename to soc/arm/samd5e5/sam_irq.c diff --git a/arch/arm/src/samd5e5/sam_lowputc.c b/soc/arm/samd5e5/sam_lowputc.c similarity index 100% rename from arch/arm/src/samd5e5/sam_lowputc.c rename to soc/arm/samd5e5/sam_lowputc.c diff --git a/arch/arm/src/samd5e5/sam_lowputc.h b/soc/arm/samd5e5/sam_lowputc.h similarity index 100% rename from arch/arm/src/samd5e5/sam_lowputc.h rename to soc/arm/samd5e5/sam_lowputc.h diff --git a/arch/arm/src/samd5e5/sam_mpuinit.c b/soc/arm/samd5e5/sam_mpuinit.c similarity index 100% rename from arch/arm/src/samd5e5/sam_mpuinit.c rename to soc/arm/samd5e5/sam_mpuinit.c diff --git a/arch/arm/src/samd5e5/sam_mpuinit.h b/soc/arm/samd5e5/sam_mpuinit.h similarity index 100% rename from arch/arm/src/samd5e5/sam_mpuinit.h rename to soc/arm/samd5e5/sam_mpuinit.h diff --git a/arch/arm/src/samd5e5/sam_oneshot.c b/soc/arm/samd5e5/sam_oneshot.c similarity index 100% rename from arch/arm/src/samd5e5/sam_oneshot.c rename to soc/arm/samd5e5/sam_oneshot.c diff --git a/arch/arm/src/samd5e5/sam_oneshot.h b/soc/arm/samd5e5/sam_oneshot.h similarity index 100% rename from arch/arm/src/samd5e5/sam_oneshot.h rename to soc/arm/samd5e5/sam_oneshot.h diff --git a/arch/arm/src/samd5e5/sam_oneshot_lowerhalf.c b/soc/arm/samd5e5/sam_oneshot_lowerhalf.c similarity index 100% rename from arch/arm/src/samd5e5/sam_oneshot_lowerhalf.c rename to soc/arm/samd5e5/sam_oneshot_lowerhalf.c diff --git a/arch/arm/src/samd5e5/sam_periphclks.h b/soc/arm/samd5e5/sam_periphclks.h similarity index 100% rename from arch/arm/src/samd5e5/sam_periphclks.h rename to soc/arm/samd5e5/sam_periphclks.h diff --git a/arch/arm/src/samd5e5/sam_port.c b/soc/arm/samd5e5/sam_port.c similarity index 100% rename from arch/arm/src/samd5e5/sam_port.c rename to soc/arm/samd5e5/sam_port.c diff --git a/arch/arm/src/samd5e5/sam_port.h b/soc/arm/samd5e5/sam_port.h similarity index 100% rename from arch/arm/src/samd5e5/sam_port.h rename to soc/arm/samd5e5/sam_port.h diff --git a/arch/arm/src/samd5e5/sam_progmem.c b/soc/arm/samd5e5/sam_progmem.c similarity index 100% rename from arch/arm/src/samd5e5/sam_progmem.c rename to soc/arm/samd5e5/sam_progmem.c diff --git a/arch/arm/src/samd5e5/sam_progmem.h b/soc/arm/samd5e5/sam_progmem.h similarity index 100% rename from arch/arm/src/samd5e5/sam_progmem.h rename to soc/arm/samd5e5/sam_progmem.h diff --git a/arch/arm/src/samd5e5/sam_sercom.c b/soc/arm/samd5e5/sam_sercom.c similarity index 100% rename from arch/arm/src/samd5e5/sam_sercom.c rename to soc/arm/samd5e5/sam_sercom.c diff --git a/arch/arm/src/samd5e5/sam_sercom.h b/soc/arm/samd5e5/sam_sercom.h similarity index 100% rename from arch/arm/src/samd5e5/sam_sercom.h rename to soc/arm/samd5e5/sam_sercom.h diff --git a/arch/arm/src/samd5e5/sam_serial.c b/soc/arm/samd5e5/sam_serial.c similarity index 100% rename from arch/arm/src/samd5e5/sam_serial.c rename to soc/arm/samd5e5/sam_serial.c diff --git a/arch/arm/src/samd5e5/sam_serial.h b/soc/arm/samd5e5/sam_serial.h similarity index 100% rename from arch/arm/src/samd5e5/sam_serial.h rename to soc/arm/samd5e5/sam_serial.h diff --git a/arch/arm/src/samd5e5/sam_spi.c b/soc/arm/samd5e5/sam_spi.c similarity index 100% rename from arch/arm/src/samd5e5/sam_spi.c rename to soc/arm/samd5e5/sam_spi.c diff --git a/arch/arm/src/samd5e5/sam_spi.h b/soc/arm/samd5e5/sam_spi.h similarity index 100% rename from arch/arm/src/samd5e5/sam_spi.h rename to soc/arm/samd5e5/sam_spi.h diff --git a/arch/arm/src/samd5e5/sam_start.c b/soc/arm/samd5e5/sam_start.c similarity index 100% rename from arch/arm/src/samd5e5/sam_start.c rename to soc/arm/samd5e5/sam_start.c diff --git a/arch/arm/src/samd5e5/sam_start.h b/soc/arm/samd5e5/sam_start.h similarity index 100% rename from arch/arm/src/samd5e5/sam_start.h rename to soc/arm/samd5e5/sam_start.h diff --git a/arch/arm/src/samd5e5/sam_tc.c b/soc/arm/samd5e5/sam_tc.c similarity index 100% rename from arch/arm/src/samd5e5/sam_tc.c rename to soc/arm/samd5e5/sam_tc.c diff --git a/arch/arm/src/samd5e5/sam_tc.h b/soc/arm/samd5e5/sam_tc.h similarity index 100% rename from arch/arm/src/samd5e5/sam_tc.h rename to soc/arm/samd5e5/sam_tc.h diff --git a/arch/arm/src/samd5e5/sam_tickless.c b/soc/arm/samd5e5/sam_tickless.c similarity index 100% rename from arch/arm/src/samd5e5/sam_tickless.c rename to soc/arm/samd5e5/sam_tickless.c diff --git a/arch/arm/src/samd5e5/sam_timerisr.c b/soc/arm/samd5e5/sam_timerisr.c similarity index 100% rename from arch/arm/src/samd5e5/sam_timerisr.c rename to soc/arm/samd5e5/sam_timerisr.c diff --git a/arch/arm/src/samd5e5/sam_usart.c b/soc/arm/samd5e5/sam_usart.c similarity index 100% rename from arch/arm/src/samd5e5/sam_usart.c rename to soc/arm/samd5e5/sam_usart.c diff --git a/arch/arm/src/samd5e5/sam_usart.h b/soc/arm/samd5e5/sam_usart.h similarity index 100% rename from arch/arm/src/samd5e5/sam_usart.h rename to soc/arm/samd5e5/sam_usart.h diff --git a/arch/arm/src/samd5e5/sam_usb.c b/soc/arm/samd5e5/sam_usb.c similarity index 100% rename from arch/arm/src/samd5e5/sam_usb.c rename to soc/arm/samd5e5/sam_usb.c diff --git a/arch/arm/src/samd5e5/sam_usb.h b/soc/arm/samd5e5/sam_usb.h similarity index 100% rename from arch/arm/src/samd5e5/sam_usb.h rename to soc/arm/samd5e5/sam_usb.h diff --git a/arch/arm/src/samd5e5/sam_usbhost.c b/soc/arm/samd5e5/sam_usbhost.c similarity index 100% rename from arch/arm/src/samd5e5/sam_usbhost.c rename to soc/arm/samd5e5/sam_usbhost.c diff --git a/arch/arm/src/samd5e5/sam_usbhost.h b/soc/arm/samd5e5/sam_usbhost.h similarity index 100% rename from arch/arm/src/samd5e5/sam_usbhost.h rename to soc/arm/samd5e5/sam_usbhost.h diff --git a/arch/arm/src/samd5e5/sam_userspace.c b/soc/arm/samd5e5/sam_userspace.c similarity index 100% rename from arch/arm/src/samd5e5/sam_userspace.c rename to soc/arm/samd5e5/sam_userspace.c diff --git a/arch/arm/src/samd5e5/sam_userspace.h b/soc/arm/samd5e5/sam_userspace.h similarity index 100% rename from arch/arm/src/samd5e5/sam_userspace.h rename to soc/arm/samd5e5/sam_userspace.h diff --git a/arch/arm/src/samd5e5/sam_wdt.c b/soc/arm/samd5e5/sam_wdt.c similarity index 100% rename from arch/arm/src/samd5e5/sam_wdt.c rename to soc/arm/samd5e5/sam_wdt.c diff --git a/arch/arm/src/samd5e5/sam_wdt.h b/soc/arm/samd5e5/sam_wdt.h similarity index 100% rename from arch/arm/src/samd5e5/sam_wdt.h rename to soc/arm/samd5e5/sam_wdt.h diff --git a/arch/arm/src/samv7/Kconfig b/soc/arm/samv7/Kconfig similarity index 100% rename from arch/arm/src/samv7/Kconfig rename to soc/arm/samv7/Kconfig diff --git a/arch/arm/src/samv7/Make.defs b/soc/arm/samv7/Make.defs similarity index 100% rename from arch/arm/src/samv7/Make.defs rename to soc/arm/samv7/Make.defs diff --git a/arch/arm/src/samv7/chip.h b/soc/arm/samv7/chip.h similarity index 100% rename from arch/arm/src/samv7/chip.h rename to soc/arm/samv7/chip.h diff --git a/arch/arm/src/samv7/hardware/sam_afec.h b/soc/arm/samv7/hardware/sam_afec.h similarity index 100% rename from arch/arm/src/samv7/hardware/sam_afec.h rename to soc/arm/samv7/hardware/sam_afec.h diff --git a/arch/arm/src/samv7/hardware/sam_chipid.h b/soc/arm/samv7/hardware/sam_chipid.h similarity index 100% rename from arch/arm/src/samv7/hardware/sam_chipid.h rename to soc/arm/samv7/hardware/sam_chipid.h diff --git a/arch/arm/src/samv7/hardware/sam_dacc.h b/soc/arm/samv7/hardware/sam_dacc.h similarity index 100% rename from arch/arm/src/samv7/hardware/sam_dacc.h rename to soc/arm/samv7/hardware/sam_dacc.h diff --git a/arch/arm/src/samv7/hardware/sam_eefc.h b/soc/arm/samv7/hardware/sam_eefc.h similarity index 100% rename from arch/arm/src/samv7/hardware/sam_eefc.h rename to soc/arm/samv7/hardware/sam_eefc.h diff --git a/arch/arm/src/samv7/hardware/sam_emac.h b/soc/arm/samv7/hardware/sam_emac.h similarity index 100% rename from arch/arm/src/samv7/hardware/sam_emac.h rename to soc/arm/samv7/hardware/sam_emac.h diff --git a/arch/arm/src/samv7/hardware/sam_hsmci.h b/soc/arm/samv7/hardware/sam_hsmci.h similarity index 100% rename from arch/arm/src/samv7/hardware/sam_hsmci.h rename to soc/arm/samv7/hardware/sam_hsmci.h diff --git a/arch/arm/src/samv7/hardware/sam_matrix.h b/soc/arm/samv7/hardware/sam_matrix.h similarity index 100% rename from arch/arm/src/samv7/hardware/sam_matrix.h rename to soc/arm/samv7/hardware/sam_matrix.h diff --git a/arch/arm/src/samv7/hardware/sam_mcan.h b/soc/arm/samv7/hardware/sam_mcan.h similarity index 100% rename from arch/arm/src/samv7/hardware/sam_mcan.h rename to soc/arm/samv7/hardware/sam_mcan.h diff --git a/arch/arm/src/samv7/hardware/sam_memorymap.h b/soc/arm/samv7/hardware/sam_memorymap.h similarity index 100% rename from arch/arm/src/samv7/hardware/sam_memorymap.h rename to soc/arm/samv7/hardware/sam_memorymap.h diff --git a/arch/arm/src/samv7/hardware/sam_pinmap.h b/soc/arm/samv7/hardware/sam_pinmap.h similarity index 100% rename from arch/arm/src/samv7/hardware/sam_pinmap.h rename to soc/arm/samv7/hardware/sam_pinmap.h diff --git a/arch/arm/src/samv7/hardware/sam_pio.h b/soc/arm/samv7/hardware/sam_pio.h similarity index 100% rename from arch/arm/src/samv7/hardware/sam_pio.h rename to soc/arm/samv7/hardware/sam_pio.h diff --git a/arch/arm/src/samv7/hardware/sam_pmc.h b/soc/arm/samv7/hardware/sam_pmc.h similarity index 100% rename from arch/arm/src/samv7/hardware/sam_pmc.h rename to soc/arm/samv7/hardware/sam_pmc.h diff --git a/arch/arm/src/samv7/hardware/sam_pwm.h b/soc/arm/samv7/hardware/sam_pwm.h similarity index 100% rename from arch/arm/src/samv7/hardware/sam_pwm.h rename to soc/arm/samv7/hardware/sam_pwm.h diff --git a/arch/arm/src/samv7/hardware/sam_qspi.h b/soc/arm/samv7/hardware/sam_qspi.h similarity index 100% rename from arch/arm/src/samv7/hardware/sam_qspi.h rename to soc/arm/samv7/hardware/sam_qspi.h diff --git a/arch/arm/src/samv7/hardware/sam_rstc.h b/soc/arm/samv7/hardware/sam_rstc.h similarity index 100% rename from arch/arm/src/samv7/hardware/sam_rstc.h rename to soc/arm/samv7/hardware/sam_rstc.h diff --git a/arch/arm/src/samv7/hardware/sam_rtc.h b/soc/arm/samv7/hardware/sam_rtc.h similarity index 100% rename from arch/arm/src/samv7/hardware/sam_rtc.h rename to soc/arm/samv7/hardware/sam_rtc.h diff --git a/arch/arm/src/samv7/hardware/sam_sdramc.h b/soc/arm/samv7/hardware/sam_sdramc.h similarity index 100% rename from arch/arm/src/samv7/hardware/sam_sdramc.h rename to soc/arm/samv7/hardware/sam_sdramc.h diff --git a/arch/arm/src/samv7/hardware/sam_smc.h b/soc/arm/samv7/hardware/sam_smc.h similarity index 100% rename from arch/arm/src/samv7/hardware/sam_smc.h rename to soc/arm/samv7/hardware/sam_smc.h diff --git a/arch/arm/src/samv7/hardware/sam_spi.h b/soc/arm/samv7/hardware/sam_spi.h similarity index 100% rename from arch/arm/src/samv7/hardware/sam_spi.h rename to soc/arm/samv7/hardware/sam_spi.h diff --git a/arch/arm/src/samv7/hardware/sam_ssc.h b/soc/arm/samv7/hardware/sam_ssc.h similarity index 100% rename from arch/arm/src/samv7/hardware/sam_ssc.h rename to soc/arm/samv7/hardware/sam_ssc.h diff --git a/arch/arm/src/samv7/hardware/sam_supc.h b/soc/arm/samv7/hardware/sam_supc.h similarity index 100% rename from arch/arm/src/samv7/hardware/sam_supc.h rename to soc/arm/samv7/hardware/sam_supc.h diff --git a/arch/arm/src/samv7/hardware/sam_sysc.h b/soc/arm/samv7/hardware/sam_sysc.h similarity index 100% rename from arch/arm/src/samv7/hardware/sam_sysc.h rename to soc/arm/samv7/hardware/sam_sysc.h diff --git a/arch/arm/src/samv7/hardware/sam_tc.h b/soc/arm/samv7/hardware/sam_tc.h similarity index 100% rename from arch/arm/src/samv7/hardware/sam_tc.h rename to soc/arm/samv7/hardware/sam_tc.h diff --git a/arch/arm/src/samv7/hardware/sam_trng.h b/soc/arm/samv7/hardware/sam_trng.h similarity index 100% rename from arch/arm/src/samv7/hardware/sam_trng.h rename to soc/arm/samv7/hardware/sam_trng.h diff --git a/arch/arm/src/samv7/hardware/sam_twihs.h b/soc/arm/samv7/hardware/sam_twihs.h similarity index 100% rename from arch/arm/src/samv7/hardware/sam_twihs.h rename to soc/arm/samv7/hardware/sam_twihs.h diff --git a/arch/arm/src/samv7/hardware/sam_uart.h b/soc/arm/samv7/hardware/sam_uart.h similarity index 100% rename from arch/arm/src/samv7/hardware/sam_uart.h rename to soc/arm/samv7/hardware/sam_uart.h diff --git a/arch/arm/src/samv7/hardware/sam_usbhs.h b/soc/arm/samv7/hardware/sam_usbhs.h similarity index 100% rename from arch/arm/src/samv7/hardware/sam_usbhs.h rename to soc/arm/samv7/hardware/sam_usbhs.h diff --git a/arch/arm/src/samv7/hardware/sam_utmi.h b/soc/arm/samv7/hardware/sam_utmi.h similarity index 100% rename from arch/arm/src/samv7/hardware/sam_utmi.h rename to soc/arm/samv7/hardware/sam_utmi.h diff --git a/arch/arm/src/samv7/hardware/sam_wdt.h b/soc/arm/samv7/hardware/sam_wdt.h similarity index 100% rename from arch/arm/src/samv7/hardware/sam_wdt.h rename to soc/arm/samv7/hardware/sam_wdt.h diff --git a/arch/arm/src/samv7/hardware/sam_xdmac.h b/soc/arm/samv7/hardware/sam_xdmac.h similarity index 100% rename from arch/arm/src/samv7/hardware/sam_xdmac.h rename to soc/arm/samv7/hardware/sam_xdmac.h diff --git a/arch/arm/src/samv7/hardware/same70_memorymap.h b/soc/arm/samv7/hardware/same70_memorymap.h similarity index 100% rename from arch/arm/src/samv7/hardware/same70_memorymap.h rename to soc/arm/samv7/hardware/same70_memorymap.h diff --git a/arch/arm/src/samv7/hardware/same70_pinmap.h b/soc/arm/samv7/hardware/same70_pinmap.h similarity index 100% rename from arch/arm/src/samv7/hardware/same70_pinmap.h rename to soc/arm/samv7/hardware/same70_pinmap.h diff --git a/arch/arm/src/samv7/hardware/samv71_memorymap.h b/soc/arm/samv7/hardware/samv71_memorymap.h similarity index 100% rename from arch/arm/src/samv7/hardware/samv71_memorymap.h rename to soc/arm/samv7/hardware/samv71_memorymap.h diff --git a/arch/arm/src/samv7/hardware/samv71_pinmap.h b/soc/arm/samv7/hardware/samv71_pinmap.h similarity index 100% rename from arch/arm/src/samv7/hardware/samv71_pinmap.h rename to soc/arm/samv7/hardware/samv71_pinmap.h diff --git a/arch/arm/src/samv7/sam_1wire.c b/soc/arm/samv7/sam_1wire.c similarity index 100% rename from arch/arm/src/samv7/sam_1wire.c rename to soc/arm/samv7/sam_1wire.c diff --git a/arch/arm/src/samv7/sam_1wire.h b/soc/arm/samv7/sam_1wire.h similarity index 100% rename from arch/arm/src/samv7/sam_1wire.h rename to soc/arm/samv7/sam_1wire.h diff --git a/arch/arm/src/samv7/sam_afec.c b/soc/arm/samv7/sam_afec.c similarity index 100% rename from arch/arm/src/samv7/sam_afec.c rename to soc/arm/samv7/sam_afec.c diff --git a/arch/arm/src/samv7/sam_afec.h b/soc/arm/samv7/sam_afec.h similarity index 100% rename from arch/arm/src/samv7/sam_afec.h rename to soc/arm/samv7/sam_afec.h diff --git a/arch/arm/src/samv7/sam_allocateheap.c b/soc/arm/samv7/sam_allocateheap.c similarity index 100% rename from arch/arm/src/samv7/sam_allocateheap.c rename to soc/arm/samv7/sam_allocateheap.c diff --git a/arch/arm/src/samv7/sam_clockconfig.c b/soc/arm/samv7/sam_clockconfig.c similarity index 100% rename from arch/arm/src/samv7/sam_clockconfig.c rename to soc/arm/samv7/sam_clockconfig.c diff --git a/arch/arm/src/samv7/sam_clockconfig.h b/soc/arm/samv7/sam_clockconfig.h similarity index 100% rename from arch/arm/src/samv7/sam_clockconfig.h rename to soc/arm/samv7/sam_clockconfig.h diff --git a/arch/arm/src/samv7/sam_config.h b/soc/arm/samv7/sam_config.h similarity index 100% rename from arch/arm/src/samv7/sam_config.h rename to soc/arm/samv7/sam_config.h diff --git a/arch/arm/src/samv7/sam_dac.c b/soc/arm/samv7/sam_dac.c similarity index 100% rename from arch/arm/src/samv7/sam_dac.c rename to soc/arm/samv7/sam_dac.c diff --git a/arch/arm/src/samv7/sam_dac.h b/soc/arm/samv7/sam_dac.h similarity index 100% rename from arch/arm/src/samv7/sam_dac.h rename to soc/arm/samv7/sam_dac.h diff --git a/arch/arm/src/samv7/sam_eefc.c b/soc/arm/samv7/sam_eefc.c similarity index 100% rename from arch/arm/src/samv7/sam_eefc.c rename to soc/arm/samv7/sam_eefc.c diff --git a/arch/arm/src/samv7/sam_eefc.h b/soc/arm/samv7/sam_eefc.h similarity index 100% rename from arch/arm/src/samv7/sam_eefc.h rename to soc/arm/samv7/sam_eefc.h diff --git a/arch/arm/src/samv7/sam_emac.c b/soc/arm/samv7/sam_emac.c similarity index 100% rename from arch/arm/src/samv7/sam_emac.c rename to soc/arm/samv7/sam_emac.c diff --git a/arch/arm/src/samv7/sam_ethernet.c b/soc/arm/samv7/sam_ethernet.c similarity index 100% rename from arch/arm/src/samv7/sam_ethernet.c rename to soc/arm/samv7/sam_ethernet.c diff --git a/arch/arm/src/samv7/sam_ethernet.h b/soc/arm/samv7/sam_ethernet.h similarity index 100% rename from arch/arm/src/samv7/sam_ethernet.h rename to soc/arm/samv7/sam_ethernet.h diff --git a/arch/arm/src/samv7/sam_freerun.c b/soc/arm/samv7/sam_freerun.c similarity index 100% rename from arch/arm/src/samv7/sam_freerun.c rename to soc/arm/samv7/sam_freerun.c diff --git a/arch/arm/src/samv7/sam_freerun.h b/soc/arm/samv7/sam_freerun.h similarity index 100% rename from arch/arm/src/samv7/sam_freerun.h rename to soc/arm/samv7/sam_freerun.h diff --git a/arch/arm/src/samv7/sam_gpio.c b/soc/arm/samv7/sam_gpio.c similarity index 100% rename from arch/arm/src/samv7/sam_gpio.c rename to soc/arm/samv7/sam_gpio.c diff --git a/arch/arm/src/samv7/sam_gpio.h b/soc/arm/samv7/sam_gpio.h similarity index 100% rename from arch/arm/src/samv7/sam_gpio.h rename to soc/arm/samv7/sam_gpio.h diff --git a/arch/arm/src/samv7/sam_gpioirq.c b/soc/arm/samv7/sam_gpioirq.c similarity index 100% rename from arch/arm/src/samv7/sam_gpioirq.c rename to soc/arm/samv7/sam_gpioirq.c diff --git a/arch/arm/src/samv7/sam_hsmci.c b/soc/arm/samv7/sam_hsmci.c similarity index 100% rename from arch/arm/src/samv7/sam_hsmci.c rename to soc/arm/samv7/sam_hsmci.c diff --git a/arch/arm/src/samv7/sam_hsmci.h b/soc/arm/samv7/sam_hsmci.h similarity index 100% rename from arch/arm/src/samv7/sam_hsmci.h rename to soc/arm/samv7/sam_hsmci.h diff --git a/arch/arm/src/samv7/sam_hsmci_clkdiv.c b/soc/arm/samv7/sam_hsmci_clkdiv.c similarity index 100% rename from arch/arm/src/samv7/sam_hsmci_clkdiv.c rename to soc/arm/samv7/sam_hsmci_clkdiv.c diff --git a/arch/arm/src/samv7/sam_irq.c b/soc/arm/samv7/sam_irq.c similarity index 100% rename from arch/arm/src/samv7/sam_irq.c rename to soc/arm/samv7/sam_irq.c diff --git a/arch/arm/src/samv7/sam_lin.h b/soc/arm/samv7/sam_lin.h similarity index 100% rename from arch/arm/src/samv7/sam_lin.h rename to soc/arm/samv7/sam_lin.h diff --git a/arch/arm/src/samv7/sam_lin_sock.c b/soc/arm/samv7/sam_lin_sock.c similarity index 100% rename from arch/arm/src/samv7/sam_lin_sock.c rename to soc/arm/samv7/sam_lin_sock.c diff --git a/arch/arm/src/samv7/sam_lowputc.c b/soc/arm/samv7/sam_lowputc.c similarity index 100% rename from arch/arm/src/samv7/sam_lowputc.c rename to soc/arm/samv7/sam_lowputc.c diff --git a/arch/arm/src/samv7/sam_mcan.c b/soc/arm/samv7/sam_mcan.c similarity index 100% rename from arch/arm/src/samv7/sam_mcan.c rename to soc/arm/samv7/sam_mcan.c diff --git a/arch/arm/src/samv7/sam_mcan.h b/soc/arm/samv7/sam_mcan.h similarity index 100% rename from arch/arm/src/samv7/sam_mcan.h rename to soc/arm/samv7/sam_mcan.h diff --git a/arch/arm/src/samv7/sam_mpuinit.c b/soc/arm/samv7/sam_mpuinit.c similarity index 100% rename from arch/arm/src/samv7/sam_mpuinit.c rename to soc/arm/samv7/sam_mpuinit.c diff --git a/arch/arm/src/samv7/sam_mpuinit.h b/soc/arm/samv7/sam_mpuinit.h similarity index 100% rename from arch/arm/src/samv7/sam_mpuinit.h rename to soc/arm/samv7/sam_mpuinit.h diff --git a/arch/arm/src/samv7/sam_oneshot.c b/soc/arm/samv7/sam_oneshot.c similarity index 100% rename from arch/arm/src/samv7/sam_oneshot.c rename to soc/arm/samv7/sam_oneshot.c diff --git a/arch/arm/src/samv7/sam_oneshot.h b/soc/arm/samv7/sam_oneshot.h similarity index 100% rename from arch/arm/src/samv7/sam_oneshot.h rename to soc/arm/samv7/sam_oneshot.h diff --git a/arch/arm/src/samv7/sam_oneshot_lowerhalf.c b/soc/arm/samv7/sam_oneshot_lowerhalf.c similarity index 100% rename from arch/arm/src/samv7/sam_oneshot_lowerhalf.c rename to soc/arm/samv7/sam_oneshot_lowerhalf.c diff --git a/arch/arm/src/samv7/sam_pck.c b/soc/arm/samv7/sam_pck.c similarity index 100% rename from arch/arm/src/samv7/sam_pck.c rename to soc/arm/samv7/sam_pck.c diff --git a/arch/arm/src/samv7/sam_pck.h b/soc/arm/samv7/sam_pck.h similarity index 100% rename from arch/arm/src/samv7/sam_pck.h rename to soc/arm/samv7/sam_pck.h diff --git a/arch/arm/src/samv7/sam_periphclks.h b/soc/arm/samv7/sam_periphclks.h similarity index 100% rename from arch/arm/src/samv7/sam_periphclks.h rename to soc/arm/samv7/sam_periphclks.h diff --git a/arch/arm/src/samv7/sam_progmem.c b/soc/arm/samv7/sam_progmem.c similarity index 100% rename from arch/arm/src/samv7/sam_progmem.c rename to soc/arm/samv7/sam_progmem.c diff --git a/arch/arm/src/samv7/sam_progmem.h b/soc/arm/samv7/sam_progmem.h similarity index 100% rename from arch/arm/src/samv7/sam_progmem.h rename to soc/arm/samv7/sam_progmem.h diff --git a/arch/arm/src/samv7/sam_pwm.c b/soc/arm/samv7/sam_pwm.c similarity index 100% rename from arch/arm/src/samv7/sam_pwm.c rename to soc/arm/samv7/sam_pwm.c diff --git a/arch/arm/src/samv7/sam_pwm.h b/soc/arm/samv7/sam_pwm.h similarity index 100% rename from arch/arm/src/samv7/sam_pwm.h rename to soc/arm/samv7/sam_pwm.h diff --git a/arch/arm/src/samv7/sam_qencoder.c b/soc/arm/samv7/sam_qencoder.c similarity index 100% rename from arch/arm/src/samv7/sam_qencoder.c rename to soc/arm/samv7/sam_qencoder.c diff --git a/arch/arm/src/samv7/sam_qencoder.h b/soc/arm/samv7/sam_qencoder.h similarity index 100% rename from arch/arm/src/samv7/sam_qencoder.h rename to soc/arm/samv7/sam_qencoder.h diff --git a/arch/arm/src/samv7/sam_qspi.c b/soc/arm/samv7/sam_qspi.c similarity index 100% rename from arch/arm/src/samv7/sam_qspi.c rename to soc/arm/samv7/sam_qspi.c diff --git a/arch/arm/src/samv7/sam_qspi.h b/soc/arm/samv7/sam_qspi.h similarity index 100% rename from arch/arm/src/samv7/sam_qspi.h rename to soc/arm/samv7/sam_qspi.h diff --git a/arch/arm/src/samv7/sam_qspi_spi.c b/soc/arm/samv7/sam_qspi_spi.c similarity index 100% rename from arch/arm/src/samv7/sam_qspi_spi.c rename to soc/arm/samv7/sam_qspi_spi.c diff --git a/arch/arm/src/samv7/sam_qspi_spi.h b/soc/arm/samv7/sam_qspi_spi.h similarity index 100% rename from arch/arm/src/samv7/sam_qspi_spi.h rename to soc/arm/samv7/sam_qspi_spi.h diff --git a/arch/arm/src/samv7/sam_rswdt.c b/soc/arm/samv7/sam_rswdt.c similarity index 100% rename from arch/arm/src/samv7/sam_rswdt.c rename to soc/arm/samv7/sam_rswdt.c diff --git a/arch/arm/src/samv7/sam_serial.c b/soc/arm/samv7/sam_serial.c similarity index 100% rename from arch/arm/src/samv7/sam_serial.c rename to soc/arm/samv7/sam_serial.c diff --git a/arch/arm/src/samv7/sam_serial.h b/soc/arm/samv7/sam_serial.h similarity index 100% rename from arch/arm/src/samv7/sam_serial.h rename to soc/arm/samv7/sam_serial.h diff --git a/arch/arm/src/samv7/sam_serial_spi.c b/soc/arm/samv7/sam_serial_spi.c similarity index 100% rename from arch/arm/src/samv7/sam_serial_spi.c rename to soc/arm/samv7/sam_serial_spi.c diff --git a/arch/arm/src/samv7/sam_serial_spi.h b/soc/arm/samv7/sam_serial_spi.h similarity index 100% rename from arch/arm/src/samv7/sam_serial_spi.h rename to soc/arm/samv7/sam_serial_spi.h diff --git a/arch/arm/src/samv7/sam_spi.c b/soc/arm/samv7/sam_spi.c similarity index 100% rename from arch/arm/src/samv7/sam_spi.c rename to soc/arm/samv7/sam_spi.c diff --git a/arch/arm/src/samv7/sam_spi.h b/soc/arm/samv7/sam_spi.h similarity index 100% rename from arch/arm/src/samv7/sam_spi.h rename to soc/arm/samv7/sam_spi.h diff --git a/arch/arm/src/samv7/sam_spi_slave.c b/soc/arm/samv7/sam_spi_slave.c similarity index 100% rename from arch/arm/src/samv7/sam_spi_slave.c rename to soc/arm/samv7/sam_spi_slave.c diff --git a/arch/arm/src/samv7/sam_ssc.c b/soc/arm/samv7/sam_ssc.c similarity index 100% rename from arch/arm/src/samv7/sam_ssc.c rename to soc/arm/samv7/sam_ssc.c diff --git a/arch/arm/src/samv7/sam_ssc.h b/soc/arm/samv7/sam_ssc.h similarity index 100% rename from arch/arm/src/samv7/sam_ssc.h rename to soc/arm/samv7/sam_ssc.h diff --git a/arch/arm/src/samv7/sam_start.c b/soc/arm/samv7/sam_start.c similarity index 100% rename from arch/arm/src/samv7/sam_start.c rename to soc/arm/samv7/sam_start.c diff --git a/arch/arm/src/samv7/sam_start.h b/soc/arm/samv7/sam_start.h similarity index 100% rename from arch/arm/src/samv7/sam_start.h rename to soc/arm/samv7/sam_start.h diff --git a/arch/arm/src/samv7/sam_systemreset.c b/soc/arm/samv7/sam_systemreset.c similarity index 100% rename from arch/arm/src/samv7/sam_systemreset.c rename to soc/arm/samv7/sam_systemreset.c diff --git a/arch/arm/src/samv7/sam_systemreset.h b/soc/arm/samv7/sam_systemreset.h similarity index 100% rename from arch/arm/src/samv7/sam_systemreset.h rename to soc/arm/samv7/sam_systemreset.h diff --git a/arch/arm/src/samv7/sam_tc.c b/soc/arm/samv7/sam_tc.c similarity index 100% rename from arch/arm/src/samv7/sam_tc.c rename to soc/arm/samv7/sam_tc.c diff --git a/arch/arm/src/samv7/sam_tc.h b/soc/arm/samv7/sam_tc.h similarity index 100% rename from arch/arm/src/samv7/sam_tc.h rename to soc/arm/samv7/sam_tc.h diff --git a/arch/arm/src/samv7/sam_tc_lowerhalf.c b/soc/arm/samv7/sam_tc_lowerhalf.c similarity index 100% rename from arch/arm/src/samv7/sam_tc_lowerhalf.c rename to soc/arm/samv7/sam_tc_lowerhalf.c diff --git a/arch/arm/src/samv7/sam_tc_lowerhalf.h b/soc/arm/samv7/sam_tc_lowerhalf.h similarity index 100% rename from arch/arm/src/samv7/sam_tc_lowerhalf.h rename to soc/arm/samv7/sam_tc_lowerhalf.h diff --git a/arch/arm/src/samv7/sam_tickless.c b/soc/arm/samv7/sam_tickless.c similarity index 100% rename from arch/arm/src/samv7/sam_tickless.c rename to soc/arm/samv7/sam_tickless.c diff --git a/arch/arm/src/samv7/sam_timerisr.c b/soc/arm/samv7/sam_timerisr.c similarity index 100% rename from arch/arm/src/samv7/sam_timerisr.c rename to soc/arm/samv7/sam_timerisr.c diff --git a/arch/arm/src/samv7/sam_trng.c b/soc/arm/samv7/sam_trng.c similarity index 100% rename from arch/arm/src/samv7/sam_trng.c rename to soc/arm/samv7/sam_trng.c diff --git a/arch/arm/src/samv7/sam_trng.h b/soc/arm/samv7/sam_trng.h similarity index 100% rename from arch/arm/src/samv7/sam_trng.h rename to soc/arm/samv7/sam_trng.h diff --git a/arch/arm/src/samv7/sam_twihs.c b/soc/arm/samv7/sam_twihs.c similarity index 100% rename from arch/arm/src/samv7/sam_twihs.c rename to soc/arm/samv7/sam_twihs.c diff --git a/arch/arm/src/samv7/sam_twihs.h b/soc/arm/samv7/sam_twihs.h similarity index 100% rename from arch/arm/src/samv7/sam_twihs.h rename to soc/arm/samv7/sam_twihs.h diff --git a/arch/arm/src/samv7/sam_uid.c b/soc/arm/samv7/sam_uid.c similarity index 100% rename from arch/arm/src/samv7/sam_uid.c rename to soc/arm/samv7/sam_uid.c diff --git a/arch/arm/src/samv7/sam_uid.h b/soc/arm/samv7/sam_uid.h similarity index 100% rename from arch/arm/src/samv7/sam_uid.h rename to soc/arm/samv7/sam_uid.h diff --git a/arch/arm/src/samv7/sam_us.c b/soc/arm/samv7/sam_us.c similarity index 100% rename from arch/arm/src/samv7/sam_us.c rename to soc/arm/samv7/sam_us.c diff --git a/arch/arm/src/samv7/sam_us.h b/soc/arm/samv7/sam_us.h similarity index 100% rename from arch/arm/src/samv7/sam_us.h rename to soc/arm/samv7/sam_us.h diff --git a/arch/arm/src/samv7/sam_usbdev.h b/soc/arm/samv7/sam_usbdev.h similarity index 100% rename from arch/arm/src/samv7/sam_usbdev.h rename to soc/arm/samv7/sam_usbdev.h diff --git a/arch/arm/src/samv7/sam_usbdevhs.c b/soc/arm/samv7/sam_usbdevhs.c similarity index 100% rename from arch/arm/src/samv7/sam_usbdevhs.c rename to soc/arm/samv7/sam_usbdevhs.c diff --git a/arch/arm/src/samv7/sam_userspace.c b/soc/arm/samv7/sam_userspace.c similarity index 100% rename from arch/arm/src/samv7/sam_userspace.c rename to soc/arm/samv7/sam_userspace.c diff --git a/arch/arm/src/samv7/sam_userspace.h b/soc/arm/samv7/sam_userspace.h similarity index 100% rename from arch/arm/src/samv7/sam_userspace.h rename to soc/arm/samv7/sam_userspace.h diff --git a/arch/arm/src/samv7/sam_wdt.c b/soc/arm/samv7/sam_wdt.c similarity index 100% rename from arch/arm/src/samv7/sam_wdt.c rename to soc/arm/samv7/sam_wdt.c diff --git a/arch/arm/src/samv7/sam_wdt.h b/soc/arm/samv7/sam_wdt.h similarity index 100% rename from arch/arm/src/samv7/sam_wdt.h rename to soc/arm/samv7/sam_wdt.h diff --git a/arch/arm/src/samv7/sam_xdmac.c b/soc/arm/samv7/sam_xdmac.c similarity index 100% rename from arch/arm/src/samv7/sam_xdmac.c rename to soc/arm/samv7/sam_xdmac.c diff --git a/arch/arm/src/samv7/sam_xdmac.h b/soc/arm/samv7/sam_xdmac.h similarity index 100% rename from arch/arm/src/samv7/sam_xdmac.h rename to soc/arm/samv7/sam_xdmac.h diff --git a/arch/arm/src/samv7/same70_periphclks.h b/soc/arm/samv7/same70_periphclks.h similarity index 100% rename from arch/arm/src/samv7/same70_periphclks.h rename to soc/arm/samv7/same70_periphclks.h diff --git a/arch/arm/src/samv7/samv71_periphclks.h b/soc/arm/samv7/samv71_periphclks.h similarity index 100% rename from arch/arm/src/samv7/samv71_periphclks.h rename to soc/arm/samv7/samv71_periphclks.h diff --git a/arch/arm/src/stm32/CMakeLists.txt b/soc/arm/stm32/CMakeLists.txt similarity index 100% rename from arch/arm/src/stm32/CMakeLists.txt rename to soc/arm/stm32/CMakeLists.txt diff --git a/arch/arm/src/stm32/Kconfig b/soc/arm/stm32/Kconfig similarity index 100% rename from arch/arm/src/stm32/Kconfig rename to soc/arm/stm32/Kconfig diff --git a/arch/arm/src/stm32/Make.defs b/soc/arm/stm32/Make.defs similarity index 100% rename from arch/arm/src/stm32/Make.defs rename to soc/arm/stm32/Make.defs diff --git a/arch/arm/src/stm32/chip.h b/soc/arm/stm32/chip.h similarity index 100% rename from arch/arm/src/stm32/chip.h rename to soc/arm/stm32/chip.h diff --git a/arch/arm/src/stm32/hardware/stm32_adc.h b/soc/arm/stm32/hardware/stm32_adc.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_adc.h rename to soc/arm/stm32/hardware/stm32_adc.h diff --git a/arch/arm/src/stm32/hardware/stm32_adc_v1.h b/soc/arm/stm32/hardware/stm32_adc_v1.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_adc_v1.h rename to soc/arm/stm32/hardware/stm32_adc_v1.h diff --git a/arch/arm/src/stm32/hardware/stm32_adc_v1l1.h b/soc/arm/stm32/hardware/stm32_adc_v1l1.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_adc_v1l1.h rename to soc/arm/stm32/hardware/stm32_adc_v1l1.h diff --git a/arch/arm/src/stm32/hardware/stm32_adc_v2.h b/soc/arm/stm32/hardware/stm32_adc_v2.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_adc_v2.h rename to soc/arm/stm32/hardware/stm32_adc_v2.h diff --git a/arch/arm/src/stm32/hardware/stm32_adc_v2g4.h b/soc/arm/stm32/hardware/stm32_adc_v2g4.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_adc_v2g4.h rename to soc/arm/stm32/hardware/stm32_adc_v2g4.h diff --git a/arch/arm/src/stm32/hardware/stm32_bkp.h b/soc/arm/stm32/hardware/stm32_bkp.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_bkp.h rename to soc/arm/stm32/hardware/stm32_bkp.h diff --git a/arch/arm/src/stm32/hardware/stm32_can.h b/soc/arm/stm32/hardware/stm32_can.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_can.h rename to soc/arm/stm32/hardware/stm32_can.h diff --git a/arch/arm/src/stm32/hardware/stm32_comp.h b/soc/arm/stm32/hardware/stm32_comp.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_comp.h rename to soc/arm/stm32/hardware/stm32_comp.h diff --git a/arch/arm/src/stm32/hardware/stm32_dac.h b/soc/arm/stm32/hardware/stm32_dac.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_dac.h rename to soc/arm/stm32/hardware/stm32_dac.h diff --git a/arch/arm/src/stm32/hardware/stm32_dac_v1.h b/soc/arm/stm32/hardware/stm32_dac_v1.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_dac_v1.h rename to soc/arm/stm32/hardware/stm32_dac_v1.h diff --git a/arch/arm/src/stm32/hardware/stm32_dbgmcu.h b/soc/arm/stm32/hardware/stm32_dbgmcu.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_dbgmcu.h rename to soc/arm/stm32/hardware/stm32_dbgmcu.h diff --git a/arch/arm/src/stm32/hardware/stm32_dma.h b/soc/arm/stm32/hardware/stm32_dma.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_dma.h rename to soc/arm/stm32/hardware/stm32_dma.h diff --git a/arch/arm/src/stm32/hardware/stm32_dma2d.h b/soc/arm/stm32/hardware/stm32_dma2d.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_dma2d.h rename to soc/arm/stm32/hardware/stm32_dma2d.h diff --git a/arch/arm/src/stm32/hardware/stm32_dma_v1.h b/soc/arm/stm32/hardware/stm32_dma_v1.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_dma_v1.h rename to soc/arm/stm32/hardware/stm32_dma_v1.h diff --git a/arch/arm/src/stm32/hardware/stm32_dma_v2.h b/soc/arm/stm32/hardware/stm32_dma_v2.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_dma_v2.h rename to soc/arm/stm32/hardware/stm32_dma_v2.h diff --git a/arch/arm/src/stm32/hardware/stm32_dmamux.h b/soc/arm/stm32/hardware/stm32_dmamux.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_dmamux.h rename to soc/arm/stm32/hardware/stm32_dmamux.h diff --git a/arch/arm/src/stm32/hardware/stm32_eth.h b/soc/arm/stm32/hardware/stm32_eth.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_eth.h rename to soc/arm/stm32/hardware/stm32_eth.h diff --git a/arch/arm/src/stm32/hardware/stm32_exti.h b/soc/arm/stm32/hardware/stm32_exti.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_exti.h rename to soc/arm/stm32/hardware/stm32_exti.h diff --git a/arch/arm/src/stm32/hardware/stm32_fdcan.h b/soc/arm/stm32/hardware/stm32_fdcan.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_fdcan.h rename to soc/arm/stm32/hardware/stm32_fdcan.h diff --git a/arch/arm/src/stm32/hardware/stm32_flash.h b/soc/arm/stm32/hardware/stm32_flash.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_flash.h rename to soc/arm/stm32/hardware/stm32_flash.h diff --git a/arch/arm/src/stm32/hardware/stm32_fmc.h b/soc/arm/stm32/hardware/stm32_fmc.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_fmc.h rename to soc/arm/stm32/hardware/stm32_fmc.h diff --git a/arch/arm/src/stm32/hardware/stm32_fsmc.h b/soc/arm/stm32/hardware/stm32_fsmc.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_fsmc.h rename to soc/arm/stm32/hardware/stm32_fsmc.h diff --git a/arch/arm/src/stm32/hardware/stm32_i2c.h b/soc/arm/stm32/hardware/stm32_i2c.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_i2c.h rename to soc/arm/stm32/hardware/stm32_i2c.h diff --git a/arch/arm/src/stm32/hardware/stm32_i2c_v1.h b/soc/arm/stm32/hardware/stm32_i2c_v1.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_i2c_v1.h rename to soc/arm/stm32/hardware/stm32_i2c_v1.h diff --git a/arch/arm/src/stm32/hardware/stm32_i2c_v2.h b/soc/arm/stm32/hardware/stm32_i2c_v2.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_i2c_v2.h rename to soc/arm/stm32/hardware/stm32_i2c_v2.h diff --git a/arch/arm/src/stm32/hardware/stm32_lcd.h b/soc/arm/stm32/hardware/stm32_lcd.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_lcd.h rename to soc/arm/stm32/hardware/stm32_lcd.h diff --git a/arch/arm/src/stm32/hardware/stm32_ltdc.h b/soc/arm/stm32/hardware/stm32_ltdc.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_ltdc.h rename to soc/arm/stm32/hardware/stm32_ltdc.h diff --git a/arch/arm/src/stm32/hardware/stm32_memorymap.h b/soc/arm/stm32/hardware/stm32_memorymap.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_memorymap.h rename to soc/arm/stm32/hardware/stm32_memorymap.h diff --git a/arch/arm/src/stm32/hardware/stm32_otghs.h b/soc/arm/stm32/hardware/stm32_otghs.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_otghs.h rename to soc/arm/stm32/hardware/stm32_otghs.h diff --git a/arch/arm/src/stm32/hardware/stm32_pinmap.h b/soc/arm/stm32/hardware/stm32_pinmap.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_pinmap.h rename to soc/arm/stm32/hardware/stm32_pinmap.h diff --git a/arch/arm/src/stm32/hardware/stm32_pwr.h b/soc/arm/stm32/hardware/stm32_pwr.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_pwr.h rename to soc/arm/stm32/hardware/stm32_pwr.h diff --git a/arch/arm/src/stm32/hardware/stm32_rng.h b/soc/arm/stm32/hardware/stm32_rng.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_rng.h rename to soc/arm/stm32/hardware/stm32_rng.h diff --git a/arch/arm/src/stm32/hardware/stm32_rtc.h b/soc/arm/stm32/hardware/stm32_rtc.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_rtc.h rename to soc/arm/stm32/hardware/stm32_rtc.h diff --git a/arch/arm/src/stm32/hardware/stm32_rtcc.h b/soc/arm/stm32/hardware/stm32_rtcc.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_rtcc.h rename to soc/arm/stm32/hardware/stm32_rtcc.h diff --git a/arch/arm/src/stm32/hardware/stm32_sdio.h b/soc/arm/stm32/hardware/stm32_sdio.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_sdio.h rename to soc/arm/stm32/hardware/stm32_sdio.h diff --git a/arch/arm/src/stm32/hardware/stm32_spi.h b/soc/arm/stm32/hardware/stm32_spi.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_spi.h rename to soc/arm/stm32/hardware/stm32_spi.h diff --git a/arch/arm/src/stm32/hardware/stm32_tim.h b/soc/arm/stm32/hardware/stm32_tim.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_tim.h rename to soc/arm/stm32/hardware/stm32_tim.h diff --git a/arch/arm/src/stm32/hardware/stm32_tim_v1v2.h b/soc/arm/stm32/hardware/stm32_tim_v1v2.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_tim_v1v2.h rename to soc/arm/stm32/hardware/stm32_tim_v1v2.h diff --git a/arch/arm/src/stm32/hardware/stm32_tim_v3.h b/soc/arm/stm32/hardware/stm32_tim_v3.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_tim_v3.h rename to soc/arm/stm32/hardware/stm32_tim_v3.h diff --git a/arch/arm/src/stm32/hardware/stm32_usbdev.h b/soc/arm/stm32/hardware/stm32_usbdev.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_usbdev.h rename to soc/arm/stm32/hardware/stm32_usbdev.h diff --git a/arch/arm/src/stm32/hardware/stm32_usbfs.h b/soc/arm/stm32/hardware/stm32_usbfs.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_usbfs.h rename to soc/arm/stm32/hardware/stm32_usbfs.h diff --git a/arch/arm/src/stm32/hardware/stm32_wdg.h b/soc/arm/stm32/hardware/stm32_wdg.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32_wdg.h rename to soc/arm/stm32/hardware/stm32_wdg.h diff --git a/arch/arm/src/stm32/hardware/stm32f100_pinmap.h b/soc/arm/stm32/hardware/stm32f100_pinmap.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f100_pinmap.h rename to soc/arm/stm32/hardware/stm32f100_pinmap.h diff --git a/arch/arm/src/stm32/hardware/stm32f100_pinmap_legacy.h b/soc/arm/stm32/hardware/stm32f100_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f100_pinmap_legacy.h rename to soc/arm/stm32/hardware/stm32f100_pinmap_legacy.h diff --git a/arch/arm/src/stm32/hardware/stm32f102_pinmap.h b/soc/arm/stm32/hardware/stm32f102_pinmap.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f102_pinmap.h rename to soc/arm/stm32/hardware/stm32f102_pinmap.h diff --git a/arch/arm/src/stm32/hardware/stm32f102_pinmap_legacy.h b/soc/arm/stm32/hardware/stm32f102_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f102_pinmap_legacy.h rename to soc/arm/stm32/hardware/stm32f102_pinmap_legacy.h diff --git a/arch/arm/src/stm32/hardware/stm32f103c_pinmap.h b/soc/arm/stm32/hardware/stm32f103c_pinmap.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f103c_pinmap.h rename to soc/arm/stm32/hardware/stm32f103c_pinmap.h diff --git a/arch/arm/src/stm32/hardware/stm32f103c_pinmap_legacy.h b/soc/arm/stm32/hardware/stm32f103c_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f103c_pinmap_legacy.h rename to soc/arm/stm32/hardware/stm32f103c_pinmap_legacy.h diff --git a/arch/arm/src/stm32/hardware/stm32f103r_pinmap.h b/soc/arm/stm32/hardware/stm32f103r_pinmap.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f103r_pinmap.h rename to soc/arm/stm32/hardware/stm32f103r_pinmap.h diff --git a/arch/arm/src/stm32/hardware/stm32f103r_pinmap_legacy.h b/soc/arm/stm32/hardware/stm32f103r_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f103r_pinmap_legacy.h rename to soc/arm/stm32/hardware/stm32f103r_pinmap_legacy.h diff --git a/arch/arm/src/stm32/hardware/stm32f103v_pinmap.h b/soc/arm/stm32/hardware/stm32f103v_pinmap.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f103v_pinmap.h rename to soc/arm/stm32/hardware/stm32f103v_pinmap.h diff --git a/arch/arm/src/stm32/hardware/stm32f103v_pinmap_legacy.h b/soc/arm/stm32/hardware/stm32f103v_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f103v_pinmap_legacy.h rename to soc/arm/stm32/hardware/stm32f103v_pinmap_legacy.h diff --git a/arch/arm/src/stm32/hardware/stm32f103z_pinmap.h b/soc/arm/stm32/hardware/stm32f103z_pinmap.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f103z_pinmap.h rename to soc/arm/stm32/hardware/stm32f103z_pinmap.h diff --git a/arch/arm/src/stm32/hardware/stm32f103z_pinmap_legacy.h b/soc/arm/stm32/hardware/stm32f103z_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f103z_pinmap_legacy.h rename to soc/arm/stm32/hardware/stm32f103z_pinmap_legacy.h diff --git a/arch/arm/src/stm32/hardware/stm32f105r_pinmap.h b/soc/arm/stm32/hardware/stm32f105r_pinmap.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f105r_pinmap.h rename to soc/arm/stm32/hardware/stm32f105r_pinmap.h diff --git a/arch/arm/src/stm32/hardware/stm32f105r_pinmap_legacy.h b/soc/arm/stm32/hardware/stm32f105r_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f105r_pinmap_legacy.h rename to soc/arm/stm32/hardware/stm32f105r_pinmap_legacy.h diff --git a/arch/arm/src/stm32/hardware/stm32f105v_pinmap.h b/soc/arm/stm32/hardware/stm32f105v_pinmap.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f105v_pinmap.h rename to soc/arm/stm32/hardware/stm32f105v_pinmap.h diff --git a/arch/arm/src/stm32/hardware/stm32f105v_pinmap_legacy.h b/soc/arm/stm32/hardware/stm32f105v_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f105v_pinmap_legacy.h rename to soc/arm/stm32/hardware/stm32f105v_pinmap_legacy.h diff --git a/arch/arm/src/stm32/hardware/stm32f107v_pinmap.h b/soc/arm/stm32/hardware/stm32f107v_pinmap.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f107v_pinmap.h rename to soc/arm/stm32/hardware/stm32f107v_pinmap.h diff --git a/arch/arm/src/stm32/hardware/stm32f107v_pinmap_legacy.h b/soc/arm/stm32/hardware/stm32f107v_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f107v_pinmap_legacy.h rename to soc/arm/stm32/hardware/stm32f107v_pinmap_legacy.h diff --git a/arch/arm/src/stm32/hardware/stm32f10xxx_gpio.h b/soc/arm/stm32/hardware/stm32f10xxx_gpio.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f10xxx_gpio.h rename to soc/arm/stm32/hardware/stm32f10xxx_gpio.h diff --git a/arch/arm/src/stm32/hardware/stm32f10xxx_memorymap.h b/soc/arm/stm32/hardware/stm32f10xxx_memorymap.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f10xxx_memorymap.h rename to soc/arm/stm32/hardware/stm32f10xxx_memorymap.h diff --git a/arch/arm/src/stm32/hardware/stm32f10xxx_rcc.h b/soc/arm/stm32/hardware/stm32f10xxx_rcc.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f10xxx_rcc.h rename to soc/arm/stm32/hardware/stm32f10xxx_rcc.h diff --git a/arch/arm/src/stm32/hardware/stm32f10xxx_uart.h b/soc/arm/stm32/hardware/stm32f10xxx_uart.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f10xxx_uart.h rename to soc/arm/stm32/hardware/stm32f10xxx_uart.h diff --git a/arch/arm/src/stm32/hardware/stm32f20xxx_gpio.h b/soc/arm/stm32/hardware/stm32f20xxx_gpio.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f20xxx_gpio.h rename to soc/arm/stm32/hardware/stm32f20xxx_gpio.h diff --git a/arch/arm/src/stm32/hardware/stm32f20xxx_memorymap.h b/soc/arm/stm32/hardware/stm32f20xxx_memorymap.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f20xxx_memorymap.h rename to soc/arm/stm32/hardware/stm32f20xxx_memorymap.h diff --git a/arch/arm/src/stm32/hardware/stm32f20xxx_pinmap.h b/soc/arm/stm32/hardware/stm32f20xxx_pinmap.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f20xxx_pinmap.h rename to soc/arm/stm32/hardware/stm32f20xxx_pinmap.h diff --git a/arch/arm/src/stm32/hardware/stm32f20xxx_pinmap_legacy.h b/soc/arm/stm32/hardware/stm32f20xxx_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f20xxx_pinmap_legacy.h rename to soc/arm/stm32/hardware/stm32f20xxx_pinmap_legacy.h diff --git a/arch/arm/src/stm32/hardware/stm32f20xxx_rcc.h b/soc/arm/stm32/hardware/stm32f20xxx_rcc.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f20xxx_rcc.h rename to soc/arm/stm32/hardware/stm32f20xxx_rcc.h diff --git a/arch/arm/src/stm32/hardware/stm32f20xxx_syscfg.h b/soc/arm/stm32/hardware/stm32f20xxx_syscfg.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f20xxx_syscfg.h rename to soc/arm/stm32/hardware/stm32f20xxx_syscfg.h diff --git a/arch/arm/src/stm32/hardware/stm32f20xxx_uart.h b/soc/arm/stm32/hardware/stm32f20xxx_uart.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f20xxx_uart.h rename to soc/arm/stm32/hardware/stm32f20xxx_uart.h diff --git a/arch/arm/src/stm32/hardware/stm32f30xxx_gpio.h b/soc/arm/stm32/hardware/stm32f30xxx_gpio.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f30xxx_gpio.h rename to soc/arm/stm32/hardware/stm32f30xxx_gpio.h diff --git a/arch/arm/src/stm32/hardware/stm32f30xxx_memorymap.h b/soc/arm/stm32/hardware/stm32f30xxx_memorymap.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f30xxx_memorymap.h rename to soc/arm/stm32/hardware/stm32f30xxx_memorymap.h diff --git a/arch/arm/src/stm32/hardware/stm32f30xxx_pinmap.h b/soc/arm/stm32/hardware/stm32f30xxx_pinmap.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f30xxx_pinmap.h rename to soc/arm/stm32/hardware/stm32f30xxx_pinmap.h diff --git a/arch/arm/src/stm32/hardware/stm32f30xxx_pinmap_legacy.h b/soc/arm/stm32/hardware/stm32f30xxx_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f30xxx_pinmap_legacy.h rename to soc/arm/stm32/hardware/stm32f30xxx_pinmap_legacy.h diff --git a/arch/arm/src/stm32/hardware/stm32f30xxx_rcc.h b/soc/arm/stm32/hardware/stm32f30xxx_rcc.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f30xxx_rcc.h rename to soc/arm/stm32/hardware/stm32f30xxx_rcc.h diff --git a/arch/arm/src/stm32/hardware/stm32f30xxx_syscfg.h b/soc/arm/stm32/hardware/stm32f30xxx_syscfg.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f30xxx_syscfg.h rename to soc/arm/stm32/hardware/stm32f30xxx_syscfg.h diff --git a/arch/arm/src/stm32/hardware/stm32f30xxx_uart.h b/soc/arm/stm32/hardware/stm32f30xxx_uart.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f30xxx_uart.h rename to soc/arm/stm32/hardware/stm32f30xxx_uart.h diff --git a/arch/arm/src/stm32/hardware/stm32f33xxx_comp.h b/soc/arm/stm32/hardware/stm32f33xxx_comp.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f33xxx_comp.h rename to soc/arm/stm32/hardware/stm32f33xxx_comp.h diff --git a/arch/arm/src/stm32/hardware/stm32f33xxx_hrtim.h b/soc/arm/stm32/hardware/stm32f33xxx_hrtim.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f33xxx_hrtim.h rename to soc/arm/stm32/hardware/stm32f33xxx_hrtim.h diff --git a/arch/arm/src/stm32/hardware/stm32f33xxx_memorymap.h b/soc/arm/stm32/hardware/stm32f33xxx_memorymap.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f33xxx_memorymap.h rename to soc/arm/stm32/hardware/stm32f33xxx_memorymap.h diff --git a/arch/arm/src/stm32/hardware/stm32f33xxx_opamp.h b/soc/arm/stm32/hardware/stm32f33xxx_opamp.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f33xxx_opamp.h rename to soc/arm/stm32/hardware/stm32f33xxx_opamp.h diff --git a/arch/arm/src/stm32/hardware/stm32f33xxx_pinmap.h b/soc/arm/stm32/hardware/stm32f33xxx_pinmap.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f33xxx_pinmap.h rename to soc/arm/stm32/hardware/stm32f33xxx_pinmap.h diff --git a/arch/arm/src/stm32/hardware/stm32f33xxx_pinmap_legacy.h b/soc/arm/stm32/hardware/stm32f33xxx_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f33xxx_pinmap_legacy.h rename to soc/arm/stm32/hardware/stm32f33xxx_pinmap_legacy.h diff --git a/arch/arm/src/stm32/hardware/stm32f33xxx_rcc.h b/soc/arm/stm32/hardware/stm32f33xxx_rcc.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f33xxx_rcc.h rename to soc/arm/stm32/hardware/stm32f33xxx_rcc.h diff --git a/arch/arm/src/stm32/hardware/stm32f33xxx_syscfg.h b/soc/arm/stm32/hardware/stm32f33xxx_syscfg.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f33xxx_syscfg.h rename to soc/arm/stm32/hardware/stm32f33xxx_syscfg.h diff --git a/arch/arm/src/stm32/hardware/stm32f37xxx_memorymap.h b/soc/arm/stm32/hardware/stm32f37xxx_memorymap.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f37xxx_memorymap.h rename to soc/arm/stm32/hardware/stm32f37xxx_memorymap.h diff --git a/arch/arm/src/stm32/hardware/stm32f37xxx_pinmap.h b/soc/arm/stm32/hardware/stm32f37xxx_pinmap.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f37xxx_pinmap.h rename to soc/arm/stm32/hardware/stm32f37xxx_pinmap.h diff --git a/arch/arm/src/stm32/hardware/stm32f37xxx_pinmap_legacy.h b/soc/arm/stm32/hardware/stm32f37xxx_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f37xxx_pinmap_legacy.h rename to soc/arm/stm32/hardware/stm32f37xxx_pinmap_legacy.h diff --git a/arch/arm/src/stm32/hardware/stm32f37xxx_rcc.h b/soc/arm/stm32/hardware/stm32f37xxx_rcc.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f37xxx_rcc.h rename to soc/arm/stm32/hardware/stm32f37xxx_rcc.h diff --git a/arch/arm/src/stm32/hardware/stm32f37xxx_sdadc.h b/soc/arm/stm32/hardware/stm32f37xxx_sdadc.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f37xxx_sdadc.h rename to soc/arm/stm32/hardware/stm32f37xxx_sdadc.h diff --git a/arch/arm/src/stm32/hardware/stm32f37xxx_syscfg.h b/soc/arm/stm32/hardware/stm32f37xxx_syscfg.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f37xxx_syscfg.h rename to soc/arm/stm32/hardware/stm32f37xxx_syscfg.h diff --git a/arch/arm/src/stm32/hardware/stm32f40xxx_gpio.h b/soc/arm/stm32/hardware/stm32f40xxx_gpio.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f40xxx_gpio.h rename to soc/arm/stm32/hardware/stm32f40xxx_gpio.h diff --git a/arch/arm/src/stm32/hardware/stm32f40xxx_memorymap.h b/soc/arm/stm32/hardware/stm32f40xxx_memorymap.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f40xxx_memorymap.h rename to soc/arm/stm32/hardware/stm32f40xxx_memorymap.h diff --git a/arch/arm/src/stm32/hardware/stm32f40xxx_pinmap.h b/soc/arm/stm32/hardware/stm32f40xxx_pinmap.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f40xxx_pinmap.h rename to soc/arm/stm32/hardware/stm32f40xxx_pinmap.h diff --git a/arch/arm/src/stm32/hardware/stm32f40xxx_pinmap_legacy.h b/soc/arm/stm32/hardware/stm32f40xxx_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f40xxx_pinmap_legacy.h rename to soc/arm/stm32/hardware/stm32f40xxx_pinmap_legacy.h diff --git a/arch/arm/src/stm32/hardware/stm32f40xxx_rcc.h b/soc/arm/stm32/hardware/stm32f40xxx_rcc.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f40xxx_rcc.h rename to soc/arm/stm32/hardware/stm32f40xxx_rcc.h diff --git a/arch/arm/src/stm32/hardware/stm32f40xxx_syscfg.h b/soc/arm/stm32/hardware/stm32f40xxx_syscfg.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f40xxx_syscfg.h rename to soc/arm/stm32/hardware/stm32f40xxx_syscfg.h diff --git a/arch/arm/src/stm32/hardware/stm32f40xxx_uart.h b/soc/arm/stm32/hardware/stm32f40xxx_uart.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f40xxx_uart.h rename to soc/arm/stm32/hardware/stm32f40xxx_uart.h diff --git a/arch/arm/src/stm32/hardware/stm32f412xx_pinmap.h b/soc/arm/stm32/hardware/stm32f412xx_pinmap.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f412xx_pinmap.h rename to soc/arm/stm32/hardware/stm32f412xx_pinmap.h diff --git a/arch/arm/src/stm32/hardware/stm32f412xx_pinmap_legacy.h b/soc/arm/stm32/hardware/stm32f412xx_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32f412xx_pinmap_legacy.h rename to soc/arm/stm32/hardware/stm32f412xx_pinmap_legacy.h diff --git a/arch/arm/src/stm32/hardware/stm32fxxxxx_otgfs.h b/soc/arm/stm32/hardware/stm32fxxxxx_otgfs.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32fxxxxx_otgfs.h rename to soc/arm/stm32/hardware/stm32fxxxxx_otgfs.h diff --git a/arch/arm/src/stm32/hardware/stm32g47xxx_hrtim.h b/soc/arm/stm32/hardware/stm32g47xxx_hrtim.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32g47xxx_hrtim.h rename to soc/arm/stm32/hardware/stm32g47xxx_hrtim.h diff --git a/arch/arm/src/stm32/hardware/stm32g4xxc_pinmap.h b/soc/arm/stm32/hardware/stm32g4xxc_pinmap.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32g4xxc_pinmap.h rename to soc/arm/stm32/hardware/stm32g4xxc_pinmap.h diff --git a/arch/arm/src/stm32/hardware/stm32g4xxc_pinmap_legacy.h b/soc/arm/stm32/hardware/stm32g4xxc_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32g4xxc_pinmap_legacy.h rename to soc/arm/stm32/hardware/stm32g4xxc_pinmap_legacy.h diff --git a/arch/arm/src/stm32/hardware/stm32g4xxk_pinmap.h b/soc/arm/stm32/hardware/stm32g4xxk_pinmap.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32g4xxk_pinmap.h rename to soc/arm/stm32/hardware/stm32g4xxk_pinmap.h diff --git a/arch/arm/src/stm32/hardware/stm32g4xxk_pinmap_legacy.h b/soc/arm/stm32/hardware/stm32g4xxk_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32g4xxk_pinmap_legacy.h rename to soc/arm/stm32/hardware/stm32g4xxk_pinmap_legacy.h diff --git a/arch/arm/src/stm32/hardware/stm32g4xxm_pinmap.h b/soc/arm/stm32/hardware/stm32g4xxm_pinmap.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32g4xxm_pinmap.h rename to soc/arm/stm32/hardware/stm32g4xxm_pinmap.h diff --git a/arch/arm/src/stm32/hardware/stm32g4xxm_pinmap_legacy.h b/soc/arm/stm32/hardware/stm32g4xxm_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32g4xxm_pinmap_legacy.h rename to soc/arm/stm32/hardware/stm32g4xxm_pinmap_legacy.h diff --git a/arch/arm/src/stm32/hardware/stm32g4xxp_pinmap.h b/soc/arm/stm32/hardware/stm32g4xxp_pinmap.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32g4xxp_pinmap.h rename to soc/arm/stm32/hardware/stm32g4xxp_pinmap.h diff --git a/arch/arm/src/stm32/hardware/stm32g4xxq_pinmap.h b/soc/arm/stm32/hardware/stm32g4xxq_pinmap.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32g4xxq_pinmap.h rename to soc/arm/stm32/hardware/stm32g4xxq_pinmap.h diff --git a/arch/arm/src/stm32/hardware/stm32g4xxq_pinmap_legacy.h b/soc/arm/stm32/hardware/stm32g4xxq_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32g4xxq_pinmap_legacy.h rename to soc/arm/stm32/hardware/stm32g4xxq_pinmap_legacy.h diff --git a/arch/arm/src/stm32/hardware/stm32g4xxr_pinmap.h b/soc/arm/stm32/hardware/stm32g4xxr_pinmap.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32g4xxr_pinmap.h rename to soc/arm/stm32/hardware/stm32g4xxr_pinmap.h diff --git a/arch/arm/src/stm32/hardware/stm32g4xxr_pinmap_legacy.h b/soc/arm/stm32/hardware/stm32g4xxr_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32g4xxr_pinmap_legacy.h rename to soc/arm/stm32/hardware/stm32g4xxr_pinmap_legacy.h diff --git a/arch/arm/src/stm32/hardware/stm32g4xxv_pinmap.h b/soc/arm/stm32/hardware/stm32g4xxv_pinmap.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32g4xxv_pinmap.h rename to soc/arm/stm32/hardware/stm32g4xxv_pinmap.h diff --git a/arch/arm/src/stm32/hardware/stm32g4xxv_pinmap_legacy.h b/soc/arm/stm32/hardware/stm32g4xxv_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32g4xxv_pinmap_legacy.h rename to soc/arm/stm32/hardware/stm32g4xxv_pinmap_legacy.h diff --git a/arch/arm/src/stm32/hardware/stm32g4xxxx_comp.h b/soc/arm/stm32/hardware/stm32g4xxxx_comp.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32g4xxxx_comp.h rename to soc/arm/stm32/hardware/stm32g4xxxx_comp.h diff --git a/arch/arm/src/stm32/hardware/stm32g4xxxx_cordic.h b/soc/arm/stm32/hardware/stm32g4xxxx_cordic.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32g4xxxx_cordic.h rename to soc/arm/stm32/hardware/stm32g4xxxx_cordic.h diff --git a/arch/arm/src/stm32/hardware/stm32g4xxxx_dmamux.h b/soc/arm/stm32/hardware/stm32g4xxxx_dmamux.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32g4xxxx_dmamux.h rename to soc/arm/stm32/hardware/stm32g4xxxx_dmamux.h diff --git a/arch/arm/src/stm32/hardware/stm32g4xxxx_gpio.h b/soc/arm/stm32/hardware/stm32g4xxxx_gpio.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32g4xxxx_gpio.h rename to soc/arm/stm32/hardware/stm32g4xxxx_gpio.h diff --git a/arch/arm/src/stm32/hardware/stm32g4xxxx_memorymap.h b/soc/arm/stm32/hardware/stm32g4xxxx_memorymap.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32g4xxxx_memorymap.h rename to soc/arm/stm32/hardware/stm32g4xxxx_memorymap.h diff --git a/arch/arm/src/stm32/hardware/stm32g4xxxx_opamp.h b/soc/arm/stm32/hardware/stm32g4xxxx_opamp.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32g4xxxx_opamp.h rename to soc/arm/stm32/hardware/stm32g4xxxx_opamp.h diff --git a/arch/arm/src/stm32/hardware/stm32g4xxxx_pinmap.h b/soc/arm/stm32/hardware/stm32g4xxxx_pinmap.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32g4xxxx_pinmap.h rename to soc/arm/stm32/hardware/stm32g4xxxx_pinmap.h diff --git a/arch/arm/src/stm32/hardware/stm32g4xxxx_pwr.h b/soc/arm/stm32/hardware/stm32g4xxxx_pwr.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32g4xxxx_pwr.h rename to soc/arm/stm32/hardware/stm32g4xxxx_pwr.h diff --git a/arch/arm/src/stm32/hardware/stm32g4xxxx_rcc.h b/soc/arm/stm32/hardware/stm32g4xxxx_rcc.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32g4xxxx_rcc.h rename to soc/arm/stm32/hardware/stm32g4xxxx_rcc.h diff --git a/arch/arm/src/stm32/hardware/stm32g4xxxx_syscfg.h b/soc/arm/stm32/hardware/stm32g4xxxx_syscfg.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32g4xxxx_syscfg.h rename to soc/arm/stm32/hardware/stm32g4xxxx_syscfg.h diff --git a/arch/arm/src/stm32/hardware/stm32g4xxxx_uart.h b/soc/arm/stm32/hardware/stm32g4xxxx_uart.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32g4xxxx_uart.h rename to soc/arm/stm32/hardware/stm32g4xxxx_uart.h diff --git a/arch/arm/src/stm32/hardware/stm32g4xxxx_vrefbuf.h b/soc/arm/stm32/hardware/stm32g4xxxx_vrefbuf.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32g4xxxx_vrefbuf.h rename to soc/arm/stm32/hardware/stm32g4xxxx_vrefbuf.h diff --git a/arch/arm/src/stm32/hardware/stm32gxxxxx_dac.h b/soc/arm/stm32/hardware/stm32gxxxxx_dac.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32gxxxxx_dac.h rename to soc/arm/stm32/hardware/stm32gxxxxx_dac.h diff --git a/arch/arm/src/stm32/hardware/stm32l15xxx_aes.h b/soc/arm/stm32/hardware/stm32l15xxx_aes.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32l15xxx_aes.h rename to soc/arm/stm32/hardware/stm32l15xxx_aes.h diff --git a/arch/arm/src/stm32/hardware/stm32l15xxx_gpio.h b/soc/arm/stm32/hardware/stm32l15xxx_gpio.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32l15xxx_gpio.h rename to soc/arm/stm32/hardware/stm32l15xxx_gpio.h diff --git a/arch/arm/src/stm32/hardware/stm32l15xxx_memorymap.h b/soc/arm/stm32/hardware/stm32l15xxx_memorymap.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32l15xxx_memorymap.h rename to soc/arm/stm32/hardware/stm32l15xxx_memorymap.h diff --git a/arch/arm/src/stm32/hardware/stm32l15xxx_pinmap.h b/soc/arm/stm32/hardware/stm32l15xxx_pinmap.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32l15xxx_pinmap.h rename to soc/arm/stm32/hardware/stm32l15xxx_pinmap.h diff --git a/arch/arm/src/stm32/hardware/stm32l15xxx_pinmap_legacy.h b/soc/arm/stm32/hardware/stm32l15xxx_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32l15xxx_pinmap_legacy.h rename to soc/arm/stm32/hardware/stm32l15xxx_pinmap_legacy.h diff --git a/arch/arm/src/stm32/hardware/stm32l15xxx_rcc.h b/soc/arm/stm32/hardware/stm32l15xxx_rcc.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32l15xxx_rcc.h rename to soc/arm/stm32/hardware/stm32l15xxx_rcc.h diff --git a/arch/arm/src/stm32/hardware/stm32l15xxx_syscfg.h b/soc/arm/stm32/hardware/stm32l15xxx_syscfg.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32l15xxx_syscfg.h rename to soc/arm/stm32/hardware/stm32l15xxx_syscfg.h diff --git a/arch/arm/src/stm32/hardware/stm32l15xxx_uart.h b/soc/arm/stm32/hardware/stm32l15xxx_uart.h similarity index 100% rename from arch/arm/src/stm32/hardware/stm32l15xxx_uart.h rename to soc/arm/stm32/hardware/stm32l15xxx_uart.h diff --git a/arch/arm/src/stm32/stm32.h b/soc/arm/stm32/stm32.h similarity index 100% rename from arch/arm/src/stm32/stm32.h rename to soc/arm/stm32/stm32.h diff --git a/arch/arm/src/stm32/stm32_1wire.c b/soc/arm/stm32/stm32_1wire.c similarity index 100% rename from arch/arm/src/stm32/stm32_1wire.c rename to soc/arm/stm32/stm32_1wire.c diff --git a/arch/arm/src/stm32/stm32_1wire.h b/soc/arm/stm32/stm32_1wire.h similarity index 100% rename from arch/arm/src/stm32/stm32_1wire.h rename to soc/arm/stm32/stm32_1wire.h diff --git a/arch/arm/src/stm32/stm32_adc.c b/soc/arm/stm32/stm32_adc.c similarity index 100% rename from arch/arm/src/stm32/stm32_adc.c rename to soc/arm/stm32/stm32_adc.c diff --git a/arch/arm/src/stm32/stm32_adc.h b/soc/arm/stm32/stm32_adc.h similarity index 100% rename from arch/arm/src/stm32/stm32_adc.h rename to soc/arm/stm32/stm32_adc.h diff --git a/arch/arm/src/stm32/stm32_aes.c b/soc/arm/stm32/stm32_aes.c similarity index 100% rename from arch/arm/src/stm32/stm32_aes.c rename to soc/arm/stm32/stm32_aes.c diff --git a/arch/arm/src/stm32/stm32_aes.h b/soc/arm/stm32/stm32_aes.h similarity index 100% rename from arch/arm/src/stm32/stm32_aes.h rename to soc/arm/stm32/stm32_aes.h diff --git a/arch/arm/src/stm32/stm32_alarm.h b/soc/arm/stm32/stm32_alarm.h similarity index 100% rename from arch/arm/src/stm32/stm32_alarm.h rename to soc/arm/stm32/stm32_alarm.h diff --git a/arch/arm/src/stm32/stm32_allocateheap.c b/soc/arm/stm32/stm32_allocateheap.c similarity index 100% rename from arch/arm/src/stm32/stm32_allocateheap.c rename to soc/arm/stm32/stm32_allocateheap.c diff --git a/arch/arm/src/stm32/stm32_bbsram.c b/soc/arm/stm32/stm32_bbsram.c similarity index 100% rename from arch/arm/src/stm32/stm32_bbsram.c rename to soc/arm/stm32/stm32_bbsram.c diff --git a/arch/arm/src/stm32/stm32_bbsram.h b/soc/arm/stm32/stm32_bbsram.h similarity index 100% rename from arch/arm/src/stm32/stm32_bbsram.h rename to soc/arm/stm32/stm32_bbsram.h diff --git a/arch/arm/src/stm32/stm32_bkp.h b/soc/arm/stm32/stm32_bkp.h similarity index 100% rename from arch/arm/src/stm32/stm32_bkp.h rename to soc/arm/stm32/stm32_bkp.h diff --git a/arch/arm/src/stm32/stm32_can.c b/soc/arm/stm32/stm32_can.c similarity index 100% rename from arch/arm/src/stm32/stm32_can.c rename to soc/arm/stm32/stm32_can.c diff --git a/arch/arm/src/stm32/stm32_can.h b/soc/arm/stm32/stm32_can.h similarity index 100% rename from arch/arm/src/stm32/stm32_can.h rename to soc/arm/stm32/stm32_can.h diff --git a/arch/arm/src/stm32/stm32_can_sock.c b/soc/arm/stm32/stm32_can_sock.c similarity index 100% rename from arch/arm/src/stm32/stm32_can_sock.c rename to soc/arm/stm32/stm32_can_sock.c diff --git a/arch/arm/src/stm32/stm32_capture.c b/soc/arm/stm32/stm32_capture.c similarity index 100% rename from arch/arm/src/stm32/stm32_capture.c rename to soc/arm/stm32/stm32_capture.c diff --git a/arch/arm/src/stm32/stm32_capture.h b/soc/arm/stm32/stm32_capture.h similarity index 100% rename from arch/arm/src/stm32/stm32_capture.h rename to soc/arm/stm32/stm32_capture.h diff --git a/arch/arm/src/stm32/stm32_capture_lowerhalf.c b/soc/arm/stm32/stm32_capture_lowerhalf.c similarity index 100% rename from arch/arm/src/stm32/stm32_capture_lowerhalf.c rename to soc/arm/stm32/stm32_capture_lowerhalf.c diff --git a/arch/arm/src/stm32/stm32_ccm.c b/soc/arm/stm32/stm32_ccm.c similarity index 100% rename from arch/arm/src/stm32/stm32_ccm.c rename to soc/arm/stm32/stm32_ccm.c diff --git a/arch/arm/src/stm32/stm32_ccm.h b/soc/arm/stm32/stm32_ccm.h similarity index 100% rename from arch/arm/src/stm32/stm32_ccm.h rename to soc/arm/stm32/stm32_ccm.h diff --git a/arch/arm/src/stm32/stm32_comp.c b/soc/arm/stm32/stm32_comp.c similarity index 100% rename from arch/arm/src/stm32/stm32_comp.c rename to soc/arm/stm32/stm32_comp.c diff --git a/arch/arm/src/stm32/stm32_comp.h b/soc/arm/stm32/stm32_comp.h similarity index 100% rename from arch/arm/src/stm32/stm32_comp.h rename to soc/arm/stm32/stm32_comp.h diff --git a/arch/arm/src/stm32/stm32_comp_v1.c b/soc/arm/stm32/stm32_comp_v1.c similarity index 100% rename from arch/arm/src/stm32/stm32_comp_v1.c rename to soc/arm/stm32/stm32_comp_v1.c diff --git a/arch/arm/src/stm32/stm32_comp_v1.h b/soc/arm/stm32/stm32_comp_v1.h similarity index 100% rename from arch/arm/src/stm32/stm32_comp_v1.h rename to soc/arm/stm32/stm32_comp_v1.h diff --git a/arch/arm/src/stm32/stm32_comp_v2.c b/soc/arm/stm32/stm32_comp_v2.c similarity index 100% rename from arch/arm/src/stm32/stm32_comp_v2.c rename to soc/arm/stm32/stm32_comp_v2.c diff --git a/arch/arm/src/stm32/stm32_comp_v2.h b/soc/arm/stm32/stm32_comp_v2.h similarity index 100% rename from arch/arm/src/stm32/stm32_comp_v2.h rename to soc/arm/stm32/stm32_comp_v2.h diff --git a/arch/arm/src/stm32/stm32_cordic.c b/soc/arm/stm32/stm32_cordic.c similarity index 100% rename from arch/arm/src/stm32/stm32_cordic.c rename to soc/arm/stm32/stm32_cordic.c diff --git a/arch/arm/src/stm32/stm32_cordic.h b/soc/arm/stm32/stm32_cordic.h similarity index 100% rename from arch/arm/src/stm32/stm32_cordic.h rename to soc/arm/stm32/stm32_cordic.h diff --git a/arch/arm/src/stm32/stm32_crypto.c b/soc/arm/stm32/stm32_crypto.c similarity index 100% rename from arch/arm/src/stm32/stm32_crypto.c rename to soc/arm/stm32/stm32_crypto.c diff --git a/arch/arm/src/stm32/stm32_dac.c b/soc/arm/stm32/stm32_dac.c similarity index 100% rename from arch/arm/src/stm32/stm32_dac.c rename to soc/arm/stm32/stm32_dac.c diff --git a/arch/arm/src/stm32/stm32_dac.h b/soc/arm/stm32/stm32_dac.h similarity index 100% rename from arch/arm/src/stm32/stm32_dac.h rename to soc/arm/stm32/stm32_dac.h diff --git a/arch/arm/src/stm32/stm32_dbgmcu.h b/soc/arm/stm32/stm32_dbgmcu.h similarity index 100% rename from arch/arm/src/stm32/stm32_dbgmcu.h rename to soc/arm/stm32/stm32_dbgmcu.h diff --git a/arch/arm/src/stm32/stm32_dfumode.c b/soc/arm/stm32/stm32_dfumode.c similarity index 100% rename from arch/arm/src/stm32/stm32_dfumode.c rename to soc/arm/stm32/stm32_dfumode.c diff --git a/arch/arm/src/stm32/stm32_dfumode.h b/soc/arm/stm32/stm32_dfumode.h similarity index 100% rename from arch/arm/src/stm32/stm32_dfumode.h rename to soc/arm/stm32/stm32_dfumode.h diff --git a/arch/arm/src/stm32/stm32_dma.c b/soc/arm/stm32/stm32_dma.c similarity index 100% rename from arch/arm/src/stm32/stm32_dma.c rename to soc/arm/stm32/stm32_dma.c diff --git a/arch/arm/src/stm32/stm32_dma.h b/soc/arm/stm32/stm32_dma.h similarity index 100% rename from arch/arm/src/stm32/stm32_dma.h rename to soc/arm/stm32/stm32_dma.h diff --git a/arch/arm/src/stm32/stm32_dma2d.c b/soc/arm/stm32/stm32_dma2d.c similarity index 100% rename from arch/arm/src/stm32/stm32_dma2d.c rename to soc/arm/stm32/stm32_dma2d.c diff --git a/arch/arm/src/stm32/stm32_dma2d.h b/soc/arm/stm32/stm32_dma2d.h similarity index 100% rename from arch/arm/src/stm32/stm32_dma2d.h rename to soc/arm/stm32/stm32_dma2d.h diff --git a/arch/arm/src/stm32/stm32_dma_v1.c b/soc/arm/stm32/stm32_dma_v1.c similarity index 100% rename from arch/arm/src/stm32/stm32_dma_v1.c rename to soc/arm/stm32/stm32_dma_v1.c diff --git a/arch/arm/src/stm32/stm32_dma_v1mux.c b/soc/arm/stm32/stm32_dma_v1mux.c similarity index 100% rename from arch/arm/src/stm32/stm32_dma_v1mux.c rename to soc/arm/stm32/stm32_dma_v1mux.c diff --git a/arch/arm/src/stm32/stm32_dma_v2.c b/soc/arm/stm32/stm32_dma_v2.c similarity index 100% rename from arch/arm/src/stm32/stm32_dma_v2.c rename to soc/arm/stm32/stm32_dma_v2.c diff --git a/arch/arm/src/stm32/stm32_dumpgpio.c b/soc/arm/stm32/stm32_dumpgpio.c similarity index 100% rename from arch/arm/src/stm32/stm32_dumpgpio.c rename to soc/arm/stm32/stm32_dumpgpio.c diff --git a/arch/arm/src/stm32/stm32_eth.c b/soc/arm/stm32/stm32_eth.c similarity index 100% rename from arch/arm/src/stm32/stm32_eth.c rename to soc/arm/stm32/stm32_eth.c diff --git a/arch/arm/src/stm32/stm32_eth.h b/soc/arm/stm32/stm32_eth.h similarity index 100% rename from arch/arm/src/stm32/stm32_eth.h rename to soc/arm/stm32/stm32_eth.h diff --git a/arch/arm/src/stm32/stm32_exti.h b/soc/arm/stm32/stm32_exti.h similarity index 100% rename from arch/arm/src/stm32/stm32_exti.h rename to soc/arm/stm32/stm32_exti.h diff --git a/arch/arm/src/stm32/stm32_exti_alarm.c b/soc/arm/stm32/stm32_exti_alarm.c similarity index 100% rename from arch/arm/src/stm32/stm32_exti_alarm.c rename to soc/arm/stm32/stm32_exti_alarm.c diff --git a/arch/arm/src/stm32/stm32_exti_gpio.c b/soc/arm/stm32/stm32_exti_gpio.c similarity index 100% rename from arch/arm/src/stm32/stm32_exti_gpio.c rename to soc/arm/stm32/stm32_exti_gpio.c diff --git a/arch/arm/src/stm32/stm32_exti_pwr.c b/soc/arm/stm32/stm32_exti_pwr.c similarity index 100% rename from arch/arm/src/stm32/stm32_exti_pwr.c rename to soc/arm/stm32/stm32_exti_pwr.c diff --git a/arch/arm/src/stm32/stm32_exti_pwr.h b/soc/arm/stm32/stm32_exti_pwr.h similarity index 100% rename from arch/arm/src/stm32/stm32_exti_pwr.h rename to soc/arm/stm32/stm32_exti_pwr.h diff --git a/arch/arm/src/stm32/stm32_exti_wakeup.c b/soc/arm/stm32/stm32_exti_wakeup.c similarity index 100% rename from arch/arm/src/stm32/stm32_exti_wakeup.c rename to soc/arm/stm32/stm32_exti_wakeup.c diff --git a/arch/arm/src/stm32/stm32_fdcan.c b/soc/arm/stm32/stm32_fdcan.c similarity index 100% rename from arch/arm/src/stm32/stm32_fdcan.c rename to soc/arm/stm32/stm32_fdcan.c diff --git a/arch/arm/src/stm32/stm32_fdcan.h b/soc/arm/stm32/stm32_fdcan.h similarity index 100% rename from arch/arm/src/stm32/stm32_fdcan.h rename to soc/arm/stm32/stm32_fdcan.h diff --git a/arch/arm/src/stm32/stm32_fdcan_sock.c b/soc/arm/stm32/stm32_fdcan_sock.c similarity index 100% rename from arch/arm/src/stm32/stm32_fdcan_sock.c rename to soc/arm/stm32/stm32_fdcan_sock.c diff --git a/arch/arm/src/stm32/stm32_flash.c b/soc/arm/stm32/stm32_flash.c similarity index 100% rename from arch/arm/src/stm32/stm32_flash.c rename to soc/arm/stm32/stm32_flash.c diff --git a/arch/arm/src/stm32/stm32_flash.h b/soc/arm/stm32/stm32_flash.h similarity index 100% rename from arch/arm/src/stm32/stm32_flash.h rename to soc/arm/stm32/stm32_flash.h diff --git a/arch/arm/src/stm32/stm32_fmc.c b/soc/arm/stm32/stm32_fmc.c similarity index 100% rename from arch/arm/src/stm32/stm32_fmc.c rename to soc/arm/stm32/stm32_fmc.c diff --git a/arch/arm/src/stm32/stm32_fmc.h b/soc/arm/stm32/stm32_fmc.h similarity index 100% rename from arch/arm/src/stm32/stm32_fmc.h rename to soc/arm/stm32/stm32_fmc.h diff --git a/arch/arm/src/stm32/stm32_foc.c b/soc/arm/stm32/stm32_foc.c similarity index 100% rename from arch/arm/src/stm32/stm32_foc.c rename to soc/arm/stm32/stm32_foc.c diff --git a/arch/arm/src/stm32/stm32_foc.h b/soc/arm/stm32/stm32_foc.h similarity index 100% rename from arch/arm/src/stm32/stm32_foc.h rename to soc/arm/stm32/stm32_foc.h diff --git a/arch/arm/src/stm32/stm32_freerun.c b/soc/arm/stm32/stm32_freerun.c similarity index 100% rename from arch/arm/src/stm32/stm32_freerun.c rename to soc/arm/stm32/stm32_freerun.c diff --git a/arch/arm/src/stm32/stm32_freerun.h b/soc/arm/stm32/stm32_freerun.h similarity index 100% rename from arch/arm/src/stm32/stm32_freerun.h rename to soc/arm/stm32/stm32_freerun.h diff --git a/arch/arm/src/stm32/stm32_fsmc.c b/soc/arm/stm32/stm32_fsmc.c similarity index 100% rename from arch/arm/src/stm32/stm32_fsmc.c rename to soc/arm/stm32/stm32_fsmc.c diff --git a/arch/arm/src/stm32/stm32_fsmc.h b/soc/arm/stm32/stm32_fsmc.h similarity index 100% rename from arch/arm/src/stm32/stm32_fsmc.h rename to soc/arm/stm32/stm32_fsmc.h diff --git a/arch/arm/src/stm32/stm32_gpio.c b/soc/arm/stm32/stm32_gpio.c similarity index 100% rename from arch/arm/src/stm32/stm32_gpio.c rename to soc/arm/stm32/stm32_gpio.c diff --git a/arch/arm/src/stm32/stm32_gpio.h b/soc/arm/stm32/stm32_gpio.h similarity index 100% rename from arch/arm/src/stm32/stm32_gpio.h rename to soc/arm/stm32/stm32_gpio.h diff --git a/arch/arm/src/stm32/stm32_hall3ph.c b/soc/arm/stm32/stm32_hall3ph.c similarity index 100% rename from arch/arm/src/stm32/stm32_hall3ph.c rename to soc/arm/stm32/stm32_hall3ph.c diff --git a/arch/arm/src/stm32/stm32_hall3ph.h b/soc/arm/stm32/stm32_hall3ph.h similarity index 100% rename from arch/arm/src/stm32/stm32_hall3ph.h rename to soc/arm/stm32/stm32_hall3ph.h diff --git a/arch/arm/src/stm32/stm32_hciuart.c b/soc/arm/stm32/stm32_hciuart.c similarity index 100% rename from arch/arm/src/stm32/stm32_hciuart.c rename to soc/arm/stm32/stm32_hciuart.c diff --git a/arch/arm/src/stm32/stm32_hciuart.h b/soc/arm/stm32/stm32_hciuart.h similarity index 100% rename from arch/arm/src/stm32/stm32_hciuart.h rename to soc/arm/stm32/stm32_hciuart.h diff --git a/arch/arm/src/stm32/stm32_hrtim.c b/soc/arm/stm32/stm32_hrtim.c similarity index 100% rename from arch/arm/src/stm32/stm32_hrtim.c rename to soc/arm/stm32/stm32_hrtim.c diff --git a/arch/arm/src/stm32/stm32_hrtim.h b/soc/arm/stm32/stm32_hrtim.h similarity index 100% rename from arch/arm/src/stm32/stm32_hrtim.h rename to soc/arm/stm32/stm32_hrtim.h diff --git a/arch/arm/src/stm32/stm32_i2c.c b/soc/arm/stm32/stm32_i2c.c similarity index 100% rename from arch/arm/src/stm32/stm32_i2c.c rename to soc/arm/stm32/stm32_i2c.c diff --git a/arch/arm/src/stm32/stm32_i2c.h b/soc/arm/stm32/stm32_i2c.h similarity index 100% rename from arch/arm/src/stm32/stm32_i2c.h rename to soc/arm/stm32/stm32_i2c.h diff --git a/arch/arm/src/stm32/stm32_i2c_alt.c b/soc/arm/stm32/stm32_i2c_alt.c similarity index 100% rename from arch/arm/src/stm32/stm32_i2c_alt.c rename to soc/arm/stm32/stm32_i2c_alt.c diff --git a/arch/arm/src/stm32/stm32_i2c_v2.c b/soc/arm/stm32/stm32_i2c_v2.c similarity index 100% rename from arch/arm/src/stm32/stm32_i2c_v2.c rename to soc/arm/stm32/stm32_i2c_v2.c diff --git a/arch/arm/src/stm32/stm32_i2cslave_v2.c b/soc/arm/stm32/stm32_i2cslave_v2.c similarity index 100% rename from arch/arm/src/stm32/stm32_i2cslave_v2.c rename to soc/arm/stm32/stm32_i2cslave_v2.c diff --git a/arch/arm/src/stm32/stm32_i2s.c b/soc/arm/stm32/stm32_i2s.c similarity index 100% rename from arch/arm/src/stm32/stm32_i2s.c rename to soc/arm/stm32/stm32_i2s.c diff --git a/arch/arm/src/stm32/stm32_i2s.h b/soc/arm/stm32/stm32_i2s.h similarity index 100% rename from arch/arm/src/stm32/stm32_i2s.h rename to soc/arm/stm32/stm32_i2s.h diff --git a/arch/arm/src/stm32/stm32_idle.c b/soc/arm/stm32/stm32_idle.c similarity index 100% rename from arch/arm/src/stm32/stm32_idle.c rename to soc/arm/stm32/stm32_idle.c diff --git a/arch/arm/src/stm32/stm32_irq.c b/soc/arm/stm32/stm32_irq.c similarity index 100% rename from arch/arm/src/stm32/stm32_irq.c rename to soc/arm/stm32/stm32_irq.c diff --git a/arch/arm/src/stm32/stm32_iwdg.c b/soc/arm/stm32/stm32_iwdg.c similarity index 100% rename from arch/arm/src/stm32/stm32_iwdg.c rename to soc/arm/stm32/stm32_iwdg.c diff --git a/arch/arm/src/stm32/stm32_lowputc.c b/soc/arm/stm32/stm32_lowputc.c similarity index 100% rename from arch/arm/src/stm32/stm32_lowputc.c rename to soc/arm/stm32/stm32_lowputc.c diff --git a/arch/arm/src/stm32/stm32_lowputc.h b/soc/arm/stm32/stm32_lowputc.h similarity index 100% rename from arch/arm/src/stm32/stm32_lowputc.h rename to soc/arm/stm32/stm32_lowputc.h diff --git a/arch/arm/src/stm32/stm32_lse.c b/soc/arm/stm32/stm32_lse.c similarity index 100% rename from arch/arm/src/stm32/stm32_lse.c rename to soc/arm/stm32/stm32_lse.c diff --git a/arch/arm/src/stm32/stm32_lsi.c b/soc/arm/stm32/stm32_lsi.c similarity index 100% rename from arch/arm/src/stm32/stm32_lsi.c rename to soc/arm/stm32/stm32_lsi.c diff --git a/arch/arm/src/stm32/stm32_ltdc.c b/soc/arm/stm32/stm32_ltdc.c similarity index 100% rename from arch/arm/src/stm32/stm32_ltdc.c rename to soc/arm/stm32/stm32_ltdc.c diff --git a/arch/arm/src/stm32/stm32_ltdc.h b/soc/arm/stm32/stm32_ltdc.h similarity index 100% rename from arch/arm/src/stm32/stm32_ltdc.h rename to soc/arm/stm32/stm32_ltdc.h diff --git a/arch/arm/src/stm32/stm32_mpuinit.c b/soc/arm/stm32/stm32_mpuinit.c similarity index 100% rename from arch/arm/src/stm32/stm32_mpuinit.c rename to soc/arm/stm32/stm32_mpuinit.c diff --git a/arch/arm/src/stm32/stm32_mpuinit.h b/soc/arm/stm32/stm32_mpuinit.h similarity index 100% rename from arch/arm/src/stm32/stm32_mpuinit.h rename to soc/arm/stm32/stm32_mpuinit.h diff --git a/arch/arm/src/stm32/stm32_oneshot.c b/soc/arm/stm32/stm32_oneshot.c similarity index 100% rename from arch/arm/src/stm32/stm32_oneshot.c rename to soc/arm/stm32/stm32_oneshot.c diff --git a/arch/arm/src/stm32/stm32_oneshot.h b/soc/arm/stm32/stm32_oneshot.h similarity index 100% rename from arch/arm/src/stm32/stm32_oneshot.h rename to soc/arm/stm32/stm32_oneshot.h diff --git a/arch/arm/src/stm32/stm32_oneshot_lowerhalf.c b/soc/arm/stm32/stm32_oneshot_lowerhalf.c similarity index 100% rename from arch/arm/src/stm32/stm32_oneshot_lowerhalf.c rename to soc/arm/stm32/stm32_oneshot_lowerhalf.c diff --git a/arch/arm/src/stm32/stm32_opamp.c b/soc/arm/stm32/stm32_opamp.c similarity index 100% rename from arch/arm/src/stm32/stm32_opamp.c rename to soc/arm/stm32/stm32_opamp.c diff --git a/arch/arm/src/stm32/stm32_opamp.h b/soc/arm/stm32/stm32_opamp.h similarity index 100% rename from arch/arm/src/stm32/stm32_opamp.h rename to soc/arm/stm32/stm32_opamp.h diff --git a/arch/arm/src/stm32/stm32_otgfs.h b/soc/arm/stm32/stm32_otgfs.h similarity index 100% rename from arch/arm/src/stm32/stm32_otgfs.h rename to soc/arm/stm32/stm32_otgfs.h diff --git a/arch/arm/src/stm32/stm32_otgfsdev.c b/soc/arm/stm32/stm32_otgfsdev.c similarity index 100% rename from arch/arm/src/stm32/stm32_otgfsdev.c rename to soc/arm/stm32/stm32_otgfsdev.c diff --git a/arch/arm/src/stm32/stm32_otgfshost.c b/soc/arm/stm32/stm32_otgfshost.c similarity index 100% rename from arch/arm/src/stm32/stm32_otgfshost.c rename to soc/arm/stm32/stm32_otgfshost.c diff --git a/arch/arm/src/stm32/stm32_otghs.h b/soc/arm/stm32/stm32_otghs.h similarity index 100% rename from arch/arm/src/stm32/stm32_otghs.h rename to soc/arm/stm32/stm32_otghs.h diff --git a/arch/arm/src/stm32/stm32_otghsdev.c b/soc/arm/stm32/stm32_otghsdev.c similarity index 100% rename from arch/arm/src/stm32/stm32_otghsdev.c rename to soc/arm/stm32/stm32_otghsdev.c diff --git a/arch/arm/src/stm32/stm32_otghshost.c b/soc/arm/stm32/stm32_otghshost.c similarity index 100% rename from arch/arm/src/stm32/stm32_otghshost.c rename to soc/arm/stm32/stm32_otghshost.c diff --git a/arch/arm/src/stm32/stm32_pm.h b/soc/arm/stm32/stm32_pm.h similarity index 100% rename from arch/arm/src/stm32/stm32_pm.h rename to soc/arm/stm32/stm32_pm.h diff --git a/arch/arm/src/stm32/stm32_pminitialize.c b/soc/arm/stm32/stm32_pminitialize.c similarity index 100% rename from arch/arm/src/stm32/stm32_pminitialize.c rename to soc/arm/stm32/stm32_pminitialize.c diff --git a/arch/arm/src/stm32/stm32_pmsleep.c b/soc/arm/stm32/stm32_pmsleep.c similarity index 100% rename from arch/arm/src/stm32/stm32_pmsleep.c rename to soc/arm/stm32/stm32_pmsleep.c diff --git a/arch/arm/src/stm32/stm32_pmstandby.c b/soc/arm/stm32/stm32_pmstandby.c similarity index 100% rename from arch/arm/src/stm32/stm32_pmstandby.c rename to soc/arm/stm32/stm32_pmstandby.c diff --git a/arch/arm/src/stm32/stm32_pmstop.c b/soc/arm/stm32/stm32_pmstop.c similarity index 100% rename from arch/arm/src/stm32/stm32_pmstop.c rename to soc/arm/stm32/stm32_pmstop.c diff --git a/arch/arm/src/stm32/stm32_pwm.c b/soc/arm/stm32/stm32_pwm.c similarity index 100% rename from arch/arm/src/stm32/stm32_pwm.c rename to soc/arm/stm32/stm32_pwm.c diff --git a/arch/arm/src/stm32/stm32_pwm.h b/soc/arm/stm32/stm32_pwm.h similarity index 100% rename from arch/arm/src/stm32/stm32_pwm.h rename to soc/arm/stm32/stm32_pwm.h diff --git a/arch/arm/src/stm32/stm32_pwr.c b/soc/arm/stm32/stm32_pwr.c similarity index 100% rename from arch/arm/src/stm32/stm32_pwr.c rename to soc/arm/stm32/stm32_pwr.c diff --git a/arch/arm/src/stm32/stm32_pwr.h b/soc/arm/stm32/stm32_pwr.h similarity index 100% rename from arch/arm/src/stm32/stm32_pwr.h rename to soc/arm/stm32/stm32_pwr.h diff --git a/arch/arm/src/stm32/stm32_qencoder.c b/soc/arm/stm32/stm32_qencoder.c similarity index 100% rename from arch/arm/src/stm32/stm32_qencoder.c rename to soc/arm/stm32/stm32_qencoder.c diff --git a/arch/arm/src/stm32/stm32_qencoder.h b/soc/arm/stm32/stm32_qencoder.h similarity index 100% rename from arch/arm/src/stm32/stm32_qencoder.h rename to soc/arm/stm32/stm32_qencoder.h diff --git a/arch/arm/src/stm32/stm32_rcc.c b/soc/arm/stm32/stm32_rcc.c similarity index 100% rename from arch/arm/src/stm32/stm32_rcc.c rename to soc/arm/stm32/stm32_rcc.c diff --git a/arch/arm/src/stm32/stm32_rcc.h b/soc/arm/stm32/stm32_rcc.h similarity index 100% rename from arch/arm/src/stm32/stm32_rcc.h rename to soc/arm/stm32/stm32_rcc.h diff --git a/arch/arm/src/stm32/stm32_rng.c b/soc/arm/stm32/stm32_rng.c similarity index 100% rename from arch/arm/src/stm32/stm32_rng.c rename to soc/arm/stm32/stm32_rng.c diff --git a/arch/arm/src/stm32/stm32_rtc.c b/soc/arm/stm32/stm32_rtc.c similarity index 100% rename from arch/arm/src/stm32/stm32_rtc.c rename to soc/arm/stm32/stm32_rtc.c diff --git a/arch/arm/src/stm32/stm32_rtc.h b/soc/arm/stm32/stm32_rtc.h similarity index 100% rename from arch/arm/src/stm32/stm32_rtc.h rename to soc/arm/stm32/stm32_rtc.h diff --git a/arch/arm/src/stm32/stm32_rtc_lowerhalf.c b/soc/arm/stm32/stm32_rtc_lowerhalf.c similarity index 100% rename from arch/arm/src/stm32/stm32_rtc_lowerhalf.c rename to soc/arm/stm32/stm32_rtc_lowerhalf.c diff --git a/arch/arm/src/stm32/stm32_rtcc.c b/soc/arm/stm32/stm32_rtcc.c similarity index 100% rename from arch/arm/src/stm32/stm32_rtcc.c rename to soc/arm/stm32/stm32_rtcc.c diff --git a/arch/arm/src/stm32/stm32_rtcounter.c b/soc/arm/stm32/stm32_rtcounter.c similarity index 100% rename from arch/arm/src/stm32/stm32_rtcounter.c rename to soc/arm/stm32/stm32_rtcounter.c diff --git a/arch/arm/src/stm32/stm32_sdadc.c b/soc/arm/stm32/stm32_sdadc.c similarity index 100% rename from arch/arm/src/stm32/stm32_sdadc.c rename to soc/arm/stm32/stm32_sdadc.c diff --git a/arch/arm/src/stm32/stm32_sdadc.h b/soc/arm/stm32/stm32_sdadc.h similarity index 100% rename from arch/arm/src/stm32/stm32_sdadc.h rename to soc/arm/stm32/stm32_sdadc.h diff --git a/arch/arm/src/stm32/stm32_sdio.c b/soc/arm/stm32/stm32_sdio.c similarity index 100% rename from arch/arm/src/stm32/stm32_sdio.c rename to soc/arm/stm32/stm32_sdio.c diff --git a/arch/arm/src/stm32/stm32_sdio.h b/soc/arm/stm32/stm32_sdio.h similarity index 100% rename from arch/arm/src/stm32/stm32_sdio.h rename to soc/arm/stm32/stm32_sdio.h diff --git a/arch/arm/src/stm32/stm32_serial.c b/soc/arm/stm32/stm32_serial.c similarity index 100% rename from arch/arm/src/stm32/stm32_serial.c rename to soc/arm/stm32/stm32_serial.c diff --git a/arch/arm/src/stm32/stm32_spi.c b/soc/arm/stm32/stm32_spi.c similarity index 100% rename from arch/arm/src/stm32/stm32_spi.c rename to soc/arm/stm32/stm32_spi.c diff --git a/arch/arm/src/stm32/stm32_spi.h b/soc/arm/stm32/stm32_spi.h similarity index 100% rename from arch/arm/src/stm32/stm32_spi.h rename to soc/arm/stm32/stm32_spi.h diff --git a/arch/arm/src/stm32/stm32_start.c b/soc/arm/stm32/stm32_start.c similarity index 100% rename from arch/arm/src/stm32/stm32_start.c rename to soc/arm/stm32/stm32_start.c diff --git a/arch/arm/src/stm32/stm32_start.h b/soc/arm/stm32/stm32_start.h similarity index 100% rename from arch/arm/src/stm32/stm32_start.h rename to soc/arm/stm32/stm32_start.h diff --git a/arch/arm/src/stm32/stm32_syscfg.h b/soc/arm/stm32/stm32_syscfg.h similarity index 100% rename from arch/arm/src/stm32/stm32_syscfg.h rename to soc/arm/stm32/stm32_syscfg.h diff --git a/arch/arm/src/stm32/stm32_tickless.c b/soc/arm/stm32/stm32_tickless.c similarity index 100% rename from arch/arm/src/stm32/stm32_tickless.c rename to soc/arm/stm32/stm32_tickless.c diff --git a/arch/arm/src/stm32/stm32_tim.c b/soc/arm/stm32/stm32_tim.c similarity index 100% rename from arch/arm/src/stm32/stm32_tim.c rename to soc/arm/stm32/stm32_tim.c diff --git a/arch/arm/src/stm32/stm32_tim.h b/soc/arm/stm32/stm32_tim.h similarity index 100% rename from arch/arm/src/stm32/stm32_tim.h rename to soc/arm/stm32/stm32_tim.h diff --git a/arch/arm/src/stm32/stm32_tim_lowerhalf.c b/soc/arm/stm32/stm32_tim_lowerhalf.c similarity index 100% rename from arch/arm/src/stm32/stm32_tim_lowerhalf.c rename to soc/arm/stm32/stm32_tim_lowerhalf.c diff --git a/arch/arm/src/stm32/stm32_timerisr.c b/soc/arm/stm32/stm32_timerisr.c similarity index 100% rename from arch/arm/src/stm32/stm32_timerisr.c rename to soc/arm/stm32/stm32_timerisr.c diff --git a/arch/arm/src/stm32/stm32_uart.h b/soc/arm/stm32/stm32_uart.h similarity index 100% rename from arch/arm/src/stm32/stm32_uart.h rename to soc/arm/stm32/stm32_uart.h diff --git a/arch/arm/src/stm32/stm32_uid.c b/soc/arm/stm32/stm32_uid.c similarity index 100% rename from arch/arm/src/stm32/stm32_uid.c rename to soc/arm/stm32/stm32_uid.c diff --git a/arch/arm/src/stm32/stm32_uid.h b/soc/arm/stm32/stm32_uid.h similarity index 100% rename from arch/arm/src/stm32/stm32_uid.h rename to soc/arm/stm32/stm32_uid.h diff --git a/arch/arm/src/stm32/stm32_usbdev.c b/soc/arm/stm32/stm32_usbdev.c similarity index 100% rename from arch/arm/src/stm32/stm32_usbdev.c rename to soc/arm/stm32/stm32_usbdev.c diff --git a/arch/arm/src/stm32/stm32_usbdev.h b/soc/arm/stm32/stm32_usbdev.h similarity index 100% rename from arch/arm/src/stm32/stm32_usbdev.h rename to soc/arm/stm32/stm32_usbdev.h diff --git a/arch/arm/src/stm32/stm32_usbfs.c b/soc/arm/stm32/stm32_usbfs.c similarity index 100% rename from arch/arm/src/stm32/stm32_usbfs.c rename to soc/arm/stm32/stm32_usbfs.c diff --git a/arch/arm/src/stm32/stm32_usbfs.h b/soc/arm/stm32/stm32_usbfs.h similarity index 100% rename from arch/arm/src/stm32/stm32_usbfs.h rename to soc/arm/stm32/stm32_usbfs.h diff --git a/arch/arm/src/stm32/stm32_usbhost.c b/soc/arm/stm32/stm32_usbhost.c similarity index 100% rename from arch/arm/src/stm32/stm32_usbhost.c rename to soc/arm/stm32/stm32_usbhost.c diff --git a/arch/arm/src/stm32/stm32_usbhost.h b/soc/arm/stm32/stm32_usbhost.h similarity index 100% rename from arch/arm/src/stm32/stm32_usbhost.h rename to soc/arm/stm32/stm32_usbhost.h diff --git a/arch/arm/src/stm32/stm32_userspace.c b/soc/arm/stm32/stm32_userspace.c similarity index 100% rename from arch/arm/src/stm32/stm32_userspace.c rename to soc/arm/stm32/stm32_userspace.c diff --git a/arch/arm/src/stm32/stm32_userspace.h b/soc/arm/stm32/stm32_userspace.h similarity index 100% rename from arch/arm/src/stm32/stm32_userspace.h rename to soc/arm/stm32/stm32_userspace.h diff --git a/arch/arm/src/stm32/stm32_waste.c b/soc/arm/stm32/stm32_waste.c similarity index 100% rename from arch/arm/src/stm32/stm32_waste.c rename to soc/arm/stm32/stm32_waste.c diff --git a/arch/arm/src/stm32/stm32_waste.h b/soc/arm/stm32/stm32_waste.h similarity index 100% rename from arch/arm/src/stm32/stm32_waste.h rename to soc/arm/stm32/stm32_waste.h diff --git a/arch/arm/src/stm32/stm32_wdg.h b/soc/arm/stm32/stm32_wdg.h similarity index 100% rename from arch/arm/src/stm32/stm32_wdg.h rename to soc/arm/stm32/stm32_wdg.h diff --git a/arch/arm/src/stm32/stm32_wwdg.c b/soc/arm/stm32/stm32_wwdg.c similarity index 100% rename from arch/arm/src/stm32/stm32_wwdg.c rename to soc/arm/stm32/stm32_wwdg.c diff --git a/arch/arm/src/stm32/stm32f10xxf30xx_flash.c b/soc/arm/stm32/stm32f10xxf30xx_flash.c similarity index 100% rename from arch/arm/src/stm32/stm32f10xxf30xx_flash.c rename to soc/arm/stm32/stm32f10xxf30xx_flash.c diff --git a/arch/arm/src/stm32/stm32f10xxx_rcc.c b/soc/arm/stm32/stm32f10xxx_rcc.c similarity index 100% rename from arch/arm/src/stm32/stm32f10xxx_rcc.c rename to soc/arm/stm32/stm32f10xxx_rcc.c diff --git a/arch/arm/src/stm32/stm32f20xxf40xx_flash.c b/soc/arm/stm32/stm32f20xxf40xx_flash.c similarity index 100% rename from arch/arm/src/stm32/stm32f20xxf40xx_flash.c rename to soc/arm/stm32/stm32f20xxf40xx_flash.c diff --git a/arch/arm/src/stm32/stm32f20xxx_rcc.c b/soc/arm/stm32/stm32f20xxx_rcc.c similarity index 100% rename from arch/arm/src/stm32/stm32f20xxx_rcc.c rename to soc/arm/stm32/stm32f20xxx_rcc.c diff --git a/arch/arm/src/stm32/stm32f30xxx_rcc.c b/soc/arm/stm32/stm32f30xxx_rcc.c similarity index 100% rename from arch/arm/src/stm32/stm32f30xxx_rcc.c rename to soc/arm/stm32/stm32f30xxx_rcc.c diff --git a/arch/arm/src/stm32/stm32f33xxx_rcc.c b/soc/arm/stm32/stm32f33xxx_rcc.c similarity index 100% rename from arch/arm/src/stm32/stm32f33xxx_rcc.c rename to soc/arm/stm32/stm32f33xxx_rcc.c diff --git a/arch/arm/src/stm32/stm32f37xxx_rcc.c b/soc/arm/stm32/stm32f37xxx_rcc.c similarity index 100% rename from arch/arm/src/stm32/stm32f37xxx_rcc.c rename to soc/arm/stm32/stm32f37xxx_rcc.c diff --git a/arch/arm/src/stm32/stm32f40xxx_alarm.h b/soc/arm/stm32/stm32f40xxx_alarm.h similarity index 100% rename from arch/arm/src/stm32/stm32f40xxx_alarm.h rename to soc/arm/stm32/stm32f40xxx_alarm.h diff --git a/arch/arm/src/stm32/stm32f40xxx_i2c.c b/soc/arm/stm32/stm32f40xxx_i2c.c similarity index 100% rename from arch/arm/src/stm32/stm32f40xxx_i2c.c rename to soc/arm/stm32/stm32f40xxx_i2c.c diff --git a/arch/arm/src/stm32/stm32f40xxx_rcc.c b/soc/arm/stm32/stm32f40xxx_rcc.c similarity index 100% rename from arch/arm/src/stm32/stm32f40xxx_rcc.c rename to soc/arm/stm32/stm32f40xxx_rcc.c diff --git a/arch/arm/src/stm32/stm32f40xxx_rtcc.c b/soc/arm/stm32/stm32f40xxx_rtcc.c similarity index 100% rename from arch/arm/src/stm32/stm32f40xxx_rtcc.c rename to soc/arm/stm32/stm32f40xxx_rtcc.c diff --git a/arch/arm/src/stm32/stm32g4xxx_flash.c b/soc/arm/stm32/stm32g4xxx_flash.c similarity index 100% rename from arch/arm/src/stm32/stm32g4xxx_flash.c rename to soc/arm/stm32/stm32g4xxx_flash.c diff --git a/arch/arm/src/stm32/stm32g4xxxx_rcc.c b/soc/arm/stm32/stm32g4xxxx_rcc.c similarity index 100% rename from arch/arm/src/stm32/stm32g4xxxx_rcc.c rename to soc/arm/stm32/stm32g4xxxx_rcc.c diff --git a/arch/arm/src/stm32/stm32l15xx_flash.c b/soc/arm/stm32/stm32l15xx_flash.c similarity index 100% rename from arch/arm/src/stm32/stm32l15xx_flash.c rename to soc/arm/stm32/stm32l15xx_flash.c diff --git a/arch/arm/src/stm32/stm32l15xxx_alarm.h b/soc/arm/stm32/stm32l15xxx_alarm.h similarity index 100% rename from arch/arm/src/stm32/stm32l15xxx_alarm.h rename to soc/arm/stm32/stm32l15xxx_alarm.h diff --git a/arch/arm/src/stm32/stm32l15xxx_rcc.c b/soc/arm/stm32/stm32l15xxx_rcc.c similarity index 100% rename from arch/arm/src/stm32/stm32l15xxx_rcc.c rename to soc/arm/stm32/stm32l15xxx_rcc.c diff --git a/arch/arm/src/stm32/stm32l15xxx_rtcc.c b/soc/arm/stm32/stm32l15xxx_rtcc.c similarity index 100% rename from arch/arm/src/stm32/stm32l15xxx_rtcc.c rename to soc/arm/stm32/stm32l15xxx_rtcc.c diff --git a/arch/arm/src/stm32f0l0g0/CMakeLists.txt b/soc/arm/stm32f0l0g0/CMakeLists.txt similarity index 100% rename from arch/arm/src/stm32f0l0g0/CMakeLists.txt rename to soc/arm/stm32f0l0g0/CMakeLists.txt diff --git a/arch/arm/src/stm32f0l0g0/Kconfig b/soc/arm/stm32f0l0g0/Kconfig similarity index 100% rename from arch/arm/src/stm32f0l0g0/Kconfig rename to soc/arm/stm32f0l0g0/Kconfig diff --git a/arch/arm/src/stm32f0l0g0/Make.defs b/soc/arm/stm32f0l0g0/Make.defs similarity index 100% rename from arch/arm/src/stm32f0l0g0/Make.defs rename to soc/arm/stm32f0l0g0/Make.defs diff --git a/arch/arm/src/stm32f0l0g0/chip.h b/soc/arm/stm32f0l0g0/chip.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/chip.h rename to soc/arm/stm32f0l0g0/chip.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32_adc.h b/soc/arm/stm32f0l0g0/hardware/stm32_adc.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32_adc.h rename to soc/arm/stm32f0l0g0/hardware/stm32_adc.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32_aes.h b/soc/arm/stm32f0l0g0/hardware/stm32_aes.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32_aes.h rename to soc/arm/stm32f0l0g0/hardware/stm32_aes.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32_can.h b/soc/arm/stm32f0l0g0/hardware/stm32_can.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32_can.h rename to soc/arm/stm32f0l0g0/hardware/stm32_can.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32_comp.h b/soc/arm/stm32f0l0g0/hardware/stm32_comp.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32_comp.h rename to soc/arm/stm32f0l0g0/hardware/stm32_comp.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32_crc.h b/soc/arm/stm32f0l0g0/hardware/stm32_crc.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32_crc.h rename to soc/arm/stm32f0l0g0/hardware/stm32_crc.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32_crs.h b/soc/arm/stm32f0l0g0/hardware/stm32_crs.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32_crs.h rename to soc/arm/stm32f0l0g0/hardware/stm32_crs.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32_dac.h b/soc/arm/stm32f0l0g0/hardware/stm32_dac.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32_dac.h rename to soc/arm/stm32f0l0g0/hardware/stm32_dac.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32_dbgmcu.h b/soc/arm/stm32f0l0g0/hardware/stm32_dbgmcu.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32_dbgmcu.h rename to soc/arm/stm32f0l0g0/hardware/stm32_dbgmcu.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32_dma_v1.h b/soc/arm/stm32f0l0g0/hardware/stm32_dma_v1.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32_dma_v1.h rename to soc/arm/stm32f0l0g0/hardware/stm32_dma_v1.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32_dmamux.h b/soc/arm/stm32f0l0g0/hardware/stm32_dmamux.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32_dmamux.h rename to soc/arm/stm32f0l0g0/hardware/stm32_dmamux.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32_exti.h b/soc/arm/stm32f0l0g0/hardware/stm32_exti.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32_exti.h rename to soc/arm/stm32f0l0g0/hardware/stm32_exti.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32_fdcan.h b/soc/arm/stm32f0l0g0/hardware/stm32_fdcan.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32_fdcan.h rename to soc/arm/stm32f0l0g0/hardware/stm32_fdcan.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32_flash.h b/soc/arm/stm32f0l0g0/hardware/stm32_flash.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32_flash.h rename to soc/arm/stm32f0l0g0/hardware/stm32_flash.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32_gpio.h b/soc/arm/stm32f0l0g0/hardware/stm32_gpio.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32_gpio.h rename to soc/arm/stm32f0l0g0/hardware/stm32_gpio.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32_i2c.h b/soc/arm/stm32f0l0g0/hardware/stm32_i2c.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32_i2c.h rename to soc/arm/stm32f0l0g0/hardware/stm32_i2c.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32_memorymap.h b/soc/arm/stm32f0l0g0/hardware/stm32_memorymap.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32_memorymap.h rename to soc/arm/stm32f0l0g0/hardware/stm32_memorymap.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32_pinmap.h b/soc/arm/stm32f0l0g0/hardware/stm32_pinmap.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32_pinmap.h rename to soc/arm/stm32f0l0g0/hardware/stm32_pinmap.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32_pwr.h b/soc/arm/stm32f0l0g0/hardware/stm32_pwr.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32_pwr.h rename to soc/arm/stm32f0l0g0/hardware/stm32_pwr.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32_rcc.h b/soc/arm/stm32f0l0g0/hardware/stm32_rcc.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32_rcc.h rename to soc/arm/stm32f0l0g0/hardware/stm32_rcc.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32_rng.h b/soc/arm/stm32f0l0g0/hardware/stm32_rng.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32_rng.h rename to soc/arm/stm32f0l0g0/hardware/stm32_rng.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32_rtcc.h b/soc/arm/stm32f0l0g0/hardware/stm32_rtcc.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32_rtcc.h rename to soc/arm/stm32f0l0g0/hardware/stm32_rtcc.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32_spi.h b/soc/arm/stm32f0l0g0/hardware/stm32_spi.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32_spi.h rename to soc/arm/stm32f0l0g0/hardware/stm32_spi.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32_syscfg.h b/soc/arm/stm32f0l0g0/hardware/stm32_syscfg.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32_syscfg.h rename to soc/arm/stm32f0l0g0/hardware/stm32_syscfg.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32_tim.h b/soc/arm/stm32f0l0g0/hardware/stm32_tim.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32_tim.h rename to soc/arm/stm32f0l0g0/hardware/stm32_tim.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32_uart.h b/soc/arm/stm32f0l0g0/hardware/stm32_uart.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32_uart.h rename to soc/arm/stm32f0l0g0/hardware/stm32_uart.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32_uart_v1.h b/soc/arm/stm32f0l0g0/hardware/stm32_uart_v1.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32_uart_v1.h rename to soc/arm/stm32f0l0g0/hardware/stm32_uart_v1.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32_uart_v2.h b/soc/arm/stm32f0l0g0/hardware/stm32_uart_v2.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32_uart_v2.h rename to soc/arm/stm32f0l0g0/hardware/stm32_uart_v2.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32_usbdev.h b/soc/arm/stm32f0l0g0/hardware/stm32_usbdev.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32_usbdev.h rename to soc/arm/stm32f0l0g0/hardware/stm32_usbdev.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32_wdg.h b/soc/arm/stm32f0l0g0/hardware/stm32_wdg.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32_wdg.h rename to soc/arm/stm32f0l0g0/hardware/stm32_wdg.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32_wdt.h b/soc/arm/stm32f0l0g0/hardware/stm32_wdt.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32_wdt.h rename to soc/arm/stm32f0l0g0/hardware/stm32_wdt.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32c0_dmamux.h b/soc/arm/stm32f0l0g0/hardware/stm32c0_dmamux.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32c0_dmamux.h rename to soc/arm/stm32f0l0g0/hardware/stm32c0_dmamux.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32c0_exti.h b/soc/arm/stm32f0l0g0/hardware/stm32c0_exti.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32c0_exti.h rename to soc/arm/stm32f0l0g0/hardware/stm32c0_exti.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32c0_flash.h b/soc/arm/stm32f0l0g0/hardware/stm32c0_flash.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32c0_flash.h rename to soc/arm/stm32f0l0g0/hardware/stm32c0_flash.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32c0_memorymap.h b/soc/arm/stm32f0l0g0/hardware/stm32c0_memorymap.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32c0_memorymap.h rename to soc/arm/stm32f0l0g0/hardware/stm32c0_memorymap.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32c0_pinmap.h b/soc/arm/stm32f0l0g0/hardware/stm32c0_pinmap.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32c0_pinmap.h rename to soc/arm/stm32f0l0g0/hardware/stm32c0_pinmap.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32c0_pwr.h b/soc/arm/stm32f0l0g0/hardware/stm32c0_pwr.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32c0_pwr.h rename to soc/arm/stm32f0l0g0/hardware/stm32c0_pwr.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32c0_rcc.h b/soc/arm/stm32f0l0g0/hardware/stm32c0_rcc.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32c0_rcc.h rename to soc/arm/stm32f0l0g0/hardware/stm32c0_rcc.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32f03x_memorymap.h b/soc/arm/stm32f0l0g0/hardware/stm32f03x_memorymap.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32f03x_memorymap.h rename to soc/arm/stm32f0l0g0/hardware/stm32f03x_memorymap.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32f03x_pinmap.h b/soc/arm/stm32f0l0g0/hardware/stm32f03x_pinmap.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32f03x_pinmap.h rename to soc/arm/stm32f0l0g0/hardware/stm32f03x_pinmap.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32f03x_pinmap_legacy.h b/soc/arm/stm32f0l0g0/hardware/stm32f03x_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32f03x_pinmap_legacy.h rename to soc/arm/stm32f0l0g0/hardware/stm32f03x_pinmap_legacy.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32f05x_pinmap.h b/soc/arm/stm32f0l0g0/hardware/stm32f05x_pinmap.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32f05x_pinmap.h rename to soc/arm/stm32f0l0g0/hardware/stm32f05x_pinmap.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32f05x_pinmap_legacy.h b/soc/arm/stm32f0l0g0/hardware/stm32f05x_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32f05x_pinmap_legacy.h rename to soc/arm/stm32f0l0g0/hardware/stm32f05x_pinmap_legacy.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32f05xf07xf09x_memorymap.h b/soc/arm/stm32f0l0g0/hardware/stm32f05xf07xf09x_memorymap.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32f05xf07xf09x_memorymap.h rename to soc/arm/stm32f0l0g0/hardware/stm32f05xf07xf09x_memorymap.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32f07x_pinmap.h b/soc/arm/stm32f0l0g0/hardware/stm32f07x_pinmap.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32f07x_pinmap.h rename to soc/arm/stm32f0l0g0/hardware/stm32f07x_pinmap.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32f07x_pinmap_legacy.h b/soc/arm/stm32f0l0g0/hardware/stm32f07x_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32f07x_pinmap_legacy.h rename to soc/arm/stm32f0l0g0/hardware/stm32f07x_pinmap_legacy.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32f09x_pinmap.h b/soc/arm/stm32f0l0g0/hardware/stm32f09x_pinmap.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32f09x_pinmap.h rename to soc/arm/stm32f0l0g0/hardware/stm32f09x_pinmap.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32f09x_pinmap_legacy.h b/soc/arm/stm32f0l0g0/hardware/stm32f09x_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32f09x_pinmap_legacy.h rename to soc/arm/stm32f0l0g0/hardware/stm32f09x_pinmap_legacy.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32f0_exti.h b/soc/arm/stm32f0l0g0/hardware/stm32f0_exti.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32f0_exti.h rename to soc/arm/stm32f0l0g0/hardware/stm32f0_exti.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32f0_flash.h b/soc/arm/stm32f0l0g0/hardware/stm32f0_flash.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32f0_flash.h rename to soc/arm/stm32f0l0g0/hardware/stm32f0_flash.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32f0_pwr.h b/soc/arm/stm32f0l0g0/hardware/stm32f0_pwr.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32f0_pwr.h rename to soc/arm/stm32f0l0g0/hardware/stm32f0_pwr.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32f0_rcc.h b/soc/arm/stm32f0l0g0/hardware/stm32f0_rcc.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32f0_rcc.h rename to soc/arm/stm32f0l0g0/hardware/stm32f0_rcc.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32f0_syscfg.h b/soc/arm/stm32f0l0g0/hardware/stm32f0_syscfg.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32f0_syscfg.h rename to soc/arm/stm32f0l0g0/hardware/stm32f0_syscfg.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32g0_dmamux.h b/soc/arm/stm32f0l0g0/hardware/stm32g0_dmamux.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32g0_dmamux.h rename to soc/arm/stm32f0l0g0/hardware/stm32g0_dmamux.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32g0_exti.h b/soc/arm/stm32f0l0g0/hardware/stm32g0_exti.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32g0_exti.h rename to soc/arm/stm32f0l0g0/hardware/stm32g0_exti.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32g0_flash.h b/soc/arm/stm32f0l0g0/hardware/stm32g0_flash.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32g0_flash.h rename to soc/arm/stm32f0l0g0/hardware/stm32g0_flash.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32g0_memorymap.h b/soc/arm/stm32f0l0g0/hardware/stm32g0_memorymap.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32g0_memorymap.h rename to soc/arm/stm32f0l0g0/hardware/stm32g0_memorymap.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32g0_pinmap.h b/soc/arm/stm32f0l0g0/hardware/stm32g0_pinmap.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32g0_pinmap.h rename to soc/arm/stm32f0l0g0/hardware/stm32g0_pinmap.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32g0_pinmap_legacy.h b/soc/arm/stm32f0l0g0/hardware/stm32g0_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32g0_pinmap_legacy.h rename to soc/arm/stm32f0l0g0/hardware/stm32g0_pinmap_legacy.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32g0_pwr.h b/soc/arm/stm32f0l0g0/hardware/stm32g0_pwr.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32g0_pwr.h rename to soc/arm/stm32f0l0g0/hardware/stm32g0_pwr.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32g0_rcc.h b/soc/arm/stm32f0l0g0/hardware/stm32g0_rcc.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32g0_rcc.h rename to soc/arm/stm32f0l0g0/hardware/stm32g0_rcc.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32g0_syscfg.h b/soc/arm/stm32f0l0g0/hardware/stm32g0_syscfg.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32g0_syscfg.h rename to soc/arm/stm32f0l0g0/hardware/stm32g0_syscfg.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32l0_exti.h b/soc/arm/stm32f0l0g0/hardware/stm32l0_exti.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32l0_exti.h rename to soc/arm/stm32f0l0g0/hardware/stm32l0_exti.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32l0_flash.h b/soc/arm/stm32f0l0g0/hardware/stm32l0_flash.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32l0_flash.h rename to soc/arm/stm32f0l0g0/hardware/stm32l0_flash.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32l0_memorymap.h b/soc/arm/stm32f0l0g0/hardware/stm32l0_memorymap.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32l0_memorymap.h rename to soc/arm/stm32f0l0g0/hardware/stm32l0_memorymap.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32l0_pinmap.h b/soc/arm/stm32f0l0g0/hardware/stm32l0_pinmap.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32l0_pinmap.h rename to soc/arm/stm32f0l0g0/hardware/stm32l0_pinmap.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32l0_pinmap_legacy.h b/soc/arm/stm32f0l0g0/hardware/stm32l0_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32l0_pinmap_legacy.h rename to soc/arm/stm32f0l0g0/hardware/stm32l0_pinmap_legacy.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32l0_pwr.h b/soc/arm/stm32f0l0g0/hardware/stm32l0_pwr.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32l0_pwr.h rename to soc/arm/stm32f0l0g0/hardware/stm32l0_pwr.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32l0_rcc.h b/soc/arm/stm32f0l0g0/hardware/stm32l0_rcc.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32l0_rcc.h rename to soc/arm/stm32f0l0g0/hardware/stm32l0_rcc.h diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32l0_syscfg.h b/soc/arm/stm32f0l0g0/hardware/stm32l0_syscfg.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/hardware/stm32l0_syscfg.h rename to soc/arm/stm32f0l0g0/hardware/stm32l0_syscfg.h diff --git a/arch/arm/src/stm32f0l0g0/stm32.h b/soc/arm/stm32f0l0g0/stm32.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32.h rename to soc/arm/stm32f0l0g0/stm32.h diff --git a/arch/arm/src/stm32f0l0g0/stm32_adc.c b/soc/arm/stm32f0l0g0/stm32_adc.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_adc.c rename to soc/arm/stm32f0l0g0/stm32_adc.c diff --git a/arch/arm/src/stm32f0l0g0/stm32_adc.h b/soc/arm/stm32f0l0g0/stm32_adc.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_adc.h rename to soc/arm/stm32f0l0g0/stm32_adc.h diff --git a/arch/arm/src/stm32f0l0g0/stm32_aes.c b/soc/arm/stm32f0l0g0/stm32_aes.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_aes.c rename to soc/arm/stm32f0l0g0/stm32_aes.c diff --git a/arch/arm/src/stm32f0l0g0/stm32_aes.h b/soc/arm/stm32f0l0g0/stm32_aes.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_aes.h rename to soc/arm/stm32f0l0g0/stm32_aes.h diff --git a/arch/arm/src/stm32f0l0g0/stm32_crypto.c b/soc/arm/stm32f0l0g0/stm32_crypto.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_crypto.c rename to soc/arm/stm32f0l0g0/stm32_crypto.c diff --git a/arch/arm/src/stm32f0l0g0/stm32_dma.c b/soc/arm/stm32f0l0g0/stm32_dma.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_dma.c rename to soc/arm/stm32f0l0g0/stm32_dma.c diff --git a/arch/arm/src/stm32f0l0g0/stm32_dma.h b/soc/arm/stm32f0l0g0/stm32_dma.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_dma.h rename to soc/arm/stm32f0l0g0/stm32_dma.h diff --git a/arch/arm/src/stm32f0l0g0/stm32_dma_v1.c b/soc/arm/stm32f0l0g0/stm32_dma_v1.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_dma_v1.c rename to soc/arm/stm32f0l0g0/stm32_dma_v1.c diff --git a/arch/arm/src/stm32f0l0g0/stm32_dma_v1mux.c b/soc/arm/stm32f0l0g0/stm32_dma_v1mux.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_dma_v1mux.c rename to soc/arm/stm32f0l0g0/stm32_dma_v1mux.c diff --git a/arch/arm/src/stm32f0l0g0/stm32_exti.h b/soc/arm/stm32f0l0g0/stm32_exti.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_exti.h rename to soc/arm/stm32f0l0g0/stm32_exti.h diff --git a/arch/arm/src/stm32f0l0g0/stm32_exti_gpio.c b/soc/arm/stm32f0l0g0/stm32_exti_gpio.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_exti_gpio.c rename to soc/arm/stm32f0l0g0/stm32_exti_gpio.c diff --git a/arch/arm/src/stm32f0l0g0/stm32_fdcan.c b/soc/arm/stm32f0l0g0/stm32_fdcan.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_fdcan.c rename to soc/arm/stm32f0l0g0/stm32_fdcan.c diff --git a/arch/arm/src/stm32f0l0g0/stm32_fdcan.h b/soc/arm/stm32f0l0g0/stm32_fdcan.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_fdcan.h rename to soc/arm/stm32f0l0g0/stm32_fdcan.h diff --git a/arch/arm/src/stm32f0l0g0/stm32_fdcan_sock.c b/soc/arm/stm32f0l0g0/stm32_fdcan_sock.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_fdcan_sock.c rename to soc/arm/stm32f0l0g0/stm32_fdcan_sock.c diff --git a/arch/arm/src/stm32f0l0g0/stm32_flash.c b/soc/arm/stm32f0l0g0/stm32_flash.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_flash.c rename to soc/arm/stm32f0l0g0/stm32_flash.c diff --git a/arch/arm/src/stm32f0l0g0/stm32_flash.h b/soc/arm/stm32f0l0g0/stm32_flash.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_flash.h rename to soc/arm/stm32f0l0g0/stm32_flash.h diff --git a/arch/arm/src/stm32f0l0g0/stm32_gpio.c b/soc/arm/stm32f0l0g0/stm32_gpio.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_gpio.c rename to soc/arm/stm32f0l0g0/stm32_gpio.c diff --git a/arch/arm/src/stm32f0l0g0/stm32_gpio.h b/soc/arm/stm32f0l0g0/stm32_gpio.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_gpio.h rename to soc/arm/stm32f0l0g0/stm32_gpio.h diff --git a/arch/arm/src/stm32f0l0g0/stm32_hsi48.c b/soc/arm/stm32f0l0g0/stm32_hsi48.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_hsi48.c rename to soc/arm/stm32f0l0g0/stm32_hsi48.c diff --git a/arch/arm/src/stm32f0l0g0/stm32_hsi48.h b/soc/arm/stm32f0l0g0/stm32_hsi48.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_hsi48.h rename to soc/arm/stm32f0l0g0/stm32_hsi48.h diff --git a/arch/arm/src/stm32f0l0g0/stm32_i2c.c b/soc/arm/stm32f0l0g0/stm32_i2c.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_i2c.c rename to soc/arm/stm32f0l0g0/stm32_i2c.c diff --git a/arch/arm/src/stm32f0l0g0/stm32_i2c.h b/soc/arm/stm32f0l0g0/stm32_i2c.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_i2c.h rename to soc/arm/stm32f0l0g0/stm32_i2c.h diff --git a/arch/arm/src/stm32f0l0g0/stm32_idle.c b/soc/arm/stm32f0l0g0/stm32_idle.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_idle.c rename to soc/arm/stm32f0l0g0/stm32_idle.c diff --git a/arch/arm/src/stm32f0l0g0/stm32_irq.c b/soc/arm/stm32f0l0g0/stm32_irq.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_irq.c rename to soc/arm/stm32f0l0g0/stm32_irq.c diff --git a/arch/arm/src/stm32f0l0g0/stm32_iwdg.c b/soc/arm/stm32f0l0g0/stm32_iwdg.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_iwdg.c rename to soc/arm/stm32f0l0g0/stm32_iwdg.c diff --git a/arch/arm/src/stm32f0l0g0/stm32_lowputc.c b/soc/arm/stm32f0l0g0/stm32_lowputc.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_lowputc.c rename to soc/arm/stm32f0l0g0/stm32_lowputc.c diff --git a/arch/arm/src/stm32f0l0g0/stm32_lowputc.h b/soc/arm/stm32f0l0g0/stm32_lowputc.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_lowputc.h rename to soc/arm/stm32f0l0g0/stm32_lowputc.h diff --git a/arch/arm/src/stm32f0l0g0/stm32_lowputc_v1.c b/soc/arm/stm32f0l0g0/stm32_lowputc_v1.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_lowputc_v1.c rename to soc/arm/stm32f0l0g0/stm32_lowputc_v1.c diff --git a/arch/arm/src/stm32f0l0g0/stm32_lowputc_v2.c b/soc/arm/stm32f0l0g0/stm32_lowputc_v2.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_lowputc_v2.c rename to soc/arm/stm32f0l0g0/stm32_lowputc_v2.c diff --git a/arch/arm/src/stm32f0l0g0/stm32_lse.c b/soc/arm/stm32f0l0g0/stm32_lse.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_lse.c rename to soc/arm/stm32f0l0g0/stm32_lse.c diff --git a/arch/arm/src/stm32f0l0g0/stm32_lsi.c b/soc/arm/stm32f0l0g0/stm32_lsi.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_lsi.c rename to soc/arm/stm32f0l0g0/stm32_lsi.c diff --git a/arch/arm/src/stm32f0l0g0/stm32_pwm.c b/soc/arm/stm32f0l0g0/stm32_pwm.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_pwm.c rename to soc/arm/stm32f0l0g0/stm32_pwm.c diff --git a/arch/arm/src/stm32f0l0g0/stm32_pwm.h b/soc/arm/stm32f0l0g0/stm32_pwm.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_pwm.h rename to soc/arm/stm32f0l0g0/stm32_pwm.h diff --git a/arch/arm/src/stm32f0l0g0/stm32_pwr.c b/soc/arm/stm32f0l0g0/stm32_pwr.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_pwr.c rename to soc/arm/stm32f0l0g0/stm32_pwr.c diff --git a/arch/arm/src/stm32f0l0g0/stm32_pwr.h b/soc/arm/stm32f0l0g0/stm32_pwr.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_pwr.h rename to soc/arm/stm32f0l0g0/stm32_pwr.h diff --git a/arch/arm/src/stm32f0l0g0/stm32_rcc.c b/soc/arm/stm32f0l0g0/stm32_rcc.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_rcc.c rename to soc/arm/stm32f0l0g0/stm32_rcc.c diff --git a/arch/arm/src/stm32f0l0g0/stm32_rcc.h b/soc/arm/stm32f0l0g0/stm32_rcc.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_rcc.h rename to soc/arm/stm32f0l0g0/stm32_rcc.h diff --git a/arch/arm/src/stm32f0l0g0/stm32_rng.c b/soc/arm/stm32f0l0g0/stm32_rng.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_rng.c rename to soc/arm/stm32f0l0g0/stm32_rng.c diff --git a/arch/arm/src/stm32f0l0g0/stm32_serial.c b/soc/arm/stm32f0l0g0/stm32_serial.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_serial.c rename to soc/arm/stm32f0l0g0/stm32_serial.c diff --git a/arch/arm/src/stm32f0l0g0/stm32_serial.h b/soc/arm/stm32f0l0g0/stm32_serial.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_serial.h rename to soc/arm/stm32f0l0g0/stm32_serial.h diff --git a/arch/arm/src/stm32f0l0g0/stm32_serial_v1.c b/soc/arm/stm32f0l0g0/stm32_serial_v1.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_serial_v1.c rename to soc/arm/stm32f0l0g0/stm32_serial_v1.c diff --git a/arch/arm/src/stm32f0l0g0/stm32_serial_v2.c b/soc/arm/stm32f0l0g0/stm32_serial_v2.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_serial_v2.c rename to soc/arm/stm32f0l0g0/stm32_serial_v2.c diff --git a/arch/arm/src/stm32f0l0g0/stm32_spi.c b/soc/arm/stm32f0l0g0/stm32_spi.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_spi.c rename to soc/arm/stm32f0l0g0/stm32_spi.c diff --git a/arch/arm/src/stm32f0l0g0/stm32_spi.h b/soc/arm/stm32f0l0g0/stm32_spi.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_spi.h rename to soc/arm/stm32f0l0g0/stm32_spi.h diff --git a/arch/arm/src/stm32f0l0g0/stm32_start.c b/soc/arm/stm32f0l0g0/stm32_start.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_start.c rename to soc/arm/stm32f0l0g0/stm32_start.c diff --git a/arch/arm/src/stm32f0l0g0/stm32_start.h b/soc/arm/stm32f0l0g0/stm32_start.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_start.h rename to soc/arm/stm32f0l0g0/stm32_start.h diff --git a/arch/arm/src/stm32f0l0g0/stm32_tim.c b/soc/arm/stm32f0l0g0/stm32_tim.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_tim.c rename to soc/arm/stm32f0l0g0/stm32_tim.c diff --git a/arch/arm/src/stm32f0l0g0/stm32_tim.h b/soc/arm/stm32f0l0g0/stm32_tim.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_tim.h rename to soc/arm/stm32f0l0g0/stm32_tim.h diff --git a/arch/arm/src/stm32f0l0g0/stm32_tim_lowerhalf.c b/soc/arm/stm32f0l0g0/stm32_tim_lowerhalf.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_tim_lowerhalf.c rename to soc/arm/stm32f0l0g0/stm32_tim_lowerhalf.c diff --git a/arch/arm/src/stm32f0l0g0/stm32_timerisr.c b/soc/arm/stm32f0l0g0/stm32_timerisr.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_timerisr.c rename to soc/arm/stm32f0l0g0/stm32_timerisr.c diff --git a/arch/arm/src/stm32f0l0g0/stm32_uart.h b/soc/arm/stm32f0l0g0/stm32_uart.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_uart.h rename to soc/arm/stm32f0l0g0/stm32_uart.h diff --git a/arch/arm/src/stm32f0l0g0/stm32_uid.c b/soc/arm/stm32f0l0g0/stm32_uid.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_uid.c rename to soc/arm/stm32f0l0g0/stm32_uid.c diff --git a/arch/arm/src/stm32f0l0g0/stm32_uid.h b/soc/arm/stm32f0l0g0/stm32_uid.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_uid.h rename to soc/arm/stm32f0l0g0/stm32_uid.h diff --git a/arch/arm/src/stm32f0l0g0/stm32_usbdev.c b/soc/arm/stm32f0l0g0/stm32_usbdev.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_usbdev.c rename to soc/arm/stm32f0l0g0/stm32_usbdev.c diff --git a/arch/arm/src/stm32f0l0g0/stm32_usbdev.h b/soc/arm/stm32f0l0g0/stm32_usbdev.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_usbdev.h rename to soc/arm/stm32f0l0g0/stm32_usbdev.h diff --git a/arch/arm/src/stm32f0l0g0/stm32_wdg.h b/soc/arm/stm32f0l0g0/stm32_wdg.h similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_wdg.h rename to soc/arm/stm32f0l0g0/stm32_wdg.h diff --git a/arch/arm/src/stm32f0l0g0/stm32_wwdg.c b/soc/arm/stm32f0l0g0/stm32_wwdg.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32_wwdg.c rename to soc/arm/stm32f0l0g0/stm32_wwdg.c diff --git a/arch/arm/src/stm32f0l0g0/stm32c0_rcc.c b/soc/arm/stm32f0l0g0/stm32c0_rcc.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32c0_rcc.c rename to soc/arm/stm32f0l0g0/stm32c0_rcc.c diff --git a/arch/arm/src/stm32f0l0g0/stm32f0_rcc.c b/soc/arm/stm32f0l0g0/stm32f0_rcc.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32f0_rcc.c rename to soc/arm/stm32f0l0g0/stm32f0_rcc.c diff --git a/arch/arm/src/stm32f0l0g0/stm32f0l0_pwr.c b/soc/arm/stm32f0l0g0/stm32f0l0_pwr.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32f0l0_pwr.c rename to soc/arm/stm32f0l0g0/stm32f0l0_pwr.c diff --git a/arch/arm/src/stm32f0l0g0/stm32g0_flash.c b/soc/arm/stm32f0l0g0/stm32g0_flash.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32g0_flash.c rename to soc/arm/stm32f0l0g0/stm32g0_flash.c diff --git a/arch/arm/src/stm32f0l0g0/stm32g0_pwr.c b/soc/arm/stm32f0l0g0/stm32g0_pwr.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32g0_pwr.c rename to soc/arm/stm32f0l0g0/stm32g0_pwr.c diff --git a/arch/arm/src/stm32f0l0g0/stm32g0_rcc.c b/soc/arm/stm32f0l0g0/stm32g0_rcc.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32g0_rcc.c rename to soc/arm/stm32f0l0g0/stm32g0_rcc.c diff --git a/soc/arm/stm32f0l0g0/stm32g0c0_flash.c b/soc/arm/stm32f0l0g0/stm32g0c0_flash.c new file mode 100644 index 0000000000..e32010190d --- /dev/null +++ b/soc/arm/stm32f0l0g0/stm32g0c0_flash.c @@ -0,0 +1,896 @@ +/**************************************************************************** + * arch/arm/src/stm32f0l0g0/stm32g0_flash.c + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + ****************************************************************************/ + +/* Provides standard flash access functions, to be used by the flash mtd + * driver. The interface is defined in the include/nuttx/progmem.h + * + * Notes: + * - Terminology: the G0xx reference manual [RM0444] refers to erase blocks + * as 'pages'. In this file, erase blocks are referred to as 'blocks' and + * the smallest write allowed is referred to as a 'page'. The STMicro + * reference manuals are not consistent in naming convention. + * - Blocking Nature: up_progmem_write() and up_progmem_eraseblock() will + * both block without releasing (up_udelay) while waiting for flash + * operations to complete. Take this into account for applications + * that use these functions. + */ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include "stm32_flash.h" + +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +#include "hardware/stm32_flash.h" +#include "hardware/stm32_memorymap.h" + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#define _K(x) ((x)*1024) +#define FLASH_BLOCK_SIZE _K(2) +#define FLASH_PAGE_SIZE 8 + +#if !defined(CONFIG_STM32F0L0G0_FLASH_CONFIG_4) && \ + !defined(CONFIG_STM32F0L0G0_FLASH_CONFIG_6) && \ + !defined(CONFIG_STM32F0L0G0_FLASH_CONFIG_8) && \ + !defined(CONFIG_STM32F0L0G0_FLASH_CONFIG_B) && \ + !defined(CONFIG_STM32F0L0G0_FLASH_CONFIG_C) && \ + !defined(CONFIG_STM32F0L0G0_FLASH_CONFIG_E) && \ + !defined(CONFIG_STM32F0L0G0_FLASH_OVERRIDE) +# error "No valid flash configuration was defined." +#endif + +#ifdef CONFIG_STM32F0L0G0_FLASH_OVERRIDE +# undef CONFIG_STM32F0L0G0_FLASH_CONFIG_4 +# undef CONFIG_STM32F0L0G0_FLASH_CONFIG_6 +# undef CONFIG_STM32F0L0G0_FLASH_CONFIG_8 +# undef CONFIG_STM32F0L0G0_FLASH_CONFIG_B +# undef CONFIG_STM32F0L0G0_FLASH_CONFIG_C +# undef CONFIG_STM32F0L0G0_FLASH_CONFIG_E +# if defined(CONFIG_STM32F0L0G0_FLASH_OVERRIDE_4) +# define CONFIG_STM32F0L0G0_FLASH_CONFIG_4 +# elif defined(CONFIG_STM32F0L0G0_FLASH_OVERRIDE_6) +# define CONFIG_STM32F0L0G0_FLASH_CONFIG_6 +# elif defined(CONFIG_STM32F0L0G0_FLASH_OVERRIDE_8) +# define CONFIG_STM32F0L0G0_FLASH_CONFIG_8 +# elif defined(CONFIG_STM32F0L0G0_FLASH_OVERRIDE_B) +# define CONFIG_STM32F0L0G0_FLASH_CONFIG_B +# elif defined(CONFIG_STM32F0L0G0_FLASH_OVERRIDE_C) +# define CONFIG_STM32F0L0G0_FLASH_CONFIG_C +# elif defined(CONFIG_STM32F0L0G0_FLASH_OVERRIDE_E) +# define CONFIG_STM32F0L0G0_FLASH_CONFIG_E +# else +# error "Invalid flash configuration override provided" +# endif +#endif + +#if defined(CONFIG_STM32F0L0G0_FLASH_CONFIG_4) +# define FLASH_NBLOCKS 8 +#elif defined(CONFIG_STM32F0L0G0_FLASH_CONFIG_6) +# define FLASH_NBLOCKS 16 +#elif defined(CONFIG_STM32F0L0G0_FLASH_CONFIG_8) +# define FLASH_NBLOCKS 32 +#elif defined(CONFIG_STM32F0L0G0_FLASH_CONFIG_B) +# define FLASH_NBLOCKS 64 +#elif defined(CONFIG_STM32F0L0G0_FLASH_CONFIG_C) +# define FLASH_NBLOCKS 128 +# define FLASH_DUAL_BANK 1 +# define FLASH_BANK2_BASE 0x08020000 +#elif defined(CONFIG_STM32F0L0G0_FLASH_CONFIG_E) +# define FLASH_NBLOCKS 256 +# define FLASH_DUAL_BANK 1 +# define FLASH_BANK2_BASE 0x08040000 +#else +# error "Invalid flash configuration defined" +#endif + +#ifdef FLASH_DUAL_BANK +# define FLASH_BANKSIZE (FLASH_NBLOCKS * FLASH_BLOCK_SIZE / 2) +#else +# define FLASH_BANKSIZE (FLASH_NBLOCKS * FLASH_BLOCK_SIZE) +#endif + +/* Dual bank G0B1 MCUs have a non-linear mapping of block number between + * banks. Bank 2 starts at block number 256, even if bank 1 ends at 63 + * or 127. + */ + +#define FLASH_BANK2_START_BLOCKNUM 256 + +#define FLASH_TOTALSIZE (FLASH_NBLOCKS * FLASH_BLOCK_SIZE) +#define FLASH_NPAGES (FLASH_NBLOCKS * FLASH_BLOCK_SIZE / FLASH_PAGE_SIZE) +#define FLASH_KEY1 0x45670123 +#define FLASH_KEY2 0xcdef89ab +#define FLASH_OPTKEY1 0x08192a3b +#define FLASH_OPTKEY2 0x4c5d6e7f +#define FLASH_ERASEDVALUE 0xffu +#define FLASH_ERASEDVALUE_DW 0xffffffffu + +#define FLASH_TIMEOUT 5000000 /* 5s */ + +#define FLASH_SR_CLEAR_ERROR_FLAGS (FLASH_SR_OPERR|FLASH_SR_PROGERR|FLASH_SR_WRPERR|\ + FLASH_SR_PGAERR|FLASH_SR_SIZERR|FLASH_SR_PGSERR|\ + FLASH_SR_MISSERR|FLASH_SR_FASTERR|FLASH_SR_RDERR|FLASH_SR_OPTVERR) + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +struct stm32_flash_priv_s +{ + uint32_t base; /* FLASH base address */ + uint32_t stblock; /* The first block number */ + uint32_t stpage; /* The first page number */ +}; + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +static void flash_unlock_cr(void); +static void flash_lock_cr(void); +static bool flash_unlock_opt(void); +static void flash_lock_opt(void); +static int flash_israngeerased(size_t startaddress, size_t size); +static inline struct stm32_flash_priv_s *flash_bank(size_t address); +static int flash_wait_for_operation(void); +static int flash_verify_blocknum(size_t block); +static uint32_t flash_block_address(size_t block); + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +static struct stm32_flash_priv_s flash_bank1_priv = +{ + .base = STM32_FLASH_BASE, + .stblock = 0, + .stpage = 0 +}; + +#ifdef FLASH_DUAL_BANK +static struct stm32_flash_priv_s flash_bank2_priv = +{ + .base = FLASH_BANK2_BASE, + .stblock = FLASH_BANK2_START_BLOCKNUM, + .stpage = (FLASH_NPAGES / 2) +}; +#endif + +static mutex_t g_lock = NXMUTEX_INITIALIZER; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: flash_bank + * + * Description: + * Returns the priv pointer to the correct bank + * + ****************************************************************************/ + +static inline struct stm32_flash_priv_s *flash_bank(size_t address) +{ + struct stm32_flash_priv_s *priv = NULL; + + if (address >= flash_bank1_priv.base && + address < flash_bank1_priv.base + FLASH_BANKSIZE) + { + priv = &flash_bank1_priv; + } +#ifdef FLASH_DUAL_BANK + else if (address >= flash_bank2_priv.base && + address < flash_bank2_priv.base + FLASH_BANKSIZE) + { + priv = &flash_bank2_priv; + } +#endif + + return priv; +} + +/**************************************************************************** + * Name: flash_israngeerased + * + * Description: + * Returns count of non-erased words + * + ****************************************************************************/ + +static int flash_israngeerased(size_t startaddress, size_t size) +{ + uint32_t *addr; + uint8_t *baddr; + size_t count = 0; + size_t bwritten = 0; + + if (!flash_bank(startaddress) || !flash_bank(startaddress + size - 1)) + { + return -EIO; + } + + addr = (uint32_t *)startaddress; + + while (count + 4 <= size) + { + if (getreg32(addr) != FLASH_ERASEDVALUE_DW) + { + bwritten++; + } + + addr++; + count += 4; + } + + baddr = (uint8_t *)addr; + + while (count < size) + { + if (getreg8(baddr) != FLASH_ERASEDVALUE) + { + /* Technically counting more than once per word but OK since + * anything that is non-zero is a failure anyways. + */ + + bwritten++; + } + + baddr++; + count++; + } + + return bwritten; +} + +/**************************************************************************** + * Name: flash_wait_for_operation() + * + * Description: + * Wait for last write/erase operation to finish + * Return error in case of timeout + * + * Returned Value: + * Zero or error value + * + * -EBUSY: Timeout while waiting for previous write/erase operation to + * complete + * + ****************************************************************************/ + +static int flash_wait_for_operation(void) +{ + int i; + bool timeout = true; + + UP_DSB(); + + for (i = 0; i < FLASH_TIMEOUT; i += 10) + { + if (!(getreg32(STM32_FLASH_SR) & + (FLASH_SR_CFGBSY | FLASH_SR_BSY1 | FLASH_SR_BSY2))) + { + timeout = false; + break; + } + + up_udelay(10); + } + + if (timeout) + { + return -EBUSY; + } + + return 0; +} + +/**************************************************************************** + * Name: flash_unlock_cr + * + * Description: + * Unlock flash control register, if it is not already unlocked. + * + ****************************************************************************/ + +static void flash_unlock_cr(void) +{ + /* FLASH_CR cannot be written when BSY1 flag set */ + + while (getreg32(STM32_FLASH_SR) & (FLASH_SR_BSY1 | FLASH_SR_CFGBSY)) + { + } + + if (getreg32(STM32_FLASH_CR) & FLASH_CR_LOCK) + { + putreg32(FLASH_KEY1, STM32_FLASH_KEYR); + putreg32(FLASH_KEY2, STM32_FLASH_KEYR); + } + + DEBUGASSERT((getreg32(STM32_FLASH_CR) & FLASH_CR_LOCK) == 0); +} + +/**************************************************************************** + * Name: flash_lock_cr + * + * Description: + * Lock flash control register. + * + ****************************************************************************/ + +static void flash_lock_cr(void) +{ + modifyreg32(STM32_FLASH_CR, 0, FLASH_CR_LOCK); +} + +/**************************************************************************** + * Name: flash_unlock_opt + * + * Description: + * Unlock flash option bytes register, if it is not already unlocked. + * + ****************************************************************************/ + +static bool flash_unlock_opt(void) +{ + bool was_locked = false; + flash_unlock_cr(); + + if (getreg32(STM32_FLASH_CR) & FLASH_CR_OPTLOCK) + { + was_locked = true; + + putreg32(FLASH_OPTKEY1, STM32_FLASH_OPTKEYR); + putreg32(FLASH_OPTKEY2, STM32_FLASH_OPTKEYR); + } + + DEBUGASSERT((getreg32(STM32_FLASH_CR) & FLASH_CR_OPTLOCK) == 0); + + return was_locked; +} + +/**************************************************************************** + * Name: flash_lock_opt + * + * Description: + * Lock flash option bytes register. + * + ****************************************************************************/ + +static void flash_lock_opt(void) +{ + modifyreg32(STM32_FLASH_CR, 0, FLASH_CR_OPTLOCK); +} + +/**************************************************************************** + * Name: flash_verify_blocknum + * + * Description: + * Verify the provided block number is valid based on the flash + * configuration. This is done because the reference implementation and + * reference manual refer to non-contiguous block (page) numbers for the + * flash layout on dual-bank devices. + * + * Returned Value: + * Zero or negated errno value. + * + * -EFAULT: Block number provided falls outside of the ranges specified in + * reference manual. + * + ****************************************************************************/ + +static int flash_verify_blocknum(size_t block) +{ +#ifdef FLASH_DUAL_BANK +#if defined(CONFIG_STM32F0L0G0_FLASH_CONFIG_C) + if ((block < 0 || block > 63) && (block < 256 || block > 319)) + { + return -EFAULT; + } +#elif defined(CONFIG_STM32F0L0G0_FLASH_CONFIG_E) + if ((block < 0 || block > 127) && (block < 256 || block > 383)) + { + return -EFAULT; + } +#else +# error "Dual bank flash config not supported by flash driver" +#endif +#else + if (block > FLASH_NBLOCKS) + { + return -EFAULT; + } +#endif + + return 0; +} + +/**************************************************************************** + * Name: flash_block_address + * + * Description: + * Find the start address for the given block number. + * + * Returned Value: + * Memory address corresponding to given block number. + * + * Assumptions: + * This function assumes the block number has already been verified. Take + * care to make sure the block number is valid for the specific chip using + * flash_verify_blocknum() first. + * + ****************************************************************************/ + +static uint32_t flash_block_address(size_t block) +{ + uint32_t addr; +#ifdef FLASH_DUAL_BANK + if (block >= flash_bank2_priv.stblock) + { + addr = flash_bank2_priv.base + + (block - flash_bank2_priv.stblock) * FLASH_BLOCK_SIZE; + } + else + { + addr = flash_bank1_priv.base + block * FLASH_BLOCK_SIZE; + } +#else + addr = flash_bank1_priv.base + block * FLASH_BLOCK_SIZE; +#endif + return addr; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: stm32_flash_unlock + * + * Description: + * Unlock flash control register (FLASH_CR) + * + ****************************************************************************/ + +void stm32_flash_unlock(void) +{ + nxmutex_lock(&g_lock); + flash_unlock_cr(); + nxmutex_unlock(&g_lock); +} + +/**************************************************************************** + * Name: stm32_flash_lock + * + * Description: + * Lock flash control register (FLASH_CR) + * + ****************************************************************************/ + +void stm32_flash_lock(void) +{ + nxmutex_lock(&g_lock); + flash_lock_cr(); + nxmutex_unlock(&g_lock); +} + +/**************************************************************************** + * Name: stm32_flash_getopt + * + * Description: + * Read the current flash option bytes from FLASH_OPTR + * + * Input Parameters: + * opt - location to store read of FLASH_OPTR + * + ****************************************************************************/ + +void stm32_flash_getopt(uint32_t *opt) +{ + *opt = getreg32(STM32_FLASH_OPTR); +} + +/**************************************************************************** + * Name: stm32_flash_optmodify + * + * Description: + * Modifies the current flash option bytes, given bits to set and clear. + * + * Input Parameters: + * clear - clear bits for FLASH_OPTR + * set - set bits for FLASH_OPTR + * + * Returned Value: + * Zero or error value + * + * -EBUSY: Timeout waiting for previous FLASH operation to occur, or + * there was data in the flash data buffer. + * + * Notes: + * This function WILL BLOCK and NOT release the thread. This is a sensitive + * operation with the potential to brick the device if interrupted. So, for + * the actual opt modify start, this function uses a tight while loop to + * wait for completion. + * + ****************************************************************************/ + +int stm32_flash_optmodify(uint32_t clear, uint32_t set) +{ + int ret; + bool was_locked; + + ret = flash_wait_for_operation(); + if (ret != 0) + { + return -EBUSY; + } + + was_locked = flash_unlock_opt(); + modifyreg32(STM32_FLASH_SR, 0, FLASH_SR_CLEAR_ERROR_FLAGS); + + modifyreg32(STM32_FLASH_OPTR, clear, set); + + while (getreg32(STM32_FLASH_SR) & FLASH_SR_BSY1) + { + } + + modifyreg32(STM32_FLASH_CR, 0, FLASH_CR_OPTSTRT); + + while (getreg32(STM32_FLASH_SR) & FLASH_SR_BSY1) + { + } + + if (was_locked) + { + flash_lock_opt(); + } + + return 0; +} + +#ifdef CONFIG_ARCH_HAVE_PROGMEM + +/* up_progmem_x functions defined in nuttx/include/nuttx/progmem.h + * + * Notes on Implementation: + * - The driver implementations DO NOT enforce memory address boundaries. + * For processors with less than 2MB flash, the user is responsible for + * not writing to memory between banks. + * + */ + +size_t up_progmem_pagesize(size_t page) +{ + return FLASH_PAGE_SIZE; +} + +ssize_t up_progmem_getpage(size_t addr) +{ + struct stm32_flash_priv_s *priv; + + priv = flash_bank(addr); + + if (priv == NULL) + { + return -EFAULT; + } + + return priv->stpage + ((addr - priv->base) / FLASH_PAGE_SIZE); +} + +size_t up_progmem_getaddress(size_t page) +{ + struct stm32_flash_priv_s *priv; + + if (page >= FLASH_NPAGES) + { + return SIZE_MAX; + } + + priv = flash_bank(STM32_FLASH_BASE + (page * FLASH_PAGE_SIZE)); + + if (!priv) + { + return SIZE_MAX; + } + + return priv->base + (page - priv->stpage) * FLASH_PAGE_SIZE; +} + +size_t up_progmem_neraseblocks(void) +{ + return FLASH_NBLOCKS; +} + +bool up_progmem_isuniform(void) +{ + /* So... Every other implementation of this in STM chips returns this as + * true. However, the description in include/nuttx/progmem.h states this to + * mean "does size of erase 'page' == size of read/write 'page'". Which is + * NOT true for most of these chips. + * + * On the G0, erase blocks are 2K and read/write page is 64 bit. + */ + + return false; +} + +ssize_t up_progmem_ispageerased(size_t page) +{ + size_t addr; + size_t count; + size_t bwritten = 0; + + if (page >= FLASH_NPAGES) + { + return -EFAULT; + } + + /* Verify */ + + for (addr = up_progmem_getaddress(page), count = up_progmem_pagesize(page); + count; count--, addr++) + { + if (getreg8(addr) != FLASH_ERASEDVALUE) + { + bwritten++; + } + } + + return bwritten; +} + +size_t up_progmem_erasesize(size_t block) +{ + return FLASH_BLOCK_SIZE; +} + +ssize_t up_progmem_eraseblock(size_t block) +{ + int ret; + size_t block_address; + + ret = flash_verify_blocknum(block); + if (ret < 0) + { + return -EFAULT; + } + + block_address = flash_block_address(block); + + ret = nxmutex_lock(&g_lock); + if (ret < 0) + { + return (ssize_t)ret; + } + + if (flash_wait_for_operation()) + { + ret = -EIO; + goto exit_with_lock; + } + + /* Get flash ready and begin erasing single block */ + + flash_unlock_cr(); + + modifyreg32(STM32_FLASH_SR, 0, FLASH_SR_CLEAR_ERROR_FLAGS); + + /* By now, know that the block number is valid and corresponds to a + * bank (if dual bank). So, don't need to verify that it is in bounds. + */ + +#ifdef FLASH_DUAL_BANK + + /* Note to future developers: The CR register definition in the reference + * manual [RM0444] is not clear on if bank selection is necessary. The PNB + * definition seems to imply that writing block numbers corresponding to + * bank 2 should just work. This is NOT the case. Writing 256 to PNB will + * cause block (page) 0 to be erased. Therefore, must switch BKER bit to + * match the correct bank. + */ + + if (block >= flash_bank2_priv.stblock) + { + modifyreg32(STM32_FLASH_CR, 0, FLASH_CR_BKER); + } + else + { + modifyreg32(STM32_FLASH_CR, FLASH_CR_BKER, 0); + } +#endif + + /* Setup erase parameters and start */ + + modifyreg32(STM32_FLASH_CR, FLASH_CR_PNB_MASK, + FLASH_CR_PER | (block << FLASH_CR_PNB_SHIFT)); + modifyreg32(STM32_FLASH_CR, 0, FLASH_CR_STRT); + + /* Wait for erase operation to complete */ + + if (flash_wait_for_operation()) + { + ret = -EIO; + goto exit_with_unlock; + } + + modifyreg32(STM32_FLASH_CR, FLASH_CR_PNB_MASK | FLASH_CR_PER, 0); + + ret = 0; + up_invalidate_dcache(block_address, block_address + FLASH_BLOCK_SIZE); + +exit_with_unlock: + flash_lock_cr(); + +exit_with_lock: + nxmutex_unlock(&g_lock); + + if (ret == 0 && + flash_israngeerased(block_address, up_progmem_erasesize(block)) == 0) + { + ret = up_progmem_erasesize(block); /* Success */ + } + else + { + ret = -EIO; + } + + return ret; +} + +ssize_t up_progmem_write(size_t addr, const void *buf, size_t count) +{ + struct stm32_flash_priv_s *priv; + uint32_t *fp; + uint32_t *rp; + uint32_t *ll = (uint32_t *)buf; + size_t faddr; + size_t written = count; + int ret; + const size_t pagesize = up_progmem_pagesize(0); /* 64-bit, 8 bytes per page */ + const size_t llperpage = pagesize / sizeof(uint32_t); + size_t pcount = count / pagesize; + + priv = flash_bank(addr); + + if (priv == NULL) + { + return -EFAULT; + } + + /* Check for valid address range */ + + if (addr < priv->base || + addr + count > priv->base + (FLASH_BANKSIZE)) + { + return -EFAULT; + } + + ret = nxmutex_lock(&g_lock); + if (ret < 0) + { + return (ssize_t)ret; + } + + /* Check address and count alignment */ + + DEBUGASSERT(!(addr % pagesize)); + DEBUGASSERT(!(count % pagesize)); + + if (flash_wait_for_operation()) + { + written = -EIO; + goto exit_with_lock; + } + + /* Get flash ready for write */ + + flash_unlock_cr(); + + modifyreg32(STM32_FLASH_SR, 0, FLASH_SR_CLEAR_ERROR_FLAGS); + modifyreg32(STM32_FLASH_CR, 0, FLASH_CR_PG); + + /* Write */ + + for (ll = (uint32_t *)buf, faddr = addr; pcount; + pcount -= 1, ll += llperpage, faddr += pagesize) + { + fp = (uint32_t *)faddr; + rp = ll; + + UP_MB(); + + /* Write 2 32 bit word and wait to complete */ + + *fp++ = *rp++; + *fp++ = *rp++; + + /* Data synchronous Barrier (DSB) just after the write operation. This + * will force the CPU to respect the sequence of instruction (no + * optimization). + */ + + UP_MB(); + + if (flash_wait_for_operation()) + { + written = -EIO; + goto exit_with_unlock; + } + + /* Future improvements may add ECC checking here. */ + } + + modifyreg32(STM32_FLASH_CR, FLASH_CR_PG, 0); + +exit_with_unlock: + flash_lock_cr(); + + if (written > 0) + { + for (ll = (uint32_t *)buf, faddr = addr, pcount = count / pagesize; + pcount; pcount -= 1, ll += llperpage, faddr += pagesize) + { + fp = (uint32_t *)faddr; + rp = ll; + + modifyreg32(STM32_FLASH_SR, 0, FLASH_SR_CLEAR_ERROR_FLAGS); + + if ((*fp++ != *rp++) || + (*fp++ != *rp++)) + { + written = -EIO; + break; + } + + /* Future improvements may add ECC checking here. */ + } + + modifyreg32(STM32_FLASH_SR, 0, FLASH_SR_CLEAR_ERROR_FLAGS); + } + +exit_with_lock: + nxmutex_unlock(&g_lock); + return written; +} + +uint8_t up_progmem_erasestate(void) +{ + return FLASH_ERASEDVALUE; +} + +#endif /* CONFIG_ARCH_HAVE_PROGMEM*/ \ No newline at end of file diff --git a/arch/arm/src/stm32f0l0g0/stm32l0_rcc.c b/soc/arm/stm32f0l0g0/stm32l0_rcc.c similarity index 100% rename from arch/arm/src/stm32f0l0g0/stm32l0_rcc.c rename to soc/arm/stm32f0l0g0/stm32l0_rcc.c diff --git a/arch/arm/src/stm32f7/CMakeLists.txt b/soc/arm/stm32f7/CMakeLists.txt similarity index 100% rename from arch/arm/src/stm32f7/CMakeLists.txt rename to soc/arm/stm32f7/CMakeLists.txt diff --git a/arch/arm/src/stm32f7/Kconfig b/soc/arm/stm32f7/Kconfig similarity index 100% rename from arch/arm/src/stm32f7/Kconfig rename to soc/arm/stm32f7/Kconfig diff --git a/arch/arm/src/stm32f7/Make.defs b/soc/arm/stm32f7/Make.defs similarity index 100% rename from arch/arm/src/stm32f7/Make.defs rename to soc/arm/stm32f7/Make.defs diff --git a/arch/arm/src/stm32f7/chip.h b/soc/arm/stm32f7/chip.h similarity index 100% rename from arch/arm/src/stm32f7/chip.h rename to soc/arm/stm32f7/chip.h diff --git a/arch/arm/src/stm32f7/hardware/stm32_adc.h b/soc/arm/stm32f7/hardware/stm32_adc.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32_adc.h rename to soc/arm/stm32f7/hardware/stm32_adc.h diff --git a/arch/arm/src/stm32f7/hardware/stm32_can.h b/soc/arm/stm32f7/hardware/stm32_can.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32_can.h rename to soc/arm/stm32f7/hardware/stm32_can.h diff --git a/arch/arm/src/stm32f7/hardware/stm32_dbgmcu.h b/soc/arm/stm32f7/hardware/stm32_dbgmcu.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32_dbgmcu.h rename to soc/arm/stm32f7/hardware/stm32_dbgmcu.h diff --git a/arch/arm/src/stm32f7/hardware/stm32_dma.h b/soc/arm/stm32f7/hardware/stm32_dma.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32_dma.h rename to soc/arm/stm32f7/hardware/stm32_dma.h diff --git a/arch/arm/src/stm32f7/hardware/stm32_dma2d.h b/soc/arm/stm32f7/hardware/stm32_dma2d.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32_dma2d.h rename to soc/arm/stm32f7/hardware/stm32_dma2d.h diff --git a/arch/arm/src/stm32f7/hardware/stm32_ethernet.h b/soc/arm/stm32f7/hardware/stm32_ethernet.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32_ethernet.h rename to soc/arm/stm32f7/hardware/stm32_ethernet.h diff --git a/arch/arm/src/stm32f7/hardware/stm32_exti.h b/soc/arm/stm32f7/hardware/stm32_exti.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32_exti.h rename to soc/arm/stm32f7/hardware/stm32_exti.h diff --git a/arch/arm/src/stm32f7/hardware/stm32_flash.h b/soc/arm/stm32f7/hardware/stm32_flash.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32_flash.h rename to soc/arm/stm32f7/hardware/stm32_flash.h diff --git a/arch/arm/src/stm32f7/hardware/stm32_fmc.h b/soc/arm/stm32f7/hardware/stm32_fmc.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32_fmc.h rename to soc/arm/stm32f7/hardware/stm32_fmc.h diff --git a/arch/arm/src/stm32f7/hardware/stm32_gpio.h b/soc/arm/stm32f7/hardware/stm32_gpio.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32_gpio.h rename to soc/arm/stm32f7/hardware/stm32_gpio.h diff --git a/arch/arm/src/stm32f7/hardware/stm32_i2c.h b/soc/arm/stm32f7/hardware/stm32_i2c.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32_i2c.h rename to soc/arm/stm32f7/hardware/stm32_i2c.h diff --git a/arch/arm/src/stm32f7/hardware/stm32_ltdc.h b/soc/arm/stm32f7/hardware/stm32_ltdc.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32_ltdc.h rename to soc/arm/stm32f7/hardware/stm32_ltdc.h diff --git a/arch/arm/src/stm32f7/hardware/stm32_memorymap.h b/soc/arm/stm32f7/hardware/stm32_memorymap.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32_memorymap.h rename to soc/arm/stm32f7/hardware/stm32_memorymap.h diff --git a/arch/arm/src/stm32f7/hardware/stm32_otg.h b/soc/arm/stm32f7/hardware/stm32_otg.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32_otg.h rename to soc/arm/stm32f7/hardware/stm32_otg.h diff --git a/arch/arm/src/stm32f7/hardware/stm32_pinmap.h b/soc/arm/stm32f7/hardware/stm32_pinmap.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32_pinmap.h rename to soc/arm/stm32f7/hardware/stm32_pinmap.h diff --git a/arch/arm/src/stm32f7/hardware/stm32_pwr.h b/soc/arm/stm32f7/hardware/stm32_pwr.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32_pwr.h rename to soc/arm/stm32f7/hardware/stm32_pwr.h diff --git a/arch/arm/src/stm32f7/hardware/stm32_qspi.h b/soc/arm/stm32f7/hardware/stm32_qspi.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32_qspi.h rename to soc/arm/stm32f7/hardware/stm32_qspi.h diff --git a/arch/arm/src/stm32f7/hardware/stm32_rcc.h b/soc/arm/stm32f7/hardware/stm32_rcc.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32_rcc.h rename to soc/arm/stm32f7/hardware/stm32_rcc.h diff --git a/arch/arm/src/stm32f7/hardware/stm32_rng.h b/soc/arm/stm32f7/hardware/stm32_rng.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32_rng.h rename to soc/arm/stm32f7/hardware/stm32_rng.h diff --git a/arch/arm/src/stm32f7/hardware/stm32_rtcc.h b/soc/arm/stm32f7/hardware/stm32_rtcc.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32_rtcc.h rename to soc/arm/stm32f7/hardware/stm32_rtcc.h diff --git a/arch/arm/src/stm32f7/hardware/stm32_sai.h b/soc/arm/stm32f7/hardware/stm32_sai.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32_sai.h rename to soc/arm/stm32f7/hardware/stm32_sai.h diff --git a/arch/arm/src/stm32f7/hardware/stm32_sdmmc.h b/soc/arm/stm32f7/hardware/stm32_sdmmc.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32_sdmmc.h rename to soc/arm/stm32f7/hardware/stm32_sdmmc.h diff --git a/arch/arm/src/stm32f7/hardware/stm32_spi.h b/soc/arm/stm32f7/hardware/stm32_spi.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32_spi.h rename to soc/arm/stm32f7/hardware/stm32_spi.h diff --git a/arch/arm/src/stm32f7/hardware/stm32_syscfg.h b/soc/arm/stm32f7/hardware/stm32_syscfg.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32_syscfg.h rename to soc/arm/stm32f7/hardware/stm32_syscfg.h diff --git a/arch/arm/src/stm32f7/hardware/stm32_tim.h b/soc/arm/stm32f7/hardware/stm32_tim.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32_tim.h rename to soc/arm/stm32f7/hardware/stm32_tim.h diff --git a/arch/arm/src/stm32f7/hardware/stm32_uart.h b/soc/arm/stm32f7/hardware/stm32_uart.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32_uart.h rename to soc/arm/stm32f7/hardware/stm32_uart.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f72xx73xx_adc.h b/soc/arm/stm32f7/hardware/stm32f72xx73xx_adc.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f72xx73xx_adc.h rename to soc/arm/stm32f7/hardware/stm32f72xx73xx_adc.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f72xx73xx_dbgmcu.h b/soc/arm/stm32f7/hardware/stm32f72xx73xx_dbgmcu.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f72xx73xx_dbgmcu.h rename to soc/arm/stm32f7/hardware/stm32f72xx73xx_dbgmcu.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f72xx73xx_dma.h b/soc/arm/stm32f7/hardware/stm32f72xx73xx_dma.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f72xx73xx_dma.h rename to soc/arm/stm32f7/hardware/stm32f72xx73xx_dma.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f72xx73xx_flash.h b/soc/arm/stm32f7/hardware/stm32f72xx73xx_flash.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f72xx73xx_flash.h rename to soc/arm/stm32f7/hardware/stm32f72xx73xx_flash.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f72xx73xx_gpio.h b/soc/arm/stm32f7/hardware/stm32f72xx73xx_gpio.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f72xx73xx_gpio.h rename to soc/arm/stm32f7/hardware/stm32f72xx73xx_gpio.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f72xx73xx_memorymap.h b/soc/arm/stm32f7/hardware/stm32f72xx73xx_memorymap.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f72xx73xx_memorymap.h rename to soc/arm/stm32f7/hardware/stm32f72xx73xx_memorymap.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f72xx73xx_pinmap.h b/soc/arm/stm32f7/hardware/stm32f72xx73xx_pinmap.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f72xx73xx_pinmap.h rename to soc/arm/stm32f7/hardware/stm32f72xx73xx_pinmap.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f72xx73xx_pinmap_legacy.h b/soc/arm/stm32f7/hardware/stm32f72xx73xx_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f72xx73xx_pinmap_legacy.h rename to soc/arm/stm32f7/hardware/stm32f72xx73xx_pinmap_legacy.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f72xx73xx_pwr.h b/soc/arm/stm32f7/hardware/stm32f72xx73xx_pwr.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f72xx73xx_pwr.h rename to soc/arm/stm32f7/hardware/stm32f72xx73xx_pwr.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f72xx73xx_rcc.h b/soc/arm/stm32f7/hardware/stm32f72xx73xx_rcc.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f72xx73xx_rcc.h rename to soc/arm/stm32f7/hardware/stm32f72xx73xx_rcc.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f72xx73xx_spi.h b/soc/arm/stm32f7/hardware/stm32f72xx73xx_spi.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f72xx73xx_spi.h rename to soc/arm/stm32f7/hardware/stm32f72xx73xx_spi.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f72xx73xx_syscfg.h b/soc/arm/stm32f7/hardware/stm32f72xx73xx_syscfg.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f72xx73xx_syscfg.h rename to soc/arm/stm32f7/hardware/stm32f72xx73xx_syscfg.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f72xx73xx_tim.h b/soc/arm/stm32f7/hardware/stm32f72xx73xx_tim.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f72xx73xx_tim.h rename to soc/arm/stm32f7/hardware/stm32f72xx73xx_tim.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f72xx73xx_uart.h b/soc/arm/stm32f7/hardware/stm32f72xx73xx_uart.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f72xx73xx_uart.h rename to soc/arm/stm32f7/hardware/stm32f72xx73xx_uart.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f74xx75xx_dbgmcu.h b/soc/arm/stm32f7/hardware/stm32f74xx75xx_dbgmcu.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f74xx75xx_dbgmcu.h rename to soc/arm/stm32f7/hardware/stm32f74xx75xx_dbgmcu.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f74xx75xx_dma.h b/soc/arm/stm32f7/hardware/stm32f74xx75xx_dma.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f74xx75xx_dma.h rename to soc/arm/stm32f7/hardware/stm32f74xx75xx_dma.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f74xx75xx_flash.h b/soc/arm/stm32f7/hardware/stm32f74xx75xx_flash.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f74xx75xx_flash.h rename to soc/arm/stm32f7/hardware/stm32f74xx75xx_flash.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f74xx75xx_gpio.h b/soc/arm/stm32f7/hardware/stm32f74xx75xx_gpio.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f74xx75xx_gpio.h rename to soc/arm/stm32f7/hardware/stm32f74xx75xx_gpio.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f74xx75xx_memorymap.h b/soc/arm/stm32f7/hardware/stm32f74xx75xx_memorymap.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f74xx75xx_memorymap.h rename to soc/arm/stm32f7/hardware/stm32f74xx75xx_memorymap.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f74xx75xx_pinmap.h b/soc/arm/stm32f7/hardware/stm32f74xx75xx_pinmap.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f74xx75xx_pinmap.h rename to soc/arm/stm32f7/hardware/stm32f74xx75xx_pinmap.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f74xx75xx_pinmap_legacy.h b/soc/arm/stm32f7/hardware/stm32f74xx75xx_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f74xx75xx_pinmap_legacy.h rename to soc/arm/stm32f7/hardware/stm32f74xx75xx_pinmap_legacy.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f74xx75xx_pwr.h b/soc/arm/stm32f7/hardware/stm32f74xx75xx_pwr.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f74xx75xx_pwr.h rename to soc/arm/stm32f7/hardware/stm32f74xx75xx_pwr.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f74xx75xx_rcc.h b/soc/arm/stm32f7/hardware/stm32f74xx75xx_rcc.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f74xx75xx_rcc.h rename to soc/arm/stm32f7/hardware/stm32f74xx75xx_rcc.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f74xx75xx_syscfg.h b/soc/arm/stm32f7/hardware/stm32f74xx75xx_syscfg.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f74xx75xx_syscfg.h rename to soc/arm/stm32f7/hardware/stm32f74xx75xx_syscfg.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f74xx75xx_tim.h b/soc/arm/stm32f7/hardware/stm32f74xx75xx_tim.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f74xx75xx_tim.h rename to soc/arm/stm32f7/hardware/stm32f74xx75xx_tim.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f74xx77xx_adc.h b/soc/arm/stm32f7/hardware/stm32f74xx77xx_adc.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f74xx77xx_adc.h rename to soc/arm/stm32f7/hardware/stm32f74xx77xx_adc.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f74xx77xx_i2c.h b/soc/arm/stm32f7/hardware/stm32f74xx77xx_i2c.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f74xx77xx_i2c.h rename to soc/arm/stm32f7/hardware/stm32f74xx77xx_i2c.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f74xx77xx_spi.h b/soc/arm/stm32f7/hardware/stm32f74xx77xx_spi.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f74xx77xx_spi.h rename to soc/arm/stm32f7/hardware/stm32f74xx77xx_spi.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f74xx77xx_uart.h b/soc/arm/stm32f7/hardware/stm32f74xx77xx_uart.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f74xx77xx_uart.h rename to soc/arm/stm32f7/hardware/stm32f74xx77xx_uart.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f76xx77xx_dbgmcu.h b/soc/arm/stm32f7/hardware/stm32f76xx77xx_dbgmcu.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f76xx77xx_dbgmcu.h rename to soc/arm/stm32f7/hardware/stm32f76xx77xx_dbgmcu.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f76xx77xx_dma.h b/soc/arm/stm32f7/hardware/stm32f76xx77xx_dma.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f76xx77xx_dma.h rename to soc/arm/stm32f7/hardware/stm32f76xx77xx_dma.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f76xx77xx_flash.h b/soc/arm/stm32f7/hardware/stm32f76xx77xx_flash.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f76xx77xx_flash.h rename to soc/arm/stm32f7/hardware/stm32f76xx77xx_flash.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f76xx77xx_gpio.h b/soc/arm/stm32f7/hardware/stm32f76xx77xx_gpio.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f76xx77xx_gpio.h rename to soc/arm/stm32f7/hardware/stm32f76xx77xx_gpio.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f76xx77xx_memorymap.h b/soc/arm/stm32f7/hardware/stm32f76xx77xx_memorymap.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f76xx77xx_memorymap.h rename to soc/arm/stm32f7/hardware/stm32f76xx77xx_memorymap.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f76xx77xx_pinmap.h b/soc/arm/stm32f7/hardware/stm32f76xx77xx_pinmap.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f76xx77xx_pinmap.h rename to soc/arm/stm32f7/hardware/stm32f76xx77xx_pinmap.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f76xx77xx_pinmap_legacy.h b/soc/arm/stm32f7/hardware/stm32f76xx77xx_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f76xx77xx_pinmap_legacy.h rename to soc/arm/stm32f7/hardware/stm32f76xx77xx_pinmap_legacy.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f76xx77xx_pwr.h b/soc/arm/stm32f7/hardware/stm32f76xx77xx_pwr.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f76xx77xx_pwr.h rename to soc/arm/stm32f7/hardware/stm32f76xx77xx_pwr.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f76xx77xx_rcc.h b/soc/arm/stm32f7/hardware/stm32f76xx77xx_rcc.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f76xx77xx_rcc.h rename to soc/arm/stm32f7/hardware/stm32f76xx77xx_rcc.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f76xx77xx_syscfg.h b/soc/arm/stm32f7/hardware/stm32f76xx77xx_syscfg.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f76xx77xx_syscfg.h rename to soc/arm/stm32f7/hardware/stm32f76xx77xx_syscfg.h diff --git a/arch/arm/src/stm32f7/hardware/stm32f76xx77xx_tim.h b/soc/arm/stm32f7/hardware/stm32f76xx77xx_tim.h similarity index 100% rename from arch/arm/src/stm32f7/hardware/stm32f76xx77xx_tim.h rename to soc/arm/stm32f7/hardware/stm32f76xx77xx_tim.h diff --git a/arch/arm/src/stm32f7/stm32_adc.c b/soc/arm/stm32f7/stm32_adc.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_adc.c rename to soc/arm/stm32f7/stm32_adc.c diff --git a/arch/arm/src/stm32f7/stm32_adc.h b/soc/arm/stm32f7/stm32_adc.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_adc.h rename to soc/arm/stm32f7/stm32_adc.h diff --git a/arch/arm/src/stm32f7/stm32_alarm.h b/soc/arm/stm32f7/stm32_alarm.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_alarm.h rename to soc/arm/stm32f7/stm32_alarm.h diff --git a/arch/arm/src/stm32f7/stm32_allocateheap.c b/soc/arm/stm32f7/stm32_allocateheap.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_allocateheap.c rename to soc/arm/stm32f7/stm32_allocateheap.c diff --git a/arch/arm/src/stm32f7/stm32_bbsram.c b/soc/arm/stm32f7/stm32_bbsram.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_bbsram.c rename to soc/arm/stm32f7/stm32_bbsram.c diff --git a/arch/arm/src/stm32f7/stm32_bbsram.h b/soc/arm/stm32f7/stm32_bbsram.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_bbsram.h rename to soc/arm/stm32f7/stm32_bbsram.h diff --git a/arch/arm/src/stm32f7/stm32_can.c b/soc/arm/stm32f7/stm32_can.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_can.c rename to soc/arm/stm32f7/stm32_can.c diff --git a/arch/arm/src/stm32f7/stm32_can.h b/soc/arm/stm32f7/stm32_can.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_can.h rename to soc/arm/stm32f7/stm32_can.h diff --git a/arch/arm/src/stm32f7/stm32_can_sock.c b/soc/arm/stm32f7/stm32_can_sock.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_can_sock.c rename to soc/arm/stm32f7/stm32_can_sock.c diff --git a/arch/arm/src/stm32f7/stm32_capture.c b/soc/arm/stm32f7/stm32_capture.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_capture.c rename to soc/arm/stm32f7/stm32_capture.c diff --git a/arch/arm/src/stm32f7/stm32_capture.h b/soc/arm/stm32f7/stm32_capture.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_capture.h rename to soc/arm/stm32f7/stm32_capture.h diff --git a/arch/arm/src/stm32f7/stm32_config.h b/soc/arm/stm32f7/stm32_config.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_config.h rename to soc/arm/stm32f7/stm32_config.h diff --git a/arch/arm/src/stm32f7/stm32_dbgmcu.h b/soc/arm/stm32f7/stm32_dbgmcu.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_dbgmcu.h rename to soc/arm/stm32f7/stm32_dbgmcu.h diff --git a/arch/arm/src/stm32f7/stm32_dma.c b/soc/arm/stm32f7/stm32_dma.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_dma.c rename to soc/arm/stm32f7/stm32_dma.c diff --git a/arch/arm/src/stm32f7/stm32_dma.h b/soc/arm/stm32f7/stm32_dma.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_dma.h rename to soc/arm/stm32f7/stm32_dma.h diff --git a/arch/arm/src/stm32f7/stm32_dma2d.c b/soc/arm/stm32f7/stm32_dma2d.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_dma2d.c rename to soc/arm/stm32f7/stm32_dma2d.c diff --git a/arch/arm/src/stm32f7/stm32_dma2d.h b/soc/arm/stm32f7/stm32_dma2d.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_dma2d.h rename to soc/arm/stm32f7/stm32_dma2d.h diff --git a/arch/arm/src/stm32f7/stm32_dtcm.c b/soc/arm/stm32f7/stm32_dtcm.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_dtcm.c rename to soc/arm/stm32f7/stm32_dtcm.c diff --git a/arch/arm/src/stm32f7/stm32_dtcm.h b/soc/arm/stm32f7/stm32_dtcm.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_dtcm.h rename to soc/arm/stm32f7/stm32_dtcm.h diff --git a/arch/arm/src/stm32f7/stm32_dumpgpio.c b/soc/arm/stm32f7/stm32_dumpgpio.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_dumpgpio.c rename to soc/arm/stm32f7/stm32_dumpgpio.c diff --git a/arch/arm/src/stm32f7/stm32_ethernet.c b/soc/arm/stm32f7/stm32_ethernet.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_ethernet.c rename to soc/arm/stm32f7/stm32_ethernet.c diff --git a/arch/arm/src/stm32f7/stm32_ethernet.h b/soc/arm/stm32f7/stm32_ethernet.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_ethernet.h rename to soc/arm/stm32f7/stm32_ethernet.h diff --git a/arch/arm/src/stm32f7/stm32_exti.h b/soc/arm/stm32f7/stm32_exti.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_exti.h rename to soc/arm/stm32f7/stm32_exti.h diff --git a/arch/arm/src/stm32f7/stm32_exti_alarm.c b/soc/arm/stm32f7/stm32_exti_alarm.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_exti_alarm.c rename to soc/arm/stm32f7/stm32_exti_alarm.c diff --git a/arch/arm/src/stm32f7/stm32_exti_gpio.c b/soc/arm/stm32f7/stm32_exti_gpio.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_exti_gpio.c rename to soc/arm/stm32f7/stm32_exti_gpio.c diff --git a/arch/arm/src/stm32f7/stm32_exti_pwr.c b/soc/arm/stm32f7/stm32_exti_pwr.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_exti_pwr.c rename to soc/arm/stm32f7/stm32_exti_pwr.c diff --git a/arch/arm/src/stm32f7/stm32_exti_pwr.h b/soc/arm/stm32f7/stm32_exti_pwr.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_exti_pwr.h rename to soc/arm/stm32f7/stm32_exti_pwr.h diff --git a/arch/arm/src/stm32f7/stm32_exti_wakeup.c b/soc/arm/stm32f7/stm32_exti_wakeup.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_exti_wakeup.c rename to soc/arm/stm32f7/stm32_exti_wakeup.c diff --git a/arch/arm/src/stm32f7/stm32_flash.c b/soc/arm/stm32f7/stm32_flash.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_flash.c rename to soc/arm/stm32f7/stm32_flash.c diff --git a/arch/arm/src/stm32f7/stm32_fmc.c b/soc/arm/stm32f7/stm32_fmc.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_fmc.c rename to soc/arm/stm32f7/stm32_fmc.c diff --git a/arch/arm/src/stm32f7/stm32_fmc.h b/soc/arm/stm32f7/stm32_fmc.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_fmc.h rename to soc/arm/stm32f7/stm32_fmc.h diff --git a/arch/arm/src/stm32f7/stm32_foc.c b/soc/arm/stm32f7/stm32_foc.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_foc.c rename to soc/arm/stm32f7/stm32_foc.c diff --git a/arch/arm/src/stm32f7/stm32_foc.h b/soc/arm/stm32f7/stm32_foc.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_foc.h rename to soc/arm/stm32f7/stm32_foc.h diff --git a/arch/arm/src/stm32f7/stm32_gpio.c b/soc/arm/stm32f7/stm32_gpio.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_gpio.c rename to soc/arm/stm32f7/stm32_gpio.c diff --git a/arch/arm/src/stm32f7/stm32_gpio.h b/soc/arm/stm32f7/stm32_gpio.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_gpio.h rename to soc/arm/stm32f7/stm32_gpio.h diff --git a/arch/arm/src/stm32f7/stm32_i2c.c b/soc/arm/stm32f7/stm32_i2c.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_i2c.c rename to soc/arm/stm32f7/stm32_i2c.c diff --git a/arch/arm/src/stm32f7/stm32_i2c.h b/soc/arm/stm32f7/stm32_i2c.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_i2c.h rename to soc/arm/stm32f7/stm32_i2c.h diff --git a/arch/arm/src/stm32f7/stm32_i2s.c b/soc/arm/stm32f7/stm32_i2s.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_i2s.c rename to soc/arm/stm32f7/stm32_i2s.c diff --git a/arch/arm/src/stm32f7/stm32_i2s.h b/soc/arm/stm32f7/stm32_i2s.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_i2s.h rename to soc/arm/stm32f7/stm32_i2s.h diff --git a/arch/arm/src/stm32f7/stm32_irq.c b/soc/arm/stm32f7/stm32_irq.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_irq.c rename to soc/arm/stm32f7/stm32_irq.c diff --git a/arch/arm/src/stm32f7/stm32_lowputc.c b/soc/arm/stm32f7/stm32_lowputc.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_lowputc.c rename to soc/arm/stm32f7/stm32_lowputc.c diff --git a/arch/arm/src/stm32f7/stm32_lowputc.h b/soc/arm/stm32f7/stm32_lowputc.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_lowputc.h rename to soc/arm/stm32f7/stm32_lowputc.h diff --git a/arch/arm/src/stm32f7/stm32_lse.c b/soc/arm/stm32f7/stm32_lse.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_lse.c rename to soc/arm/stm32f7/stm32_lse.c diff --git a/arch/arm/src/stm32f7/stm32_lsi.c b/soc/arm/stm32f7/stm32_lsi.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_lsi.c rename to soc/arm/stm32f7/stm32_lsi.c diff --git a/arch/arm/src/stm32f7/stm32_ltdc.c b/soc/arm/stm32f7/stm32_ltdc.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_ltdc.c rename to soc/arm/stm32f7/stm32_ltdc.c diff --git a/arch/arm/src/stm32f7/stm32_ltdc.h b/soc/arm/stm32f7/stm32_ltdc.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_ltdc.h rename to soc/arm/stm32f7/stm32_ltdc.h diff --git a/arch/arm/src/stm32f7/stm32_mpuinit.c b/soc/arm/stm32f7/stm32_mpuinit.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_mpuinit.c rename to soc/arm/stm32f7/stm32_mpuinit.c diff --git a/arch/arm/src/stm32f7/stm32_mpuinit.h b/soc/arm/stm32f7/stm32_mpuinit.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_mpuinit.h rename to soc/arm/stm32f7/stm32_mpuinit.h diff --git a/arch/arm/src/stm32f7/stm32_otg.h b/soc/arm/stm32f7/stm32_otg.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_otg.h rename to soc/arm/stm32f7/stm32_otg.h diff --git a/arch/arm/src/stm32f7/stm32_otgdev.c b/soc/arm/stm32f7/stm32_otgdev.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_otgdev.c rename to soc/arm/stm32f7/stm32_otgdev.c diff --git a/arch/arm/src/stm32f7/stm32_otghost.c b/soc/arm/stm32f7/stm32_otghost.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_otghost.c rename to soc/arm/stm32f7/stm32_otghost.c diff --git a/arch/arm/src/stm32f7/stm32_pm.h b/soc/arm/stm32f7/stm32_pm.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_pm.h rename to soc/arm/stm32f7/stm32_pm.h diff --git a/arch/arm/src/stm32f7/stm32_pminitialize.c b/soc/arm/stm32f7/stm32_pminitialize.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_pminitialize.c rename to soc/arm/stm32f7/stm32_pminitialize.c diff --git a/arch/arm/src/stm32f7/stm32_pmsleep.c b/soc/arm/stm32f7/stm32_pmsleep.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_pmsleep.c rename to soc/arm/stm32f7/stm32_pmsleep.c diff --git a/arch/arm/src/stm32f7/stm32_pmstandby.c b/soc/arm/stm32f7/stm32_pmstandby.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_pmstandby.c rename to soc/arm/stm32f7/stm32_pmstandby.c diff --git a/arch/arm/src/stm32f7/stm32_pmstop.c b/soc/arm/stm32f7/stm32_pmstop.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_pmstop.c rename to soc/arm/stm32f7/stm32_pmstop.c diff --git a/arch/arm/src/stm32f7/stm32_pwm.c b/soc/arm/stm32f7/stm32_pwm.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_pwm.c rename to soc/arm/stm32f7/stm32_pwm.c diff --git a/arch/arm/src/stm32f7/stm32_pwm.h b/soc/arm/stm32f7/stm32_pwm.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_pwm.h rename to soc/arm/stm32f7/stm32_pwm.h diff --git a/arch/arm/src/stm32f7/stm32_pwr.c b/soc/arm/stm32f7/stm32_pwr.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_pwr.c rename to soc/arm/stm32f7/stm32_pwr.c diff --git a/arch/arm/src/stm32f7/stm32_pwr.h b/soc/arm/stm32f7/stm32_pwr.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_pwr.h rename to soc/arm/stm32f7/stm32_pwr.h diff --git a/arch/arm/src/stm32f7/stm32_qencoder.c b/soc/arm/stm32f7/stm32_qencoder.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_qencoder.c rename to soc/arm/stm32f7/stm32_qencoder.c diff --git a/arch/arm/src/stm32f7/stm32_qencoder.h b/soc/arm/stm32f7/stm32_qencoder.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_qencoder.h rename to soc/arm/stm32f7/stm32_qencoder.h diff --git a/arch/arm/src/stm32f7/stm32_qspi.c b/soc/arm/stm32f7/stm32_qspi.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_qspi.c rename to soc/arm/stm32f7/stm32_qspi.c diff --git a/arch/arm/src/stm32f7/stm32_qspi.h b/soc/arm/stm32f7/stm32_qspi.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_qspi.h rename to soc/arm/stm32f7/stm32_qspi.h diff --git a/arch/arm/src/stm32f7/stm32_rcc.c b/soc/arm/stm32f7/stm32_rcc.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_rcc.c rename to soc/arm/stm32f7/stm32_rcc.c diff --git a/arch/arm/src/stm32f7/stm32_rcc.h b/soc/arm/stm32f7/stm32_rcc.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_rcc.h rename to soc/arm/stm32f7/stm32_rcc.h diff --git a/arch/arm/src/stm32f7/stm32_rng.c b/soc/arm/stm32f7/stm32_rng.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_rng.c rename to soc/arm/stm32f7/stm32_rng.c diff --git a/arch/arm/src/stm32f7/stm32_rtc.c b/soc/arm/stm32f7/stm32_rtc.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_rtc.c rename to soc/arm/stm32f7/stm32_rtc.c diff --git a/arch/arm/src/stm32f7/stm32_rtc.h b/soc/arm/stm32f7/stm32_rtc.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_rtc.h rename to soc/arm/stm32f7/stm32_rtc.h diff --git a/arch/arm/src/stm32f7/stm32_rtc_lowerhalf.c b/soc/arm/stm32f7/stm32_rtc_lowerhalf.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_rtc_lowerhalf.c rename to soc/arm/stm32f7/stm32_rtc_lowerhalf.c diff --git a/arch/arm/src/stm32f7/stm32_sai.c b/soc/arm/stm32f7/stm32_sai.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_sai.c rename to soc/arm/stm32f7/stm32_sai.c diff --git a/arch/arm/src/stm32f7/stm32_sai.h b/soc/arm/stm32f7/stm32_sai.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_sai.h rename to soc/arm/stm32f7/stm32_sai.h diff --git a/arch/arm/src/stm32f7/stm32_sdmmc.c b/soc/arm/stm32f7/stm32_sdmmc.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_sdmmc.c rename to soc/arm/stm32f7/stm32_sdmmc.c diff --git a/arch/arm/src/stm32f7/stm32_sdmmc.h b/soc/arm/stm32f7/stm32_sdmmc.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_sdmmc.h rename to soc/arm/stm32f7/stm32_sdmmc.h diff --git a/arch/arm/src/stm32f7/stm32_serial.c b/soc/arm/stm32f7/stm32_serial.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_serial.c rename to soc/arm/stm32f7/stm32_serial.c diff --git a/arch/arm/src/stm32f7/stm32_spi.c b/soc/arm/stm32f7/stm32_spi.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_spi.c rename to soc/arm/stm32f7/stm32_spi.c diff --git a/arch/arm/src/stm32f7/stm32_spi.h b/soc/arm/stm32f7/stm32_spi.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_spi.h rename to soc/arm/stm32f7/stm32_spi.h diff --git a/arch/arm/src/stm32f7/stm32_start.c b/soc/arm/stm32f7/stm32_start.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_start.c rename to soc/arm/stm32f7/stm32_start.c diff --git a/arch/arm/src/stm32f7/stm32_start.h b/soc/arm/stm32f7/stm32_start.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_start.h rename to soc/arm/stm32f7/stm32_start.h diff --git a/arch/arm/src/stm32f7/stm32_tickless.c b/soc/arm/stm32f7/stm32_tickless.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_tickless.c rename to soc/arm/stm32f7/stm32_tickless.c diff --git a/arch/arm/src/stm32f7/stm32_tim.c b/soc/arm/stm32f7/stm32_tim.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_tim.c rename to soc/arm/stm32f7/stm32_tim.c diff --git a/arch/arm/src/stm32f7/stm32_tim.h b/soc/arm/stm32f7/stm32_tim.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_tim.h rename to soc/arm/stm32f7/stm32_tim.h diff --git a/arch/arm/src/stm32f7/stm32_tim_lowerhalf.c b/soc/arm/stm32f7/stm32_tim_lowerhalf.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_tim_lowerhalf.c rename to soc/arm/stm32f7/stm32_tim_lowerhalf.c diff --git a/arch/arm/src/stm32f7/stm32_timerisr.c b/soc/arm/stm32f7/stm32_timerisr.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_timerisr.c rename to soc/arm/stm32f7/stm32_timerisr.c diff --git a/arch/arm/src/stm32f7/stm32_uart.h b/soc/arm/stm32f7/stm32_uart.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_uart.h rename to soc/arm/stm32f7/stm32_uart.h diff --git a/arch/arm/src/stm32f7/stm32_uid.c b/soc/arm/stm32f7/stm32_uid.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_uid.c rename to soc/arm/stm32f7/stm32_uid.c diff --git a/arch/arm/src/stm32f7/stm32_uid.h b/soc/arm/stm32f7/stm32_uid.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_uid.h rename to soc/arm/stm32f7/stm32_uid.h diff --git a/arch/arm/src/stm32f7/stm32_usbhost.c b/soc/arm/stm32f7/stm32_usbhost.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_usbhost.c rename to soc/arm/stm32f7/stm32_usbhost.c diff --git a/arch/arm/src/stm32f7/stm32_usbhost.h b/soc/arm/stm32f7/stm32_usbhost.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_usbhost.h rename to soc/arm/stm32f7/stm32_usbhost.h diff --git a/arch/arm/src/stm32f7/stm32_userspace.c b/soc/arm/stm32f7/stm32_userspace.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_userspace.c rename to soc/arm/stm32f7/stm32_userspace.c diff --git a/arch/arm/src/stm32f7/stm32_userspace.h b/soc/arm/stm32f7/stm32_userspace.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_userspace.h rename to soc/arm/stm32f7/stm32_userspace.h diff --git a/arch/arm/src/stm32f7/stm32_waste.c b/soc/arm/stm32f7/stm32_waste.c similarity index 100% rename from arch/arm/src/stm32f7/stm32_waste.c rename to soc/arm/stm32f7/stm32_waste.c diff --git a/arch/arm/src/stm32f7/stm32_waste.h b/soc/arm/stm32f7/stm32_waste.h similarity index 100% rename from arch/arm/src/stm32f7/stm32_waste.h rename to soc/arm/stm32f7/stm32_waste.h diff --git a/arch/arm/src/stm32f7/stm32f72xx73xx_rcc.c b/soc/arm/stm32f7/stm32f72xx73xx_rcc.c similarity index 100% rename from arch/arm/src/stm32f7/stm32f72xx73xx_rcc.c rename to soc/arm/stm32f7/stm32f72xx73xx_rcc.c diff --git a/arch/arm/src/stm32f7/stm32f74xx75xx_rcc.c b/soc/arm/stm32f7/stm32f74xx75xx_rcc.c similarity index 100% rename from arch/arm/src/stm32f7/stm32f74xx75xx_rcc.c rename to soc/arm/stm32f7/stm32f74xx75xx_rcc.c diff --git a/arch/arm/src/stm32f7/stm32f76xx77xx_rcc.c b/soc/arm/stm32f7/stm32f76xx77xx_rcc.c similarity index 100% rename from arch/arm/src/stm32f7/stm32f76xx77xx_rcc.c rename to soc/arm/stm32f7/stm32f76xx77xx_rcc.c diff --git a/arch/arm/src/stm32h5/Kconfig b/soc/arm/stm32h5/Kconfig similarity index 100% rename from arch/arm/src/stm32h5/Kconfig rename to soc/arm/stm32h5/Kconfig diff --git a/arch/arm/src/stm32h5/Make.defs b/soc/arm/stm32h5/Make.defs similarity index 100% rename from arch/arm/src/stm32h5/Make.defs rename to soc/arm/stm32h5/Make.defs diff --git a/arch/arm/src/stm32h5/chip.h b/soc/arm/stm32h5/chip.h similarity index 100% rename from arch/arm/src/stm32h5/chip.h rename to soc/arm/stm32h5/chip.h diff --git a/arch/arm/src/stm32h5/hardware/stm32_adc.h b/soc/arm/stm32h5/hardware/stm32_adc.h similarity index 100% rename from arch/arm/src/stm32h5/hardware/stm32_adc.h rename to soc/arm/stm32h5/hardware/stm32_adc.h diff --git a/arch/arm/src/stm32h5/hardware/stm32_crs.h b/soc/arm/stm32h5/hardware/stm32_crs.h similarity index 100% rename from arch/arm/src/stm32h5/hardware/stm32_crs.h rename to soc/arm/stm32h5/hardware/stm32_crs.h diff --git a/arch/arm/src/stm32h5/hardware/stm32_dbgmcu.h b/soc/arm/stm32h5/hardware/stm32_dbgmcu.h similarity index 100% rename from arch/arm/src/stm32h5/hardware/stm32_dbgmcu.h rename to soc/arm/stm32h5/hardware/stm32_dbgmcu.h diff --git a/arch/arm/src/stm32h5/hardware/stm32_dts.h b/soc/arm/stm32h5/hardware/stm32_dts.h similarity index 100% rename from arch/arm/src/stm32h5/hardware/stm32_dts.h rename to soc/arm/stm32h5/hardware/stm32_dts.h diff --git a/arch/arm/src/stm32h5/hardware/stm32_ethernet.h b/soc/arm/stm32h5/hardware/stm32_ethernet.h similarity index 100% rename from arch/arm/src/stm32h5/hardware/stm32_ethernet.h rename to soc/arm/stm32h5/hardware/stm32_ethernet.h diff --git a/arch/arm/src/stm32h5/hardware/stm32_fdcan.h b/soc/arm/stm32h5/hardware/stm32_fdcan.h similarity index 100% rename from arch/arm/src/stm32h5/hardware/stm32_fdcan.h rename to soc/arm/stm32h5/hardware/stm32_fdcan.h diff --git a/arch/arm/src/stm32h5/hardware/stm32_flash.h b/soc/arm/stm32h5/hardware/stm32_flash.h similarity index 100% rename from arch/arm/src/stm32h5/hardware/stm32_flash.h rename to soc/arm/stm32h5/hardware/stm32_flash.h diff --git a/arch/arm/src/stm32h5/hardware/stm32_gpdma.h b/soc/arm/stm32h5/hardware/stm32_gpdma.h similarity index 100% rename from arch/arm/src/stm32h5/hardware/stm32_gpdma.h rename to soc/arm/stm32h5/hardware/stm32_gpdma.h diff --git a/arch/arm/src/stm32h5/hardware/stm32_gpio.h b/soc/arm/stm32h5/hardware/stm32_gpio.h similarity index 100% rename from arch/arm/src/stm32h5/hardware/stm32_gpio.h rename to soc/arm/stm32h5/hardware/stm32_gpio.h diff --git a/arch/arm/src/stm32h5/hardware/stm32_i2c.h b/soc/arm/stm32h5/hardware/stm32_i2c.h similarity index 100% rename from arch/arm/src/stm32h5/hardware/stm32_i2c.h rename to soc/arm/stm32h5/hardware/stm32_i2c.h diff --git a/arch/arm/src/stm32h5/hardware/stm32_icache.h b/soc/arm/stm32h5/hardware/stm32_icache.h similarity index 100% rename from arch/arm/src/stm32h5/hardware/stm32_icache.h rename to soc/arm/stm32h5/hardware/stm32_icache.h diff --git a/arch/arm/src/stm32h5/hardware/stm32_memorymap.h b/soc/arm/stm32h5/hardware/stm32_memorymap.h similarity index 100% rename from arch/arm/src/stm32h5/hardware/stm32_memorymap.h rename to soc/arm/stm32h5/hardware/stm32_memorymap.h diff --git a/arch/arm/src/stm32h5/hardware/stm32_pinmap.h b/soc/arm/stm32h5/hardware/stm32_pinmap.h similarity index 100% rename from arch/arm/src/stm32h5/hardware/stm32_pinmap.h rename to soc/arm/stm32h5/hardware/stm32_pinmap.h diff --git a/arch/arm/src/stm32h5/hardware/stm32_pwr.h b/soc/arm/stm32h5/hardware/stm32_pwr.h similarity index 100% rename from arch/arm/src/stm32h5/hardware/stm32_pwr.h rename to soc/arm/stm32h5/hardware/stm32_pwr.h diff --git a/arch/arm/src/stm32h5/hardware/stm32_qspi.h b/soc/arm/stm32h5/hardware/stm32_qspi.h similarity index 100% rename from arch/arm/src/stm32h5/hardware/stm32_qspi.h rename to soc/arm/stm32h5/hardware/stm32_qspi.h diff --git a/arch/arm/src/stm32h5/hardware/stm32_rcc.h b/soc/arm/stm32h5/hardware/stm32_rcc.h similarity index 100% rename from arch/arm/src/stm32h5/hardware/stm32_rcc.h rename to soc/arm/stm32h5/hardware/stm32_rcc.h diff --git a/arch/arm/src/stm32h5/hardware/stm32_sbs.h b/soc/arm/stm32h5/hardware/stm32_sbs.h similarity index 100% rename from arch/arm/src/stm32h5/hardware/stm32_sbs.h rename to soc/arm/stm32h5/hardware/stm32_sbs.h diff --git a/arch/arm/src/stm32h5/hardware/stm32_tim.h b/soc/arm/stm32h5/hardware/stm32_tim.h similarity index 100% rename from arch/arm/src/stm32h5/hardware/stm32_tim.h rename to soc/arm/stm32h5/hardware/stm32_tim.h diff --git a/arch/arm/src/stm32h5/hardware/stm32_uart.h b/soc/arm/stm32h5/hardware/stm32_uart.h similarity index 100% rename from arch/arm/src/stm32h5/hardware/stm32_uart.h rename to soc/arm/stm32h5/hardware/stm32_uart.h diff --git a/arch/arm/src/stm32h5/hardware/stm32_usbfs.h b/soc/arm/stm32h5/hardware/stm32_usbfs.h similarity index 100% rename from arch/arm/src/stm32h5/hardware/stm32_usbfs.h rename to soc/arm/stm32h5/hardware/stm32_usbfs.h diff --git a/arch/arm/src/stm32h5/hardware/stm32h56x_dmasigmap.h b/soc/arm/stm32h5/hardware/stm32h56x_dmasigmap.h similarity index 100% rename from arch/arm/src/stm32h5/hardware/stm32h56x_dmasigmap.h rename to soc/arm/stm32h5/hardware/stm32h56x_dmasigmap.h diff --git a/arch/arm/src/stm32h5/hardware/stm32h56xxx_pinmap.h b/soc/arm/stm32h5/hardware/stm32h56xxx_pinmap.h similarity index 100% rename from arch/arm/src/stm32h5/hardware/stm32h56xxx_pinmap.h rename to soc/arm/stm32h5/hardware/stm32h56xxx_pinmap.h diff --git a/arch/arm/src/stm32h5/hardware/stm32h5xxx_flash.h b/soc/arm/stm32h5/hardware/stm32h5xxx_flash.h similarity index 100% rename from arch/arm/src/stm32h5/hardware/stm32h5xxx_flash.h rename to soc/arm/stm32h5/hardware/stm32h5xxx_flash.h diff --git a/arch/arm/src/stm32h5/hardware/stm32h5xxx_gpio.h b/soc/arm/stm32h5/hardware/stm32h5xxx_gpio.h similarity index 100% rename from arch/arm/src/stm32h5/hardware/stm32h5xxx_gpio.h rename to soc/arm/stm32h5/hardware/stm32h5xxx_gpio.h diff --git a/arch/arm/src/stm32h5/hardware/stm32h5xxx_i2c.h b/soc/arm/stm32h5/hardware/stm32h5xxx_i2c.h similarity index 100% rename from arch/arm/src/stm32h5/hardware/stm32h5xxx_i2c.h rename to soc/arm/stm32h5/hardware/stm32h5xxx_i2c.h diff --git a/arch/arm/src/stm32h5/hardware/stm32h5xxx_memorymap.h b/soc/arm/stm32h5/hardware/stm32h5xxx_memorymap.h similarity index 100% rename from arch/arm/src/stm32h5/hardware/stm32h5xxx_memorymap.h rename to soc/arm/stm32h5/hardware/stm32h5xxx_memorymap.h diff --git a/arch/arm/src/stm32h5/hardware/stm32h5xxx_pwr.h b/soc/arm/stm32h5/hardware/stm32h5xxx_pwr.h similarity index 100% rename from arch/arm/src/stm32h5/hardware/stm32h5xxx_pwr.h rename to soc/arm/stm32h5/hardware/stm32h5xxx_pwr.h diff --git a/arch/arm/src/stm32h5/hardware/stm32h5xxx_rcc.h b/soc/arm/stm32h5/hardware/stm32h5xxx_rcc.h similarity index 100% rename from arch/arm/src/stm32h5/hardware/stm32h5xxx_rcc.h rename to soc/arm/stm32h5/hardware/stm32h5xxx_rcc.h diff --git a/arch/arm/src/stm32h5/hardware/stm32h5xxx_spi.h b/soc/arm/stm32h5/hardware/stm32h5xxx_spi.h similarity index 100% rename from arch/arm/src/stm32h5/hardware/stm32h5xxx_spi.h rename to soc/arm/stm32h5/hardware/stm32h5xxx_spi.h diff --git a/arch/arm/src/stm32h5/hardware/stm32h5xxx_uart.h b/soc/arm/stm32h5/hardware/stm32h5xxx_uart.h similarity index 100% rename from arch/arm/src/stm32h5/hardware/stm32h5xxx_uart.h rename to soc/arm/stm32h5/hardware/stm32h5xxx_uart.h diff --git a/arch/arm/src/stm32h5/stm32.h b/soc/arm/stm32h5/stm32.h similarity index 100% rename from arch/arm/src/stm32h5/stm32.h rename to soc/arm/stm32h5/stm32.h diff --git a/arch/arm/src/stm32h5/stm32_adc.c b/soc/arm/stm32h5/stm32_adc.c similarity index 100% rename from arch/arm/src/stm32h5/stm32_adc.c rename to soc/arm/stm32h5/stm32_adc.c diff --git a/arch/arm/src/stm32h5/stm32_adc.h b/soc/arm/stm32h5/stm32_adc.h similarity index 100% rename from arch/arm/src/stm32h5/stm32_adc.h rename to soc/arm/stm32h5/stm32_adc.h diff --git a/arch/arm/src/stm32h5/stm32_dbgmcu.h b/soc/arm/stm32h5/stm32_dbgmcu.h similarity index 100% rename from arch/arm/src/stm32h5/stm32_dbgmcu.h rename to soc/arm/stm32h5/stm32_dbgmcu.h diff --git a/arch/arm/src/stm32h5/stm32_dma.c b/soc/arm/stm32h5/stm32_dma.c similarity index 100% rename from arch/arm/src/stm32h5/stm32_dma.c rename to soc/arm/stm32h5/stm32_dma.c diff --git a/arch/arm/src/stm32h5/stm32_dma.h b/soc/arm/stm32h5/stm32_dma.h similarity index 100% rename from arch/arm/src/stm32h5/stm32_dma.h rename to soc/arm/stm32h5/stm32_dma.h diff --git a/arch/arm/src/stm32h5/stm32_dts.c b/soc/arm/stm32h5/stm32_dts.c similarity index 100% rename from arch/arm/src/stm32h5/stm32_dts.c rename to soc/arm/stm32h5/stm32_dts.c diff --git a/arch/arm/src/stm32h5/stm32_dts.h b/soc/arm/stm32h5/stm32_dts.h similarity index 100% rename from arch/arm/src/stm32h5/stm32_dts.h rename to soc/arm/stm32h5/stm32_dts.h diff --git a/arch/arm/src/stm32h5/stm32_ethernet.c b/soc/arm/stm32h5/stm32_ethernet.c similarity index 100% rename from arch/arm/src/stm32h5/stm32_ethernet.c rename to soc/arm/stm32h5/stm32_ethernet.c diff --git a/arch/arm/src/stm32h5/stm32_ethernet.h b/soc/arm/stm32h5/stm32_ethernet.h similarity index 100% rename from arch/arm/src/stm32h5/stm32_ethernet.h rename to soc/arm/stm32h5/stm32_ethernet.h diff --git a/arch/arm/src/stm32h5/stm32_fdcan.c b/soc/arm/stm32h5/stm32_fdcan.c similarity index 100% rename from arch/arm/src/stm32h5/stm32_fdcan.c rename to soc/arm/stm32h5/stm32_fdcan.c diff --git a/arch/arm/src/stm32h5/stm32_fdcan.h b/soc/arm/stm32h5/stm32_fdcan.h similarity index 100% rename from arch/arm/src/stm32h5/stm32_fdcan.h rename to soc/arm/stm32h5/stm32_fdcan.h diff --git a/arch/arm/src/stm32h5/stm32_flash.c b/soc/arm/stm32h5/stm32_flash.c similarity index 100% rename from arch/arm/src/stm32h5/stm32_flash.c rename to soc/arm/stm32h5/stm32_flash.c diff --git a/arch/arm/src/stm32h5/stm32_flash.h b/soc/arm/stm32h5/stm32_flash.h similarity index 100% rename from arch/arm/src/stm32h5/stm32_flash.h rename to soc/arm/stm32h5/stm32_flash.h diff --git a/arch/arm/src/stm32h5/stm32_gpio.c b/soc/arm/stm32h5/stm32_gpio.c similarity index 100% rename from arch/arm/src/stm32h5/stm32_gpio.c rename to soc/arm/stm32h5/stm32_gpio.c diff --git a/arch/arm/src/stm32h5/stm32_gpio.h b/soc/arm/stm32h5/stm32_gpio.h similarity index 100% rename from arch/arm/src/stm32h5/stm32_gpio.h rename to soc/arm/stm32h5/stm32_gpio.h diff --git a/arch/arm/src/stm32h5/stm32_hsi48.c b/soc/arm/stm32h5/stm32_hsi48.c similarity index 100% rename from arch/arm/src/stm32h5/stm32_hsi48.c rename to soc/arm/stm32h5/stm32_hsi48.c diff --git a/arch/arm/src/stm32h5/stm32_hsi48.h b/soc/arm/stm32h5/stm32_hsi48.h similarity index 100% rename from arch/arm/src/stm32h5/stm32_hsi48.h rename to soc/arm/stm32h5/stm32_hsi48.h diff --git a/arch/arm/src/stm32h5/stm32_i2c.c b/soc/arm/stm32h5/stm32_i2c.c similarity index 100% rename from arch/arm/src/stm32h5/stm32_i2c.c rename to soc/arm/stm32h5/stm32_i2c.c diff --git a/arch/arm/src/stm32h5/stm32_i2c.h b/soc/arm/stm32h5/stm32_i2c.h similarity index 100% rename from arch/arm/src/stm32h5/stm32_i2c.h rename to soc/arm/stm32h5/stm32_i2c.h diff --git a/arch/arm/src/stm32h5/stm32_icache.c b/soc/arm/stm32h5/stm32_icache.c similarity index 100% rename from arch/arm/src/stm32h5/stm32_icache.c rename to soc/arm/stm32h5/stm32_icache.c diff --git a/arch/arm/src/stm32h5/stm32_icache.h b/soc/arm/stm32h5/stm32_icache.h similarity index 100% rename from arch/arm/src/stm32h5/stm32_icache.h rename to soc/arm/stm32h5/stm32_icache.h diff --git a/arch/arm/src/stm32h5/stm32_idle.c b/soc/arm/stm32h5/stm32_idle.c similarity index 100% rename from arch/arm/src/stm32h5/stm32_idle.c rename to soc/arm/stm32h5/stm32_idle.c diff --git a/arch/arm/src/stm32h5/stm32_irq.c b/soc/arm/stm32h5/stm32_irq.c similarity index 100% rename from arch/arm/src/stm32h5/stm32_irq.c rename to soc/arm/stm32h5/stm32_irq.c diff --git a/arch/arm/src/stm32h5/stm32_lowputc.c b/soc/arm/stm32h5/stm32_lowputc.c similarity index 100% rename from arch/arm/src/stm32h5/stm32_lowputc.c rename to soc/arm/stm32h5/stm32_lowputc.c diff --git a/arch/arm/src/stm32h5/stm32_lowputc.h b/soc/arm/stm32h5/stm32_lowputc.h similarity index 100% rename from arch/arm/src/stm32h5/stm32_lowputc.h rename to soc/arm/stm32h5/stm32_lowputc.h diff --git a/arch/arm/src/stm32h5/stm32_lse.c b/soc/arm/stm32h5/stm32_lse.c similarity index 100% rename from arch/arm/src/stm32h5/stm32_lse.c rename to soc/arm/stm32h5/stm32_lse.c diff --git a/arch/arm/src/stm32h5/stm32_lsi.c b/soc/arm/stm32h5/stm32_lsi.c similarity index 100% rename from arch/arm/src/stm32h5/stm32_lsi.c rename to soc/arm/stm32h5/stm32_lsi.c diff --git a/arch/arm/src/stm32h5/stm32_pwr.c b/soc/arm/stm32h5/stm32_pwr.c similarity index 100% rename from arch/arm/src/stm32h5/stm32_pwr.c rename to soc/arm/stm32h5/stm32_pwr.c diff --git a/arch/arm/src/stm32h5/stm32_pwr.h b/soc/arm/stm32h5/stm32_pwr.h similarity index 100% rename from arch/arm/src/stm32h5/stm32_pwr.h rename to soc/arm/stm32h5/stm32_pwr.h diff --git a/arch/arm/src/stm32h5/stm32_qspi.c b/soc/arm/stm32h5/stm32_qspi.c similarity index 100% rename from arch/arm/src/stm32h5/stm32_qspi.c rename to soc/arm/stm32h5/stm32_qspi.c diff --git a/arch/arm/src/stm32h5/stm32_qspi.h b/soc/arm/stm32h5/stm32_qspi.h similarity index 100% rename from arch/arm/src/stm32h5/stm32_qspi.h rename to soc/arm/stm32h5/stm32_qspi.h diff --git a/arch/arm/src/stm32h5/stm32_rcc.c b/soc/arm/stm32h5/stm32_rcc.c similarity index 100% rename from arch/arm/src/stm32h5/stm32_rcc.c rename to soc/arm/stm32h5/stm32_rcc.c diff --git a/arch/arm/src/stm32h5/stm32_rcc.h b/soc/arm/stm32h5/stm32_rcc.h similarity index 100% rename from arch/arm/src/stm32h5/stm32_rcc.h rename to soc/arm/stm32h5/stm32_rcc.h diff --git a/arch/arm/src/stm32h5/stm32_serial.c b/soc/arm/stm32h5/stm32_serial.c similarity index 100% rename from arch/arm/src/stm32h5/stm32_serial.c rename to soc/arm/stm32h5/stm32_serial.c diff --git a/arch/arm/src/stm32h5/stm32_spi.c b/soc/arm/stm32h5/stm32_spi.c similarity index 100% rename from arch/arm/src/stm32h5/stm32_spi.c rename to soc/arm/stm32h5/stm32_spi.c diff --git a/arch/arm/src/stm32h5/stm32_spi.h b/soc/arm/stm32h5/stm32_spi.h similarity index 100% rename from arch/arm/src/stm32h5/stm32_spi.h rename to soc/arm/stm32h5/stm32_spi.h diff --git a/arch/arm/src/stm32h5/stm32_start.c b/soc/arm/stm32h5/stm32_start.c similarity index 100% rename from arch/arm/src/stm32h5/stm32_start.c rename to soc/arm/stm32h5/stm32_start.c diff --git a/arch/arm/src/stm32h5/stm32_start.h b/soc/arm/stm32h5/stm32_start.h similarity index 100% rename from arch/arm/src/stm32h5/stm32_start.h rename to soc/arm/stm32h5/stm32_start.h diff --git a/arch/arm/src/stm32h5/stm32_tim.c b/soc/arm/stm32h5/stm32_tim.c similarity index 100% rename from arch/arm/src/stm32h5/stm32_tim.c rename to soc/arm/stm32h5/stm32_tim.c diff --git a/arch/arm/src/stm32h5/stm32_tim.h b/soc/arm/stm32h5/stm32_tim.h similarity index 100% rename from arch/arm/src/stm32h5/stm32_tim.h rename to soc/arm/stm32h5/stm32_tim.h diff --git a/arch/arm/src/stm32h5/stm32_tim_lowerhalf.c b/soc/arm/stm32h5/stm32_tim_lowerhalf.c similarity index 100% rename from arch/arm/src/stm32h5/stm32_tim_lowerhalf.c rename to soc/arm/stm32h5/stm32_tim_lowerhalf.c diff --git a/arch/arm/src/stm32h5/stm32_timerisr.c b/soc/arm/stm32h5/stm32_timerisr.c similarity index 100% rename from arch/arm/src/stm32h5/stm32_timerisr.c rename to soc/arm/stm32h5/stm32_timerisr.c diff --git a/arch/arm/src/stm32h5/stm32_uart.h b/soc/arm/stm32h5/stm32_uart.h similarity index 100% rename from arch/arm/src/stm32h5/stm32_uart.h rename to soc/arm/stm32h5/stm32_uart.h diff --git a/arch/arm/src/stm32h5/stm32_uid.c b/soc/arm/stm32h5/stm32_uid.c similarity index 100% rename from arch/arm/src/stm32h5/stm32_uid.c rename to soc/arm/stm32h5/stm32_uid.c diff --git a/arch/arm/src/stm32h5/stm32_uid.h b/soc/arm/stm32h5/stm32_uid.h similarity index 100% rename from arch/arm/src/stm32h5/stm32_uid.h rename to soc/arm/stm32h5/stm32_uid.h diff --git a/arch/arm/src/stm32h5/stm32_usbfs.c b/soc/arm/stm32h5/stm32_usbfs.c similarity index 100% rename from arch/arm/src/stm32h5/stm32_usbfs.c rename to soc/arm/stm32h5/stm32_usbfs.c diff --git a/arch/arm/src/stm32h5/stm32_usbfs.h b/soc/arm/stm32h5/stm32_usbfs.h similarity index 100% rename from arch/arm/src/stm32h5/stm32_usbfs.h rename to soc/arm/stm32h5/stm32_usbfs.h diff --git a/arch/arm/src/stm32h5/stm32h563xx_flash.c b/soc/arm/stm32h5/stm32h563xx_flash.c similarity index 100% rename from arch/arm/src/stm32h5/stm32h563xx_flash.c rename to soc/arm/stm32h5/stm32h563xx_flash.c diff --git a/arch/arm/src/stm32h5/stm32h5xx_rcc.c b/soc/arm/stm32h5/stm32h5xx_rcc.c similarity index 100% rename from arch/arm/src/stm32h5/stm32h5xx_rcc.c rename to soc/arm/stm32h5/stm32h5xx_rcc.c diff --git a/arch/arm/src/stm32h7/CMakeLists.txt b/soc/arm/stm32h7/CMakeLists.txt similarity index 100% rename from arch/arm/src/stm32h7/CMakeLists.txt rename to soc/arm/stm32h7/CMakeLists.txt diff --git a/arch/arm/src/stm32h7/Kconfig b/soc/arm/stm32h7/Kconfig similarity index 100% rename from arch/arm/src/stm32h7/Kconfig rename to soc/arm/stm32h7/Kconfig diff --git a/arch/arm/src/stm32h7/Make.defs b/soc/arm/stm32h7/Make.defs similarity index 100% rename from arch/arm/src/stm32h7/Make.defs rename to soc/arm/stm32h7/Make.defs diff --git a/arch/arm/src/stm32h7/hardware/stm32_adc.h b/soc/arm/stm32h7/hardware/stm32_adc.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32_adc.h rename to soc/arm/stm32h7/hardware/stm32_adc.h diff --git a/arch/arm/src/stm32h7/hardware/stm32_axi.h b/soc/arm/stm32h7/hardware/stm32_axi.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32_axi.h rename to soc/arm/stm32h7/hardware/stm32_axi.h diff --git a/arch/arm/src/stm32h7/hardware/stm32_bdma.h b/soc/arm/stm32h7/hardware/stm32_bdma.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32_bdma.h rename to soc/arm/stm32h7/hardware/stm32_bdma.h diff --git a/arch/arm/src/stm32h7/hardware/stm32_dac.h b/soc/arm/stm32h7/hardware/stm32_dac.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32_dac.h rename to soc/arm/stm32h7/hardware/stm32_dac.h diff --git a/arch/arm/src/stm32h7/hardware/stm32_dma.h b/soc/arm/stm32h7/hardware/stm32_dma.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32_dma.h rename to soc/arm/stm32h7/hardware/stm32_dma.h diff --git a/arch/arm/src/stm32h7/hardware/stm32_dmamux.h b/soc/arm/stm32h7/hardware/stm32_dmamux.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32_dmamux.h rename to soc/arm/stm32h7/hardware/stm32_dmamux.h diff --git a/arch/arm/src/stm32h7/hardware/stm32_ethernet.h b/soc/arm/stm32h7/hardware/stm32_ethernet.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32_ethernet.h rename to soc/arm/stm32h7/hardware/stm32_ethernet.h diff --git a/arch/arm/src/stm32h7/hardware/stm32_exti.h b/soc/arm/stm32h7/hardware/stm32_exti.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32_exti.h rename to soc/arm/stm32h7/hardware/stm32_exti.h diff --git a/arch/arm/src/stm32h7/hardware/stm32_fdcan.h b/soc/arm/stm32h7/hardware/stm32_fdcan.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32_fdcan.h rename to soc/arm/stm32h7/hardware/stm32_fdcan.h diff --git a/arch/arm/src/stm32h7/hardware/stm32_flash.h b/soc/arm/stm32h7/hardware/stm32_flash.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32_flash.h rename to soc/arm/stm32h7/hardware/stm32_flash.h diff --git a/arch/arm/src/stm32h7/hardware/stm32_fmc.h b/soc/arm/stm32h7/hardware/stm32_fmc.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32_fmc.h rename to soc/arm/stm32h7/hardware/stm32_fmc.h diff --git a/arch/arm/src/stm32h7/hardware/stm32_gpio.h b/soc/arm/stm32h7/hardware/stm32_gpio.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32_gpio.h rename to soc/arm/stm32h7/hardware/stm32_gpio.h diff --git a/arch/arm/src/stm32h7/hardware/stm32_hsem.h b/soc/arm/stm32h7/hardware/stm32_hsem.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32_hsem.h rename to soc/arm/stm32h7/hardware/stm32_hsem.h diff --git a/arch/arm/src/stm32h7/hardware/stm32_i2c.h b/soc/arm/stm32h7/hardware/stm32_i2c.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32_i2c.h rename to soc/arm/stm32h7/hardware/stm32_i2c.h diff --git a/arch/arm/src/stm32h7/hardware/stm32_lptim.h b/soc/arm/stm32h7/hardware/stm32_lptim.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32_lptim.h rename to soc/arm/stm32h7/hardware/stm32_lptim.h diff --git a/arch/arm/src/stm32h7/hardware/stm32_ltdc.h b/soc/arm/stm32h7/hardware/stm32_ltdc.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32_ltdc.h rename to soc/arm/stm32h7/hardware/stm32_ltdc.h diff --git a/arch/arm/src/stm32h7/hardware/stm32_mdma.h b/soc/arm/stm32h7/hardware/stm32_mdma.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32_mdma.h rename to soc/arm/stm32h7/hardware/stm32_mdma.h diff --git a/arch/arm/src/stm32h7/hardware/stm32_memorymap.h b/soc/arm/stm32h7/hardware/stm32_memorymap.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32_memorymap.h rename to soc/arm/stm32h7/hardware/stm32_memorymap.h diff --git a/arch/arm/src/stm32h7/hardware/stm32_otg.h b/soc/arm/stm32h7/hardware/stm32_otg.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32_otg.h rename to soc/arm/stm32h7/hardware/stm32_otg.h diff --git a/arch/arm/src/stm32h7/hardware/stm32_pinmap.h b/soc/arm/stm32h7/hardware/stm32_pinmap.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32_pinmap.h rename to soc/arm/stm32h7/hardware/stm32_pinmap.h diff --git a/arch/arm/src/stm32h7/hardware/stm32_pwr.h b/soc/arm/stm32h7/hardware/stm32_pwr.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32_pwr.h rename to soc/arm/stm32h7/hardware/stm32_pwr.h diff --git a/arch/arm/src/stm32h7/hardware/stm32_qspi.h b/soc/arm/stm32h7/hardware/stm32_qspi.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32_qspi.h rename to soc/arm/stm32h7/hardware/stm32_qspi.h diff --git a/arch/arm/src/stm32h7/hardware/stm32_rcc.h b/soc/arm/stm32h7/hardware/stm32_rcc.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32_rcc.h rename to soc/arm/stm32h7/hardware/stm32_rcc.h diff --git a/arch/arm/src/stm32h7/hardware/stm32_rng.h b/soc/arm/stm32h7/hardware/stm32_rng.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32_rng.h rename to soc/arm/stm32h7/hardware/stm32_rng.h diff --git a/arch/arm/src/stm32h7/hardware/stm32_rtcc.h b/soc/arm/stm32h7/hardware/stm32_rtcc.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32_rtcc.h rename to soc/arm/stm32h7/hardware/stm32_rtcc.h diff --git a/arch/arm/src/stm32h7/hardware/stm32_sdmmc.h b/soc/arm/stm32h7/hardware/stm32_sdmmc.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32_sdmmc.h rename to soc/arm/stm32h7/hardware/stm32_sdmmc.h diff --git a/arch/arm/src/stm32h7/hardware/stm32_spi.h b/soc/arm/stm32h7/hardware/stm32_spi.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32_spi.h rename to soc/arm/stm32h7/hardware/stm32_spi.h diff --git a/arch/arm/src/stm32h7/hardware/stm32_syscfg.h b/soc/arm/stm32h7/hardware/stm32_syscfg.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32_syscfg.h rename to soc/arm/stm32h7/hardware/stm32_syscfg.h diff --git a/arch/arm/src/stm32h7/hardware/stm32_tim.h b/soc/arm/stm32h7/hardware/stm32_tim.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32_tim.h rename to soc/arm/stm32h7/hardware/stm32_tim.h diff --git a/arch/arm/src/stm32h7/hardware/stm32_uart.h b/soc/arm/stm32h7/hardware/stm32_uart.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32_uart.h rename to soc/arm/stm32h7/hardware/stm32_uart.h diff --git a/arch/arm/src/stm32h7/hardware/stm32_wdg.h b/soc/arm/stm32h7/hardware/stm32_wdg.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32_wdg.h rename to soc/arm/stm32h7/hardware/stm32_wdg.h diff --git a/arch/arm/src/stm32h7/hardware/stm32h7b3xx_flash.h b/soc/arm/stm32h7/hardware/stm32h7b3xx_flash.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32h7b3xx_flash.h rename to soc/arm/stm32h7/hardware/stm32h7b3xx_flash.h diff --git a/arch/arm/src/stm32h7/hardware/stm32h7x3xx_dmamux.h b/soc/arm/stm32h7/hardware/stm32h7x3xx_dmamux.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32h7x3xx_dmamux.h rename to soc/arm/stm32h7/hardware/stm32h7x3xx_dmamux.h diff --git a/arch/arm/src/stm32h7/hardware/stm32h7x3xx_flash.h b/soc/arm/stm32h7/hardware/stm32h7x3xx_flash.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32h7x3xx_flash.h rename to soc/arm/stm32h7/hardware/stm32h7x3xx_flash.h diff --git a/arch/arm/src/stm32h7/hardware/stm32h7x3xx_gpio.h b/soc/arm/stm32h7/hardware/stm32h7x3xx_gpio.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32h7x3xx_gpio.h rename to soc/arm/stm32h7/hardware/stm32h7x3xx_gpio.h diff --git a/arch/arm/src/stm32h7/hardware/stm32h7x3xx_i2c.h b/soc/arm/stm32h7/hardware/stm32h7x3xx_i2c.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32h7x3xx_i2c.h rename to soc/arm/stm32h7/hardware/stm32h7x3xx_i2c.h diff --git a/arch/arm/src/stm32h7/hardware/stm32h7x3xx_memorymap.h b/soc/arm/stm32h7/hardware/stm32h7x3xx_memorymap.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32h7x3xx_memorymap.h rename to soc/arm/stm32h7/hardware/stm32h7x3xx_memorymap.h diff --git a/arch/arm/src/stm32h7/hardware/stm32h7x3xx_pinmap.h b/soc/arm/stm32h7/hardware/stm32h7x3xx_pinmap.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32h7x3xx_pinmap.h rename to soc/arm/stm32h7/hardware/stm32h7x3xx_pinmap.h diff --git a/arch/arm/src/stm32h7/hardware/stm32h7x3xx_pinmap_legacy.h b/soc/arm/stm32h7/hardware/stm32h7x3xx_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32h7x3xx_pinmap_legacy.h rename to soc/arm/stm32h7/hardware/stm32h7x3xx_pinmap_legacy.h diff --git a/arch/arm/src/stm32h7/hardware/stm32h7x3xx_pwr.h b/soc/arm/stm32h7/hardware/stm32h7x3xx_pwr.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32h7x3xx_pwr.h rename to soc/arm/stm32h7/hardware/stm32h7x3xx_pwr.h diff --git a/arch/arm/src/stm32h7/hardware/stm32h7x3xx_rcc.h b/soc/arm/stm32h7/hardware/stm32h7x3xx_rcc.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32h7x3xx_rcc.h rename to soc/arm/stm32h7/hardware/stm32h7x3xx_rcc.h diff --git a/arch/arm/src/stm32h7/hardware/stm32h7x3xx_sdmmc.h b/soc/arm/stm32h7/hardware/stm32h7x3xx_sdmmc.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32h7x3xx_sdmmc.h rename to soc/arm/stm32h7/hardware/stm32h7x3xx_sdmmc.h diff --git a/arch/arm/src/stm32h7/hardware/stm32h7x3xx_spi.h b/soc/arm/stm32h7/hardware/stm32h7x3xx_spi.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32h7x3xx_spi.h rename to soc/arm/stm32h7/hardware/stm32h7x3xx_spi.h diff --git a/arch/arm/src/stm32h7/hardware/stm32h7x3xx_syscfg.h b/soc/arm/stm32h7/hardware/stm32h7x3xx_syscfg.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32h7x3xx_syscfg.h rename to soc/arm/stm32h7/hardware/stm32h7x3xx_syscfg.h diff --git a/arch/arm/src/stm32h7/hardware/stm32h7x3xx_uart.h b/soc/arm/stm32h7/hardware/stm32h7x3xx_uart.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32h7x3xx_uart.h rename to soc/arm/stm32h7/hardware/stm32h7x3xx_uart.h diff --git a/arch/arm/src/stm32h7/hardware/stm32h7xxx_dbgmcu.h b/soc/arm/stm32h7/hardware/stm32h7xxx_dbgmcu.h similarity index 100% rename from arch/arm/src/stm32h7/hardware/stm32h7xxx_dbgmcu.h rename to soc/arm/stm32h7/hardware/stm32h7xxx_dbgmcu.h diff --git a/arch/arm/src/stm32h7/stm32.h b/soc/arm/stm32h7/stm32.h similarity index 100% rename from arch/arm/src/stm32h7/stm32.h rename to soc/arm/stm32h7/stm32.h diff --git a/arch/arm/src/stm32h7/stm32_adc.c b/soc/arm/stm32h7/stm32_adc.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_adc.c rename to soc/arm/stm32h7/stm32_adc.c diff --git a/arch/arm/src/stm32h7/stm32_adc.h b/soc/arm/stm32h7/stm32_adc.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_adc.h rename to soc/arm/stm32h7/stm32_adc.h diff --git a/arch/arm/src/stm32h7/stm32_alarm.h b/soc/arm/stm32h7/stm32_alarm.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_alarm.h rename to soc/arm/stm32h7/stm32_alarm.h diff --git a/arch/arm/src/stm32h7/stm32_allocateheap.c b/soc/arm/stm32h7/stm32_allocateheap.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_allocateheap.c rename to soc/arm/stm32h7/stm32_allocateheap.c diff --git a/arch/arm/src/stm32h7/stm32_bbsram.c b/soc/arm/stm32h7/stm32_bbsram.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_bbsram.c rename to soc/arm/stm32h7/stm32_bbsram.c diff --git a/arch/arm/src/stm32h7/stm32_bbsram.h b/soc/arm/stm32h7/stm32_bbsram.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_bbsram.h rename to soc/arm/stm32h7/stm32_bbsram.h diff --git a/arch/arm/src/stm32h7/stm32_capture.c b/soc/arm/stm32h7/stm32_capture.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_capture.c rename to soc/arm/stm32h7/stm32_capture.c diff --git a/arch/arm/src/stm32h7/stm32_capture.h b/soc/arm/stm32h7/stm32_capture.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_capture.h rename to soc/arm/stm32h7/stm32_capture.h diff --git a/arch/arm/src/stm32h7/stm32_capture_lowerhalf.c b/soc/arm/stm32h7/stm32_capture_lowerhalf.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_capture_lowerhalf.c rename to soc/arm/stm32h7/stm32_capture_lowerhalf.c diff --git a/arch/arm/src/stm32h7/stm32_dbgmcu.h b/soc/arm/stm32h7/stm32_dbgmcu.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_dbgmcu.h rename to soc/arm/stm32h7/stm32_dbgmcu.h diff --git a/arch/arm/src/stm32h7/stm32_dma.c b/soc/arm/stm32h7/stm32_dma.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_dma.c rename to soc/arm/stm32h7/stm32_dma.c diff --git a/arch/arm/src/stm32h7/stm32_dma.h b/soc/arm/stm32h7/stm32_dma.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_dma.h rename to soc/arm/stm32h7/stm32_dma.h diff --git a/arch/arm/src/stm32h7/stm32_dtcm.c b/soc/arm/stm32h7/stm32_dtcm.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_dtcm.c rename to soc/arm/stm32h7/stm32_dtcm.c diff --git a/arch/arm/src/stm32h7/stm32_dtcm.h b/soc/arm/stm32h7/stm32_dtcm.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_dtcm.h rename to soc/arm/stm32h7/stm32_dtcm.h diff --git a/arch/arm/src/stm32h7/stm32_dualcore.c b/soc/arm/stm32h7/stm32_dualcore.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_dualcore.c rename to soc/arm/stm32h7/stm32_dualcore.c diff --git a/arch/arm/src/stm32h7/stm32_dualcore.h b/soc/arm/stm32h7/stm32_dualcore.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_dualcore.h rename to soc/arm/stm32h7/stm32_dualcore.h diff --git a/arch/arm/src/stm32h7/stm32_ethernet.c b/soc/arm/stm32h7/stm32_ethernet.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_ethernet.c rename to soc/arm/stm32h7/stm32_ethernet.c diff --git a/arch/arm/src/stm32h7/stm32_ethernet.h b/soc/arm/stm32h7/stm32_ethernet.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_ethernet.h rename to soc/arm/stm32h7/stm32_ethernet.h diff --git a/arch/arm/src/stm32h7/stm32_exti.h b/soc/arm/stm32h7/stm32_exti.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_exti.h rename to soc/arm/stm32h7/stm32_exti.h diff --git a/arch/arm/src/stm32h7/stm32_exti_alarm.c b/soc/arm/stm32h7/stm32_exti_alarm.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_exti_alarm.c rename to soc/arm/stm32h7/stm32_exti_alarm.c diff --git a/arch/arm/src/stm32h7/stm32_exti_gpio.c b/soc/arm/stm32h7/stm32_exti_gpio.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_exti_gpio.c rename to soc/arm/stm32h7/stm32_exti_gpio.c diff --git a/arch/arm/src/stm32h7/stm32_exti_wakeup.c b/soc/arm/stm32h7/stm32_exti_wakeup.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_exti_wakeup.c rename to soc/arm/stm32h7/stm32_exti_wakeup.c diff --git a/arch/arm/src/stm32h7/stm32_fdcan_sock.c b/soc/arm/stm32h7/stm32_fdcan_sock.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_fdcan_sock.c rename to soc/arm/stm32h7/stm32_fdcan_sock.c diff --git a/arch/arm/src/stm32h7/stm32_fdcan_sock.h b/soc/arm/stm32h7/stm32_fdcan_sock.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_fdcan_sock.h rename to soc/arm/stm32h7/stm32_fdcan_sock.h diff --git a/arch/arm/src/stm32h7/stm32_flash.c b/soc/arm/stm32h7/stm32_flash.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_flash.c rename to soc/arm/stm32h7/stm32_flash.c diff --git a/arch/arm/src/stm32h7/stm32_flash.h b/soc/arm/stm32h7/stm32_flash.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_flash.h rename to soc/arm/stm32h7/stm32_flash.h diff --git a/arch/arm/src/stm32h7/stm32_fmc.c b/soc/arm/stm32h7/stm32_fmc.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_fmc.c rename to soc/arm/stm32h7/stm32_fmc.c diff --git a/arch/arm/src/stm32h7/stm32_fmc.h b/soc/arm/stm32h7/stm32_fmc.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_fmc.h rename to soc/arm/stm32h7/stm32_fmc.h diff --git a/arch/arm/src/stm32h7/stm32_gpio.c b/soc/arm/stm32h7/stm32_gpio.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_gpio.c rename to soc/arm/stm32h7/stm32_gpio.c diff --git a/arch/arm/src/stm32h7/stm32_gpio.h b/soc/arm/stm32h7/stm32_gpio.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_gpio.h rename to soc/arm/stm32h7/stm32_gpio.h diff --git a/arch/arm/src/stm32h7/stm32_hsem.c b/soc/arm/stm32h7/stm32_hsem.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_hsem.c rename to soc/arm/stm32h7/stm32_hsem.c diff --git a/arch/arm/src/stm32h7/stm32_hsem.h b/soc/arm/stm32h7/stm32_hsem.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_hsem.h rename to soc/arm/stm32h7/stm32_hsem.h diff --git a/arch/arm/src/stm32h7/stm32_i2c.c b/soc/arm/stm32h7/stm32_i2c.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_i2c.c rename to soc/arm/stm32h7/stm32_i2c.c diff --git a/arch/arm/src/stm32h7/stm32_i2c.h b/soc/arm/stm32h7/stm32_i2c.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_i2c.h rename to soc/arm/stm32h7/stm32_i2c.h diff --git a/arch/arm/src/stm32h7/stm32_irq.c b/soc/arm/stm32h7/stm32_irq.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_irq.c rename to soc/arm/stm32h7/stm32_irq.c diff --git a/arch/arm/src/stm32h7/stm32_iwdg.c b/soc/arm/stm32h7/stm32_iwdg.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_iwdg.c rename to soc/arm/stm32h7/stm32_iwdg.c diff --git a/arch/arm/src/stm32h7/stm32_lowputc.c b/soc/arm/stm32h7/stm32_lowputc.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_lowputc.c rename to soc/arm/stm32h7/stm32_lowputc.c diff --git a/arch/arm/src/stm32h7/stm32_lowputc.h b/soc/arm/stm32h7/stm32_lowputc.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_lowputc.h rename to soc/arm/stm32h7/stm32_lowputc.h diff --git a/arch/arm/src/stm32h7/stm32_lptim.c b/soc/arm/stm32h7/stm32_lptim.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_lptim.c rename to soc/arm/stm32h7/stm32_lptim.c diff --git a/arch/arm/src/stm32h7/stm32_lptim.h b/soc/arm/stm32h7/stm32_lptim.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_lptim.h rename to soc/arm/stm32h7/stm32_lptim.h diff --git a/arch/arm/src/stm32h7/stm32_lse.c b/soc/arm/stm32h7/stm32_lse.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_lse.c rename to soc/arm/stm32h7/stm32_lse.c diff --git a/arch/arm/src/stm32h7/stm32_lsi.c b/soc/arm/stm32h7/stm32_lsi.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_lsi.c rename to soc/arm/stm32h7/stm32_lsi.c diff --git a/arch/arm/src/stm32h7/stm32_ltdc.c b/soc/arm/stm32h7/stm32_ltdc.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_ltdc.c rename to soc/arm/stm32h7/stm32_ltdc.c diff --git a/arch/arm/src/stm32h7/stm32_ltdc.h b/soc/arm/stm32h7/stm32_ltdc.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_ltdc.h rename to soc/arm/stm32h7/stm32_ltdc.h diff --git a/soc/arm/stm32h7/stm32_mdio.c b/soc/arm/stm32h7/stm32_mdio.c new file mode 100644 index 0000000000..dec85291f9 --- /dev/null +++ b/soc/arm/stm32h7/stm32_mdio.c @@ -0,0 +1,232 @@ +/**************************************************************************** + * arch/arm/src/stm32h7/stm32_mdio.c + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#ifdef CONFIG_STM32H7_ETHMAC_REGDEBUG +static uint32_t stm32_getreg(uint32_t addr); +static void stm32_putreg(uint32_t val, uint32_t addr); +static void stm32_checksetup(void); +#else +# define stm32_getreg(addr) getreg32(addr) +# define stm32_putreg(val,addr) putreg32(val,addr) +# define stm32_checksetup() +#endif + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include + +#include +#include +#include + +#include "stm32_mdio.h" +#include "hardware/stm32_ethernet.h" + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +struct stm32_mdio_bus_s +{ + struct mdio_lowerhalf_s *lower; + + /* MDIO bus timeout in milliseconds */ + + int timeout; +}; + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +static int stm32_c22_read(struct mdio_lowerhalf_s *dev, uint8_t phydev, + uint8_t regaddr, uint16_t *value); + +static int stm32_c22_write(struct mdio_lowerhalf_s *dev, uint8_t phydev, + uint8_t regaddr, uint16_t value); + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +const struct mdio_ops_s g_stm32_mdio_ops = +{ + .read = stm32_c22_read, + .write = stm32_c22_write, + .reset = NULL, +}; + +struct mdio_lowerhalf_s g_stm32_mdio_lowerhalf = +{ + .ops = &g_stm32_mdio_ops +}; + +struct stm32_mdio_bus_s g_stm32_mdio_bus = +{ + .lower = &g_stm32_mdio_lowerhalf, + .timeout = 10 +}; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +static int stm32_c22_read(struct mdio_lowerhalf_s *dev, uint8_t phydev, + uint8_t regaddr, uint16_t *value) +{ + int to; + uint32_t regval; + + int retval = -ETIMEDOUT; + struct stm32_mdio_bus_s *priv = (struct stm32_mdio_bus_s *)dev; + + /* Configure the MACMDIOAR register, preserving CSR Clock Range CR[3:0] + * bits + */ + + regval = stm32_getreg(STM32_ETH_MACMDIOAR); + regval &= ETH_MACMDIOAR_CR_MASK; + + /* Set the PHY device address, PHY register address, and set the buy bit. + * the ETH_MACMDIOAR_GOC == 3, indicating a read operation. + */ + + regval |= (((uint32_t)phydev << ETH_MACMDIOAR_PA_SHIFT) & + ETH_MACMDIOAR_PA_MASK); + regval |= (((uint32_t)regaddr << ETH_MACMDIOAR_RDA_SHIFT) & + ETH_MACMDIOAR_RDA_MASK); + regval |= ETH_MACMDIOAR_MB | ETH_MACMDIOAR_GOC_READ; + + stm32_putreg(regval, STM32_ETH_MACMDIOAR); + + /* Wait for the transfer to complete */ + + for (to = priv->timeout; to >= 0; to--) + { + if ((stm32_getreg(STM32_ETH_MACMDIOAR) & ETH_MACMDIOAR_MB) == 0) + { + *value = (uint16_t)stm32_getreg(STM32_ETH_MACMDIODR); + retval = OK; + break; + } + + up_mdelay(5); + } + + if (to <= 0) + { + ninfo("MII transfer timed out: phydev: %04x regaddr: %04x\n", + phydev, regaddr); + } + + return retval; +} + +static int stm32_c22_write(struct mdio_lowerhalf_s *dev, uint8_t phydev, + uint8_t regaddr, uint16_t value) +{ + int to; + uint32_t regval; + + int retval = -ETIMEDOUT; + struct stm32_mdio_bus_s *priv = (struct stm32_mdio_bus_s *)dev; + + /* Configure the MACMDIOAR register, preserving CSR Clock Range CR[3:0] + * bits + */ + + regval = stm32_getreg(STM32_ETH_MACMDIOAR); + regval &= ETH_MACMDIOAR_CR_MASK; + + /* Read the existing register value, if clear mask is given */ + + /* Set the PHY device address, PHY register address, and set the busy bit. + * the ETH_MACMDIOAR_GOC == 1, indicating a write operation. + */ + + regval |= (((uint32_t)phydev << ETH_MACMDIOAR_PA_SHIFT) & + ETH_MACMDIOAR_PA_MASK); + regval |= (((uint32_t)phydev << ETH_MACMDIOAR_RDA_SHIFT) & + ETH_MACMDIOAR_RDA_MASK); + regval |= (ETH_MACMDIOAR_MB | ETH_MACMDIOAR_GOC_WRITE); + + /* Write the value into the MACMDIODR register before setting the new + * MACMDIOAR register value. + */ + + stm32_putreg(value, STM32_ETH_MACMDIODR); + stm32_putreg(regval, STM32_ETH_MACMDIOAR); + + /* Wait for the transfer to complete */ + + for (to = priv->timeout; to >= 0; to--) + { + if ((stm32_getreg(STM32_ETH_MACMDIOAR) & ETH_MACMDIOAR_MB) == 0) + { + retval = OK; + break; + } + + up_mdelay(5); + } + + if (to <= 0) + { + ninfo("MII transfer timed out: phydevaddr: %04x phyregaddr: %04x" + "value: %04x\n", phydev, regaddr, value); + } + + return retval; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: stm32_mdio_bus_initialize + * + * Description: + * Initialize the MDIO bus + * + * Returned Value: + * Initialized MDIO bus structure or NULL on failure + * + ****************************************************************************/ + +struct mdio_bus_s *stm32_mdio_bus_initialize(void) +{ + return mdio_register(&g_stm32_mdio_lowerhalf); +} diff --git a/arch/z16/src/common/z16_nputs.c b/soc/arm/stm32h7/stm32_mdio.h similarity index 76% rename from arch/z16/src/common/z16_nputs.c rename to soc/arm/stm32h7/stm32_mdio.h index d86a887780..cc79d1dac1 100644 --- a/arch/z16/src/common/z16_nputs.c +++ b/soc/arm/stm32h7/stm32_mdio.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/z16/src/common/z16_nputs.c + * arch/z16/src/common/z16_mdelay.c * * SPDX-License-Identifier: Apache-2.0 * @@ -27,22 +27,34 @@ #include #include +#ifdef CONFIG_BOARD_LOOPSPERMSEC + /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: up_nputs + * Name: up_mdelay * * Description: - * This is a low-level helper function used to support debug. + * Delay inline for the requested number of milliseconds. + * *** NOT multi-tasking friendly *** + * + * ASSUMPTIONS: + * The setting CONFIG_BOARD_LOOPSPERMSEC has been calibrated * ****************************************************************************/ -void up_nputs(const char *str, size_t len) +void up_mdelay(unsigned int milliseconds) { - while (len-- > 0 && *str) + volatile int i; + volatile int j; + + for (i = 0; i < milliseconds; i++) { - up_putc(*str++); + for (j = 0; j < CONFIG_BOARD_LOOPSPERMSEC; j++) + { + } } } +#endif /* CONFIG_BOARD_LOOPSPERMSEC */ diff --git a/arch/arm/src/stm32h7/stm32_mpuinit.c b/soc/arm/stm32h7/stm32_mpuinit.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_mpuinit.c rename to soc/arm/stm32h7/stm32_mpuinit.c diff --git a/arch/arm/src/stm32h7/stm32_mpuinit.h b/soc/arm/stm32h7/stm32_mpuinit.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_mpuinit.h rename to soc/arm/stm32h7/stm32_mpuinit.h diff --git a/arch/arm/src/stm32h7/stm32_oneshot.c b/soc/arm/stm32h7/stm32_oneshot.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_oneshot.c rename to soc/arm/stm32h7/stm32_oneshot.c diff --git a/arch/arm/src/stm32h7/stm32_oneshot.h b/soc/arm/stm32h7/stm32_oneshot.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_oneshot.h rename to soc/arm/stm32h7/stm32_oneshot.h diff --git a/arch/arm/src/stm32h7/stm32_oneshot_lowerhalf.c b/soc/arm/stm32h7/stm32_oneshot_lowerhalf.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_oneshot_lowerhalf.c rename to soc/arm/stm32h7/stm32_oneshot_lowerhalf.c diff --git a/arch/arm/src/stm32h7/stm32_otg.h b/soc/arm/stm32h7/stm32_otg.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_otg.h rename to soc/arm/stm32h7/stm32_otg.h diff --git a/arch/arm/src/stm32h7/stm32_otgdev.c b/soc/arm/stm32h7/stm32_otgdev.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_otgdev.c rename to soc/arm/stm32h7/stm32_otgdev.c diff --git a/arch/arm/src/stm32h7/stm32_otghost.c b/soc/arm/stm32h7/stm32_otghost.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_otghost.c rename to soc/arm/stm32h7/stm32_otghost.c diff --git a/arch/arm/src/stm32h7/stm32_pm.h b/soc/arm/stm32h7/stm32_pm.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_pm.h rename to soc/arm/stm32h7/stm32_pm.h diff --git a/arch/arm/src/stm32h7/stm32_pminitialize.c b/soc/arm/stm32h7/stm32_pminitialize.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_pminitialize.c rename to soc/arm/stm32h7/stm32_pminitialize.c diff --git a/arch/arm/src/stm32h7/stm32_pmsleep.c b/soc/arm/stm32h7/stm32_pmsleep.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_pmsleep.c rename to soc/arm/stm32h7/stm32_pmsleep.c diff --git a/arch/arm/src/stm32h7/stm32_pmstandby.c b/soc/arm/stm32h7/stm32_pmstandby.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_pmstandby.c rename to soc/arm/stm32h7/stm32_pmstandby.c diff --git a/arch/arm/src/stm32h7/stm32_pmstop.c b/soc/arm/stm32h7/stm32_pmstop.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_pmstop.c rename to soc/arm/stm32h7/stm32_pmstop.c diff --git a/arch/arm/src/stm32h7/stm32_pwm.c b/soc/arm/stm32h7/stm32_pwm.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_pwm.c rename to soc/arm/stm32h7/stm32_pwm.c diff --git a/arch/arm/src/stm32h7/stm32_pwm.h b/soc/arm/stm32h7/stm32_pwm.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_pwm.h rename to soc/arm/stm32h7/stm32_pwm.h diff --git a/arch/arm/src/stm32h7/stm32_pwr.c b/soc/arm/stm32h7/stm32_pwr.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_pwr.c rename to soc/arm/stm32h7/stm32_pwr.c diff --git a/arch/arm/src/stm32h7/stm32_pwr.h b/soc/arm/stm32h7/stm32_pwr.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_pwr.h rename to soc/arm/stm32h7/stm32_pwr.h diff --git a/arch/arm/src/stm32h7/stm32_qencoder.c b/soc/arm/stm32h7/stm32_qencoder.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_qencoder.c rename to soc/arm/stm32h7/stm32_qencoder.c diff --git a/arch/arm/src/stm32h7/stm32_qencoder.h b/soc/arm/stm32h7/stm32_qencoder.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_qencoder.h rename to soc/arm/stm32h7/stm32_qencoder.h diff --git a/arch/arm/src/stm32h7/stm32_qspi.c b/soc/arm/stm32h7/stm32_qspi.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_qspi.c rename to soc/arm/stm32h7/stm32_qspi.c diff --git a/arch/arm/src/stm32h7/stm32_qspi.h b/soc/arm/stm32h7/stm32_qspi.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_qspi.h rename to soc/arm/stm32h7/stm32_qspi.h diff --git a/arch/arm/src/stm32h7/stm32_rcc.c b/soc/arm/stm32h7/stm32_rcc.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_rcc.c rename to soc/arm/stm32h7/stm32_rcc.c diff --git a/arch/arm/src/stm32h7/stm32_rcc.h b/soc/arm/stm32h7/stm32_rcc.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_rcc.h rename to soc/arm/stm32h7/stm32_rcc.h diff --git a/arch/arm/src/stm32h7/stm32_rng.c b/soc/arm/stm32h7/stm32_rng.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_rng.c rename to soc/arm/stm32h7/stm32_rng.c diff --git a/arch/arm/src/stm32h7/stm32_rptun.c b/soc/arm/stm32h7/stm32_rptun.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_rptun.c rename to soc/arm/stm32h7/stm32_rptun.c diff --git a/arch/arm/src/stm32h7/stm32_rptun.h b/soc/arm/stm32h7/stm32_rptun.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_rptun.h rename to soc/arm/stm32h7/stm32_rptun.h diff --git a/arch/arm/src/stm32h7/stm32_rtc.c b/soc/arm/stm32h7/stm32_rtc.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_rtc.c rename to soc/arm/stm32h7/stm32_rtc.c diff --git a/arch/arm/src/stm32h7/stm32_rtc.h b/soc/arm/stm32h7/stm32_rtc.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_rtc.h rename to soc/arm/stm32h7/stm32_rtc.h diff --git a/arch/arm/src/stm32h7/stm32_rtc_lowerhalf.c b/soc/arm/stm32h7/stm32_rtc_lowerhalf.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_rtc_lowerhalf.c rename to soc/arm/stm32h7/stm32_rtc_lowerhalf.c diff --git a/arch/arm/src/stm32h7/stm32_sdmmc.c b/soc/arm/stm32h7/stm32_sdmmc.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_sdmmc.c rename to soc/arm/stm32h7/stm32_sdmmc.c diff --git a/arch/arm/src/stm32h7/stm32_sdmmc.h b/soc/arm/stm32h7/stm32_sdmmc.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_sdmmc.h rename to soc/arm/stm32h7/stm32_sdmmc.h diff --git a/arch/arm/src/stm32h7/stm32_serial.c b/soc/arm/stm32h7/stm32_serial.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_serial.c rename to soc/arm/stm32h7/stm32_serial.c diff --git a/arch/arm/src/stm32h7/stm32_spi.c b/soc/arm/stm32h7/stm32_spi.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_spi.c rename to soc/arm/stm32h7/stm32_spi.c diff --git a/arch/arm/src/stm32h7/stm32_spi.h b/soc/arm/stm32h7/stm32_spi.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_spi.h rename to soc/arm/stm32h7/stm32_spi.h diff --git a/arch/arm/src/stm32h7/stm32_spi_slave.c b/soc/arm/stm32h7/stm32_spi_slave.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_spi_slave.c rename to soc/arm/stm32h7/stm32_spi_slave.c diff --git a/arch/arm/src/stm32h7/stm32_start.c b/soc/arm/stm32h7/stm32_start.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_start.c rename to soc/arm/stm32h7/stm32_start.c diff --git a/arch/arm/src/stm32h7/stm32_start.h b/soc/arm/stm32h7/stm32_start.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_start.h rename to soc/arm/stm32h7/stm32_start.h diff --git a/arch/arm/src/stm32h7/stm32_tickless.c b/soc/arm/stm32h7/stm32_tickless.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_tickless.c rename to soc/arm/stm32h7/stm32_tickless.c diff --git a/arch/arm/src/stm32h7/stm32_tim.c b/soc/arm/stm32h7/stm32_tim.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_tim.c rename to soc/arm/stm32h7/stm32_tim.c diff --git a/arch/arm/src/stm32h7/stm32_tim.h b/soc/arm/stm32h7/stm32_tim.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_tim.h rename to soc/arm/stm32h7/stm32_tim.h diff --git a/arch/arm/src/stm32h7/stm32_tim_lowerhalf.c b/soc/arm/stm32h7/stm32_tim_lowerhalf.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_tim_lowerhalf.c rename to soc/arm/stm32h7/stm32_tim_lowerhalf.c diff --git a/arch/arm/src/stm32h7/stm32_timerisr.c b/soc/arm/stm32h7/stm32_timerisr.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_timerisr.c rename to soc/arm/stm32h7/stm32_timerisr.c diff --git a/arch/arm/src/stm32h7/stm32_uart.h b/soc/arm/stm32h7/stm32_uart.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_uart.h rename to soc/arm/stm32h7/stm32_uart.h diff --git a/arch/arm/src/stm32h7/stm32_uid.c b/soc/arm/stm32h7/stm32_uid.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_uid.c rename to soc/arm/stm32h7/stm32_uid.c diff --git a/arch/arm/src/stm32h7/stm32_uid.h b/soc/arm/stm32h7/stm32_uid.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_uid.h rename to soc/arm/stm32h7/stm32_uid.h diff --git a/arch/arm/src/stm32h7/stm32_usbhost.c b/soc/arm/stm32h7/stm32_usbhost.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_usbhost.c rename to soc/arm/stm32h7/stm32_usbhost.c diff --git a/arch/arm/src/stm32h7/stm32_usbhost.h b/soc/arm/stm32h7/stm32_usbhost.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_usbhost.h rename to soc/arm/stm32h7/stm32_usbhost.h diff --git a/arch/arm/src/stm32h7/stm32_userspace.c b/soc/arm/stm32h7/stm32_userspace.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_userspace.c rename to soc/arm/stm32h7/stm32_userspace.c diff --git a/arch/arm/src/stm32h7/stm32_userspace.h b/soc/arm/stm32h7/stm32_userspace.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_userspace.h rename to soc/arm/stm32h7/stm32_userspace.h diff --git a/arch/arm/src/stm32h7/stm32_wdg.h b/soc/arm/stm32h7/stm32_wdg.h similarity index 100% rename from arch/arm/src/stm32h7/stm32_wdg.h rename to soc/arm/stm32h7/stm32_wdg.h diff --git a/arch/arm/src/stm32h7/stm32_wwdg.c b/soc/arm/stm32h7/stm32_wwdg.c similarity index 100% rename from arch/arm/src/stm32h7/stm32_wwdg.c rename to soc/arm/stm32h7/stm32_wwdg.c diff --git a/arch/arm/src/stm32h7/stm32h743xx_flash.c b/soc/arm/stm32h7/stm32h743xx_flash.c similarity index 100% rename from arch/arm/src/stm32h7/stm32h743xx_flash.c rename to soc/arm/stm32h7/stm32h743xx_flash.c diff --git a/arch/arm/src/stm32h7/stm32h7b3xx_flash.c b/soc/arm/stm32h7/stm32h7b3xx_flash.c similarity index 100% rename from arch/arm/src/stm32h7/stm32h7b3xx_flash.c rename to soc/arm/stm32h7/stm32h7b3xx_flash.c diff --git a/arch/arm/src/stm32h7/stm32h7x3xx_rcc.c b/soc/arm/stm32h7/stm32h7x3xx_rcc.c similarity index 100% rename from arch/arm/src/stm32h7/stm32h7x3xx_rcc.c rename to soc/arm/stm32h7/stm32h7x3xx_rcc.c diff --git a/arch/arm/src/stm32h7/stm32h7x7xx_rcc.c b/soc/arm/stm32h7/stm32h7x7xx_rcc.c similarity index 100% rename from arch/arm/src/stm32h7/stm32h7x7xx_rcc.c rename to soc/arm/stm32h7/stm32h7x7xx_rcc.c diff --git a/arch/arm/src/stm32l4/CMakeLists.txt b/soc/arm/stm32l4/CMakeLists.txt similarity index 100% rename from arch/arm/src/stm32l4/CMakeLists.txt rename to soc/arm/stm32l4/CMakeLists.txt diff --git a/arch/arm/src/stm32l4/Kconfig b/soc/arm/stm32l4/Kconfig similarity index 100% rename from arch/arm/src/stm32l4/Kconfig rename to soc/arm/stm32l4/Kconfig diff --git a/arch/arm/src/stm32l4/Make.defs b/soc/arm/stm32l4/Make.defs similarity index 100% rename from arch/arm/src/stm32l4/Make.defs rename to soc/arm/stm32l4/Make.defs diff --git a/arch/arm/src/stm32l4/chip.h b/soc/arm/stm32l4/chip.h similarity index 100% rename from arch/arm/src/stm32l4/chip.h rename to soc/arm/stm32l4/chip.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4_adc.h b/soc/arm/stm32l4/hardware/stm32l4_adc.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4_adc.h rename to soc/arm/stm32l4/hardware/stm32l4_adc.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4_can.h b/soc/arm/stm32l4/hardware/stm32l4_can.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4_can.h rename to soc/arm/stm32l4/hardware/stm32l4_can.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4_comp.h b/soc/arm/stm32l4/hardware/stm32l4_comp.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4_comp.h rename to soc/arm/stm32l4/hardware/stm32l4_comp.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4_crs.h b/soc/arm/stm32l4/hardware/stm32l4_crs.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4_crs.h rename to soc/arm/stm32l4/hardware/stm32l4_crs.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4_dac.h b/soc/arm/stm32l4/hardware/stm32l4_dac.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4_dac.h rename to soc/arm/stm32l4/hardware/stm32l4_dac.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4_dfsdm.h b/soc/arm/stm32l4/hardware/stm32l4_dfsdm.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4_dfsdm.h rename to soc/arm/stm32l4/hardware/stm32l4_dfsdm.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4_exti.h b/soc/arm/stm32l4/hardware/stm32l4_exti.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4_exti.h rename to soc/arm/stm32l4/hardware/stm32l4_exti.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4_flash.h b/soc/arm/stm32l4/hardware/stm32l4_flash.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4_flash.h rename to soc/arm/stm32l4/hardware/stm32l4_flash.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4_gpio.h b/soc/arm/stm32l4/hardware/stm32l4_gpio.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4_gpio.h rename to soc/arm/stm32l4/hardware/stm32l4_gpio.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4_i2c.h b/soc/arm/stm32l4/hardware/stm32l4_i2c.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4_i2c.h rename to soc/arm/stm32l4/hardware/stm32l4_i2c.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4_lptim.h b/soc/arm/stm32l4/hardware/stm32l4_lptim.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4_lptim.h rename to soc/arm/stm32l4/hardware/stm32l4_lptim.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4_memorymap.h b/soc/arm/stm32l4/hardware/stm32l4_memorymap.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4_memorymap.h rename to soc/arm/stm32l4/hardware/stm32l4_memorymap.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4_pinmap.h b/soc/arm/stm32l4/hardware/stm32l4_pinmap.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4_pinmap.h rename to soc/arm/stm32l4/hardware/stm32l4_pinmap.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4_pwr.h b/soc/arm/stm32l4/hardware/stm32l4_pwr.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4_pwr.h rename to soc/arm/stm32l4/hardware/stm32l4_pwr.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4_qspi.h b/soc/arm/stm32l4/hardware/stm32l4_qspi.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4_qspi.h rename to soc/arm/stm32l4/hardware/stm32l4_qspi.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4_rng.h b/soc/arm/stm32l4/hardware/stm32l4_rng.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4_rng.h rename to soc/arm/stm32l4/hardware/stm32l4_rng.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4_rtcc.h b/soc/arm/stm32l4/hardware/stm32l4_rtcc.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4_rtcc.h rename to soc/arm/stm32l4/hardware/stm32l4_rtcc.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4_sai.h b/soc/arm/stm32l4/hardware/stm32l4_sai.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4_sai.h rename to soc/arm/stm32l4/hardware/stm32l4_sai.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4_sdmmc.h b/soc/arm/stm32l4/hardware/stm32l4_sdmmc.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4_sdmmc.h rename to soc/arm/stm32l4/hardware/stm32l4_sdmmc.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4_spi.h b/soc/arm/stm32l4/hardware/stm32l4_spi.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4_spi.h rename to soc/arm/stm32l4/hardware/stm32l4_spi.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4_syscfg.h b/soc/arm/stm32l4/hardware/stm32l4_syscfg.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4_syscfg.h rename to soc/arm/stm32l4/hardware/stm32l4_syscfg.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4_tim.h b/soc/arm/stm32l4/hardware/stm32l4_tim.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4_tim.h rename to soc/arm/stm32l4/hardware/stm32l4_tim.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4_uart.h b/soc/arm/stm32l4/hardware/stm32l4_uart.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4_uart.h rename to soc/arm/stm32l4/hardware/stm32l4_uart.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4_usbdev.h b/soc/arm/stm32l4/hardware/stm32l4_usbdev.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4_usbdev.h rename to soc/arm/stm32l4/hardware/stm32l4_usbdev.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4_wdg.h b/soc/arm/stm32l4/hardware/stm32l4_wdg.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4_wdg.h rename to soc/arm/stm32l4/hardware/stm32l4_wdg.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4x3xx_dbgmcu.h b/soc/arm/stm32l4/hardware/stm32l4x3xx_dbgmcu.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4x3xx_dbgmcu.h rename to soc/arm/stm32l4/hardware/stm32l4x3xx_dbgmcu.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4x3xx_dma.h b/soc/arm/stm32l4/hardware/stm32l4x3xx_dma.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4x3xx_dma.h rename to soc/arm/stm32l4/hardware/stm32l4x3xx_dma.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4x3xx_firewall.h b/soc/arm/stm32l4/hardware/stm32l4x3xx_firewall.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4x3xx_firewall.h rename to soc/arm/stm32l4/hardware/stm32l4x3xx_firewall.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4x3xx_pinmap.h b/soc/arm/stm32l4/hardware/stm32l4x3xx_pinmap.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4x3xx_pinmap.h rename to soc/arm/stm32l4/hardware/stm32l4x3xx_pinmap.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4x3xx_pinmap_legacy.h b/soc/arm/stm32l4/hardware/stm32l4x3xx_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4x3xx_pinmap_legacy.h rename to soc/arm/stm32l4/hardware/stm32l4x3xx_pinmap_legacy.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4x3xx_rcc.h b/soc/arm/stm32l4/hardware/stm32l4x3xx_rcc.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4x3xx_rcc.h rename to soc/arm/stm32l4/hardware/stm32l4x3xx_rcc.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4x3xx_syscfg.h b/soc/arm/stm32l4/hardware/stm32l4x3xx_syscfg.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4x3xx_syscfg.h rename to soc/arm/stm32l4/hardware/stm32l4x3xx_syscfg.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4x5xx_dbgmcu.h b/soc/arm/stm32l4/hardware/stm32l4x5xx_dbgmcu.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4x5xx_dbgmcu.h rename to soc/arm/stm32l4/hardware/stm32l4x5xx_dbgmcu.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4x5xx_dma.h b/soc/arm/stm32l4/hardware/stm32l4x5xx_dma.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4x5xx_dma.h rename to soc/arm/stm32l4/hardware/stm32l4x5xx_dma.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4x5xx_firewall.h b/soc/arm/stm32l4/hardware/stm32l4x5xx_firewall.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4x5xx_firewall.h rename to soc/arm/stm32l4/hardware/stm32l4x5xx_firewall.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4x5xx_otgfs.h b/soc/arm/stm32l4/hardware/stm32l4x5xx_otgfs.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4x5xx_otgfs.h rename to soc/arm/stm32l4/hardware/stm32l4x5xx_otgfs.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4x5xx_pinmap.h b/soc/arm/stm32l4/hardware/stm32l4x5xx_pinmap.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4x5xx_pinmap.h rename to soc/arm/stm32l4/hardware/stm32l4x5xx_pinmap.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4x5xx_pinmap_legacy.h b/soc/arm/stm32l4/hardware/stm32l4x5xx_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4x5xx_pinmap_legacy.h rename to soc/arm/stm32l4/hardware/stm32l4x5xx_pinmap_legacy.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4x5xx_rcc.h b/soc/arm/stm32l4/hardware/stm32l4x5xx_rcc.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4x5xx_rcc.h rename to soc/arm/stm32l4/hardware/stm32l4x5xx_rcc.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4x5xx_syscfg.h b/soc/arm/stm32l4/hardware/stm32l4x5xx_syscfg.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4x5xx_syscfg.h rename to soc/arm/stm32l4/hardware/stm32l4x5xx_syscfg.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4x6xx_dbgmcu.h b/soc/arm/stm32l4/hardware/stm32l4x6xx_dbgmcu.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4x6xx_dbgmcu.h rename to soc/arm/stm32l4/hardware/stm32l4x6xx_dbgmcu.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4x6xx_dma.h b/soc/arm/stm32l4/hardware/stm32l4x6xx_dma.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4x6xx_dma.h rename to soc/arm/stm32l4/hardware/stm32l4x6xx_dma.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4x6xx_firewall.h b/soc/arm/stm32l4/hardware/stm32l4x6xx_firewall.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4x6xx_firewall.h rename to soc/arm/stm32l4/hardware/stm32l4x6xx_firewall.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4x6xx_otgfs.h b/soc/arm/stm32l4/hardware/stm32l4x6xx_otgfs.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4x6xx_otgfs.h rename to soc/arm/stm32l4/hardware/stm32l4x6xx_otgfs.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4x6xx_pinmap.h b/soc/arm/stm32l4/hardware/stm32l4x6xx_pinmap.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4x6xx_pinmap.h rename to soc/arm/stm32l4/hardware/stm32l4x6xx_pinmap.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4x6xx_pinmap_legacy.h b/soc/arm/stm32l4/hardware/stm32l4x6xx_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4x6xx_pinmap_legacy.h rename to soc/arm/stm32l4/hardware/stm32l4x6xx_pinmap_legacy.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4x6xx_rcc.h b/soc/arm/stm32l4/hardware/stm32l4x6xx_rcc.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4x6xx_rcc.h rename to soc/arm/stm32l4/hardware/stm32l4x6xx_rcc.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4x6xx_syscfg.h b/soc/arm/stm32l4/hardware/stm32l4x6xx_syscfg.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4x6xx_syscfg.h rename to soc/arm/stm32l4/hardware/stm32l4x6xx_syscfg.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4xrxx_dbgmcu.h b/soc/arm/stm32l4/hardware/stm32l4xrxx_dbgmcu.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4xrxx_dbgmcu.h rename to soc/arm/stm32l4/hardware/stm32l4xrxx_dbgmcu.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4xrxx_dma.h b/soc/arm/stm32l4/hardware/stm32l4xrxx_dma.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4xrxx_dma.h rename to soc/arm/stm32l4/hardware/stm32l4xrxx_dma.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4xrxx_dmamux.h b/soc/arm/stm32l4/hardware/stm32l4xrxx_dmamux.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4xrxx_dmamux.h rename to soc/arm/stm32l4/hardware/stm32l4xrxx_dmamux.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4xrxx_firewall.h b/soc/arm/stm32l4/hardware/stm32l4xrxx_firewall.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4xrxx_firewall.h rename to soc/arm/stm32l4/hardware/stm32l4xrxx_firewall.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4xrxx_pinmap.h b/soc/arm/stm32l4/hardware/stm32l4xrxx_pinmap.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4xrxx_pinmap.h rename to soc/arm/stm32l4/hardware/stm32l4xrxx_pinmap.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4xrxx_pinmap_legacy.h b/soc/arm/stm32l4/hardware/stm32l4xrxx_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4xrxx_pinmap_legacy.h rename to soc/arm/stm32l4/hardware/stm32l4xrxx_pinmap_legacy.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4xrxx_rcc.h b/soc/arm/stm32l4/hardware/stm32l4xrxx_rcc.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4xrxx_rcc.h rename to soc/arm/stm32l4/hardware/stm32l4xrxx_rcc.h diff --git a/arch/arm/src/stm32l4/hardware/stm32l4xrxx_syscfg.h b/soc/arm/stm32l4/hardware/stm32l4xrxx_syscfg.h similarity index 100% rename from arch/arm/src/stm32l4/hardware/stm32l4xrxx_syscfg.h rename to soc/arm/stm32l4/hardware/stm32l4xrxx_syscfg.h diff --git a/arch/arm/src/stm32l4/stm32l4.h b/soc/arm/stm32l4/stm32l4.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4.h rename to soc/arm/stm32l4/stm32l4.h diff --git a/arch/arm/src/stm32l4/stm32l4_1wire.c b/soc/arm/stm32l4/stm32l4_1wire.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_1wire.c rename to soc/arm/stm32l4/stm32l4_1wire.c diff --git a/arch/arm/src/stm32l4/stm32l4_1wire.h b/soc/arm/stm32l4/stm32l4_1wire.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_1wire.h rename to soc/arm/stm32l4/stm32l4_1wire.h diff --git a/arch/arm/src/stm32l4/stm32l4_adc.c b/soc/arm/stm32l4/stm32l4_adc.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_adc.c rename to soc/arm/stm32l4/stm32l4_adc.c diff --git a/arch/arm/src/stm32l4/stm32l4_adc.h b/soc/arm/stm32l4/stm32l4_adc.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_adc.h rename to soc/arm/stm32l4/stm32l4_adc.h diff --git a/arch/arm/src/stm32l4/stm32l4_allocateheap.c b/soc/arm/stm32l4/stm32l4_allocateheap.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_allocateheap.c rename to soc/arm/stm32l4/stm32l4_allocateheap.c diff --git a/arch/arm/src/stm32l4/stm32l4_can.c b/soc/arm/stm32l4/stm32l4_can.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_can.c rename to soc/arm/stm32l4/stm32l4_can.c diff --git a/arch/arm/src/stm32l4/stm32l4_can.h b/soc/arm/stm32l4/stm32l4_can.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_can.h rename to soc/arm/stm32l4/stm32l4_can.h diff --git a/arch/arm/src/stm32l4/stm32l4_comp.c b/soc/arm/stm32l4/stm32l4_comp.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_comp.c rename to soc/arm/stm32l4/stm32l4_comp.c diff --git a/arch/arm/src/stm32l4/stm32l4_comp.h b/soc/arm/stm32l4/stm32l4_comp.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_comp.h rename to soc/arm/stm32l4/stm32l4_comp.h diff --git a/arch/arm/src/stm32l4/stm32l4_dac.c b/soc/arm/stm32l4/stm32l4_dac.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_dac.c rename to soc/arm/stm32l4/stm32l4_dac.c diff --git a/arch/arm/src/stm32l4/stm32l4_dac.h b/soc/arm/stm32l4/stm32l4_dac.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_dac.h rename to soc/arm/stm32l4/stm32l4_dac.h diff --git a/arch/arm/src/stm32l4/stm32l4_dbgmcu.h b/soc/arm/stm32l4/stm32l4_dbgmcu.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_dbgmcu.h rename to soc/arm/stm32l4/stm32l4_dbgmcu.h diff --git a/arch/arm/src/stm32l4/stm32l4_dfsdm.c b/soc/arm/stm32l4/stm32l4_dfsdm.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_dfsdm.c rename to soc/arm/stm32l4/stm32l4_dfsdm.c diff --git a/arch/arm/src/stm32l4/stm32l4_dfsdm.h b/soc/arm/stm32l4/stm32l4_dfsdm.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_dfsdm.h rename to soc/arm/stm32l4/stm32l4_dfsdm.h diff --git a/arch/arm/src/stm32l4/stm32l4_dfumode.c b/soc/arm/stm32l4/stm32l4_dfumode.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_dfumode.c rename to soc/arm/stm32l4/stm32l4_dfumode.c diff --git a/arch/arm/src/stm32l4/stm32l4_dfumode.h b/soc/arm/stm32l4/stm32l4_dfumode.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_dfumode.h rename to soc/arm/stm32l4/stm32l4_dfumode.h diff --git a/arch/arm/src/stm32l4/stm32l4_dma.c b/soc/arm/stm32l4/stm32l4_dma.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_dma.c rename to soc/arm/stm32l4/stm32l4_dma.c diff --git a/arch/arm/src/stm32l4/stm32l4_dma.h b/soc/arm/stm32l4/stm32l4_dma.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_dma.h rename to soc/arm/stm32l4/stm32l4_dma.h diff --git a/arch/arm/src/stm32l4/stm32l4_dumpgpio.c b/soc/arm/stm32l4/stm32l4_dumpgpio.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_dumpgpio.c rename to soc/arm/stm32l4/stm32l4_dumpgpio.c diff --git a/arch/arm/src/stm32l4/stm32l4_exti.h b/soc/arm/stm32l4/stm32l4_exti.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_exti.h rename to soc/arm/stm32l4/stm32l4_exti.h diff --git a/arch/arm/src/stm32l4/stm32l4_exti_alarm.c b/soc/arm/stm32l4/stm32l4_exti_alarm.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_exti_alarm.c rename to soc/arm/stm32l4/stm32l4_exti_alarm.c diff --git a/arch/arm/src/stm32l4/stm32l4_exti_comp.c b/soc/arm/stm32l4/stm32l4_exti_comp.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_exti_comp.c rename to soc/arm/stm32l4/stm32l4_exti_comp.c diff --git a/arch/arm/src/stm32l4/stm32l4_exti_gpio.c b/soc/arm/stm32l4/stm32l4_exti_gpio.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_exti_gpio.c rename to soc/arm/stm32l4/stm32l4_exti_gpio.c diff --git a/arch/arm/src/stm32l4/stm32l4_exti_pwr.c b/soc/arm/stm32l4/stm32l4_exti_pwr.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_exti_pwr.c rename to soc/arm/stm32l4/stm32l4_exti_pwr.c diff --git a/arch/arm/src/stm32l4/stm32l4_exti_pwr.h b/soc/arm/stm32l4/stm32l4_exti_pwr.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_exti_pwr.h rename to soc/arm/stm32l4/stm32l4_exti_pwr.h diff --git a/arch/arm/src/stm32l4/stm32l4_exti_wakeup.c b/soc/arm/stm32l4/stm32l4_exti_wakeup.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_exti_wakeup.c rename to soc/arm/stm32l4/stm32l4_exti_wakeup.c diff --git a/arch/arm/src/stm32l4/stm32l4_firewall.c b/soc/arm/stm32l4/stm32l4_firewall.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_firewall.c rename to soc/arm/stm32l4/stm32l4_firewall.c diff --git a/arch/arm/src/stm32l4/stm32l4_firewall.h b/soc/arm/stm32l4/stm32l4_firewall.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_firewall.h rename to soc/arm/stm32l4/stm32l4_firewall.h diff --git a/arch/arm/src/stm32l4/stm32l4_flash.c b/soc/arm/stm32l4/stm32l4_flash.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_flash.c rename to soc/arm/stm32l4/stm32l4_flash.c diff --git a/arch/arm/src/stm32l4/stm32l4_flash.h b/soc/arm/stm32l4/stm32l4_flash.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_flash.h rename to soc/arm/stm32l4/stm32l4_flash.h diff --git a/arch/arm/src/stm32l4/stm32l4_freerun.c b/soc/arm/stm32l4/stm32l4_freerun.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_freerun.c rename to soc/arm/stm32l4/stm32l4_freerun.c diff --git a/arch/arm/src/stm32l4/stm32l4_freerun.h b/soc/arm/stm32l4/stm32l4_freerun.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_freerun.h rename to soc/arm/stm32l4/stm32l4_freerun.h diff --git a/arch/arm/src/stm32l4/stm32l4_gpio.c b/soc/arm/stm32l4/stm32l4_gpio.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_gpio.c rename to soc/arm/stm32l4/stm32l4_gpio.c diff --git a/arch/arm/src/stm32l4/stm32l4_gpio.h b/soc/arm/stm32l4/stm32l4_gpio.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_gpio.h rename to soc/arm/stm32l4/stm32l4_gpio.h diff --git a/arch/arm/src/stm32l4/stm32l4_hsi48.c b/soc/arm/stm32l4/stm32l4_hsi48.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_hsi48.c rename to soc/arm/stm32l4/stm32l4_hsi48.c diff --git a/arch/arm/src/stm32l4/stm32l4_hsi48.h b/soc/arm/stm32l4/stm32l4_hsi48.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_hsi48.h rename to soc/arm/stm32l4/stm32l4_hsi48.h diff --git a/arch/arm/src/stm32l4/stm32l4_i2c.c b/soc/arm/stm32l4/stm32l4_i2c.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_i2c.c rename to soc/arm/stm32l4/stm32l4_i2c.c diff --git a/arch/arm/src/stm32l4/stm32l4_i2c.h b/soc/arm/stm32l4/stm32l4_i2c.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_i2c.h rename to soc/arm/stm32l4/stm32l4_i2c.h diff --git a/arch/arm/src/stm32l4/stm32l4_idle.c b/soc/arm/stm32l4/stm32l4_idle.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_idle.c rename to soc/arm/stm32l4/stm32l4_idle.c diff --git a/arch/arm/src/stm32l4/stm32l4_irq.c b/soc/arm/stm32l4/stm32l4_irq.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_irq.c rename to soc/arm/stm32l4/stm32l4_irq.c diff --git a/arch/arm/src/stm32l4/stm32l4_iwdg.c b/soc/arm/stm32l4/stm32l4_iwdg.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_iwdg.c rename to soc/arm/stm32l4/stm32l4_iwdg.c diff --git a/arch/arm/src/stm32l4/stm32l4_lowputc.c b/soc/arm/stm32l4/stm32l4_lowputc.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_lowputc.c rename to soc/arm/stm32l4/stm32l4_lowputc.c diff --git a/arch/arm/src/stm32l4/stm32l4_lowputc.h b/soc/arm/stm32l4/stm32l4_lowputc.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_lowputc.h rename to soc/arm/stm32l4/stm32l4_lowputc.h diff --git a/arch/arm/src/stm32l4/stm32l4_lptim.c b/soc/arm/stm32l4/stm32l4_lptim.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_lptim.c rename to soc/arm/stm32l4/stm32l4_lptim.c diff --git a/arch/arm/src/stm32l4/stm32l4_lptim.h b/soc/arm/stm32l4/stm32l4_lptim.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_lptim.h rename to soc/arm/stm32l4/stm32l4_lptim.h diff --git a/arch/arm/src/stm32l4/stm32l4_lse.c b/soc/arm/stm32l4/stm32l4_lse.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_lse.c rename to soc/arm/stm32l4/stm32l4_lse.c diff --git a/arch/arm/src/stm32l4/stm32l4_lsi.c b/soc/arm/stm32l4/stm32l4_lsi.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_lsi.c rename to soc/arm/stm32l4/stm32l4_lsi.c diff --git a/arch/arm/src/stm32l4/stm32l4_mpuinit.c b/soc/arm/stm32l4/stm32l4_mpuinit.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_mpuinit.c rename to soc/arm/stm32l4/stm32l4_mpuinit.c diff --git a/arch/arm/src/stm32l4/stm32l4_mpuinit.h b/soc/arm/stm32l4/stm32l4_mpuinit.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_mpuinit.h rename to soc/arm/stm32l4/stm32l4_mpuinit.h diff --git a/arch/arm/src/stm32l4/stm32l4_oneshot.c b/soc/arm/stm32l4/stm32l4_oneshot.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_oneshot.c rename to soc/arm/stm32l4/stm32l4_oneshot.c diff --git a/arch/arm/src/stm32l4/stm32l4_oneshot.h b/soc/arm/stm32l4/stm32l4_oneshot.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_oneshot.h rename to soc/arm/stm32l4/stm32l4_oneshot.h diff --git a/arch/arm/src/stm32l4/stm32l4_oneshot_lowerhalf.c b/soc/arm/stm32l4/stm32l4_oneshot_lowerhalf.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_oneshot_lowerhalf.c rename to soc/arm/stm32l4/stm32l4_oneshot_lowerhalf.c diff --git a/arch/arm/src/stm32l4/stm32l4_otgfs.h b/soc/arm/stm32l4/stm32l4_otgfs.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_otgfs.h rename to soc/arm/stm32l4/stm32l4_otgfs.h diff --git a/arch/arm/src/stm32l4/stm32l4_otgfsdev.c b/soc/arm/stm32l4/stm32l4_otgfsdev.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_otgfsdev.c rename to soc/arm/stm32l4/stm32l4_otgfsdev.c diff --git a/arch/arm/src/stm32l4/stm32l4_otgfshost.c b/soc/arm/stm32l4/stm32l4_otgfshost.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_otgfshost.c rename to soc/arm/stm32l4/stm32l4_otgfshost.c diff --git a/arch/arm/src/stm32l4/stm32l4_pm.h b/soc/arm/stm32l4/stm32l4_pm.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_pm.h rename to soc/arm/stm32l4/stm32l4_pm.h diff --git a/arch/arm/src/stm32l4/stm32l4_pminitialize.c b/soc/arm/stm32l4/stm32l4_pminitialize.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_pminitialize.c rename to soc/arm/stm32l4/stm32l4_pminitialize.c diff --git a/arch/arm/src/stm32l4/stm32l4_pmlpr.c b/soc/arm/stm32l4/stm32l4_pmlpr.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_pmlpr.c rename to soc/arm/stm32l4/stm32l4_pmlpr.c diff --git a/arch/arm/src/stm32l4/stm32l4_pmsleep.c b/soc/arm/stm32l4/stm32l4_pmsleep.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_pmsleep.c rename to soc/arm/stm32l4/stm32l4_pmsleep.c diff --git a/arch/arm/src/stm32l4/stm32l4_pmstandby.c b/soc/arm/stm32l4/stm32l4_pmstandby.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_pmstandby.c rename to soc/arm/stm32l4/stm32l4_pmstandby.c diff --git a/arch/arm/src/stm32l4/stm32l4_pmstop.c b/soc/arm/stm32l4/stm32l4_pmstop.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_pmstop.c rename to soc/arm/stm32l4/stm32l4_pmstop.c diff --git a/arch/arm/src/stm32l4/stm32l4_pwm.c b/soc/arm/stm32l4/stm32l4_pwm.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_pwm.c rename to soc/arm/stm32l4/stm32l4_pwm.c diff --git a/arch/arm/src/stm32l4/stm32l4_pwm.h b/soc/arm/stm32l4/stm32l4_pwm.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_pwm.h rename to soc/arm/stm32l4/stm32l4_pwm.h diff --git a/arch/arm/src/stm32l4/stm32l4_pwr.c b/soc/arm/stm32l4/stm32l4_pwr.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_pwr.c rename to soc/arm/stm32l4/stm32l4_pwr.c diff --git a/arch/arm/src/stm32l4/stm32l4_pwr.h b/soc/arm/stm32l4/stm32l4_pwr.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_pwr.h rename to soc/arm/stm32l4/stm32l4_pwr.h diff --git a/arch/arm/src/stm32l4/stm32l4_qencoder.c b/soc/arm/stm32l4/stm32l4_qencoder.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_qencoder.c rename to soc/arm/stm32l4/stm32l4_qencoder.c diff --git a/arch/arm/src/stm32l4/stm32l4_qencoder.h b/soc/arm/stm32l4/stm32l4_qencoder.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_qencoder.h rename to soc/arm/stm32l4/stm32l4_qencoder.h diff --git a/arch/arm/src/stm32l4/stm32l4_qspi.c b/soc/arm/stm32l4/stm32l4_qspi.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_qspi.c rename to soc/arm/stm32l4/stm32l4_qspi.c diff --git a/arch/arm/src/stm32l4/stm32l4_qspi.h b/soc/arm/stm32l4/stm32l4_qspi.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_qspi.h rename to soc/arm/stm32l4/stm32l4_qspi.h diff --git a/arch/arm/src/stm32l4/stm32l4_rcc.c b/soc/arm/stm32l4/stm32l4_rcc.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_rcc.c rename to soc/arm/stm32l4/stm32l4_rcc.c diff --git a/arch/arm/src/stm32l4/stm32l4_rcc.h b/soc/arm/stm32l4/stm32l4_rcc.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_rcc.h rename to soc/arm/stm32l4/stm32l4_rcc.h diff --git a/arch/arm/src/stm32l4/stm32l4_rng.c b/soc/arm/stm32l4/stm32l4_rng.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_rng.c rename to soc/arm/stm32l4/stm32l4_rng.c diff --git a/arch/arm/src/stm32l4/stm32l4_rtc.c b/soc/arm/stm32l4/stm32l4_rtc.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_rtc.c rename to soc/arm/stm32l4/stm32l4_rtc.c diff --git a/arch/arm/src/stm32l4/stm32l4_rtc.h b/soc/arm/stm32l4/stm32l4_rtc.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_rtc.h rename to soc/arm/stm32l4/stm32l4_rtc.h diff --git a/arch/arm/src/stm32l4/stm32l4_rtc_lowerhalf.c b/soc/arm/stm32l4/stm32l4_rtc_lowerhalf.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_rtc_lowerhalf.c rename to soc/arm/stm32l4/stm32l4_rtc_lowerhalf.c diff --git a/arch/arm/src/stm32l4/stm32l4_sai.c b/soc/arm/stm32l4/stm32l4_sai.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_sai.c rename to soc/arm/stm32l4/stm32l4_sai.c diff --git a/arch/arm/src/stm32l4/stm32l4_sai.h b/soc/arm/stm32l4/stm32l4_sai.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_sai.h rename to soc/arm/stm32l4/stm32l4_sai.h diff --git a/arch/arm/src/stm32l4/stm32l4_sdmmc.c b/soc/arm/stm32l4/stm32l4_sdmmc.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_sdmmc.c rename to soc/arm/stm32l4/stm32l4_sdmmc.c diff --git a/arch/arm/src/stm32l4/stm32l4_sdmmc.h b/soc/arm/stm32l4/stm32l4_sdmmc.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_sdmmc.h rename to soc/arm/stm32l4/stm32l4_sdmmc.h diff --git a/arch/arm/src/stm32l4/stm32l4_serial.c b/soc/arm/stm32l4/stm32l4_serial.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_serial.c rename to soc/arm/stm32l4/stm32l4_serial.c diff --git a/arch/arm/src/stm32l4/stm32l4_spi.c b/soc/arm/stm32l4/stm32l4_spi.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_spi.c rename to soc/arm/stm32l4/stm32l4_spi.c diff --git a/arch/arm/src/stm32l4/stm32l4_spi.h b/soc/arm/stm32l4/stm32l4_spi.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_spi.h rename to soc/arm/stm32l4/stm32l4_spi.h diff --git a/arch/arm/src/stm32l4/stm32l4_start.c b/soc/arm/stm32l4/stm32l4_start.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_start.c rename to soc/arm/stm32l4/stm32l4_start.c diff --git a/arch/arm/src/stm32l4/stm32l4_start.h b/soc/arm/stm32l4/stm32l4_start.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_start.h rename to soc/arm/stm32l4/stm32l4_start.h diff --git a/arch/arm/src/stm32l4/stm32l4_tickless.c b/soc/arm/stm32l4/stm32l4_tickless.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_tickless.c rename to soc/arm/stm32l4/stm32l4_tickless.c diff --git a/arch/arm/src/stm32l4/stm32l4_tim.c b/soc/arm/stm32l4/stm32l4_tim.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_tim.c rename to soc/arm/stm32l4/stm32l4_tim.c diff --git a/arch/arm/src/stm32l4/stm32l4_tim.h b/soc/arm/stm32l4/stm32l4_tim.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_tim.h rename to soc/arm/stm32l4/stm32l4_tim.h diff --git a/arch/arm/src/stm32l4/stm32l4_tim_lowerhalf.c b/soc/arm/stm32l4/stm32l4_tim_lowerhalf.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_tim_lowerhalf.c rename to soc/arm/stm32l4/stm32l4_tim_lowerhalf.c diff --git a/arch/arm/src/stm32l4/stm32l4_timerisr.c b/soc/arm/stm32l4/stm32l4_timerisr.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_timerisr.c rename to soc/arm/stm32l4/stm32l4_timerisr.c diff --git a/arch/arm/src/stm32l4/stm32l4_uart.h b/soc/arm/stm32l4/stm32l4_uart.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_uart.h rename to soc/arm/stm32l4/stm32l4_uart.h diff --git a/arch/arm/src/stm32l4/stm32l4_uid.c b/soc/arm/stm32l4/stm32l4_uid.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_uid.c rename to soc/arm/stm32l4/stm32l4_uid.c diff --git a/arch/arm/src/stm32l4/stm32l4_uid.h b/soc/arm/stm32l4/stm32l4_uid.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_uid.h rename to soc/arm/stm32l4/stm32l4_uid.h diff --git a/arch/arm/src/stm32l4/stm32l4_usbdev.c b/soc/arm/stm32l4/stm32l4_usbdev.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_usbdev.c rename to soc/arm/stm32l4/stm32l4_usbdev.c diff --git a/arch/arm/src/stm32l4/stm32l4_usbdev.h b/soc/arm/stm32l4/stm32l4_usbdev.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_usbdev.h rename to soc/arm/stm32l4/stm32l4_usbdev.h diff --git a/arch/arm/src/stm32l4/stm32l4_usbhost.h b/soc/arm/stm32l4/stm32l4_usbhost.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_usbhost.h rename to soc/arm/stm32l4/stm32l4_usbhost.h diff --git a/arch/arm/src/stm32l4/stm32l4_usbhost_trace.c b/soc/arm/stm32l4/stm32l4_usbhost_trace.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_usbhost_trace.c rename to soc/arm/stm32l4/stm32l4_usbhost_trace.c diff --git a/arch/arm/src/stm32l4/stm32l4_userspace.c b/soc/arm/stm32l4/stm32l4_userspace.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_userspace.c rename to soc/arm/stm32l4/stm32l4_userspace.c diff --git a/arch/arm/src/stm32l4/stm32l4_userspace.h b/soc/arm/stm32l4/stm32l4_userspace.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_userspace.h rename to soc/arm/stm32l4/stm32l4_userspace.h diff --git a/arch/arm/src/stm32l4/stm32l4_waste.c b/soc/arm/stm32l4/stm32l4_waste.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_waste.c rename to soc/arm/stm32l4/stm32l4_waste.c diff --git a/arch/arm/src/stm32l4/stm32l4_waste.h b/soc/arm/stm32l4/stm32l4_waste.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_waste.h rename to soc/arm/stm32l4/stm32l4_waste.h diff --git a/arch/arm/src/stm32l4/stm32l4_wdg.h b/soc/arm/stm32l4/stm32l4_wdg.h similarity index 100% rename from arch/arm/src/stm32l4/stm32l4_wdg.h rename to soc/arm/stm32l4/stm32l4_wdg.h diff --git a/arch/arm/src/stm32l4/stm32l4x3xx_rcc.c b/soc/arm/stm32l4/stm32l4x3xx_rcc.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4x3xx_rcc.c rename to soc/arm/stm32l4/stm32l4x3xx_rcc.c diff --git a/arch/arm/src/stm32l4/stm32l4x5xx_rcc.c b/soc/arm/stm32l4/stm32l4x5xx_rcc.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4x5xx_rcc.c rename to soc/arm/stm32l4/stm32l4x5xx_rcc.c diff --git a/arch/arm/src/stm32l4/stm32l4x6xx_dma.c b/soc/arm/stm32l4/stm32l4x6xx_dma.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4x6xx_dma.c rename to soc/arm/stm32l4/stm32l4x6xx_dma.c diff --git a/arch/arm/src/stm32l4/stm32l4x6xx_rcc.c b/soc/arm/stm32l4/stm32l4x6xx_rcc.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4x6xx_rcc.c rename to soc/arm/stm32l4/stm32l4x6xx_rcc.c diff --git a/arch/arm/src/stm32l4/stm32l4xrxx_dma.c b/soc/arm/stm32l4/stm32l4xrxx_dma.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4xrxx_dma.c rename to soc/arm/stm32l4/stm32l4xrxx_dma.c diff --git a/arch/arm/src/stm32l4/stm32l4xrxx_rcc.c b/soc/arm/stm32l4/stm32l4xrxx_rcc.c similarity index 100% rename from arch/arm/src/stm32l4/stm32l4xrxx_rcc.c rename to soc/arm/stm32l4/stm32l4xrxx_rcc.c diff --git a/arch/arm/src/stm32l5/Kconfig b/soc/arm/stm32l5/Kconfig similarity index 100% rename from arch/arm/src/stm32l5/Kconfig rename to soc/arm/stm32l5/Kconfig diff --git a/arch/arm/src/stm32l5/Make.defs b/soc/arm/stm32l5/Make.defs similarity index 100% rename from arch/arm/src/stm32l5/Make.defs rename to soc/arm/stm32l5/Make.defs diff --git a/arch/arm/src/stm32l5/chip.h b/soc/arm/stm32l5/chip.h similarity index 100% rename from arch/arm/src/stm32l5/chip.h rename to soc/arm/stm32l5/chip.h diff --git a/arch/arm/src/stm32l5/hardware/stm32l562xx_dbgmcu.h b/soc/arm/stm32l5/hardware/stm32l562xx_dbgmcu.h similarity index 100% rename from arch/arm/src/stm32l5/hardware/stm32l562xx_dbgmcu.h rename to soc/arm/stm32l5/hardware/stm32l562xx_dbgmcu.h diff --git a/arch/arm/src/stm32l5/hardware/stm32l562xx_pinmap.h b/soc/arm/stm32l5/hardware/stm32l562xx_pinmap.h similarity index 100% rename from arch/arm/src/stm32l5/hardware/stm32l562xx_pinmap.h rename to soc/arm/stm32l5/hardware/stm32l562xx_pinmap.h diff --git a/arch/arm/src/stm32l5/hardware/stm32l562xx_pinmap_legacy.h b/soc/arm/stm32l5/hardware/stm32l562xx_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32l5/hardware/stm32l562xx_pinmap_legacy.h rename to soc/arm/stm32l5/hardware/stm32l562xx_pinmap_legacy.h diff --git a/arch/arm/src/stm32l5/hardware/stm32l562xx_rcc.h b/soc/arm/stm32l5/hardware/stm32l562xx_rcc.h similarity index 100% rename from arch/arm/src/stm32l5/hardware/stm32l562xx_rcc.h rename to soc/arm/stm32l5/hardware/stm32l562xx_rcc.h diff --git a/arch/arm/src/stm32l5/hardware/stm32l562xx_syscfg.h b/soc/arm/stm32l5/hardware/stm32l562xx_syscfg.h similarity index 100% rename from arch/arm/src/stm32l5/hardware/stm32l562xx_syscfg.h rename to soc/arm/stm32l5/hardware/stm32l562xx_syscfg.h diff --git a/arch/arm/src/stm32l5/hardware/stm32l5_exti.h b/soc/arm/stm32l5/hardware/stm32l5_exti.h similarity index 100% rename from arch/arm/src/stm32l5/hardware/stm32l5_exti.h rename to soc/arm/stm32l5/hardware/stm32l5_exti.h diff --git a/arch/arm/src/stm32l5/hardware/stm32l5_flash.h b/soc/arm/stm32l5/hardware/stm32l5_flash.h similarity index 100% rename from arch/arm/src/stm32l5/hardware/stm32l5_flash.h rename to soc/arm/stm32l5/hardware/stm32l5_flash.h diff --git a/arch/arm/src/stm32l5/hardware/stm32l5_gpio.h b/soc/arm/stm32l5/hardware/stm32l5_gpio.h similarity index 100% rename from arch/arm/src/stm32l5/hardware/stm32l5_gpio.h rename to soc/arm/stm32l5/hardware/stm32l5_gpio.h diff --git a/arch/arm/src/stm32l5/hardware/stm32l5_memorymap.h b/soc/arm/stm32l5/hardware/stm32l5_memorymap.h similarity index 100% rename from arch/arm/src/stm32l5/hardware/stm32l5_memorymap.h rename to soc/arm/stm32l5/hardware/stm32l5_memorymap.h diff --git a/arch/arm/src/stm32l5/hardware/stm32l5_pinmap.h b/soc/arm/stm32l5/hardware/stm32l5_pinmap.h similarity index 100% rename from arch/arm/src/stm32l5/hardware/stm32l5_pinmap.h rename to soc/arm/stm32l5/hardware/stm32l5_pinmap.h diff --git a/arch/arm/src/stm32l5/hardware/stm32l5_pwr.h b/soc/arm/stm32l5/hardware/stm32l5_pwr.h similarity index 100% rename from arch/arm/src/stm32l5/hardware/stm32l5_pwr.h rename to soc/arm/stm32l5/hardware/stm32l5_pwr.h diff --git a/arch/arm/src/stm32l5/hardware/stm32l5_spi.h b/soc/arm/stm32l5/hardware/stm32l5_spi.h similarity index 100% rename from arch/arm/src/stm32l5/hardware/stm32l5_spi.h rename to soc/arm/stm32l5/hardware/stm32l5_spi.h diff --git a/arch/arm/src/stm32l5/hardware/stm32l5_syscfg.h b/soc/arm/stm32l5/hardware/stm32l5_syscfg.h similarity index 100% rename from arch/arm/src/stm32l5/hardware/stm32l5_syscfg.h rename to soc/arm/stm32l5/hardware/stm32l5_syscfg.h diff --git a/arch/arm/src/stm32l5/hardware/stm32l5_tim.h b/soc/arm/stm32l5/hardware/stm32l5_tim.h similarity index 100% rename from arch/arm/src/stm32l5/hardware/stm32l5_tim.h rename to soc/arm/stm32l5/hardware/stm32l5_tim.h diff --git a/arch/arm/src/stm32l5/hardware/stm32l5_uart.h b/soc/arm/stm32l5/hardware/stm32l5_uart.h similarity index 100% rename from arch/arm/src/stm32l5/hardware/stm32l5_uart.h rename to soc/arm/stm32l5/hardware/stm32l5_uart.h diff --git a/arch/arm/src/stm32l5/stm32l5.h b/soc/arm/stm32l5/stm32l5.h similarity index 100% rename from arch/arm/src/stm32l5/stm32l5.h rename to soc/arm/stm32l5/stm32l5.h diff --git a/arch/arm/src/stm32l5/stm32l562xx_rcc.c b/soc/arm/stm32l5/stm32l562xx_rcc.c similarity index 100% rename from arch/arm/src/stm32l5/stm32l562xx_rcc.c rename to soc/arm/stm32l5/stm32l562xx_rcc.c diff --git a/arch/arm/src/stm32l5/stm32l5_allocateheap.c b/soc/arm/stm32l5/stm32l5_allocateheap.c similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_allocateheap.c rename to soc/arm/stm32l5/stm32l5_allocateheap.c diff --git a/arch/arm/src/stm32l5/stm32l5_dbgmcu.h b/soc/arm/stm32l5/stm32l5_dbgmcu.h similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_dbgmcu.h rename to soc/arm/stm32l5/stm32l5_dbgmcu.h diff --git a/arch/arm/src/stm32l5/stm32l5_dumpgpio.c b/soc/arm/stm32l5/stm32l5_dumpgpio.c similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_dumpgpio.c rename to soc/arm/stm32l5/stm32l5_dumpgpio.c diff --git a/arch/arm/src/stm32l5/stm32l5_exti.h b/soc/arm/stm32l5/stm32l5_exti.h similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_exti.h rename to soc/arm/stm32l5/stm32l5_exti.h diff --git a/arch/arm/src/stm32l5/stm32l5_exti_gpio.c b/soc/arm/stm32l5/stm32l5_exti_gpio.c similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_exti_gpio.c rename to soc/arm/stm32l5/stm32l5_exti_gpio.c diff --git a/arch/arm/src/stm32l5/stm32l5_flash.c b/soc/arm/stm32l5/stm32l5_flash.c similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_flash.c rename to soc/arm/stm32l5/stm32l5_flash.c diff --git a/arch/arm/src/stm32l5/stm32l5_flash.h b/soc/arm/stm32l5/stm32l5_flash.h similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_flash.h rename to soc/arm/stm32l5/stm32l5_flash.h diff --git a/arch/arm/src/stm32l5/stm32l5_gpio.c b/soc/arm/stm32l5/stm32l5_gpio.c similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_gpio.c rename to soc/arm/stm32l5/stm32l5_gpio.c diff --git a/arch/arm/src/stm32l5/stm32l5_gpio.h b/soc/arm/stm32l5/stm32l5_gpio.h similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_gpio.h rename to soc/arm/stm32l5/stm32l5_gpio.h diff --git a/arch/arm/src/stm32l5/stm32l5_idle.c b/soc/arm/stm32l5/stm32l5_idle.c similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_idle.c rename to soc/arm/stm32l5/stm32l5_idle.c diff --git a/arch/arm/src/stm32l5/stm32l5_irq.c b/soc/arm/stm32l5/stm32l5_irq.c similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_irq.c rename to soc/arm/stm32l5/stm32l5_irq.c diff --git a/arch/arm/src/stm32l5/stm32l5_lowputc.c b/soc/arm/stm32l5/stm32l5_lowputc.c similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_lowputc.c rename to soc/arm/stm32l5/stm32l5_lowputc.c diff --git a/arch/arm/src/stm32l5/stm32l5_lowputc.h b/soc/arm/stm32l5/stm32l5_lowputc.h similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_lowputc.h rename to soc/arm/stm32l5/stm32l5_lowputc.h diff --git a/arch/arm/src/stm32l5/stm32l5_lse.c b/soc/arm/stm32l5/stm32l5_lse.c similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_lse.c rename to soc/arm/stm32l5/stm32l5_lse.c diff --git a/arch/arm/src/stm32l5/stm32l5_lsi.c b/soc/arm/stm32l5/stm32l5_lsi.c similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_lsi.c rename to soc/arm/stm32l5/stm32l5_lsi.c diff --git a/arch/arm/src/stm32l5/stm32l5_mpuinit.c b/soc/arm/stm32l5/stm32l5_mpuinit.c similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_mpuinit.c rename to soc/arm/stm32l5/stm32l5_mpuinit.c diff --git a/arch/arm/src/stm32l5/stm32l5_mpuinit.h b/soc/arm/stm32l5/stm32l5_mpuinit.h similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_mpuinit.h rename to soc/arm/stm32l5/stm32l5_mpuinit.h diff --git a/arch/arm/src/stm32l5/stm32l5_pwr.c b/soc/arm/stm32l5/stm32l5_pwr.c similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_pwr.c rename to soc/arm/stm32l5/stm32l5_pwr.c diff --git a/arch/arm/src/stm32l5/stm32l5_pwr.h b/soc/arm/stm32l5/stm32l5_pwr.h similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_pwr.h rename to soc/arm/stm32l5/stm32l5_pwr.h diff --git a/arch/arm/src/stm32l5/stm32l5_rcc.c b/soc/arm/stm32l5/stm32l5_rcc.c similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_rcc.c rename to soc/arm/stm32l5/stm32l5_rcc.c diff --git a/arch/arm/src/stm32l5/stm32l5_rcc.h b/soc/arm/stm32l5/stm32l5_rcc.h similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_rcc.h rename to soc/arm/stm32l5/stm32l5_rcc.h diff --git a/arch/arm/src/stm32l5/stm32l5_serial.c b/soc/arm/stm32l5/stm32l5_serial.c similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_serial.c rename to soc/arm/stm32l5/stm32l5_serial.c diff --git a/arch/arm/src/stm32l5/stm32l5_spi.c b/soc/arm/stm32l5/stm32l5_spi.c similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_spi.c rename to soc/arm/stm32l5/stm32l5_spi.c diff --git a/arch/arm/src/stm32l5/stm32l5_spi.h b/soc/arm/stm32l5/stm32l5_spi.h similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_spi.h rename to soc/arm/stm32l5/stm32l5_spi.h diff --git a/arch/arm/src/stm32l5/stm32l5_start.c b/soc/arm/stm32l5/stm32l5_start.c similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_start.c rename to soc/arm/stm32l5/stm32l5_start.c diff --git a/arch/arm/src/stm32l5/stm32l5_start.h b/soc/arm/stm32l5/stm32l5_start.h similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_start.h rename to soc/arm/stm32l5/stm32l5_start.h diff --git a/arch/arm/src/stm32l5/stm32l5_tim.c b/soc/arm/stm32l5/stm32l5_tim.c similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_tim.c rename to soc/arm/stm32l5/stm32l5_tim.c diff --git a/arch/arm/src/stm32l5/stm32l5_tim.h b/soc/arm/stm32l5/stm32l5_tim.h similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_tim.h rename to soc/arm/stm32l5/stm32l5_tim.h diff --git a/arch/arm/src/stm32l5/stm32l5_tim_lowerhalf.c b/soc/arm/stm32l5/stm32l5_tim_lowerhalf.c similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_tim_lowerhalf.c rename to soc/arm/stm32l5/stm32l5_tim_lowerhalf.c diff --git a/arch/arm/src/stm32l5/stm32l5_timerisr.c b/soc/arm/stm32l5/stm32l5_timerisr.c similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_timerisr.c rename to soc/arm/stm32l5/stm32l5_timerisr.c diff --git a/arch/arm/src/stm32l5/stm32l5_uart.h b/soc/arm/stm32l5/stm32l5_uart.h similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_uart.h rename to soc/arm/stm32l5/stm32l5_uart.h diff --git a/arch/arm/src/stm32l5/stm32l5_uid.c b/soc/arm/stm32l5/stm32l5_uid.c similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_uid.c rename to soc/arm/stm32l5/stm32l5_uid.c diff --git a/arch/arm/src/stm32l5/stm32l5_uid.h b/soc/arm/stm32l5/stm32l5_uid.h similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_uid.h rename to soc/arm/stm32l5/stm32l5_uid.h diff --git a/arch/arm/src/stm32l5/stm32l5_userspace.c b/soc/arm/stm32l5/stm32l5_userspace.c similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_userspace.c rename to soc/arm/stm32l5/stm32l5_userspace.c diff --git a/arch/arm/src/stm32l5/stm32l5_userspace.h b/soc/arm/stm32l5/stm32l5_userspace.h similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_userspace.h rename to soc/arm/stm32l5/stm32l5_userspace.h diff --git a/arch/arm/src/stm32l5/stm32l5_waste.c b/soc/arm/stm32l5/stm32l5_waste.c similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_waste.c rename to soc/arm/stm32l5/stm32l5_waste.c diff --git a/arch/arm/src/stm32l5/stm32l5_waste.h b/soc/arm/stm32l5/stm32l5_waste.h similarity index 100% rename from arch/arm/src/stm32l5/stm32l5_waste.h rename to soc/arm/stm32l5/stm32l5_waste.h diff --git a/arch/arm/src/stm32u5/CMakeLists.txt b/soc/arm/stm32u5/CMakeLists.txt similarity index 100% rename from arch/arm/src/stm32u5/CMakeLists.txt rename to soc/arm/stm32u5/CMakeLists.txt diff --git a/arch/arm/src/stm32u5/Kconfig b/soc/arm/stm32u5/Kconfig similarity index 100% rename from arch/arm/src/stm32u5/Kconfig rename to soc/arm/stm32u5/Kconfig diff --git a/arch/arm/src/stm32u5/Make.defs b/soc/arm/stm32u5/Make.defs similarity index 100% rename from arch/arm/src/stm32u5/Make.defs rename to soc/arm/stm32u5/Make.defs diff --git a/arch/arm/src/stm32u5/chip.h b/soc/arm/stm32u5/chip.h similarity index 100% rename from arch/arm/src/stm32u5/chip.h rename to soc/arm/stm32u5/chip.h diff --git a/arch/arm/src/stm32u5/hardware/stm32_exti.h b/soc/arm/stm32u5/hardware/stm32_exti.h similarity index 100% rename from arch/arm/src/stm32u5/hardware/stm32_exti.h rename to soc/arm/stm32u5/hardware/stm32_exti.h diff --git a/arch/arm/src/stm32u5/hardware/stm32_flash.h b/soc/arm/stm32u5/hardware/stm32_flash.h similarity index 100% rename from arch/arm/src/stm32u5/hardware/stm32_flash.h rename to soc/arm/stm32u5/hardware/stm32_flash.h diff --git a/arch/arm/src/stm32u5/hardware/stm32_gpio.h b/soc/arm/stm32u5/hardware/stm32_gpio.h similarity index 100% rename from arch/arm/src/stm32u5/hardware/stm32_gpio.h rename to soc/arm/stm32u5/hardware/stm32_gpio.h diff --git a/arch/arm/src/stm32u5/hardware/stm32_i2c.h b/soc/arm/stm32u5/hardware/stm32_i2c.h similarity index 100% rename from arch/arm/src/stm32u5/hardware/stm32_i2c.h rename to soc/arm/stm32u5/hardware/stm32_i2c.h diff --git a/arch/arm/src/stm32u5/hardware/stm32_memorymap.h b/soc/arm/stm32u5/hardware/stm32_memorymap.h similarity index 100% rename from arch/arm/src/stm32u5/hardware/stm32_memorymap.h rename to soc/arm/stm32u5/hardware/stm32_memorymap.h diff --git a/arch/arm/src/stm32u5/hardware/stm32_pinmap.h b/soc/arm/stm32u5/hardware/stm32_pinmap.h similarity index 100% rename from arch/arm/src/stm32u5/hardware/stm32_pinmap.h rename to soc/arm/stm32u5/hardware/stm32_pinmap.h diff --git a/arch/arm/src/stm32u5/hardware/stm32_pwr.h b/soc/arm/stm32u5/hardware/stm32_pwr.h similarity index 100% rename from arch/arm/src/stm32u5/hardware/stm32_pwr.h rename to soc/arm/stm32u5/hardware/stm32_pwr.h diff --git a/arch/arm/src/stm32u5/hardware/stm32_spi.h b/soc/arm/stm32u5/hardware/stm32_spi.h similarity index 100% rename from arch/arm/src/stm32u5/hardware/stm32_spi.h rename to soc/arm/stm32u5/hardware/stm32_spi.h diff --git a/arch/arm/src/stm32u5/hardware/stm32_syscfg.h b/soc/arm/stm32u5/hardware/stm32_syscfg.h similarity index 100% rename from arch/arm/src/stm32u5/hardware/stm32_syscfg.h rename to soc/arm/stm32u5/hardware/stm32_syscfg.h diff --git a/arch/arm/src/stm32u5/hardware/stm32_tim.h b/soc/arm/stm32u5/hardware/stm32_tim.h similarity index 100% rename from arch/arm/src/stm32u5/hardware/stm32_tim.h rename to soc/arm/stm32u5/hardware/stm32_tim.h diff --git a/arch/arm/src/stm32u5/hardware/stm32_uart.h b/soc/arm/stm32u5/hardware/stm32_uart.h similarity index 100% rename from arch/arm/src/stm32u5/hardware/stm32_uart.h rename to soc/arm/stm32u5/hardware/stm32_uart.h diff --git a/arch/arm/src/stm32u5/hardware/stm32u5xx_dbgmcu.h b/soc/arm/stm32u5/hardware/stm32u5xx_dbgmcu.h similarity index 100% rename from arch/arm/src/stm32u5/hardware/stm32u5xx_dbgmcu.h rename to soc/arm/stm32u5/hardware/stm32u5xx_dbgmcu.h diff --git a/arch/arm/src/stm32u5/hardware/stm32u5xx_pinmap.h b/soc/arm/stm32u5/hardware/stm32u5xx_pinmap.h similarity index 100% rename from arch/arm/src/stm32u5/hardware/stm32u5xx_pinmap.h rename to soc/arm/stm32u5/hardware/stm32u5xx_pinmap.h diff --git a/arch/arm/src/stm32u5/hardware/stm32u5xx_rcc.h b/soc/arm/stm32u5/hardware/stm32u5xx_rcc.h similarity index 100% rename from arch/arm/src/stm32u5/hardware/stm32u5xx_rcc.h rename to soc/arm/stm32u5/hardware/stm32u5xx_rcc.h diff --git a/arch/arm/src/stm32u5/hardware/stm32u5xx_spi.h b/soc/arm/stm32u5/hardware/stm32u5xx_spi.h similarity index 100% rename from arch/arm/src/stm32u5/hardware/stm32u5xx_spi.h rename to soc/arm/stm32u5/hardware/stm32u5xx_spi.h diff --git a/arch/arm/src/stm32u5/hardware/stm32u5xx_syscfg.h b/soc/arm/stm32u5/hardware/stm32u5xx_syscfg.h similarity index 100% rename from arch/arm/src/stm32u5/hardware/stm32u5xx_syscfg.h rename to soc/arm/stm32u5/hardware/stm32u5xx_syscfg.h diff --git a/arch/arm/src/stm32u5/stm32.h b/soc/arm/stm32u5/stm32.h similarity index 100% rename from arch/arm/src/stm32u5/stm32.h rename to soc/arm/stm32u5/stm32.h diff --git a/arch/arm/src/stm32u5/stm32_allocateheap.c b/soc/arm/stm32u5/stm32_allocateheap.c similarity index 100% rename from arch/arm/src/stm32u5/stm32_allocateheap.c rename to soc/arm/stm32u5/stm32_allocateheap.c diff --git a/arch/arm/src/stm32u5/stm32_dbgmcu.h b/soc/arm/stm32u5/stm32_dbgmcu.h similarity index 100% rename from arch/arm/src/stm32u5/stm32_dbgmcu.h rename to soc/arm/stm32u5/stm32_dbgmcu.h diff --git a/arch/arm/src/stm32u5/stm32_dumpgpio.c b/soc/arm/stm32u5/stm32_dumpgpio.c similarity index 100% rename from arch/arm/src/stm32u5/stm32_dumpgpio.c rename to soc/arm/stm32u5/stm32_dumpgpio.c diff --git a/arch/arm/src/stm32u5/stm32_exti.h b/soc/arm/stm32u5/stm32_exti.h similarity index 100% rename from arch/arm/src/stm32u5/stm32_exti.h rename to soc/arm/stm32u5/stm32_exti.h diff --git a/arch/arm/src/stm32u5/stm32_exti_gpio.c b/soc/arm/stm32u5/stm32_exti_gpio.c similarity index 100% rename from arch/arm/src/stm32u5/stm32_exti_gpio.c rename to soc/arm/stm32u5/stm32_exti_gpio.c diff --git a/arch/arm/src/stm32u5/stm32_flash.c b/soc/arm/stm32u5/stm32_flash.c similarity index 100% rename from arch/arm/src/stm32u5/stm32_flash.c rename to soc/arm/stm32u5/stm32_flash.c diff --git a/arch/arm/src/stm32u5/stm32_flash.h b/soc/arm/stm32u5/stm32_flash.h similarity index 100% rename from arch/arm/src/stm32u5/stm32_flash.h rename to soc/arm/stm32u5/stm32_flash.h diff --git a/arch/arm/src/stm32u5/stm32_gpio.c b/soc/arm/stm32u5/stm32_gpio.c similarity index 100% rename from arch/arm/src/stm32u5/stm32_gpio.c rename to soc/arm/stm32u5/stm32_gpio.c diff --git a/arch/arm/src/stm32u5/stm32_gpio.h b/soc/arm/stm32u5/stm32_gpio.h similarity index 100% rename from arch/arm/src/stm32u5/stm32_gpio.h rename to soc/arm/stm32u5/stm32_gpio.h diff --git a/arch/arm/src/stm32u5/stm32_i2c.c b/soc/arm/stm32u5/stm32_i2c.c similarity index 100% rename from arch/arm/src/stm32u5/stm32_i2c.c rename to soc/arm/stm32u5/stm32_i2c.c diff --git a/arch/arm/src/stm32u5/stm32_i2c.h b/soc/arm/stm32u5/stm32_i2c.h similarity index 100% rename from arch/arm/src/stm32u5/stm32_i2c.h rename to soc/arm/stm32u5/stm32_i2c.h diff --git a/arch/arm/src/stm32u5/stm32_idle.c b/soc/arm/stm32u5/stm32_idle.c similarity index 100% rename from arch/arm/src/stm32u5/stm32_idle.c rename to soc/arm/stm32u5/stm32_idle.c diff --git a/arch/arm/src/stm32u5/stm32_irq.c b/soc/arm/stm32u5/stm32_irq.c similarity index 100% rename from arch/arm/src/stm32u5/stm32_irq.c rename to soc/arm/stm32u5/stm32_irq.c diff --git a/arch/arm/src/stm32u5/stm32_lowputc.c b/soc/arm/stm32u5/stm32_lowputc.c similarity index 100% rename from arch/arm/src/stm32u5/stm32_lowputc.c rename to soc/arm/stm32u5/stm32_lowputc.c diff --git a/arch/arm/src/stm32u5/stm32_lowputc.h b/soc/arm/stm32u5/stm32_lowputc.h similarity index 100% rename from arch/arm/src/stm32u5/stm32_lowputc.h rename to soc/arm/stm32u5/stm32_lowputc.h diff --git a/arch/arm/src/stm32u5/stm32_lse.c b/soc/arm/stm32u5/stm32_lse.c similarity index 100% rename from arch/arm/src/stm32u5/stm32_lse.c rename to soc/arm/stm32u5/stm32_lse.c diff --git a/arch/arm/src/stm32u5/stm32_lsi.c b/soc/arm/stm32u5/stm32_lsi.c similarity index 100% rename from arch/arm/src/stm32u5/stm32_lsi.c rename to soc/arm/stm32u5/stm32_lsi.c diff --git a/arch/arm/src/stm32u5/stm32_mpuinit.c b/soc/arm/stm32u5/stm32_mpuinit.c similarity index 100% rename from arch/arm/src/stm32u5/stm32_mpuinit.c rename to soc/arm/stm32u5/stm32_mpuinit.c diff --git a/arch/arm/src/stm32u5/stm32_mpuinit.h b/soc/arm/stm32u5/stm32_mpuinit.h similarity index 100% rename from arch/arm/src/stm32u5/stm32_mpuinit.h rename to soc/arm/stm32u5/stm32_mpuinit.h diff --git a/arch/arm/src/stm32u5/stm32_pwr.c b/soc/arm/stm32u5/stm32_pwr.c similarity index 100% rename from arch/arm/src/stm32u5/stm32_pwr.c rename to soc/arm/stm32u5/stm32_pwr.c diff --git a/arch/arm/src/stm32u5/stm32_pwr.h b/soc/arm/stm32u5/stm32_pwr.h similarity index 100% rename from arch/arm/src/stm32u5/stm32_pwr.h rename to soc/arm/stm32u5/stm32_pwr.h diff --git a/arch/arm/src/stm32u5/stm32_rcc.c b/soc/arm/stm32u5/stm32_rcc.c similarity index 100% rename from arch/arm/src/stm32u5/stm32_rcc.c rename to soc/arm/stm32u5/stm32_rcc.c diff --git a/arch/arm/src/stm32u5/stm32_rcc.h b/soc/arm/stm32u5/stm32_rcc.h similarity index 100% rename from arch/arm/src/stm32u5/stm32_rcc.h rename to soc/arm/stm32u5/stm32_rcc.h diff --git a/arch/arm/src/stm32u5/stm32_serial.c b/soc/arm/stm32u5/stm32_serial.c similarity index 100% rename from arch/arm/src/stm32u5/stm32_serial.c rename to soc/arm/stm32u5/stm32_serial.c diff --git a/arch/arm/src/stm32u5/stm32_spi.c b/soc/arm/stm32u5/stm32_spi.c similarity index 100% rename from arch/arm/src/stm32u5/stm32_spi.c rename to soc/arm/stm32u5/stm32_spi.c diff --git a/arch/arm/src/stm32u5/stm32_spi.h b/soc/arm/stm32u5/stm32_spi.h similarity index 100% rename from arch/arm/src/stm32u5/stm32_spi.h rename to soc/arm/stm32u5/stm32_spi.h diff --git a/arch/arm/src/stm32u5/stm32_start.c b/soc/arm/stm32u5/stm32_start.c similarity index 100% rename from arch/arm/src/stm32u5/stm32_start.c rename to soc/arm/stm32u5/stm32_start.c diff --git a/arch/arm/src/stm32u5/stm32_start.h b/soc/arm/stm32u5/stm32_start.h similarity index 100% rename from arch/arm/src/stm32u5/stm32_start.h rename to soc/arm/stm32u5/stm32_start.h diff --git a/arch/arm/src/stm32u5/stm32_tim.c b/soc/arm/stm32u5/stm32_tim.c similarity index 100% rename from arch/arm/src/stm32u5/stm32_tim.c rename to soc/arm/stm32u5/stm32_tim.c diff --git a/arch/arm/src/stm32u5/stm32_tim.h b/soc/arm/stm32u5/stm32_tim.h similarity index 100% rename from arch/arm/src/stm32u5/stm32_tim.h rename to soc/arm/stm32u5/stm32_tim.h diff --git a/arch/arm/src/stm32u5/stm32_tim_lowerhalf.c b/soc/arm/stm32u5/stm32_tim_lowerhalf.c similarity index 100% rename from arch/arm/src/stm32u5/stm32_tim_lowerhalf.c rename to soc/arm/stm32u5/stm32_tim_lowerhalf.c diff --git a/arch/arm/src/stm32u5/stm32_timerisr.c b/soc/arm/stm32u5/stm32_timerisr.c similarity index 100% rename from arch/arm/src/stm32u5/stm32_timerisr.c rename to soc/arm/stm32u5/stm32_timerisr.c diff --git a/arch/arm/src/stm32u5/stm32_uart.h b/soc/arm/stm32u5/stm32_uart.h similarity index 100% rename from arch/arm/src/stm32u5/stm32_uart.h rename to soc/arm/stm32u5/stm32_uart.h diff --git a/arch/arm/src/stm32u5/stm32_uid.c b/soc/arm/stm32u5/stm32_uid.c similarity index 100% rename from arch/arm/src/stm32u5/stm32_uid.c rename to soc/arm/stm32u5/stm32_uid.c diff --git a/arch/arm/src/stm32u5/stm32_uid.h b/soc/arm/stm32u5/stm32_uid.h similarity index 100% rename from arch/arm/src/stm32u5/stm32_uid.h rename to soc/arm/stm32u5/stm32_uid.h diff --git a/arch/arm/src/stm32u5/stm32_userspace.c b/soc/arm/stm32u5/stm32_userspace.c similarity index 100% rename from arch/arm/src/stm32u5/stm32_userspace.c rename to soc/arm/stm32u5/stm32_userspace.c diff --git a/arch/arm/src/stm32u5/stm32_userspace.h b/soc/arm/stm32u5/stm32_userspace.h similarity index 100% rename from arch/arm/src/stm32u5/stm32_userspace.h rename to soc/arm/stm32u5/stm32_userspace.h diff --git a/arch/arm/src/stm32u5/stm32_waste.c b/soc/arm/stm32u5/stm32_waste.c similarity index 100% rename from arch/arm/src/stm32u5/stm32_waste.c rename to soc/arm/stm32u5/stm32_waste.c diff --git a/arch/arm/src/stm32u5/stm32_waste.h b/soc/arm/stm32u5/stm32_waste.h similarity index 100% rename from arch/arm/src/stm32u5/stm32_waste.h rename to soc/arm/stm32u5/stm32_waste.h diff --git a/arch/arm/src/stm32u5/stm32u5xx_rcc.c b/soc/arm/stm32u5/stm32u5xx_rcc.c similarity index 100% rename from arch/arm/src/stm32u5/stm32u5xx_rcc.c rename to soc/arm/stm32u5/stm32u5xx_rcc.c diff --git a/arch/arm/src/stm32wb/Kconfig b/soc/arm/stm32wb/Kconfig similarity index 100% rename from arch/arm/src/stm32wb/Kconfig rename to soc/arm/stm32wb/Kconfig diff --git a/arch/arm/src/stm32wb/Make.defs b/soc/arm/stm32wb/Make.defs similarity index 100% rename from arch/arm/src/stm32wb/Make.defs rename to soc/arm/stm32wb/Make.defs diff --git a/arch/arm/src/stm32wb/chip.h b/soc/arm/stm32wb/chip.h similarity index 100% rename from arch/arm/src/stm32wb/chip.h rename to soc/arm/stm32wb/chip.h diff --git a/arch/arm/src/stm32wb/hardware/stm32wb_crs.h b/soc/arm/stm32wb/hardware/stm32wb_crs.h similarity index 100% rename from arch/arm/src/stm32wb/hardware/stm32wb_crs.h rename to soc/arm/stm32wb/hardware/stm32wb_crs.h diff --git a/arch/arm/src/stm32wb/hardware/stm32wb_dma.h b/soc/arm/stm32wb/hardware/stm32wb_dma.h similarity index 100% rename from arch/arm/src/stm32wb/hardware/stm32wb_dma.h rename to soc/arm/stm32wb/hardware/stm32wb_dma.h diff --git a/arch/arm/src/stm32wb/hardware/stm32wb_dmamux.h b/soc/arm/stm32wb/hardware/stm32wb_dmamux.h similarity index 100% rename from arch/arm/src/stm32wb/hardware/stm32wb_dmamux.h rename to soc/arm/stm32wb/hardware/stm32wb_dmamux.h diff --git a/arch/arm/src/stm32wb/hardware/stm32wb_exti.h b/soc/arm/stm32wb/hardware/stm32wb_exti.h similarity index 100% rename from arch/arm/src/stm32wb/hardware/stm32wb_exti.h rename to soc/arm/stm32wb/hardware/stm32wb_exti.h diff --git a/arch/arm/src/stm32wb/hardware/stm32wb_flash.h b/soc/arm/stm32wb/hardware/stm32wb_flash.h similarity index 100% rename from arch/arm/src/stm32wb/hardware/stm32wb_flash.h rename to soc/arm/stm32wb/hardware/stm32wb_flash.h diff --git a/arch/arm/src/stm32wb/hardware/stm32wb_gpio.h b/soc/arm/stm32wb/hardware/stm32wb_gpio.h similarity index 100% rename from arch/arm/src/stm32wb/hardware/stm32wb_gpio.h rename to soc/arm/stm32wb/hardware/stm32wb_gpio.h diff --git a/arch/arm/src/stm32wb/hardware/stm32wb_i2c.h b/soc/arm/stm32wb/hardware/stm32wb_i2c.h similarity index 100% rename from arch/arm/src/stm32wb/hardware/stm32wb_i2c.h rename to soc/arm/stm32wb/hardware/stm32wb_i2c.h diff --git a/arch/arm/src/stm32wb/hardware/stm32wb_ipcc.h b/soc/arm/stm32wb/hardware/stm32wb_ipcc.h similarity index 100% rename from arch/arm/src/stm32wb/hardware/stm32wb_ipcc.h rename to soc/arm/stm32wb/hardware/stm32wb_ipcc.h diff --git a/arch/arm/src/stm32wb/hardware/stm32wb_memorymap.h b/soc/arm/stm32wb/hardware/stm32wb_memorymap.h similarity index 100% rename from arch/arm/src/stm32wb/hardware/stm32wb_memorymap.h rename to soc/arm/stm32wb/hardware/stm32wb_memorymap.h diff --git a/arch/arm/src/stm32wb/hardware/stm32wb_pinmap.h b/soc/arm/stm32wb/hardware/stm32wb_pinmap.h similarity index 100% rename from arch/arm/src/stm32wb/hardware/stm32wb_pinmap.h rename to soc/arm/stm32wb/hardware/stm32wb_pinmap.h diff --git a/arch/arm/src/stm32wb/hardware/stm32wb_pwr.h b/soc/arm/stm32wb/hardware/stm32wb_pwr.h similarity index 100% rename from arch/arm/src/stm32wb/hardware/stm32wb_pwr.h rename to soc/arm/stm32wb/hardware/stm32wb_pwr.h diff --git a/arch/arm/src/stm32wb/hardware/stm32wb_rcc.h b/soc/arm/stm32wb/hardware/stm32wb_rcc.h similarity index 100% rename from arch/arm/src/stm32wb/hardware/stm32wb_rcc.h rename to soc/arm/stm32wb/hardware/stm32wb_rcc.h diff --git a/arch/arm/src/stm32wb/hardware/stm32wb_rtc.h b/soc/arm/stm32wb/hardware/stm32wb_rtc.h similarity index 100% rename from arch/arm/src/stm32wb/hardware/stm32wb_rtc.h rename to soc/arm/stm32wb/hardware/stm32wb_rtc.h diff --git a/arch/arm/src/stm32wb/hardware/stm32wb_spi.h b/soc/arm/stm32wb/hardware/stm32wb_spi.h similarity index 100% rename from arch/arm/src/stm32wb/hardware/stm32wb_spi.h rename to soc/arm/stm32wb/hardware/stm32wb_spi.h diff --git a/arch/arm/src/stm32wb/hardware/stm32wb_syscfg.h b/soc/arm/stm32wb/hardware/stm32wb_syscfg.h similarity index 100% rename from arch/arm/src/stm32wb/hardware/stm32wb_syscfg.h rename to soc/arm/stm32wb/hardware/stm32wb_syscfg.h diff --git a/arch/arm/src/stm32wb/hardware/stm32wb_tim.h b/soc/arm/stm32wb/hardware/stm32wb_tim.h similarity index 100% rename from arch/arm/src/stm32wb/hardware/stm32wb_tim.h rename to soc/arm/stm32wb/hardware/stm32wb_tim.h diff --git a/arch/arm/src/stm32wb/hardware/stm32wb_uart.h b/soc/arm/stm32wb/hardware/stm32wb_uart.h similarity index 100% rename from arch/arm/src/stm32wb/hardware/stm32wb_uart.h rename to soc/arm/stm32wb/hardware/stm32wb_uart.h diff --git a/arch/arm/src/stm32wb/hardware/stm32wbxx_pinmap.h b/soc/arm/stm32wb/hardware/stm32wbxx_pinmap.h similarity index 100% rename from arch/arm/src/stm32wb/hardware/stm32wbxx_pinmap.h rename to soc/arm/stm32wb/hardware/stm32wbxx_pinmap.h diff --git a/arch/arm/src/stm32wb/hardware/stm32wbxx_pinmap_legacy.h b/soc/arm/stm32wb/hardware/stm32wbxx_pinmap_legacy.h similarity index 100% rename from arch/arm/src/stm32wb/hardware/stm32wbxx_pinmap_legacy.h rename to soc/arm/stm32wb/hardware/stm32wbxx_pinmap_legacy.h diff --git a/arch/arm/src/stm32wb/stm32wb.h b/soc/arm/stm32wb/stm32wb.h similarity index 100% rename from arch/arm/src/stm32wb/stm32wb.h rename to soc/arm/stm32wb/stm32wb.h diff --git a/arch/arm/src/stm32wb/stm32wb_allocateheap.c b/soc/arm/stm32wb/stm32wb_allocateheap.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_allocateheap.c rename to soc/arm/stm32wb/stm32wb_allocateheap.c diff --git a/arch/arm/src/stm32wb/stm32wb_blehci.c b/soc/arm/stm32wb/stm32wb_blehci.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_blehci.c rename to soc/arm/stm32wb/stm32wb_blehci.c diff --git a/arch/arm/src/stm32wb/stm32wb_blehci.h b/soc/arm/stm32wb/stm32wb_blehci.h similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_blehci.h rename to soc/arm/stm32wb/stm32wb_blehci.h diff --git a/arch/arm/src/stm32wb/stm32wb_dma.c b/soc/arm/stm32wb/stm32wb_dma.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_dma.c rename to soc/arm/stm32wb/stm32wb_dma.c diff --git a/arch/arm/src/stm32wb/stm32wb_dma.h b/soc/arm/stm32wb/stm32wb_dma.h similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_dma.h rename to soc/arm/stm32wb/stm32wb_dma.h diff --git a/arch/arm/src/stm32wb/stm32wb_dumpgpio.c b/soc/arm/stm32wb/stm32wb_dumpgpio.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_dumpgpio.c rename to soc/arm/stm32wb/stm32wb_dumpgpio.c diff --git a/arch/arm/src/stm32wb/stm32wb_exti.h b/soc/arm/stm32wb/stm32wb_exti.h similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_exti.h rename to soc/arm/stm32wb/stm32wb_exti.h diff --git a/arch/arm/src/stm32wb/stm32wb_exti_alarm.c b/soc/arm/stm32wb/stm32wb_exti_alarm.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_exti_alarm.c rename to soc/arm/stm32wb/stm32wb_exti_alarm.c diff --git a/arch/arm/src/stm32wb/stm32wb_exti_gpio.c b/soc/arm/stm32wb/stm32wb_exti_gpio.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_exti_gpio.c rename to soc/arm/stm32wb/stm32wb_exti_gpio.c diff --git a/arch/arm/src/stm32wb/stm32wb_exti_pwr.c b/soc/arm/stm32wb/stm32wb_exti_pwr.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_exti_pwr.c rename to soc/arm/stm32wb/stm32wb_exti_pwr.c diff --git a/arch/arm/src/stm32wb/stm32wb_exti_wakeup.c b/soc/arm/stm32wb/stm32wb_exti_wakeup.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_exti_wakeup.c rename to soc/arm/stm32wb/stm32wb_exti_wakeup.c diff --git a/arch/arm/src/stm32wb/stm32wb_flash.c b/soc/arm/stm32wb/stm32wb_flash.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_flash.c rename to soc/arm/stm32wb/stm32wb_flash.c diff --git a/arch/arm/src/stm32wb/stm32wb_flash.h b/soc/arm/stm32wb/stm32wb_flash.h similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_flash.h rename to soc/arm/stm32wb/stm32wb_flash.h diff --git a/arch/arm/src/stm32wb/stm32wb_freerun.c b/soc/arm/stm32wb/stm32wb_freerun.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_freerun.c rename to soc/arm/stm32wb/stm32wb_freerun.c diff --git a/arch/arm/src/stm32wb/stm32wb_freerun.h b/soc/arm/stm32wb/stm32wb_freerun.h similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_freerun.h rename to soc/arm/stm32wb/stm32wb_freerun.h diff --git a/arch/arm/src/stm32wb/stm32wb_gpio.c b/soc/arm/stm32wb/stm32wb_gpio.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_gpio.c rename to soc/arm/stm32wb/stm32wb_gpio.c diff --git a/arch/arm/src/stm32wb/stm32wb_gpio.h b/soc/arm/stm32wb/stm32wb_gpio.h similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_gpio.h rename to soc/arm/stm32wb/stm32wb_gpio.h diff --git a/arch/arm/src/stm32wb/stm32wb_i2c.c b/soc/arm/stm32wb/stm32wb_i2c.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_i2c.c rename to soc/arm/stm32wb/stm32wb_i2c.c diff --git a/arch/arm/src/stm32wb/stm32wb_i2c.h b/soc/arm/stm32wb/stm32wb_i2c.h similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_i2c.h rename to soc/arm/stm32wb/stm32wb_i2c.h diff --git a/arch/arm/src/stm32wb/stm32wb_idle.c b/soc/arm/stm32wb/stm32wb_idle.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_idle.c rename to soc/arm/stm32wb/stm32wb_idle.c diff --git a/arch/arm/src/stm32wb/stm32wb_ipcc.c b/soc/arm/stm32wb/stm32wb_ipcc.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_ipcc.c rename to soc/arm/stm32wb/stm32wb_ipcc.c diff --git a/arch/arm/src/stm32wb/stm32wb_ipcc.h b/soc/arm/stm32wb/stm32wb_ipcc.h similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_ipcc.h rename to soc/arm/stm32wb/stm32wb_ipcc.h diff --git a/arch/arm/src/stm32wb/stm32wb_irq.c b/soc/arm/stm32wb/stm32wb_irq.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_irq.c rename to soc/arm/stm32wb/stm32wb_irq.c diff --git a/arch/arm/src/stm32wb/stm32wb_lowputc.c b/soc/arm/stm32wb/stm32wb_lowputc.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_lowputc.c rename to soc/arm/stm32wb/stm32wb_lowputc.c diff --git a/arch/arm/src/stm32wb/stm32wb_lowputc.h b/soc/arm/stm32wb/stm32wb_lowputc.h similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_lowputc.h rename to soc/arm/stm32wb/stm32wb_lowputc.h diff --git a/arch/arm/src/stm32wb/stm32wb_mbox.c b/soc/arm/stm32wb/stm32wb_mbox.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_mbox.c rename to soc/arm/stm32wb/stm32wb_mbox.c diff --git a/arch/arm/src/stm32wb/stm32wb_mbox.h b/soc/arm/stm32wb/stm32wb_mbox.h similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_mbox.h rename to soc/arm/stm32wb/stm32wb_mbox.h diff --git a/arch/arm/src/stm32wb/stm32wb_mbox_list.h b/soc/arm/stm32wb/stm32wb_mbox_list.h similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_mbox_list.h rename to soc/arm/stm32wb/stm32wb_mbox_list.h diff --git a/arch/arm/src/stm32wb/stm32wb_mbox_shci.h b/soc/arm/stm32wb/stm32wb_mbox_shci.h similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_mbox_shci.h rename to soc/arm/stm32wb/stm32wb_mbox_shci.h diff --git a/arch/arm/src/stm32wb/stm32wb_mpuinit.c b/soc/arm/stm32wb/stm32wb_mpuinit.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_mpuinit.c rename to soc/arm/stm32wb/stm32wb_mpuinit.c diff --git a/arch/arm/src/stm32wb/stm32wb_mpuinit.h b/soc/arm/stm32wb/stm32wb_mpuinit.h similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_mpuinit.h rename to soc/arm/stm32wb/stm32wb_mpuinit.h diff --git a/arch/arm/src/stm32wb/stm32wb_oneshot.c b/soc/arm/stm32wb/stm32wb_oneshot.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_oneshot.c rename to soc/arm/stm32wb/stm32wb_oneshot.c diff --git a/arch/arm/src/stm32wb/stm32wb_oneshot.h b/soc/arm/stm32wb/stm32wb_oneshot.h similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_oneshot.h rename to soc/arm/stm32wb/stm32wb_oneshot.h diff --git a/arch/arm/src/stm32wb/stm32wb_oneshot_lowerhalf.c b/soc/arm/stm32wb/stm32wb_oneshot_lowerhalf.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_oneshot_lowerhalf.c rename to soc/arm/stm32wb/stm32wb_oneshot_lowerhalf.c diff --git a/arch/arm/src/stm32wb/stm32wb_pm.h b/soc/arm/stm32wb/stm32wb_pm.h similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_pm.h rename to soc/arm/stm32wb/stm32wb_pm.h diff --git a/arch/arm/src/stm32wb/stm32wb_pminitialize.c b/soc/arm/stm32wb/stm32wb_pminitialize.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_pminitialize.c rename to soc/arm/stm32wb/stm32wb_pminitialize.c diff --git a/arch/arm/src/stm32wb/stm32wb_pmlpr.c b/soc/arm/stm32wb/stm32wb_pmlpr.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_pmlpr.c rename to soc/arm/stm32wb/stm32wb_pmlpr.c diff --git a/arch/arm/src/stm32wb/stm32wb_pmsleep.c b/soc/arm/stm32wb/stm32wb_pmsleep.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_pmsleep.c rename to soc/arm/stm32wb/stm32wb_pmsleep.c diff --git a/arch/arm/src/stm32wb/stm32wb_pmstandby.c b/soc/arm/stm32wb/stm32wb_pmstandby.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_pmstandby.c rename to soc/arm/stm32wb/stm32wb_pmstandby.c diff --git a/arch/arm/src/stm32wb/stm32wb_pmstop.c b/soc/arm/stm32wb/stm32wb_pmstop.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_pmstop.c rename to soc/arm/stm32wb/stm32wb_pmstop.c diff --git a/arch/arm/src/stm32wb/stm32wb_pwr.c b/soc/arm/stm32wb/stm32wb_pwr.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_pwr.c rename to soc/arm/stm32wb/stm32wb_pwr.c diff --git a/arch/arm/src/stm32wb/stm32wb_pwr.h b/soc/arm/stm32wb/stm32wb_pwr.h similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_pwr.h rename to soc/arm/stm32wb/stm32wb_pwr.h diff --git a/arch/arm/src/stm32wb/stm32wb_rcc.c b/soc/arm/stm32wb/stm32wb_rcc.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_rcc.c rename to soc/arm/stm32wb/stm32wb_rcc.c diff --git a/arch/arm/src/stm32wb/stm32wb_rcc.h b/soc/arm/stm32wb/stm32wb_rcc.h similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_rcc.h rename to soc/arm/stm32wb/stm32wb_rcc.h diff --git a/arch/arm/src/stm32wb/stm32wb_rcc_hsi48.c b/soc/arm/stm32wb/stm32wb_rcc_hsi48.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_rcc_hsi48.c rename to soc/arm/stm32wb/stm32wb_rcc_hsi48.c diff --git a/arch/arm/src/stm32wb/stm32wb_rcc_lse.c b/soc/arm/stm32wb/stm32wb_rcc_lse.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_rcc_lse.c rename to soc/arm/stm32wb/stm32wb_rcc_lse.c diff --git a/arch/arm/src/stm32wb/stm32wb_rcc_lsi.c b/soc/arm/stm32wb/stm32wb_rcc_lsi.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_rcc_lsi.c rename to soc/arm/stm32wb/stm32wb_rcc_lsi.c diff --git a/arch/arm/src/stm32wb/stm32wb_rtc.c b/soc/arm/stm32wb/stm32wb_rtc.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_rtc.c rename to soc/arm/stm32wb/stm32wb_rtc.c diff --git a/arch/arm/src/stm32wb/stm32wb_rtc.h b/soc/arm/stm32wb/stm32wb_rtc.h similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_rtc.h rename to soc/arm/stm32wb/stm32wb_rtc.h diff --git a/arch/arm/src/stm32wb/stm32wb_rtc_lowerhalf.c b/soc/arm/stm32wb/stm32wb_rtc_lowerhalf.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_rtc_lowerhalf.c rename to soc/arm/stm32wb/stm32wb_rtc_lowerhalf.c diff --git a/arch/arm/src/stm32wb/stm32wb_serial.c b/soc/arm/stm32wb/stm32wb_serial.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_serial.c rename to soc/arm/stm32wb/stm32wb_serial.c diff --git a/arch/arm/src/stm32wb/stm32wb_spi.c b/soc/arm/stm32wb/stm32wb_spi.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_spi.c rename to soc/arm/stm32wb/stm32wb_spi.c diff --git a/arch/arm/src/stm32wb/stm32wb_spi.h b/soc/arm/stm32wb/stm32wb_spi.h similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_spi.h rename to soc/arm/stm32wb/stm32wb_spi.h diff --git a/arch/arm/src/stm32wb/stm32wb_start.c b/soc/arm/stm32wb/stm32wb_start.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_start.c rename to soc/arm/stm32wb/stm32wb_start.c diff --git a/arch/arm/src/stm32wb/stm32wb_start.h b/soc/arm/stm32wb/stm32wb_start.h similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_start.h rename to soc/arm/stm32wb/stm32wb_start.h diff --git a/arch/arm/src/stm32wb/stm32wb_tickless.c b/soc/arm/stm32wb/stm32wb_tickless.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_tickless.c rename to soc/arm/stm32wb/stm32wb_tickless.c diff --git a/arch/arm/src/stm32wb/stm32wb_tim.c b/soc/arm/stm32wb/stm32wb_tim.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_tim.c rename to soc/arm/stm32wb/stm32wb_tim.c diff --git a/arch/arm/src/stm32wb/stm32wb_tim.h b/soc/arm/stm32wb/stm32wb_tim.h similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_tim.h rename to soc/arm/stm32wb/stm32wb_tim.h diff --git a/arch/arm/src/stm32wb/stm32wb_tim_lowerhalf.c b/soc/arm/stm32wb/stm32wb_tim_lowerhalf.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_tim_lowerhalf.c rename to soc/arm/stm32wb/stm32wb_tim_lowerhalf.c diff --git a/arch/arm/src/stm32wb/stm32wb_timerisr.c b/soc/arm/stm32wb/stm32wb_timerisr.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_timerisr.c rename to soc/arm/stm32wb/stm32wb_timerisr.c diff --git a/arch/arm/src/stm32wb/stm32wb_uart.h b/soc/arm/stm32wb/stm32wb_uart.h similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_uart.h rename to soc/arm/stm32wb/stm32wb_uart.h diff --git a/arch/arm/src/stm32wb/stm32wb_uid.c b/soc/arm/stm32wb/stm32wb_uid.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_uid.c rename to soc/arm/stm32wb/stm32wb_uid.c diff --git a/arch/arm/src/stm32wb/stm32wb_uid.h b/soc/arm/stm32wb/stm32wb_uid.h similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_uid.h rename to soc/arm/stm32wb/stm32wb_uid.h diff --git a/arch/arm/src/stm32wb/stm32wb_userspace.c b/soc/arm/stm32wb/stm32wb_userspace.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_userspace.c rename to soc/arm/stm32wb/stm32wb_userspace.c diff --git a/arch/arm/src/stm32wb/stm32wb_userspace.h b/soc/arm/stm32wb/stm32wb_userspace.h similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_userspace.h rename to soc/arm/stm32wb/stm32wb_userspace.h diff --git a/arch/arm/src/stm32wb/stm32wb_waste.c b/soc/arm/stm32wb/stm32wb_waste.c similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_waste.c rename to soc/arm/stm32wb/stm32wb_waste.c diff --git a/arch/arm/src/stm32wb/stm32wb_waste.h b/soc/arm/stm32wb/stm32wb_waste.h similarity index 100% rename from arch/arm/src/stm32wb/stm32wb_waste.h rename to soc/arm/stm32wb/stm32wb_waste.h diff --git a/arch/arm/src/stm32wl5/Kconfig b/soc/arm/stm32wl5/Kconfig similarity index 100% rename from arch/arm/src/stm32wl5/Kconfig rename to soc/arm/stm32wl5/Kconfig diff --git a/arch/arm/src/stm32wl5/Make.defs b/soc/arm/stm32wl5/Make.defs similarity index 100% rename from arch/arm/src/stm32wl5/Make.defs rename to soc/arm/stm32wl5/Make.defs diff --git a/arch/arm/src/stm32wl5/chip.h b/soc/arm/stm32wl5/chip.h similarity index 100% rename from arch/arm/src/stm32wl5/chip.h rename to soc/arm/stm32wl5/chip.h diff --git a/arch/arm/src/stm32wl5/hardware/stm32wl5_exti.h b/soc/arm/stm32wl5/hardware/stm32wl5_exti.h similarity index 100% rename from arch/arm/src/stm32wl5/hardware/stm32wl5_exti.h rename to soc/arm/stm32wl5/hardware/stm32wl5_exti.h diff --git a/arch/arm/src/stm32wl5/hardware/stm32wl5_flash.h b/soc/arm/stm32wl5/hardware/stm32wl5_flash.h similarity index 100% rename from arch/arm/src/stm32wl5/hardware/stm32wl5_flash.h rename to soc/arm/stm32wl5/hardware/stm32wl5_flash.h diff --git a/arch/arm/src/stm32wl5/hardware/stm32wl5_gpio.h b/soc/arm/stm32wl5/hardware/stm32wl5_gpio.h similarity index 100% rename from arch/arm/src/stm32wl5/hardware/stm32wl5_gpio.h rename to soc/arm/stm32wl5/hardware/stm32wl5_gpio.h diff --git a/arch/arm/src/stm32wl5/hardware/stm32wl5_ipcc.h b/soc/arm/stm32wl5/hardware/stm32wl5_ipcc.h similarity index 100% rename from arch/arm/src/stm32wl5/hardware/stm32wl5_ipcc.h rename to soc/arm/stm32wl5/hardware/stm32wl5_ipcc.h diff --git a/arch/arm/src/stm32wl5/hardware/stm32wl5_memorymap.h b/soc/arm/stm32wl5/hardware/stm32wl5_memorymap.h similarity index 100% rename from arch/arm/src/stm32wl5/hardware/stm32wl5_memorymap.h rename to soc/arm/stm32wl5/hardware/stm32wl5_memorymap.h diff --git a/arch/arm/src/stm32wl5/hardware/stm32wl5_pinmap.h b/soc/arm/stm32wl5/hardware/stm32wl5_pinmap.h similarity index 100% rename from arch/arm/src/stm32wl5/hardware/stm32wl5_pinmap.h rename to soc/arm/stm32wl5/hardware/stm32wl5_pinmap.h diff --git a/arch/arm/src/stm32wl5/hardware/stm32wl5_pwr.h b/soc/arm/stm32wl5/hardware/stm32wl5_pwr.h similarity index 100% rename from arch/arm/src/stm32wl5/hardware/stm32wl5_pwr.h rename to soc/arm/stm32wl5/hardware/stm32wl5_pwr.h diff --git a/arch/arm/src/stm32wl5/hardware/stm32wl5_rcc.h b/soc/arm/stm32wl5/hardware/stm32wl5_rcc.h similarity index 100% rename from arch/arm/src/stm32wl5/hardware/stm32wl5_rcc.h rename to soc/arm/stm32wl5/hardware/stm32wl5_rcc.h diff --git a/arch/arm/src/stm32wl5/hardware/stm32wl5_spi.h b/soc/arm/stm32wl5/hardware/stm32wl5_spi.h similarity index 100% rename from arch/arm/src/stm32wl5/hardware/stm32wl5_spi.h rename to soc/arm/stm32wl5/hardware/stm32wl5_spi.h diff --git a/arch/arm/src/stm32wl5/hardware/stm32wl5_syscfg.h b/soc/arm/stm32wl5/hardware/stm32wl5_syscfg.h similarity index 100% rename from arch/arm/src/stm32wl5/hardware/stm32wl5_syscfg.h rename to soc/arm/stm32wl5/hardware/stm32wl5_syscfg.h diff --git a/arch/arm/src/stm32wl5/hardware/stm32wl5_tim.h b/soc/arm/stm32wl5/hardware/stm32wl5_tim.h similarity index 100% rename from arch/arm/src/stm32wl5/hardware/stm32wl5_tim.h rename to soc/arm/stm32wl5/hardware/stm32wl5_tim.h diff --git a/arch/arm/src/stm32wl5/hardware/stm32wl5_uart.h b/soc/arm/stm32wl5/hardware/stm32wl5_uart.h similarity index 100% rename from arch/arm/src/stm32wl5/hardware/stm32wl5_uart.h rename to soc/arm/stm32wl5/hardware/stm32wl5_uart.h diff --git a/arch/arm/src/stm32wl5/stm32wl5.h b/soc/arm/stm32wl5/stm32wl5.h similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5.h rename to soc/arm/stm32wl5/stm32wl5.h diff --git a/arch/arm/src/stm32wl5/stm32wl5_allocateheap.c b/soc/arm/stm32wl5/stm32wl5_allocateheap.c similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_allocateheap.c rename to soc/arm/stm32wl5/stm32wl5_allocateheap.c diff --git a/arch/arm/src/stm32wl5/stm32wl5_exti.h b/soc/arm/stm32wl5/stm32wl5_exti.h similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_exti.h rename to soc/arm/stm32wl5/stm32wl5_exti.h diff --git a/arch/arm/src/stm32wl5/stm32wl5_exti_gpio.c b/soc/arm/stm32wl5/stm32wl5_exti_gpio.c similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_exti_gpio.c rename to soc/arm/stm32wl5/stm32wl5_exti_gpio.c diff --git a/arch/arm/src/stm32wl5/stm32wl5_flash.c b/soc/arm/stm32wl5/stm32wl5_flash.c similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_flash.c rename to soc/arm/stm32wl5/stm32wl5_flash.c diff --git a/arch/arm/src/stm32wl5/stm32wl5_flash.h b/soc/arm/stm32wl5/stm32wl5_flash.h similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_flash.h rename to soc/arm/stm32wl5/stm32wl5_flash.h diff --git a/arch/arm/src/stm32wl5/stm32wl5_gpio.c b/soc/arm/stm32wl5/stm32wl5_gpio.c similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_gpio.c rename to soc/arm/stm32wl5/stm32wl5_gpio.c diff --git a/arch/arm/src/stm32wl5/stm32wl5_gpio.h b/soc/arm/stm32wl5/stm32wl5_gpio.h similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_gpio.h rename to soc/arm/stm32wl5/stm32wl5_gpio.h diff --git a/arch/arm/src/stm32wl5/stm32wl5_idle.c b/soc/arm/stm32wl5/stm32wl5_idle.c similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_idle.c rename to soc/arm/stm32wl5/stm32wl5_idle.c diff --git a/arch/arm/src/stm32wl5/stm32wl5_ipcc.c b/soc/arm/stm32wl5/stm32wl5_ipcc.c similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_ipcc.c rename to soc/arm/stm32wl5/stm32wl5_ipcc.c diff --git a/arch/arm/src/stm32wl5/stm32wl5_ipcc.h b/soc/arm/stm32wl5/stm32wl5_ipcc.h similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_ipcc.h rename to soc/arm/stm32wl5/stm32wl5_ipcc.h diff --git a/arch/arm/src/stm32wl5/stm32wl5_irq.c b/soc/arm/stm32wl5/stm32wl5_irq.c similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_irq.c rename to soc/arm/stm32wl5/stm32wl5_irq.c diff --git a/arch/arm/src/stm32wl5/stm32wl5_lowputc.c b/soc/arm/stm32wl5/stm32wl5_lowputc.c similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_lowputc.c rename to soc/arm/stm32wl5/stm32wl5_lowputc.c diff --git a/arch/arm/src/stm32wl5/stm32wl5_lowputc.h b/soc/arm/stm32wl5/stm32wl5_lowputc.h similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_lowputc.h rename to soc/arm/stm32wl5/stm32wl5_lowputc.h diff --git a/arch/arm/src/stm32wl5/stm32wl5_lse.c b/soc/arm/stm32wl5/stm32wl5_lse.c similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_lse.c rename to soc/arm/stm32wl5/stm32wl5_lse.c diff --git a/arch/arm/src/stm32wl5/stm32wl5_lsi.c b/soc/arm/stm32wl5/stm32wl5_lsi.c similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_lsi.c rename to soc/arm/stm32wl5/stm32wl5_lsi.c diff --git a/arch/arm/src/stm32wl5/stm32wl5_mpuinit.c b/soc/arm/stm32wl5/stm32wl5_mpuinit.c similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_mpuinit.c rename to soc/arm/stm32wl5/stm32wl5_mpuinit.c diff --git a/arch/arm/src/stm32wl5/stm32wl5_mpuinit.h b/soc/arm/stm32wl5/stm32wl5_mpuinit.h similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_mpuinit.h rename to soc/arm/stm32wl5/stm32wl5_mpuinit.h diff --git a/arch/arm/src/stm32wl5/stm32wl5_pwr.c b/soc/arm/stm32wl5/stm32wl5_pwr.c similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_pwr.c rename to soc/arm/stm32wl5/stm32wl5_pwr.c diff --git a/arch/arm/src/stm32wl5/stm32wl5_pwr.h b/soc/arm/stm32wl5/stm32wl5_pwr.h similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_pwr.h rename to soc/arm/stm32wl5/stm32wl5_pwr.h diff --git a/arch/arm/src/stm32wl5/stm32wl5_rcc.c b/soc/arm/stm32wl5/stm32wl5_rcc.c similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_rcc.c rename to soc/arm/stm32wl5/stm32wl5_rcc.c diff --git a/arch/arm/src/stm32wl5/stm32wl5_rcc.h b/soc/arm/stm32wl5/stm32wl5_rcc.h similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_rcc.h rename to soc/arm/stm32wl5/stm32wl5_rcc.h diff --git a/arch/arm/src/stm32wl5/stm32wl5_serial.c b/soc/arm/stm32wl5/stm32wl5_serial.c similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_serial.c rename to soc/arm/stm32wl5/stm32wl5_serial.c diff --git a/arch/arm/src/stm32wl5/stm32wl5_spi.c b/soc/arm/stm32wl5/stm32wl5_spi.c similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_spi.c rename to soc/arm/stm32wl5/stm32wl5_spi.c diff --git a/arch/arm/src/stm32wl5/stm32wl5_spi.h b/soc/arm/stm32wl5/stm32wl5_spi.h similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_spi.h rename to soc/arm/stm32wl5/stm32wl5_spi.h diff --git a/arch/arm/src/stm32wl5/stm32wl5_start.c b/soc/arm/stm32wl5/stm32wl5_start.c similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_start.c rename to soc/arm/stm32wl5/stm32wl5_start.c diff --git a/arch/arm/src/stm32wl5/stm32wl5_start.h b/soc/arm/stm32wl5/stm32wl5_start.h similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_start.h rename to soc/arm/stm32wl5/stm32wl5_start.h diff --git a/arch/arm/src/stm32wl5/stm32wl5_tim.c b/soc/arm/stm32wl5/stm32wl5_tim.c similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_tim.c rename to soc/arm/stm32wl5/stm32wl5_tim.c diff --git a/arch/arm/src/stm32wl5/stm32wl5_tim.h b/soc/arm/stm32wl5/stm32wl5_tim.h similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_tim.h rename to soc/arm/stm32wl5/stm32wl5_tim.h diff --git a/arch/arm/src/stm32wl5/stm32wl5_tim_lowerhalf.c b/soc/arm/stm32wl5/stm32wl5_tim_lowerhalf.c similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_tim_lowerhalf.c rename to soc/arm/stm32wl5/stm32wl5_tim_lowerhalf.c diff --git a/arch/arm/src/stm32wl5/stm32wl5_timerisr.c b/soc/arm/stm32wl5/stm32wl5_timerisr.c similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_timerisr.c rename to soc/arm/stm32wl5/stm32wl5_timerisr.c diff --git a/arch/arm/src/stm32wl5/stm32wl5_uart.h b/soc/arm/stm32wl5/stm32wl5_uart.h similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_uart.h rename to soc/arm/stm32wl5/stm32wl5_uart.h diff --git a/arch/arm/src/stm32wl5/stm32wl5_uid.c b/soc/arm/stm32wl5/stm32wl5_uid.c similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_uid.c rename to soc/arm/stm32wl5/stm32wl5_uid.c diff --git a/arch/arm/src/stm32wl5/stm32wl5_uid.h b/soc/arm/stm32wl5/stm32wl5_uid.h similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_uid.h rename to soc/arm/stm32wl5/stm32wl5_uid.h diff --git a/arch/arm/src/stm32wl5/stm32wl5_userspace.c b/soc/arm/stm32wl5/stm32wl5_userspace.c similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_userspace.c rename to soc/arm/stm32wl5/stm32wl5_userspace.c diff --git a/arch/arm/src/stm32wl5/stm32wl5_userspace.h b/soc/arm/stm32wl5/stm32wl5_userspace.h similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_userspace.h rename to soc/arm/stm32wl5/stm32wl5_userspace.h diff --git a/arch/arm/src/stm32wl5/stm32wl5_waste.c b/soc/arm/stm32wl5/stm32wl5_waste.c similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_waste.c rename to soc/arm/stm32wl5/stm32wl5_waste.c diff --git a/arch/arm/src/stm32wl5/stm32wl5_waste.h b/soc/arm/stm32wl5/stm32wl5_waste.h similarity index 100% rename from arch/arm/src/stm32wl5/stm32wl5_waste.h rename to soc/arm/stm32wl5/stm32wl5_waste.h diff --git a/arch/arm/src/str71x/Kconfig b/soc/arm/str71x/Kconfig similarity index 100% rename from arch/arm/src/str71x/Kconfig rename to soc/arm/str71x/Kconfig diff --git a/arch/arm/src/str71x/Make.defs b/soc/arm/str71x/Make.defs similarity index 100% rename from arch/arm/src/str71x/Make.defs rename to soc/arm/str71x/Make.defs diff --git a/arch/arm/src/str71x/chip.h b/soc/arm/str71x/chip.h similarity index 100% rename from arch/arm/src/str71x/chip.h rename to soc/arm/str71x/chip.h diff --git a/arch/arm/src/str71x/str71x.h b/soc/arm/str71x/str71x.h similarity index 100% rename from arch/arm/src/str71x/str71x.h rename to soc/arm/str71x/str71x.h diff --git a/arch/arm/src/str71x/str71x_adc12.h b/soc/arm/str71x/str71x_adc12.h similarity index 100% rename from arch/arm/src/str71x/str71x_adc12.h rename to soc/arm/str71x/str71x_adc12.h diff --git a/arch/arm/src/str71x/str71x_apb.h b/soc/arm/str71x/str71x_apb.h similarity index 100% rename from arch/arm/src/str71x/str71x_apb.h rename to soc/arm/str71x/str71x_apb.h diff --git a/arch/arm/src/str71x/str71x_bspi.h b/soc/arm/str71x/str71x_bspi.h similarity index 100% rename from arch/arm/src/str71x/str71x_bspi.h rename to soc/arm/str71x/str71x_bspi.h diff --git a/arch/arm/src/str71x/str71x_can.h b/soc/arm/str71x/str71x_can.h similarity index 100% rename from arch/arm/src/str71x/str71x_can.h rename to soc/arm/str71x/str71x_can.h diff --git a/arch/arm/src/str71x/str71x_decodeirq.c b/soc/arm/str71x/str71x_decodeirq.c similarity index 100% rename from arch/arm/src/str71x/str71x_decodeirq.c rename to soc/arm/str71x/str71x_decodeirq.c diff --git a/arch/arm/src/str71x/str71x_eic.h b/soc/arm/str71x/str71x_eic.h similarity index 100% rename from arch/arm/src/str71x/str71x_eic.h rename to soc/arm/str71x/str71x_eic.h diff --git a/arch/arm/src/str71x/str71x_emi.h b/soc/arm/str71x/str71x_emi.h similarity index 100% rename from arch/arm/src/str71x/str71x_emi.h rename to soc/arm/str71x/str71x_emi.h diff --git a/arch/arm/src/str71x/str71x_flash.h b/soc/arm/str71x/str71x_flash.h similarity index 100% rename from arch/arm/src/str71x/str71x_flash.h rename to soc/arm/str71x/str71x_flash.h diff --git a/arch/arm/src/str71x/str71x_gpio.h b/soc/arm/str71x/str71x_gpio.h similarity index 100% rename from arch/arm/src/str71x/str71x_gpio.h rename to soc/arm/str71x/str71x_gpio.h diff --git a/arch/arm/src/str71x/str71x_head.S b/soc/arm/str71x/str71x_head.S similarity index 100% rename from arch/arm/src/str71x/str71x_head.S rename to soc/arm/str71x/str71x_head.S diff --git a/arch/arm/src/str71x/str71x_i2c.h b/soc/arm/str71x/str71x_i2c.h similarity index 100% rename from arch/arm/src/str71x/str71x_i2c.h rename to soc/arm/str71x/str71x_i2c.h diff --git a/arch/arm/src/str71x/str71x_irq.c b/soc/arm/str71x/str71x_irq.c similarity index 100% rename from arch/arm/src/str71x/str71x_irq.c rename to soc/arm/str71x/str71x_irq.c diff --git a/arch/arm/src/str71x/str71x_lowputc.c b/soc/arm/str71x/str71x_lowputc.c similarity index 100% rename from arch/arm/src/str71x/str71x_lowputc.c rename to soc/arm/str71x/str71x_lowputc.c diff --git a/arch/arm/src/str71x/str71x_map.h b/soc/arm/str71x/str71x_map.h similarity index 100% rename from arch/arm/src/str71x/str71x_map.h rename to soc/arm/str71x/str71x_map.h diff --git a/arch/arm/src/str71x/str71x_pcu.h b/soc/arm/str71x/str71x_pcu.h similarity index 100% rename from arch/arm/src/str71x/str71x_pcu.h rename to soc/arm/str71x/str71x_pcu.h diff --git a/arch/arm/src/str71x/str71x_prccu.c b/soc/arm/str71x/str71x_prccu.c similarity index 100% rename from arch/arm/src/str71x/str71x_prccu.c rename to soc/arm/str71x/str71x_prccu.c diff --git a/arch/arm/src/str71x/str71x_rccu.h b/soc/arm/str71x/str71x_rccu.h similarity index 100% rename from arch/arm/src/str71x/str71x_rccu.h rename to soc/arm/str71x/str71x_rccu.h diff --git a/arch/arm/src/str71x/str71x_rtc.h b/soc/arm/str71x/str71x_rtc.h similarity index 100% rename from arch/arm/src/str71x/str71x_rtc.h rename to soc/arm/str71x/str71x_rtc.h diff --git a/arch/arm/src/str71x/str71x_serial.c b/soc/arm/str71x/str71x_serial.c similarity index 100% rename from arch/arm/src/str71x/str71x_serial.c rename to soc/arm/str71x/str71x_serial.c diff --git a/arch/arm/src/str71x/str71x_timer.h b/soc/arm/str71x/str71x_timer.h similarity index 100% rename from arch/arm/src/str71x/str71x_timer.h rename to soc/arm/str71x/str71x_timer.h diff --git a/arch/arm/src/str71x/str71x_timerisr.c b/soc/arm/str71x/str71x_timerisr.c similarity index 100% rename from arch/arm/src/str71x/str71x_timerisr.c rename to soc/arm/str71x/str71x_timerisr.c diff --git a/arch/arm/src/str71x/str71x_uart.h b/soc/arm/str71x/str71x_uart.h similarity index 100% rename from arch/arm/src/str71x/str71x_uart.h rename to soc/arm/str71x/str71x_uart.h diff --git a/arch/arm/src/str71x/str71x_usb.h b/soc/arm/str71x/str71x_usb.h similarity index 100% rename from arch/arm/src/str71x/str71x_usb.h rename to soc/arm/str71x/str71x_usb.h diff --git a/arch/arm/src/str71x/str71x_wdog.h b/soc/arm/str71x/str71x_wdog.h similarity index 100% rename from arch/arm/src/str71x/str71x_wdog.h rename to soc/arm/str71x/str71x_wdog.h diff --git a/arch/arm/src/str71x/str71x_xti.c b/soc/arm/str71x/str71x_xti.c similarity index 100% rename from arch/arm/src/str71x/str71x_xti.c rename to soc/arm/str71x/str71x_xti.c diff --git a/arch/arm/src/str71x/str71x_xti.h b/soc/arm/str71x/str71x_xti.h similarity index 100% rename from arch/arm/src/str71x/str71x_xti.h rename to soc/arm/str71x/str71x_xti.h diff --git a/arch/arm/src/tiva/CMakeLists.txt b/soc/arm/tiva/CMakeLists.txt similarity index 100% rename from arch/arm/src/tiva/CMakeLists.txt rename to soc/arm/tiva/CMakeLists.txt diff --git a/arch/arm/src/tiva/Kconfig b/soc/arm/tiva/Kconfig similarity index 100% rename from arch/arm/src/tiva/Kconfig rename to soc/arm/tiva/Kconfig diff --git a/arch/arm/src/tiva/Make.defs b/soc/arm/tiva/Make.defs similarity index 100% rename from arch/arm/src/tiva/Make.defs rename to soc/arm/tiva/Make.defs diff --git a/arch/arm/src/tiva/cc13xx/CMakeLists.txt b/soc/arm/tiva/cc13xx/CMakeLists.txt similarity index 100% rename from arch/arm/src/tiva/cc13xx/CMakeLists.txt rename to soc/arm/tiva/cc13xx/CMakeLists.txt diff --git a/arch/arm/src/tiva/cc13xx/cc13x0_rom.c b/soc/arm/tiva/cc13xx/cc13x0_rom.c similarity index 100% rename from arch/arm/src/tiva/cc13xx/cc13x0_rom.c rename to soc/arm/tiva/cc13xx/cc13x0_rom.c diff --git a/arch/arm/src/tiva/cc13xx/cc13x0_rom.h b/soc/arm/tiva/cc13xx/cc13x0_rom.h similarity index 100% rename from arch/arm/src/tiva/cc13xx/cc13x0_rom.h rename to soc/arm/tiva/cc13xx/cc13x0_rom.h diff --git a/arch/arm/src/tiva/cc13xx/cc13x0_trim.c b/soc/arm/tiva/cc13xx/cc13x0_trim.c similarity index 100% rename from arch/arm/src/tiva/cc13xx/cc13x0_trim.c rename to soc/arm/tiva/cc13xx/cc13x0_trim.c diff --git a/arch/arm/src/tiva/cc13xx/cc13x2_aux_sysif.c b/soc/arm/tiva/cc13xx/cc13x2_aux_sysif.c similarity index 100% rename from arch/arm/src/tiva/cc13xx/cc13x2_aux_sysif.c rename to soc/arm/tiva/cc13xx/cc13x2_aux_sysif.c diff --git a/arch/arm/src/tiva/cc13xx/cc13x2_aux_sysif.h b/soc/arm/tiva/cc13xx/cc13x2_aux_sysif.h similarity index 100% rename from arch/arm/src/tiva/cc13xx/cc13x2_aux_sysif.h rename to soc/arm/tiva/cc13xx/cc13x2_aux_sysif.h diff --git a/arch/arm/src/tiva/cc13xx/cc13x2_cc26x2_v1_rom.c b/soc/arm/tiva/cc13xx/cc13x2_cc26x2_v1_rom.c similarity index 100% rename from arch/arm/src/tiva/cc13xx/cc13x2_cc26x2_v1_rom.c rename to soc/arm/tiva/cc13xx/cc13x2_cc26x2_v1_rom.c diff --git a/arch/arm/src/tiva/cc13xx/cc13x2_cc26x2_v1_rom.h b/soc/arm/tiva/cc13xx/cc13x2_cc26x2_v1_rom.h similarity index 100% rename from arch/arm/src/tiva/cc13xx/cc13x2_cc26x2_v1_rom.h rename to soc/arm/tiva/cc13xx/cc13x2_cc26x2_v1_rom.h diff --git a/arch/arm/src/tiva/cc13xx/cc13x2_cc26x2_v2_rom.h b/soc/arm/tiva/cc13xx/cc13x2_cc26x2_v2_rom.h similarity index 100% rename from arch/arm/src/tiva/cc13xx/cc13x2_cc26x2_v2_rom.h rename to soc/arm/tiva/cc13xx/cc13x2_cc26x2_v2_rom.h diff --git a/arch/arm/src/tiva/cc13xx/cc13x2_v1_trim.c b/soc/arm/tiva/cc13xx/cc13x2_v1_trim.c similarity index 100% rename from arch/arm/src/tiva/cc13xx/cc13x2_v1_trim.c rename to soc/arm/tiva/cc13xx/cc13x2_v1_trim.c diff --git a/arch/arm/src/tiva/cc13xx/cc13x2_v2_trim.c b/soc/arm/tiva/cc13xx/cc13x2_v2_trim.c similarity index 100% rename from arch/arm/src/tiva/cc13xx/cc13x2_v2_trim.c rename to soc/arm/tiva/cc13xx/cc13x2_v2_trim.c diff --git a/arch/arm/src/tiva/cc13xx/cc13xx_chipinfo.c b/soc/arm/tiva/cc13xx/cc13xx_chipinfo.c similarity index 100% rename from arch/arm/src/tiva/cc13xx/cc13xx_chipinfo.c rename to soc/arm/tiva/cc13xx/cc13xx_chipinfo.c diff --git a/arch/arm/src/tiva/cc13xx/cc13xx_enableclks.c b/soc/arm/tiva/cc13xx/cc13xx_enableclks.c similarity index 100% rename from arch/arm/src/tiva/cc13xx/cc13xx_enableclks.c rename to soc/arm/tiva/cc13xx/cc13xx_enableclks.c diff --git a/arch/arm/src/tiva/cc13xx/cc13xx_enableclks.h b/soc/arm/tiva/cc13xx/cc13xx_enableclks.h similarity index 100% rename from arch/arm/src/tiva/cc13xx/cc13xx_enableclks.h rename to soc/arm/tiva/cc13xx/cc13xx_enableclks.h diff --git a/arch/arm/src/tiva/cc13xx/cc13xx_enablepwr.c b/soc/arm/tiva/cc13xx/cc13xx_enablepwr.c similarity index 100% rename from arch/arm/src/tiva/cc13xx/cc13xx_enablepwr.c rename to soc/arm/tiva/cc13xx/cc13xx_enablepwr.c diff --git a/arch/arm/src/tiva/cc13xx/cc13xx_enablepwr.h b/soc/arm/tiva/cc13xx/cc13xx_enablepwr.h similarity index 100% rename from arch/arm/src/tiva/cc13xx/cc13xx_enablepwr.h rename to soc/arm/tiva/cc13xx/cc13xx_enablepwr.h diff --git a/arch/arm/src/tiva/cc13xx/cc13xx_gpio.c b/soc/arm/tiva/cc13xx/cc13xx_gpio.c similarity index 100% rename from arch/arm/src/tiva/cc13xx/cc13xx_gpio.c rename to soc/arm/tiva/cc13xx/cc13xx_gpio.c diff --git a/arch/arm/src/tiva/cc13xx/cc13xx_gpio.h b/soc/arm/tiva/cc13xx/cc13xx_gpio.h similarity index 100% rename from arch/arm/src/tiva/cc13xx/cc13xx_gpio.h rename to soc/arm/tiva/cc13xx/cc13xx_gpio.h diff --git a/arch/arm/src/tiva/cc13xx/cc13xx_gpioirq.c b/soc/arm/tiva/cc13xx/cc13xx_gpioirq.c similarity index 100% rename from arch/arm/src/tiva/cc13xx/cc13xx_gpioirq.c rename to soc/arm/tiva/cc13xx/cc13xx_gpioirq.c diff --git a/arch/arm/src/tiva/cc13xx/cc13xx_prcm.c b/soc/arm/tiva/cc13xx/cc13xx_prcm.c similarity index 100% rename from arch/arm/src/tiva/cc13xx/cc13xx_prcm.c rename to soc/arm/tiva/cc13xx/cc13xx_prcm.c diff --git a/arch/arm/src/tiva/cc13xx/cc13xx_prcm.h b/soc/arm/tiva/cc13xx/cc13xx_prcm.h similarity index 100% rename from arch/arm/src/tiva/cc13xx/cc13xx_prcm.h rename to soc/arm/tiva/cc13xx/cc13xx_prcm.h diff --git a/arch/arm/src/tiva/cc13xx/cc13xx_start.c b/soc/arm/tiva/cc13xx/cc13xx_start.c similarity index 100% rename from arch/arm/src/tiva/cc13xx/cc13xx_start.c rename to soc/arm/tiva/cc13xx/cc13xx_start.c diff --git a/arch/arm/src/tiva/chip.h b/soc/arm/tiva/chip.h similarity index 100% rename from arch/arm/src/tiva/chip.h rename to soc/arm/tiva/chip.h diff --git a/arch/arm/src/tiva/common/CMakeLists.txt b/soc/arm/tiva/common/CMakeLists.txt similarity index 100% rename from arch/arm/src/tiva/common/CMakeLists.txt rename to soc/arm/tiva/common/CMakeLists.txt diff --git a/arch/arm/src/tiva/common/lm4xx_tm3c_sysctrl.c b/soc/arm/tiva/common/lm4xx_tm3c_sysctrl.c similarity index 100% rename from arch/arm/src/tiva/common/lm4xx_tm3c_sysctrl.c rename to soc/arm/tiva/common/lm4xx_tm3c_sysctrl.c diff --git a/arch/arm/src/tiva/common/lmxx_tm4c_enableclks.h b/soc/arm/tiva/common/lmxx_tm4c_enableclks.h similarity index 100% rename from arch/arm/src/tiva/common/lmxx_tm4c_enableclks.h rename to soc/arm/tiva/common/lmxx_tm4c_enableclks.h diff --git a/arch/arm/src/tiva/common/lmxx_tm4c_enablepwr.h b/soc/arm/tiva/common/lmxx_tm4c_enablepwr.h similarity index 100% rename from arch/arm/src/tiva/common/lmxx_tm4c_enablepwr.h rename to soc/arm/tiva/common/lmxx_tm4c_enablepwr.h diff --git a/arch/arm/src/tiva/common/lmxx_tm4c_gpioirq.c b/soc/arm/tiva/common/lmxx_tm4c_gpioirq.c similarity index 100% rename from arch/arm/src/tiva/common/lmxx_tm4c_gpioirq.c rename to soc/arm/tiva/common/lmxx_tm4c_gpioirq.c diff --git a/arch/arm/src/tiva/common/lmxx_tm4c_start.c b/soc/arm/tiva/common/lmxx_tm4c_start.c similarity index 100% rename from arch/arm/src/tiva/common/lmxx_tm4c_start.c rename to soc/arm/tiva/common/lmxx_tm4c_start.c diff --git a/arch/arm/src/tiva/common/tiva_adclib.c b/soc/arm/tiva/common/tiva_adclib.c similarity index 100% rename from arch/arm/src/tiva/common/tiva_adclib.c rename to soc/arm/tiva/common/tiva_adclib.c diff --git a/arch/arm/src/tiva/common/tiva_adclow.c b/soc/arm/tiva/common/tiva_adclow.c similarity index 100% rename from arch/arm/src/tiva/common/tiva_adclow.c rename to soc/arm/tiva/common/tiva_adclow.c diff --git a/arch/arm/src/tiva/common/tiva_allocateheap.c b/soc/arm/tiva/common/tiva_allocateheap.c similarity index 100% rename from arch/arm/src/tiva/common/tiva_allocateheap.c rename to soc/arm/tiva/common/tiva_allocateheap.c diff --git a/arch/arm/src/tiva/common/tiva_can.c b/soc/arm/tiva/common/tiva_can.c similarity index 100% rename from arch/arm/src/tiva/common/tiva_can.c rename to soc/arm/tiva/common/tiva_can.c diff --git a/arch/arm/src/tiva/common/tiva_dumpgpio.c b/soc/arm/tiva/common/tiva_dumpgpio.c similarity index 100% rename from arch/arm/src/tiva/common/tiva_dumpgpio.c rename to soc/arm/tiva/common/tiva_dumpgpio.c diff --git a/arch/arm/src/tiva/common/tiva_eeprom.c b/soc/arm/tiva/common/tiva_eeprom.c similarity index 100% rename from arch/arm/src/tiva/common/tiva_eeprom.c rename to soc/arm/tiva/common/tiva_eeprom.c diff --git a/arch/arm/src/tiva/common/tiva_flash.c b/soc/arm/tiva/common/tiva_flash.c similarity index 100% rename from arch/arm/src/tiva/common/tiva_flash.c rename to soc/arm/tiva/common/tiva_flash.c diff --git a/arch/arm/src/tiva/common/tiva_hciuart.c b/soc/arm/tiva/common/tiva_hciuart.c similarity index 100% rename from arch/arm/src/tiva/common/tiva_hciuart.c rename to soc/arm/tiva/common/tiva_hciuart.c diff --git a/arch/arm/src/tiva/common/tiva_i2c.c b/soc/arm/tiva/common/tiva_i2c.c similarity index 100% rename from arch/arm/src/tiva/common/tiva_i2c.c rename to soc/arm/tiva/common/tiva_i2c.c diff --git a/arch/arm/src/tiva/common/tiva_idle.c b/soc/arm/tiva/common/tiva_idle.c similarity index 100% rename from arch/arm/src/tiva/common/tiva_idle.c rename to soc/arm/tiva/common/tiva_idle.c diff --git a/arch/arm/src/tiva/common/tiva_irq.c b/soc/arm/tiva/common/tiva_irq.c similarity index 100% rename from arch/arm/src/tiva/common/tiva_irq.c rename to soc/arm/tiva/common/tiva_irq.c diff --git a/arch/arm/src/tiva/common/tiva_lowputc.c b/soc/arm/tiva/common/tiva_lowputc.c similarity index 100% rename from arch/arm/src/tiva/common/tiva_lowputc.c rename to soc/arm/tiva/common/tiva_lowputc.c diff --git a/arch/arm/src/tiva/common/tiva_mpuinit.c b/soc/arm/tiva/common/tiva_mpuinit.c similarity index 100% rename from arch/arm/src/tiva/common/tiva_mpuinit.c rename to soc/arm/tiva/common/tiva_mpuinit.c diff --git a/arch/arm/src/tiva/common/tiva_pwm.c b/soc/arm/tiva/common/tiva_pwm.c similarity index 100% rename from arch/arm/src/tiva/common/tiva_pwm.c rename to soc/arm/tiva/common/tiva_pwm.c diff --git a/arch/arm/src/tiva/common/tiva_qencoder.c b/soc/arm/tiva/common/tiva_qencoder.c similarity index 100% rename from arch/arm/src/tiva/common/tiva_qencoder.c rename to soc/arm/tiva/common/tiva_qencoder.c diff --git a/arch/arm/src/tiva/common/tiva_serial.c b/soc/arm/tiva/common/tiva_serial.c similarity index 100% rename from arch/arm/src/tiva/common/tiva_serial.c rename to soc/arm/tiva/common/tiva_serial.c diff --git a/arch/arm/src/tiva/common/tiva_sock_can.c b/soc/arm/tiva/common/tiva_sock_can.c similarity index 100% rename from arch/arm/src/tiva/common/tiva_sock_can.c rename to soc/arm/tiva/common/tiva_sock_can.c diff --git a/arch/arm/src/tiva/common/tiva_ssi.c b/soc/arm/tiva/common/tiva_ssi.c similarity index 100% rename from arch/arm/src/tiva/common/tiva_ssi.c rename to soc/arm/tiva/common/tiva_ssi.c diff --git a/arch/arm/src/tiva/common/tiva_timerisr.c b/soc/arm/tiva/common/tiva_timerisr.c similarity index 100% rename from arch/arm/src/tiva/common/tiva_timerisr.c rename to soc/arm/tiva/common/tiva_timerisr.c diff --git a/arch/arm/src/tiva/common/tiva_timerlib.c b/soc/arm/tiva/common/tiva_timerlib.c similarity index 100% rename from arch/arm/src/tiva/common/tiva_timerlib.c rename to soc/arm/tiva/common/tiva_timerlib.c diff --git a/arch/arm/src/tiva/common/tiva_timerlow32.c b/soc/arm/tiva/common/tiva_timerlow32.c similarity index 100% rename from arch/arm/src/tiva/common/tiva_timerlow32.c rename to soc/arm/tiva/common/tiva_timerlow32.c diff --git a/arch/arm/src/tiva/common/tiva_userspace.c b/soc/arm/tiva/common/tiva_userspace.c similarity index 100% rename from arch/arm/src/tiva/common/tiva_userspace.c rename to soc/arm/tiva/common/tiva_userspace.c diff --git a/arch/arm/src/tiva/hardware/cc13x0/cc13x0_adi2_refsys.h b/soc/arm/tiva/hardware/cc13x0/cc13x0_adi2_refsys.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x0/cc13x0_adi2_refsys.h rename to soc/arm/tiva/hardware/cc13x0/cc13x0_adi2_refsys.h diff --git a/arch/arm/src/tiva/hardware/cc13x0/cc13x0_adi3_refsys.h b/soc/arm/tiva/hardware/cc13x0/cc13x0_adi3_refsys.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x0/cc13x0_adi3_refsys.h rename to soc/arm/tiva/hardware/cc13x0/cc13x0_adi3_refsys.h diff --git a/arch/arm/src/tiva/hardware/cc13x0/cc13x0_adi4_aux.h b/soc/arm/tiva/hardware/cc13x0/cc13x0_adi4_aux.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x0/cc13x0_adi4_aux.h rename to soc/arm/tiva/hardware/cc13x0/cc13x0_adi4_aux.h diff --git a/arch/arm/src/tiva/hardware/cc13x0/cc13x0_aon_batmon.h b/soc/arm/tiva/hardware/cc13x0/cc13x0_aon_batmon.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x0/cc13x0_aon_batmon.h rename to soc/arm/tiva/hardware/cc13x0/cc13x0_aon_batmon.h diff --git a/arch/arm/src/tiva/hardware/cc13x0/cc13x0_aon_ioc.h b/soc/arm/tiva/hardware/cc13x0/cc13x0_aon_ioc.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x0/cc13x0_aon_ioc.h rename to soc/arm/tiva/hardware/cc13x0/cc13x0_aon_ioc.h diff --git a/arch/arm/src/tiva/hardware/cc13x0/cc13x0_aon_rtc.h b/soc/arm/tiva/hardware/cc13x0/cc13x0_aon_rtc.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x0/cc13x0_aon_rtc.h rename to soc/arm/tiva/hardware/cc13x0/cc13x0_aon_rtc.h diff --git a/arch/arm/src/tiva/hardware/cc13x0/cc13x0_aon_sysctl.h b/soc/arm/tiva/hardware/cc13x0/cc13x0_aon_sysctl.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x0/cc13x0_aon_sysctl.h rename to soc/arm/tiva/hardware/cc13x0/cc13x0_aon_sysctl.h diff --git a/arch/arm/src/tiva/hardware/cc13x0/cc13x0_aon_wuc.h b/soc/arm/tiva/hardware/cc13x0/cc13x0_aon_wuc.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x0/cc13x0_aon_wuc.h rename to soc/arm/tiva/hardware/cc13x0/cc13x0_aon_wuc.h diff --git a/arch/arm/src/tiva/hardware/cc13x0/cc13x0_aux_smph.h b/soc/arm/tiva/hardware/cc13x0/cc13x0_aux_smph.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x0/cc13x0_aux_smph.h rename to soc/arm/tiva/hardware/cc13x0/cc13x0_aux_smph.h diff --git a/arch/arm/src/tiva/hardware/cc13x0/cc13x0_aux_wuc.h b/soc/arm/tiva/hardware/cc13x0/cc13x0_aux_wuc.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x0/cc13x0_aux_wuc.h rename to soc/arm/tiva/hardware/cc13x0/cc13x0_aux_wuc.h diff --git a/arch/arm/src/tiva/hardware/cc13x0/cc13x0_ccfg.h b/soc/arm/tiva/hardware/cc13x0/cc13x0_ccfg.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x0/cc13x0_ccfg.h rename to soc/arm/tiva/hardware/cc13x0/cc13x0_ccfg.h diff --git a/arch/arm/src/tiva/hardware/cc13x0/cc13x0_ddi.h b/soc/arm/tiva/hardware/cc13x0/cc13x0_ddi.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x0/cc13x0_ddi.h rename to soc/arm/tiva/hardware/cc13x0/cc13x0_ddi.h diff --git a/arch/arm/src/tiva/hardware/cc13x0/cc13x0_ddi0_osc.h b/soc/arm/tiva/hardware/cc13x0/cc13x0_ddi0_osc.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x0/cc13x0_ddi0_osc.h rename to soc/arm/tiva/hardware/cc13x0/cc13x0_ddi0_osc.h diff --git a/arch/arm/src/tiva/hardware/cc13x0/cc13x0_fcfg1.h b/soc/arm/tiva/hardware/cc13x0/cc13x0_fcfg1.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x0/cc13x0_fcfg1.h rename to soc/arm/tiva/hardware/cc13x0/cc13x0_fcfg1.h diff --git a/arch/arm/src/tiva/hardware/cc13x0/cc13x0_flash.h b/soc/arm/tiva/hardware/cc13x0/cc13x0_flash.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x0/cc13x0_flash.h rename to soc/arm/tiva/hardware/cc13x0/cc13x0_flash.h diff --git a/arch/arm/src/tiva/hardware/cc13x0/cc13x0_gpio.h b/soc/arm/tiva/hardware/cc13x0/cc13x0_gpio.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x0/cc13x0_gpio.h rename to soc/arm/tiva/hardware/cc13x0/cc13x0_gpio.h diff --git a/arch/arm/src/tiva/hardware/cc13x0/cc13x0_i2c.h b/soc/arm/tiva/hardware/cc13x0/cc13x0_i2c.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x0/cc13x0_i2c.h rename to soc/arm/tiva/hardware/cc13x0/cc13x0_i2c.h diff --git a/arch/arm/src/tiva/hardware/cc13x0/cc13x0_ioc.h b/soc/arm/tiva/hardware/cc13x0/cc13x0_ioc.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x0/cc13x0_ioc.h rename to soc/arm/tiva/hardware/cc13x0/cc13x0_ioc.h diff --git a/arch/arm/src/tiva/hardware/cc13x0/cc13x0_memorymap.h b/soc/arm/tiva/hardware/cc13x0/cc13x0_memorymap.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x0/cc13x0_memorymap.h rename to soc/arm/tiva/hardware/cc13x0/cc13x0_memorymap.h diff --git a/arch/arm/src/tiva/hardware/cc13x0/cc13x0_prcm.h b/soc/arm/tiva/hardware/cc13x0/cc13x0_prcm.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x0/cc13x0_prcm.h rename to soc/arm/tiva/hardware/cc13x0/cc13x0_prcm.h diff --git a/arch/arm/src/tiva/hardware/cc13x0/cc13x0_smph.h b/soc/arm/tiva/hardware/cc13x0/cc13x0_smph.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x0/cc13x0_smph.h rename to soc/arm/tiva/hardware/cc13x0/cc13x0_smph.h diff --git a/arch/arm/src/tiva/hardware/cc13x0/cc13x0_timer.h b/soc/arm/tiva/hardware/cc13x0/cc13x0_timer.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x0/cc13x0_timer.h rename to soc/arm/tiva/hardware/cc13x0/cc13x0_timer.h diff --git a/arch/arm/src/tiva/hardware/cc13x0/cc13x0_uart.h b/soc/arm/tiva/hardware/cc13x0/cc13x0_uart.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x0/cc13x0_uart.h rename to soc/arm/tiva/hardware/cc13x0/cc13x0_uart.h diff --git a/arch/arm/src/tiva/hardware/cc13x0/cc13x0_vims.h b/soc/arm/tiva/hardware/cc13x0/cc13x0_vims.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x0/cc13x0_vims.h rename to soc/arm/tiva/hardware/cc13x0/cc13x0_vims.h diff --git a/arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_adi2_refsys.h b/soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_adi2_refsys.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_adi2_refsys.h rename to soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_adi2_refsys.h diff --git a/arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_adi3_refsys.h b/soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_adi3_refsys.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_adi3_refsys.h rename to soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_adi3_refsys.h diff --git a/arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_adi4_aux.h b/soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_adi4_aux.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_adi4_aux.h rename to soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_adi4_aux.h diff --git a/arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_aon_batmon.h b/soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_aon_batmon.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_aon_batmon.h rename to soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_aon_batmon.h diff --git a/arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_aon_ioc.h b/soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_aon_ioc.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_aon_ioc.h rename to soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_aon_ioc.h diff --git a/arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_aon_pmctl.h b/soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_aon_pmctl.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_aon_pmctl.h rename to soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_aon_pmctl.h diff --git a/arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_aon_rtc.h b/soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_aon_rtc.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_aon_rtc.h rename to soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_aon_rtc.h diff --git a/arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_aux_smph.h b/soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_aux_smph.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_aux_smph.h rename to soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_aux_smph.h diff --git a/arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_aux_sysif.h b/soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_aux_sysif.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_aux_sysif.h rename to soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_aux_sysif.h diff --git a/arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_ccfg.h b/soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_ccfg.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_ccfg.h rename to soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_ccfg.h diff --git a/arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_ddi.h b/soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_ddi.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_ddi.h rename to soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_ddi.h diff --git a/arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_ddi0_osc.h b/soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_ddi0_osc.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_ddi0_osc.h rename to soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_ddi0_osc.h diff --git a/arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_fcfg1.h b/soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_fcfg1.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_fcfg1.h rename to soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_fcfg1.h diff --git a/arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_flash.h b/soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_flash.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_flash.h rename to soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_flash.h diff --git a/arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_gpio.h b/soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_gpio.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_gpio.h rename to soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_gpio.h diff --git a/arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_i2c.h b/soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_i2c.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_i2c.h rename to soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_i2c.h diff --git a/arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_ioc.h b/soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_ioc.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_ioc.h rename to soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_ioc.h diff --git a/arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_memorymap.h b/soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_memorymap.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_memorymap.h rename to soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_memorymap.h diff --git a/arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_prcm.h b/soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_prcm.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_prcm.h rename to soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_prcm.h diff --git a/arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_smph.h b/soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_smph.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_smph.h rename to soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_smph.h diff --git a/arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_timer.h b/soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_timer.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_timer.h rename to soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_timer.h diff --git a/arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_uart.h b/soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_uart.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_uart.h rename to soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_uart.h diff --git a/arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_vims.h b/soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_vims.h similarity index 100% rename from arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_vims.h rename to soc/arm/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_vims.h diff --git a/arch/arm/src/tiva/hardware/lm/lm3s_ethernet.h b/soc/arm/tiva/hardware/lm/lm3s_ethernet.h similarity index 100% rename from arch/arm/src/tiva/hardware/lm/lm3s_ethernet.h rename to soc/arm/tiva/hardware/lm/lm3s_ethernet.h diff --git a/arch/arm/src/tiva/hardware/lm/lm3s_flash.h b/soc/arm/tiva/hardware/lm/lm3s_flash.h similarity index 100% rename from arch/arm/src/tiva/hardware/lm/lm3s_flash.h rename to soc/arm/tiva/hardware/lm/lm3s_flash.h diff --git a/arch/arm/src/tiva/hardware/lm/lm3s_gpio.h b/soc/arm/tiva/hardware/lm/lm3s_gpio.h similarity index 100% rename from arch/arm/src/tiva/hardware/lm/lm3s_gpio.h rename to soc/arm/tiva/hardware/lm/lm3s_gpio.h diff --git a/arch/arm/src/tiva/hardware/lm/lm3s_memorymap.h b/soc/arm/tiva/hardware/lm/lm3s_memorymap.h similarity index 100% rename from arch/arm/src/tiva/hardware/lm/lm3s_memorymap.h rename to soc/arm/tiva/hardware/lm/lm3s_memorymap.h diff --git a/arch/arm/src/tiva/hardware/lm/lm3s_pinmap.h b/soc/arm/tiva/hardware/lm/lm3s_pinmap.h similarity index 100% rename from arch/arm/src/tiva/hardware/lm/lm3s_pinmap.h rename to soc/arm/tiva/hardware/lm/lm3s_pinmap.h diff --git a/arch/arm/src/tiva/hardware/lm/lm3s_sysctrl.h b/soc/arm/tiva/hardware/lm/lm3s_sysctrl.h similarity index 100% rename from arch/arm/src/tiva/hardware/lm/lm3s_sysctrl.h rename to soc/arm/tiva/hardware/lm/lm3s_sysctrl.h diff --git a/arch/arm/src/tiva/hardware/lm/lm3s_timer.h b/soc/arm/tiva/hardware/lm/lm3s_timer.h similarity index 100% rename from arch/arm/src/tiva/hardware/lm/lm3s_timer.h rename to soc/arm/tiva/hardware/lm/lm3s_timer.h diff --git a/arch/arm/src/tiva/hardware/lm/lm4f_gpio.h b/soc/arm/tiva/hardware/lm/lm4f_gpio.h similarity index 100% rename from arch/arm/src/tiva/hardware/lm/lm4f_gpio.h rename to soc/arm/tiva/hardware/lm/lm4f_gpio.h diff --git a/arch/arm/src/tiva/hardware/lm/lm4f_memorymap.h b/soc/arm/tiva/hardware/lm/lm4f_memorymap.h similarity index 100% rename from arch/arm/src/tiva/hardware/lm/lm4f_memorymap.h rename to soc/arm/tiva/hardware/lm/lm4f_memorymap.h diff --git a/arch/arm/src/tiva/hardware/lm/lm4f_pinmap.h b/soc/arm/tiva/hardware/lm/lm4f_pinmap.h similarity index 100% rename from arch/arm/src/tiva/hardware/lm/lm4f_pinmap.h rename to soc/arm/tiva/hardware/lm/lm4f_pinmap.h diff --git a/arch/arm/src/tiva/hardware/lm/lm4f_sysctrl.h b/soc/arm/tiva/hardware/lm/lm4f_sysctrl.h similarity index 100% rename from arch/arm/src/tiva/hardware/lm/lm4f_sysctrl.h rename to soc/arm/tiva/hardware/lm/lm4f_sysctrl.h diff --git a/arch/arm/src/tiva/hardware/lm/lm4f_timer.h b/soc/arm/tiva/hardware/lm/lm4f_timer.h similarity index 100% rename from arch/arm/src/tiva/hardware/lm/lm4f_timer.h rename to soc/arm/tiva/hardware/lm/lm4f_timer.h diff --git a/arch/arm/src/tiva/hardware/lm/lm_i2c.h b/soc/arm/tiva/hardware/lm/lm_i2c.h similarity index 100% rename from arch/arm/src/tiva/hardware/lm/lm_i2c.h rename to soc/arm/tiva/hardware/lm/lm_i2c.h diff --git a/arch/arm/src/tiva/hardware/lm/lm_uart.h b/soc/arm/tiva/hardware/lm/lm_uart.h similarity index 100% rename from arch/arm/src/tiva/hardware/lm/lm_uart.h rename to soc/arm/tiva/hardware/lm/lm_uart.h diff --git a/arch/arm/src/tiva/hardware/tiva_adc.h b/soc/arm/tiva/hardware/tiva_adc.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_adc.h rename to soc/arm/tiva/hardware/tiva_adc.h diff --git a/arch/arm/src/tiva/hardware/tiva_adi2_refsys.h b/soc/arm/tiva/hardware/tiva_adi2_refsys.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_adi2_refsys.h rename to soc/arm/tiva/hardware/tiva_adi2_refsys.h diff --git a/arch/arm/src/tiva/hardware/tiva_adi3_refsys.h b/soc/arm/tiva/hardware/tiva_adi3_refsys.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_adi3_refsys.h rename to soc/arm/tiva/hardware/tiva_adi3_refsys.h diff --git a/arch/arm/src/tiva/hardware/tiva_adi4_aux.h b/soc/arm/tiva/hardware/tiva_adi4_aux.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_adi4_aux.h rename to soc/arm/tiva/hardware/tiva_adi4_aux.h diff --git a/arch/arm/src/tiva/hardware/tiva_aon_batmon.h b/soc/arm/tiva/hardware/tiva_aon_batmon.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_aon_batmon.h rename to soc/arm/tiva/hardware/tiva_aon_batmon.h diff --git a/arch/arm/src/tiva/hardware/tiva_aon_ioc.h b/soc/arm/tiva/hardware/tiva_aon_ioc.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_aon_ioc.h rename to soc/arm/tiva/hardware/tiva_aon_ioc.h diff --git a/arch/arm/src/tiva/hardware/tiva_aon_pmctl.h b/soc/arm/tiva/hardware/tiva_aon_pmctl.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_aon_pmctl.h rename to soc/arm/tiva/hardware/tiva_aon_pmctl.h diff --git a/arch/arm/src/tiva/hardware/tiva_aon_rtc.h b/soc/arm/tiva/hardware/tiva_aon_rtc.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_aon_rtc.h rename to soc/arm/tiva/hardware/tiva_aon_rtc.h diff --git a/arch/arm/src/tiva/hardware/tiva_aon_sysctl.h b/soc/arm/tiva/hardware/tiva_aon_sysctl.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_aon_sysctl.h rename to soc/arm/tiva/hardware/tiva_aon_sysctl.h diff --git a/arch/arm/src/tiva/hardware/tiva_aon_wuc.h b/soc/arm/tiva/hardware/tiva_aon_wuc.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_aon_wuc.h rename to soc/arm/tiva/hardware/tiva_aon_wuc.h diff --git a/arch/arm/src/tiva/hardware/tiva_aux_smph.h b/soc/arm/tiva/hardware/tiva_aux_smph.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_aux_smph.h rename to soc/arm/tiva/hardware/tiva_aux_smph.h diff --git a/arch/arm/src/tiva/hardware/tiva_aux_sysif.h b/soc/arm/tiva/hardware/tiva_aux_sysif.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_aux_sysif.h rename to soc/arm/tiva/hardware/tiva_aux_sysif.h diff --git a/arch/arm/src/tiva/hardware/tiva_aux_wuc.h b/soc/arm/tiva/hardware/tiva_aux_wuc.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_aux_wuc.h rename to soc/arm/tiva/hardware/tiva_aux_wuc.h diff --git a/arch/arm/src/tiva/hardware/tiva_can.h b/soc/arm/tiva/hardware/tiva_can.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_can.h rename to soc/arm/tiva/hardware/tiva_can.h diff --git a/arch/arm/src/tiva/hardware/tiva_ccfg.h b/soc/arm/tiva/hardware/tiva_ccfg.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_ccfg.h rename to soc/arm/tiva/hardware/tiva_ccfg.h diff --git a/arch/arm/src/tiva/hardware/tiva_ddi.h b/soc/arm/tiva/hardware/tiva_ddi.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_ddi.h rename to soc/arm/tiva/hardware/tiva_ddi.h diff --git a/arch/arm/src/tiva/hardware/tiva_ddi0_osc.h b/soc/arm/tiva/hardware/tiva_ddi0_osc.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_ddi0_osc.h rename to soc/arm/tiva/hardware/tiva_ddi0_osc.h diff --git a/arch/arm/src/tiva/hardware/tiva_eeprom.h b/soc/arm/tiva/hardware/tiva_eeprom.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_eeprom.h rename to soc/arm/tiva/hardware/tiva_eeprom.h diff --git a/arch/arm/src/tiva/hardware/tiva_epi.h b/soc/arm/tiva/hardware/tiva_epi.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_epi.h rename to soc/arm/tiva/hardware/tiva_epi.h diff --git a/arch/arm/src/tiva/hardware/tiva_ethernet.h b/soc/arm/tiva/hardware/tiva_ethernet.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_ethernet.h rename to soc/arm/tiva/hardware/tiva_ethernet.h diff --git a/arch/arm/src/tiva/hardware/tiva_fcfg1.h b/soc/arm/tiva/hardware/tiva_fcfg1.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_fcfg1.h rename to soc/arm/tiva/hardware/tiva_fcfg1.h diff --git a/arch/arm/src/tiva/hardware/tiva_flash.h b/soc/arm/tiva/hardware/tiva_flash.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_flash.h rename to soc/arm/tiva/hardware/tiva_flash.h diff --git a/arch/arm/src/tiva/hardware/tiva_gpio.h b/soc/arm/tiva/hardware/tiva_gpio.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_gpio.h rename to soc/arm/tiva/hardware/tiva_gpio.h diff --git a/arch/arm/src/tiva/hardware/tiva_i2c.h b/soc/arm/tiva/hardware/tiva_i2c.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_i2c.h rename to soc/arm/tiva/hardware/tiva_i2c.h diff --git a/arch/arm/src/tiva/hardware/tiva_ioc.h b/soc/arm/tiva/hardware/tiva_ioc.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_ioc.h rename to soc/arm/tiva/hardware/tiva_ioc.h diff --git a/arch/arm/src/tiva/hardware/tiva_memorymap.h b/soc/arm/tiva/hardware/tiva_memorymap.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_memorymap.h rename to soc/arm/tiva/hardware/tiva_memorymap.h diff --git a/arch/arm/src/tiva/hardware/tiva_pinmap.h b/soc/arm/tiva/hardware/tiva_pinmap.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_pinmap.h rename to soc/arm/tiva/hardware/tiva_pinmap.h diff --git a/arch/arm/src/tiva/hardware/tiva_prcm.h b/soc/arm/tiva/hardware/tiva_prcm.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_prcm.h rename to soc/arm/tiva/hardware/tiva_prcm.h diff --git a/arch/arm/src/tiva/hardware/tiva_pwm.h b/soc/arm/tiva/hardware/tiva_pwm.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_pwm.h rename to soc/arm/tiva/hardware/tiva_pwm.h diff --git a/arch/arm/src/tiva/hardware/tiva_qencoder.h b/soc/arm/tiva/hardware/tiva_qencoder.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_qencoder.h rename to soc/arm/tiva/hardware/tiva_qencoder.h diff --git a/arch/arm/src/tiva/hardware/tiva_smph.h b/soc/arm/tiva/hardware/tiva_smph.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_smph.h rename to soc/arm/tiva/hardware/tiva_smph.h diff --git a/arch/arm/src/tiva/hardware/tiva_ssi.h b/soc/arm/tiva/hardware/tiva_ssi.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_ssi.h rename to soc/arm/tiva/hardware/tiva_ssi.h diff --git a/arch/arm/src/tiva/hardware/tiva_sysctrl.h b/soc/arm/tiva/hardware/tiva_sysctrl.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_sysctrl.h rename to soc/arm/tiva/hardware/tiva_sysctrl.h diff --git a/arch/arm/src/tiva/hardware/tiva_timer.h b/soc/arm/tiva/hardware/tiva_timer.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_timer.h rename to soc/arm/tiva/hardware/tiva_timer.h diff --git a/arch/arm/src/tiva/hardware/tiva_uart.h b/soc/arm/tiva/hardware/tiva_uart.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_uart.h rename to soc/arm/tiva/hardware/tiva_uart.h diff --git a/arch/arm/src/tiva/hardware/tiva_vims.h b/soc/arm/tiva/hardware/tiva_vims.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_vims.h rename to soc/arm/tiva/hardware/tiva_vims.h diff --git a/arch/arm/src/tiva/hardware/tiva_wdt.h b/soc/arm/tiva/hardware/tiva_wdt.h similarity index 100% rename from arch/arm/src/tiva/hardware/tiva_wdt.h rename to soc/arm/tiva/hardware/tiva_wdt.h diff --git a/arch/arm/src/tiva/hardware/tm4c/tm4c123_gpio.h b/soc/arm/tiva/hardware/tm4c/tm4c123_gpio.h similarity index 100% rename from arch/arm/src/tiva/hardware/tm4c/tm4c123_gpio.h rename to soc/arm/tiva/hardware/tm4c/tm4c123_gpio.h diff --git a/arch/arm/src/tiva/hardware/tm4c/tm4c123_i2c.h b/soc/arm/tiva/hardware/tm4c/tm4c123_i2c.h similarity index 100% rename from arch/arm/src/tiva/hardware/tm4c/tm4c123_i2c.h rename to soc/arm/tiva/hardware/tm4c/tm4c123_i2c.h diff --git a/arch/arm/src/tiva/hardware/tm4c/tm4c123_sysctrl.h b/soc/arm/tiva/hardware/tm4c/tm4c123_sysctrl.h similarity index 100% rename from arch/arm/src/tiva/hardware/tm4c/tm4c123_sysctrl.h rename to soc/arm/tiva/hardware/tm4c/tm4c123_sysctrl.h diff --git a/arch/arm/src/tiva/hardware/tm4c/tm4c123_timer.h b/soc/arm/tiva/hardware/tm4c/tm4c123_timer.h similarity index 100% rename from arch/arm/src/tiva/hardware/tm4c/tm4c123_timer.h rename to soc/arm/tiva/hardware/tm4c/tm4c123_timer.h diff --git a/arch/arm/src/tiva/hardware/tm4c/tm4c129_gpio.h b/soc/arm/tiva/hardware/tm4c/tm4c129_gpio.h similarity index 100% rename from arch/arm/src/tiva/hardware/tm4c/tm4c129_gpio.h rename to soc/arm/tiva/hardware/tm4c/tm4c129_gpio.h diff --git a/arch/arm/src/tiva/hardware/tm4c/tm4c129_i2c.h b/soc/arm/tiva/hardware/tm4c/tm4c129_i2c.h similarity index 100% rename from arch/arm/src/tiva/hardware/tm4c/tm4c129_i2c.h rename to soc/arm/tiva/hardware/tm4c/tm4c129_i2c.h diff --git a/arch/arm/src/tiva/hardware/tm4c/tm4c129_sysctrl.h b/soc/arm/tiva/hardware/tm4c/tm4c129_sysctrl.h similarity index 100% rename from arch/arm/src/tiva/hardware/tm4c/tm4c129_sysctrl.h rename to soc/arm/tiva/hardware/tm4c/tm4c129_sysctrl.h diff --git a/arch/arm/src/tiva/hardware/tm4c/tm4c129_timer.h b/soc/arm/tiva/hardware/tm4c/tm4c129_timer.h similarity index 100% rename from arch/arm/src/tiva/hardware/tm4c/tm4c129_timer.h rename to soc/arm/tiva/hardware/tm4c/tm4c129_timer.h diff --git a/arch/arm/src/tiva/hardware/tm4c/tm4c_ethernet.h b/soc/arm/tiva/hardware/tm4c/tm4c_ethernet.h similarity index 100% rename from arch/arm/src/tiva/hardware/tm4c/tm4c_ethernet.h rename to soc/arm/tiva/hardware/tm4c/tm4c_ethernet.h diff --git a/arch/arm/src/tiva/hardware/tm4c/tm4c_flash.h b/soc/arm/tiva/hardware/tm4c/tm4c_flash.h similarity index 100% rename from arch/arm/src/tiva/hardware/tm4c/tm4c_flash.h rename to soc/arm/tiva/hardware/tm4c/tm4c_flash.h diff --git a/arch/arm/src/tiva/hardware/tm4c/tm4c_memorymap.h b/soc/arm/tiva/hardware/tm4c/tm4c_memorymap.h similarity index 100% rename from arch/arm/src/tiva/hardware/tm4c/tm4c_memorymap.h rename to soc/arm/tiva/hardware/tm4c/tm4c_memorymap.h diff --git a/arch/arm/src/tiva/hardware/tm4c/tm4c_pinmap.h b/soc/arm/tiva/hardware/tm4c/tm4c_pinmap.h similarity index 100% rename from arch/arm/src/tiva/hardware/tm4c/tm4c_pinmap.h rename to soc/arm/tiva/hardware/tm4c/tm4c_pinmap.h diff --git a/arch/arm/src/tiva/hardware/tm4c/tm4c_uart.h b/soc/arm/tiva/hardware/tm4c/tm4c_uart.h similarity index 100% rename from arch/arm/src/tiva/hardware/tm4c/tm4c_uart.h rename to soc/arm/tiva/hardware/tm4c/tm4c_uart.h diff --git a/arch/arm/src/tiva/lm/CMakeLists.txt b/soc/arm/tiva/lm/CMakeLists.txt similarity index 100% rename from arch/arm/src/tiva/lm/CMakeLists.txt rename to soc/arm/tiva/lm/CMakeLists.txt diff --git a/arch/arm/src/tiva/lm/lm3s_ethernet.c b/soc/arm/tiva/lm/lm3s_ethernet.c similarity index 100% rename from arch/arm/src/tiva/lm/lm3s_ethernet.c rename to soc/arm/tiva/lm/lm3s_ethernet.c diff --git a/arch/arm/src/tiva/lm/lm3s_gpio.c b/soc/arm/tiva/lm/lm3s_gpio.c similarity index 100% rename from arch/arm/src/tiva/lm/lm3s_gpio.c rename to soc/arm/tiva/lm/lm3s_gpio.c diff --git a/arch/arm/src/tiva/lm/lm3s_gpio.h b/soc/arm/tiva/lm/lm3s_gpio.h similarity index 100% rename from arch/arm/src/tiva/lm/lm3s_gpio.h rename to soc/arm/tiva/lm/lm3s_gpio.h diff --git a/arch/arm/src/tiva/lm/lm4f_gpio.c b/soc/arm/tiva/lm/lm4f_gpio.c similarity index 100% rename from arch/arm/src/tiva/lm/lm4f_gpio.c rename to soc/arm/tiva/lm/lm4f_gpio.c diff --git a/arch/arm/src/tiva/lm/lm4f_gpio.h b/soc/arm/tiva/lm/lm4f_gpio.h similarity index 100% rename from arch/arm/src/tiva/lm/lm4f_gpio.h rename to soc/arm/tiva/lm/lm4f_gpio.h diff --git a/arch/arm/src/tiva/tiva_adc.h b/soc/arm/tiva/tiva_adc.h similarity index 100% rename from arch/arm/src/tiva/tiva_adc.h rename to soc/arm/tiva/tiva_adc.h diff --git a/arch/arm/src/tiva/tiva_can.h b/soc/arm/tiva/tiva_can.h similarity index 100% rename from arch/arm/src/tiva/tiva_can.h rename to soc/arm/tiva/tiva_can.h diff --git a/arch/arm/src/tiva/tiva_chipinfo.h b/soc/arm/tiva/tiva_chipinfo.h similarity index 100% rename from arch/arm/src/tiva/tiva_chipinfo.h rename to soc/arm/tiva/tiva_chipinfo.h diff --git a/arch/arm/src/tiva/tiva_eeprom.h b/soc/arm/tiva/tiva_eeprom.h similarity index 100% rename from arch/arm/src/tiva/tiva_eeprom.h rename to soc/arm/tiva/tiva_eeprom.h diff --git a/arch/arm/src/tiva/tiva_enableclks.h b/soc/arm/tiva/tiva_enableclks.h similarity index 100% rename from arch/arm/src/tiva/tiva_enableclks.h rename to soc/arm/tiva/tiva_enableclks.h diff --git a/arch/arm/src/tiva/tiva_enablepwr.h b/soc/arm/tiva/tiva_enablepwr.h similarity index 100% rename from arch/arm/src/tiva/tiva_enablepwr.h rename to soc/arm/tiva/tiva_enablepwr.h diff --git a/arch/arm/src/tiva/tiva_ethernet.h b/soc/arm/tiva/tiva_ethernet.h similarity index 100% rename from arch/arm/src/tiva/tiva_ethernet.h rename to soc/arm/tiva/tiva_ethernet.h diff --git a/arch/arm/src/tiva/tiva_flash.h b/soc/arm/tiva/tiva_flash.h similarity index 100% rename from arch/arm/src/tiva/tiva_flash.h rename to soc/arm/tiva/tiva_flash.h diff --git a/arch/arm/src/tiva/tiva_gpio.h b/soc/arm/tiva/tiva_gpio.h similarity index 100% rename from arch/arm/src/tiva/tiva_gpio.h rename to soc/arm/tiva/tiva_gpio.h diff --git a/arch/arm/src/tiva/tiva_hciuart.h b/soc/arm/tiva/tiva_hciuart.h similarity index 100% rename from arch/arm/src/tiva/tiva_hciuart.h rename to soc/arm/tiva/tiva_hciuart.h diff --git a/arch/arm/src/tiva/tiva_i2c.h b/soc/arm/tiva/tiva_i2c.h similarity index 100% rename from arch/arm/src/tiva/tiva_i2c.h rename to soc/arm/tiva/tiva_i2c.h diff --git a/arch/arm/src/tiva/tiva_lowputc.h b/soc/arm/tiva/tiva_lowputc.h similarity index 100% rename from arch/arm/src/tiva/tiva_lowputc.h rename to soc/arm/tiva/tiva_lowputc.h diff --git a/arch/arm/src/tiva/tiva_mpuinit.h b/soc/arm/tiva/tiva_mpuinit.h similarity index 100% rename from arch/arm/src/tiva/tiva_mpuinit.h rename to soc/arm/tiva/tiva_mpuinit.h diff --git a/arch/arm/src/tiva/tiva_periphrdy.h b/soc/arm/tiva/tiva_periphrdy.h similarity index 100% rename from arch/arm/src/tiva/tiva_periphrdy.h rename to soc/arm/tiva/tiva_periphrdy.h diff --git a/arch/arm/src/tiva/tiva_pwm.h b/soc/arm/tiva/tiva_pwm.h similarity index 100% rename from arch/arm/src/tiva/tiva_pwm.h rename to soc/arm/tiva/tiva_pwm.h diff --git a/arch/arm/src/tiva/tiva_qencoder.h b/soc/arm/tiva/tiva_qencoder.h similarity index 100% rename from arch/arm/src/tiva/tiva_qencoder.h rename to soc/arm/tiva/tiva_qencoder.h diff --git a/arch/arm/src/tiva/tiva_ssi.h b/soc/arm/tiva/tiva_ssi.h similarity index 100% rename from arch/arm/src/tiva/tiva_ssi.h rename to soc/arm/tiva/tiva_ssi.h diff --git a/arch/arm/src/tiva/tiva_start.h b/soc/arm/tiva/tiva_start.h similarity index 100% rename from arch/arm/src/tiva/tiva_start.h rename to soc/arm/tiva/tiva_start.h diff --git a/arch/arm/src/tiva/tiva_sysctrl.h b/soc/arm/tiva/tiva_sysctrl.h similarity index 100% rename from arch/arm/src/tiva/tiva_sysctrl.h rename to soc/arm/tiva/tiva_sysctrl.h diff --git a/arch/arm/src/tiva/tiva_timer.h b/soc/arm/tiva/tiva_timer.h similarity index 100% rename from arch/arm/src/tiva/tiva_timer.h rename to soc/arm/tiva/tiva_timer.h diff --git a/arch/arm/src/tiva/tiva_userspace.h b/soc/arm/tiva/tiva_userspace.h similarity index 100% rename from arch/arm/src/tiva/tiva_userspace.h rename to soc/arm/tiva/tiva_userspace.h diff --git a/arch/arm/src/tiva/tm4c/CMakeLists.txt b/soc/arm/tiva/tm4c/CMakeLists.txt similarity index 100% rename from arch/arm/src/tiva/tm4c/CMakeLists.txt rename to soc/arm/tiva/tm4c/CMakeLists.txt diff --git a/arch/arm/src/tiva/tm4c/tm4c129_sysctrl.c b/soc/arm/tiva/tm4c/tm4c129_sysctrl.c similarity index 100% rename from arch/arm/src/tiva/tm4c/tm4c129_sysctrl.c rename to soc/arm/tiva/tm4c/tm4c129_sysctrl.c diff --git a/arch/arm/src/tiva/tm4c/tm4c_ethernet.c b/soc/arm/tiva/tm4c/tm4c_ethernet.c similarity index 100% rename from arch/arm/src/tiva/tm4c/tm4c_ethernet.c rename to soc/arm/tiva/tm4c/tm4c_ethernet.c diff --git a/arch/arm/src/tiva/tm4c/tm4c_gpio.c b/soc/arm/tiva/tm4c/tm4c_gpio.c similarity index 100% rename from arch/arm/src/tiva/tm4c/tm4c_gpio.c rename to soc/arm/tiva/tm4c/tm4c_gpio.c diff --git a/arch/arm/src/tiva/tm4c/tm4c_gpio.h b/soc/arm/tiva/tm4c/tm4c_gpio.h similarity index 100% rename from arch/arm/src/tiva/tm4c/tm4c_gpio.h rename to soc/arm/tiva/tm4c/tm4c_gpio.h diff --git a/arch/arm/src/tlsr82/Kconfig b/soc/arm/tlsr82/Kconfig similarity index 100% rename from arch/arm/src/tlsr82/Kconfig rename to soc/arm/tlsr82/Kconfig diff --git a/arch/arm/src/tlsr82/Make.defs b/soc/arm/tlsr82/Make.defs similarity index 100% rename from arch/arm/src/tlsr82/Make.defs rename to soc/arm/tlsr82/Make.defs diff --git a/arch/arm/src/tlsr82/Toolchain.defs b/soc/arm/tlsr82/Toolchain.defs similarity index 100% rename from arch/arm/src/tlsr82/Toolchain.defs rename to soc/arm/tlsr82/Toolchain.defs diff --git a/arch/arm/src/tlsr82/chip.h b/soc/arm/tlsr82/chip.h similarity index 100% rename from arch/arm/src/tlsr82/chip.h rename to soc/arm/tlsr82/chip.h diff --git a/arch/arm/src/tlsr82/chip/b87/boot/cstartup_flash.S b/soc/arm/tlsr82/chip/b87/boot/cstartup_flash.S similarity index 100% rename from arch/arm/src/tlsr82/chip/b87/boot/cstartup_flash.S rename to soc/arm/tlsr82/chip/b87/boot/cstartup_flash.S diff --git a/arch/arm/src/tlsr82/hardware/tlsr82_adc.h b/soc/arm/tlsr82/hardware/tlsr82_adc.h similarity index 100% rename from arch/arm/src/tlsr82/hardware/tlsr82_adc.h rename to soc/arm/tlsr82/hardware/tlsr82_adc.h diff --git a/arch/arm/src/tlsr82/hardware/tlsr82_aes.h b/soc/arm/tlsr82/hardware/tlsr82_aes.h similarity index 100% rename from arch/arm/src/tlsr82/hardware/tlsr82_aes.h rename to soc/arm/tlsr82/hardware/tlsr82_aes.h diff --git a/arch/arm/src/tlsr82/hardware/tlsr82_analog.h b/soc/arm/tlsr82/hardware/tlsr82_analog.h similarity index 100% rename from arch/arm/src/tlsr82/hardware/tlsr82_analog.h rename to soc/arm/tlsr82/hardware/tlsr82_analog.h diff --git a/arch/arm/src/tlsr82/hardware/tlsr82_clock.h b/soc/arm/tlsr82/hardware/tlsr82_clock.h similarity index 100% rename from arch/arm/src/tlsr82/hardware/tlsr82_clock.h rename to soc/arm/tlsr82/hardware/tlsr82_clock.h diff --git a/arch/arm/src/tlsr82/hardware/tlsr82_dfifo.h b/soc/arm/tlsr82/hardware/tlsr82_dfifo.h similarity index 100% rename from arch/arm/src/tlsr82/hardware/tlsr82_dfifo.h rename to soc/arm/tlsr82/hardware/tlsr82_dfifo.h diff --git a/arch/arm/src/tlsr82/hardware/tlsr82_dma.h b/soc/arm/tlsr82/hardware/tlsr82_dma.h similarity index 100% rename from arch/arm/src/tlsr82/hardware/tlsr82_dma.h rename to soc/arm/tlsr82/hardware/tlsr82_dma.h diff --git a/arch/arm/src/tlsr82/hardware/tlsr82_gpio.h b/soc/arm/tlsr82/hardware/tlsr82_gpio.h similarity index 100% rename from arch/arm/src/tlsr82/hardware/tlsr82_gpio.h rename to soc/arm/tlsr82/hardware/tlsr82_gpio.h diff --git a/arch/arm/src/tlsr82/hardware/tlsr82_irq.h b/soc/arm/tlsr82/hardware/tlsr82_irq.h similarity index 100% rename from arch/arm/src/tlsr82/hardware/tlsr82_irq.h rename to soc/arm/tlsr82/hardware/tlsr82_irq.h diff --git a/arch/arm/src/tlsr82/hardware/tlsr82_mspi.h b/soc/arm/tlsr82/hardware/tlsr82_mspi.h similarity index 100% rename from arch/arm/src/tlsr82/hardware/tlsr82_mspi.h rename to soc/arm/tlsr82/hardware/tlsr82_mspi.h diff --git a/arch/arm/src/tlsr82/hardware/tlsr82_pwm.h b/soc/arm/tlsr82/hardware/tlsr82_pwm.h similarity index 100% rename from arch/arm/src/tlsr82/hardware/tlsr82_pwm.h rename to soc/arm/tlsr82/hardware/tlsr82_pwm.h diff --git a/arch/arm/src/tlsr82/hardware/tlsr82_register.h b/soc/arm/tlsr82/hardware/tlsr82_register.h similarity index 100% rename from arch/arm/src/tlsr82/hardware/tlsr82_register.h rename to soc/arm/tlsr82/hardware/tlsr82_register.h diff --git a/arch/arm/src/tlsr82/hardware/tlsr82_spi.h b/soc/arm/tlsr82/hardware/tlsr82_spi.h similarity index 100% rename from arch/arm/src/tlsr82/hardware/tlsr82_spi.h rename to soc/arm/tlsr82/hardware/tlsr82_spi.h diff --git a/arch/arm/src/tlsr82/hardware/tlsr82_timer.h b/soc/arm/tlsr82/hardware/tlsr82_timer.h similarity index 100% rename from arch/arm/src/tlsr82/hardware/tlsr82_timer.h rename to soc/arm/tlsr82/hardware/tlsr82_timer.h diff --git a/arch/arm/src/tlsr82/hardware/tlsr82_uart.h b/soc/arm/tlsr82/hardware/tlsr82_uart.h similarity index 100% rename from arch/arm/src/tlsr82/hardware/tlsr82_uart.h rename to soc/arm/tlsr82/hardware/tlsr82_uart.h diff --git a/arch/arm/src/tlsr82/tc32/Make.defs b/soc/arm/tlsr82/tc32/Make.defs similarity index 100% rename from arch/arm/src/tlsr82/tc32/Make.defs rename to soc/arm/tlsr82/tc32/Make.defs diff --git a/arch/arm/src/tlsr82/tc32/div_mod.S b/soc/arm/tlsr82/tc32/div_mod.S similarity index 100% rename from arch/arm/src/tlsr82/tc32/div_mod.S rename to soc/arm/tlsr82/tc32/div_mod.S diff --git a/arch/arm/src/tlsr82/tc32/tc32.h b/soc/arm/tlsr82/tc32/tc32.h similarity index 100% rename from arch/arm/src/tlsr82/tc32/tc32.h rename to soc/arm/tlsr82/tc32/tc32.h diff --git a/arch/arm/src/tlsr82/tc32/tc32_backtrace.c b/soc/arm/tlsr82/tc32/tc32_backtrace.c similarity index 100% rename from arch/arm/src/tlsr82/tc32/tc32_backtrace.c rename to soc/arm/tlsr82/tc32/tc32_backtrace.c diff --git a/arch/arm/src/tlsr82/tc32/tc32_doirq.c b/soc/arm/tlsr82/tc32/tc32_doirq.c similarity index 100% rename from arch/arm/src/tlsr82/tc32/tc32_doirq.c rename to soc/arm/tlsr82/tc32/tc32_doirq.c diff --git a/arch/arm/src/tlsr82/tc32/tc32_exception.S b/soc/arm/tlsr82/tc32/tc32_exception.S similarity index 100% rename from arch/arm/src/tlsr82/tc32/tc32_exception.S rename to soc/arm/tlsr82/tc32/tc32_exception.S diff --git a/arch/arm/src/tlsr82/tc32/tc32_fullcontextrestore.S b/soc/arm/tlsr82/tc32/tc32_fullcontextrestore.S similarity index 100% rename from arch/arm/src/tlsr82/tc32/tc32_fullcontextrestore.S rename to soc/arm/tlsr82/tc32/tc32_fullcontextrestore.S diff --git a/arch/arm/src/tlsr82/tc32/tc32_initialstate.c b/soc/arm/tlsr82/tc32/tc32_initialstate.c similarity index 100% rename from arch/arm/src/tlsr82/tc32/tc32_initialstate.c rename to soc/arm/tlsr82/tc32/tc32_initialstate.c diff --git a/arch/arm/src/tlsr82/tc32/tc32_saveusercontext.S b/soc/arm/tlsr82/tc32/tc32_saveusercontext.S similarity index 100% rename from arch/arm/src/tlsr82/tc32/tc32_saveusercontext.S rename to soc/arm/tlsr82/tc32/tc32_saveusercontext.S diff --git a/arch/arm/src/tlsr82/tc32/tc32_schedulesigaction.c b/soc/arm/tlsr82/tc32/tc32_schedulesigaction.c similarity index 100% rename from arch/arm/src/tlsr82/tc32/tc32_schedulesigaction.c rename to soc/arm/tlsr82/tc32/tc32_schedulesigaction.c diff --git a/arch/arm/src/tlsr82/tc32/tc32_switchcontext.S b/soc/arm/tlsr82/tc32/tc32_switchcontext.S similarity index 100% rename from arch/arm/src/tlsr82/tc32/tc32_switchcontext.S rename to soc/arm/tlsr82/tc32/tc32_switchcontext.S diff --git a/arch/arm/src/tlsr82/tc32/tc32_syscall.c b/soc/arm/tlsr82/tc32/tc32_syscall.c similarity index 100% rename from arch/arm/src/tlsr82/tc32/tc32_syscall.c rename to soc/arm/tlsr82/tc32/tc32_syscall.c diff --git a/arch/arm/src/tlsr82/tc32/tc32_udelay.c b/soc/arm/tlsr82/tc32/tc32_udelay.c similarity index 100% rename from arch/arm/src/tlsr82/tc32/tc32_udelay.c rename to soc/arm/tlsr82/tc32/tc32_udelay.c diff --git a/arch/arm/src/tlsr82/tlsr82_adc.c b/soc/arm/tlsr82/tlsr82_adc.c similarity index 100% rename from arch/arm/src/tlsr82/tlsr82_adc.c rename to soc/arm/tlsr82/tlsr82_adc.c diff --git a/arch/arm/src/tlsr82/tlsr82_adc.h b/soc/arm/tlsr82/tlsr82_adc.h similarity index 100% rename from arch/arm/src/tlsr82/tlsr82_adc.h rename to soc/arm/tlsr82/tlsr82_adc.h diff --git a/arch/arm/src/tlsr82/tlsr82_aes.c b/soc/arm/tlsr82/tlsr82_aes.c similarity index 100% rename from arch/arm/src/tlsr82/tlsr82_aes.c rename to soc/arm/tlsr82/tlsr82_aes.c diff --git a/arch/arm/src/tlsr82/tlsr82_analog.c b/soc/arm/tlsr82/tlsr82_analog.c similarity index 100% rename from arch/arm/src/tlsr82/tlsr82_analog.c rename to soc/arm/tlsr82/tlsr82_analog.c diff --git a/arch/arm/src/tlsr82/tlsr82_analog.h b/soc/arm/tlsr82/tlsr82_analog.h similarity index 100% rename from arch/arm/src/tlsr82/tlsr82_analog.h rename to soc/arm/tlsr82/tlsr82_analog.h diff --git a/arch/arm/src/tlsr82/tlsr82_clock.c b/soc/arm/tlsr82/tlsr82_clock.c similarity index 100% rename from arch/arm/src/tlsr82/tlsr82_clock.c rename to soc/arm/tlsr82/tlsr82_clock.c diff --git a/arch/arm/src/tlsr82/tlsr82_clock.h b/soc/arm/tlsr82/tlsr82_clock.h similarity index 100% rename from arch/arm/src/tlsr82/tlsr82_clock.h rename to soc/arm/tlsr82/tlsr82_clock.h diff --git a/arch/arm/src/tlsr82/tlsr82_cpu.c b/soc/arm/tlsr82/tlsr82_cpu.c similarity index 100% rename from arch/arm/src/tlsr82/tlsr82_cpu.c rename to soc/arm/tlsr82/tlsr82_cpu.c diff --git a/arch/arm/src/tlsr82/tlsr82_cpu.h b/soc/arm/tlsr82/tlsr82_cpu.h similarity index 100% rename from arch/arm/src/tlsr82/tlsr82_cpu.h rename to soc/arm/tlsr82/tlsr82_cpu.h diff --git a/arch/arm/src/tlsr82/tlsr82_flash.c b/soc/arm/tlsr82/tlsr82_flash.c similarity index 100% rename from arch/arm/src/tlsr82/tlsr82_flash.c rename to soc/arm/tlsr82/tlsr82_flash.c diff --git a/arch/arm/src/tlsr82/tlsr82_flash.h b/soc/arm/tlsr82/tlsr82_flash.h similarity index 100% rename from arch/arm/src/tlsr82/tlsr82_flash.h rename to soc/arm/tlsr82/tlsr82_flash.h diff --git a/arch/arm/src/tlsr82/tlsr82_flash_mtd.c b/soc/arm/tlsr82/tlsr82_flash_mtd.c similarity index 100% rename from arch/arm/src/tlsr82/tlsr82_flash_mtd.c rename to soc/arm/tlsr82/tlsr82_flash_mtd.c diff --git a/arch/arm/src/tlsr82/tlsr82_flash_mtd.h b/soc/arm/tlsr82/tlsr82_flash_mtd.h similarity index 100% rename from arch/arm/src/tlsr82/tlsr82_flash_mtd.h rename to soc/arm/tlsr82/tlsr82_flash_mtd.h diff --git a/arch/arm/src/tlsr82/tlsr82_gpio.c b/soc/arm/tlsr82/tlsr82_gpio.c similarity index 100% rename from arch/arm/src/tlsr82/tlsr82_gpio.c rename to soc/arm/tlsr82/tlsr82_gpio.c diff --git a/arch/arm/src/tlsr82/tlsr82_gpio.h b/soc/arm/tlsr82/tlsr82_gpio.h similarity index 100% rename from arch/arm/src/tlsr82/tlsr82_gpio.h rename to soc/arm/tlsr82/tlsr82_gpio.h diff --git a/arch/arm/src/tlsr82/tlsr82_gpio_cfg.c b/soc/arm/tlsr82/tlsr82_gpio_cfg.c similarity index 100% rename from arch/arm/src/tlsr82/tlsr82_gpio_cfg.c rename to soc/arm/tlsr82/tlsr82_gpio_cfg.c diff --git a/arch/arm/src/tlsr82/tlsr82_gpio_cfg.h b/soc/arm/tlsr82/tlsr82_gpio_cfg.h similarity index 100% rename from arch/arm/src/tlsr82/tlsr82_gpio_cfg.h rename to soc/arm/tlsr82/tlsr82_gpio_cfg.h diff --git a/arch/arm/src/tlsr82/tlsr82_gpio_default.h b/soc/arm/tlsr82/tlsr82_gpio_default.h similarity index 100% rename from arch/arm/src/tlsr82/tlsr82_gpio_default.h rename to soc/arm/tlsr82/tlsr82_gpio_default.h diff --git a/arch/arm/src/tlsr82/tlsr82_irq.c b/soc/arm/tlsr82/tlsr82_irq.c similarity index 100% rename from arch/arm/src/tlsr82/tlsr82_irq.c rename to soc/arm/tlsr82/tlsr82_irq.c diff --git a/arch/arm/src/tlsr82/tlsr82_mspi.c b/soc/arm/tlsr82/tlsr82_mspi.c similarity index 100% rename from arch/arm/src/tlsr82/tlsr82_mspi.c rename to soc/arm/tlsr82/tlsr82_mspi.c diff --git a/arch/arm/src/tlsr82/tlsr82_mspi.h b/soc/arm/tlsr82/tlsr82_mspi.h similarity index 100% rename from arch/arm/src/tlsr82/tlsr82_mspi.h rename to soc/arm/tlsr82/tlsr82_mspi.h diff --git a/arch/arm/src/tlsr82/tlsr82_pwm.c b/soc/arm/tlsr82/tlsr82_pwm.c similarity index 100% rename from arch/arm/src/tlsr82/tlsr82_pwm.c rename to soc/arm/tlsr82/tlsr82_pwm.c diff --git a/arch/arm/src/tlsr82/tlsr82_pwm.h b/soc/arm/tlsr82/tlsr82_pwm.h similarity index 100% rename from arch/arm/src/tlsr82/tlsr82_pwm.h rename to soc/arm/tlsr82/tlsr82_pwm.h diff --git a/arch/arm/src/tlsr82/tlsr82_serial.c b/soc/arm/tlsr82/tlsr82_serial.c similarity index 100% rename from arch/arm/src/tlsr82/tlsr82_serial.c rename to soc/arm/tlsr82/tlsr82_serial.c diff --git a/arch/arm/src/tlsr82/tlsr82_serial.h b/soc/arm/tlsr82/tlsr82_serial.h similarity index 100% rename from arch/arm/src/tlsr82/tlsr82_serial.h rename to soc/arm/tlsr82/tlsr82_serial.h diff --git a/arch/arm/src/tlsr82/tlsr82_spi_console.c b/soc/arm/tlsr82/tlsr82_spi_console.c similarity index 100% rename from arch/arm/src/tlsr82/tlsr82_spi_console.c rename to soc/arm/tlsr82/tlsr82_spi_console.c diff --git a/arch/arm/src/tlsr82/tlsr82_spi_console.h b/soc/arm/tlsr82/tlsr82_spi_console.h similarity index 100% rename from arch/arm/src/tlsr82/tlsr82_spi_console.h rename to soc/arm/tlsr82/tlsr82_spi_console.h diff --git a/arch/arm/src/tlsr82/tlsr82_start.c b/soc/arm/tlsr82/tlsr82_start.c similarity index 100% rename from arch/arm/src/tlsr82/tlsr82_start.c rename to soc/arm/tlsr82/tlsr82_start.c diff --git a/arch/arm/src/tlsr82/tlsr82_timer.c b/soc/arm/tlsr82/tlsr82_timer.c similarity index 100% rename from arch/arm/src/tlsr82/tlsr82_timer.c rename to soc/arm/tlsr82/tlsr82_timer.c diff --git a/arch/arm/src/tlsr82/tlsr82_timer.h b/soc/arm/tlsr82/tlsr82_timer.h similarity index 100% rename from arch/arm/src/tlsr82/tlsr82_timer.h rename to soc/arm/tlsr82/tlsr82_timer.h diff --git a/arch/arm/src/tlsr82/tlsr82_timer_isr.c b/soc/arm/tlsr82/tlsr82_timer_isr.c similarity index 100% rename from arch/arm/src/tlsr82/tlsr82_timer_isr.c rename to soc/arm/tlsr82/tlsr82_timer_isr.c diff --git a/arch/arm/src/tlsr82/tlsr82_timer_lowerhalf.c b/soc/arm/tlsr82/tlsr82_timer_lowerhalf.c similarity index 100% rename from arch/arm/src/tlsr82/tlsr82_timer_lowerhalf.c rename to soc/arm/tlsr82/tlsr82_timer_lowerhalf.c diff --git a/arch/arm/src/tlsr82/tlsr82_timer_lowerhalf.h b/soc/arm/tlsr82/tlsr82_timer_lowerhalf.h similarity index 100% rename from arch/arm/src/tlsr82/tlsr82_timer_lowerhalf.h rename to soc/arm/tlsr82/tlsr82_timer_lowerhalf.h diff --git a/arch/arm/src/tlsr82/tlsr82_watchdog.c b/soc/arm/tlsr82/tlsr82_watchdog.c similarity index 100% rename from arch/arm/src/tlsr82/tlsr82_watchdog.c rename to soc/arm/tlsr82/tlsr82_watchdog.c diff --git a/arch/arm/src/tlsr82/tlsr82_watchdog.h b/soc/arm/tlsr82/tlsr82_watchdog.h similarity index 100% rename from arch/arm/src/tlsr82/tlsr82_watchdog.h rename to soc/arm/tlsr82/tlsr82_watchdog.h diff --git a/arch/arm/src/tms570/CMakeLists.txt b/soc/arm/tms570/CMakeLists.txt similarity index 100% rename from arch/arm/src/tms570/CMakeLists.txt rename to soc/arm/tms570/CMakeLists.txt diff --git a/arch/arm/src/tms570/Kconfig b/soc/arm/tms570/Kconfig similarity index 100% rename from arch/arm/src/tms570/Kconfig rename to soc/arm/tms570/Kconfig diff --git a/arch/arm/src/tms570/Make.defs b/soc/arm/tms570/Make.defs similarity index 100% rename from arch/arm/src/tms570/Make.defs rename to soc/arm/tms570/Make.defs diff --git a/arch/arm/src/tms570/chip.h b/soc/arm/tms570/chip.h similarity index 100% rename from arch/arm/src/tms570/chip.h rename to soc/arm/tms570/chip.h diff --git a/arch/arm/src/tms570/hardware/tms570_esm.h b/soc/arm/tms570/hardware/tms570_esm.h similarity index 100% rename from arch/arm/src/tms570/hardware/tms570_esm.h rename to soc/arm/tms570/hardware/tms570_esm.h diff --git a/arch/arm/src/tms570/hardware/tms570_flash.h b/soc/arm/tms570/hardware/tms570_flash.h similarity index 100% rename from arch/arm/src/tms570/hardware/tms570_flash.h rename to soc/arm/tms570/hardware/tms570_flash.h diff --git a/arch/arm/src/tms570/hardware/tms570_gio.h b/soc/arm/tms570/hardware/tms570_gio.h similarity index 100% rename from arch/arm/src/tms570/hardware/tms570_gio.h rename to soc/arm/tms570/hardware/tms570_gio.h diff --git a/arch/arm/src/tms570/hardware/tms570_iomm.h b/soc/arm/tms570/hardware/tms570_iomm.h similarity index 100% rename from arch/arm/src/tms570/hardware/tms570_iomm.h rename to soc/arm/tms570/hardware/tms570_iomm.h diff --git a/arch/arm/src/tms570/hardware/tms570_memorymap.h b/soc/arm/tms570/hardware/tms570_memorymap.h similarity index 100% rename from arch/arm/src/tms570/hardware/tms570_memorymap.h rename to soc/arm/tms570/hardware/tms570_memorymap.h diff --git a/arch/arm/src/tms570/hardware/tms570_pbist.h b/soc/arm/tms570/hardware/tms570_pbist.h similarity index 100% rename from arch/arm/src/tms570/hardware/tms570_pbist.h rename to soc/arm/tms570/hardware/tms570_pbist.h diff --git a/arch/arm/src/tms570/hardware/tms570_pcr.h b/soc/arm/tms570/hardware/tms570_pcr.h similarity index 100% rename from arch/arm/src/tms570/hardware/tms570_pcr.h rename to soc/arm/tms570/hardware/tms570_pcr.h diff --git a/arch/arm/src/tms570/hardware/tms570_pinmux.h b/soc/arm/tms570/hardware/tms570_pinmux.h similarity index 100% rename from arch/arm/src/tms570/hardware/tms570_pinmux.h rename to soc/arm/tms570/hardware/tms570_pinmux.h diff --git a/arch/arm/src/tms570/hardware/tms570_rti.h b/soc/arm/tms570/hardware/tms570_rti.h similarity index 100% rename from arch/arm/src/tms570/hardware/tms570_rti.h rename to soc/arm/tms570/hardware/tms570_rti.h diff --git a/arch/arm/src/tms570/hardware/tms570_sci.h b/soc/arm/tms570/hardware/tms570_sci.h similarity index 100% rename from arch/arm/src/tms570/hardware/tms570_sci.h rename to soc/arm/tms570/hardware/tms570_sci.h diff --git a/arch/arm/src/tms570/hardware/tms570_sys.h b/soc/arm/tms570/hardware/tms570_sys.h similarity index 100% rename from arch/arm/src/tms570/hardware/tms570_sys.h rename to soc/arm/tms570/hardware/tms570_sys.h diff --git a/arch/arm/src/tms570/hardware/tms570_sys2.h b/soc/arm/tms570/hardware/tms570_sys2.h similarity index 100% rename from arch/arm/src/tms570/hardware/tms570_sys2.h rename to soc/arm/tms570/hardware/tms570_sys2.h diff --git a/arch/arm/src/tms570/hardware/tms570_vim.h b/soc/arm/tms570/hardware/tms570_vim.h similarity index 100% rename from arch/arm/src/tms570/hardware/tms570_vim.h rename to soc/arm/tms570/hardware/tms570_vim.h diff --git a/arch/arm/src/tms570/hardware/tms570ls04x03x_memorymap.h b/soc/arm/tms570/hardware/tms570ls04x03x_memorymap.h similarity index 100% rename from arch/arm/src/tms570/hardware/tms570ls04x03x_memorymap.h rename to soc/arm/tms570/hardware/tms570ls04x03x_memorymap.h diff --git a/arch/arm/src/tms570/hardware/tms570ls04x03x_pinmux.h b/soc/arm/tms570/hardware/tms570ls04x03x_pinmux.h similarity index 100% rename from arch/arm/src/tms570/hardware/tms570ls04x03x_pinmux.h rename to soc/arm/tms570/hardware/tms570ls04x03x_pinmux.h diff --git a/arch/arm/src/tms570/tms570_boot.c b/soc/arm/tms570/tms570_boot.c similarity index 100% rename from arch/arm/src/tms570/tms570_boot.c rename to soc/arm/tms570/tms570_boot.c diff --git a/arch/arm/src/tms570/tms570_boot.h b/soc/arm/tms570/tms570_boot.h similarity index 100% rename from arch/arm/src/tms570/tms570_boot.h rename to soc/arm/tms570/tms570_boot.h diff --git a/arch/arm/src/tms570/tms570_clockconfig.c b/soc/arm/tms570/tms570_clockconfig.c similarity index 100% rename from arch/arm/src/tms570/tms570_clockconfig.c rename to soc/arm/tms570/tms570_clockconfig.c diff --git a/arch/arm/src/tms570/tms570_clockconfig.h b/soc/arm/tms570/tms570_clockconfig.h similarity index 100% rename from arch/arm/src/tms570/tms570_clockconfig.h rename to soc/arm/tms570/tms570_clockconfig.h diff --git a/arch/arm/src/tms570/tms570_esm.c b/soc/arm/tms570/tms570_esm.c similarity index 100% rename from arch/arm/src/tms570/tms570_esm.c rename to soc/arm/tms570/tms570_esm.c diff --git a/arch/arm/src/tms570/tms570_esm.h b/soc/arm/tms570/tms570_esm.h similarity index 100% rename from arch/arm/src/tms570/tms570_esm.h rename to soc/arm/tms570/tms570_esm.h diff --git a/arch/arm/src/tms570/tms570_gio.c b/soc/arm/tms570/tms570_gio.c similarity index 100% rename from arch/arm/src/tms570/tms570_gio.c rename to soc/arm/tms570/tms570_gio.c diff --git a/arch/arm/src/tms570/tms570_gio.h b/soc/arm/tms570/tms570_gio.h similarity index 100% rename from arch/arm/src/tms570/tms570_gio.h rename to soc/arm/tms570/tms570_gio.h diff --git a/arch/arm/src/tms570/tms570_gioirq.c b/soc/arm/tms570/tms570_gioirq.c similarity index 100% rename from arch/arm/src/tms570/tms570_gioirq.c rename to soc/arm/tms570/tms570_gioirq.c diff --git a/arch/arm/src/tms570/tms570_irq.c b/soc/arm/tms570/tms570_irq.c similarity index 100% rename from arch/arm/src/tms570/tms570_irq.c rename to soc/arm/tms570/tms570_irq.c diff --git a/arch/arm/src/tms570/tms570_irq.h b/soc/arm/tms570/tms570_irq.h similarity index 100% rename from arch/arm/src/tms570/tms570_irq.h rename to soc/arm/tms570/tms570_irq.h diff --git a/arch/arm/src/tms570/tms570_lowputc.c b/soc/arm/tms570/tms570_lowputc.c similarity index 100% rename from arch/arm/src/tms570/tms570_lowputc.c rename to soc/arm/tms570/tms570_lowputc.c diff --git a/arch/arm/src/tms570/tms570_lowputc.h b/soc/arm/tms570/tms570_lowputc.h similarity index 100% rename from arch/arm/src/tms570/tms570_lowputc.h rename to soc/arm/tms570/tms570_lowputc.h diff --git a/arch/arm/src/tms570/tms570_selftest.c b/soc/arm/tms570/tms570_selftest.c similarity index 100% rename from arch/arm/src/tms570/tms570_selftest.c rename to soc/arm/tms570/tms570_selftest.c diff --git a/arch/arm/src/tms570/tms570_selftest.h b/soc/arm/tms570/tms570_selftest.h similarity index 100% rename from arch/arm/src/tms570/tms570_selftest.h rename to soc/arm/tms570/tms570_selftest.h diff --git a/arch/arm/src/tms570/tms570_serial.c b/soc/arm/tms570/tms570_serial.c similarity index 100% rename from arch/arm/src/tms570/tms570_serial.c rename to soc/arm/tms570/tms570_serial.c diff --git a/arch/arm/src/tms570/tms570_timerisr.c b/soc/arm/tms570/tms570_timerisr.c similarity index 100% rename from arch/arm/src/tms570/tms570_timerisr.c rename to soc/arm/tms570/tms570_timerisr.c diff --git a/arch/arm/src/xmc4/CMakeLists.txt b/soc/arm/xmc4/CMakeLists.txt similarity index 100% rename from arch/arm/src/xmc4/CMakeLists.txt rename to soc/arm/xmc4/CMakeLists.txt diff --git a/arch/arm/src/xmc4/Kconfig b/soc/arm/xmc4/Kconfig similarity index 100% rename from arch/arm/src/xmc4/Kconfig rename to soc/arm/xmc4/Kconfig diff --git a/arch/arm/src/xmc4/Make.defs b/soc/arm/xmc4/Make.defs similarity index 100% rename from arch/arm/src/xmc4/Make.defs rename to soc/arm/xmc4/Make.defs diff --git a/arch/arm/src/xmc4/chip.h b/soc/arm/xmc4/chip.h similarity index 100% rename from arch/arm/src/xmc4/chip.h rename to soc/arm/xmc4/chip.h diff --git a/arch/arm/src/xmc4/hardware/xmc4_ccu4.h b/soc/arm/xmc4/hardware/xmc4_ccu4.h similarity index 100% rename from arch/arm/src/xmc4/hardware/xmc4_ccu4.h rename to soc/arm/xmc4/hardware/xmc4_ccu4.h diff --git a/arch/arm/src/xmc4/hardware/xmc4_eru.h b/soc/arm/xmc4/hardware/xmc4_eru.h similarity index 100% rename from arch/arm/src/xmc4/hardware/xmc4_eru.h rename to soc/arm/xmc4/hardware/xmc4_eru.h diff --git a/arch/arm/src/xmc4/hardware/xmc4_eru_pinmap.h b/soc/arm/xmc4/hardware/xmc4_eru_pinmap.h similarity index 100% rename from arch/arm/src/xmc4/hardware/xmc4_eru_pinmap.h rename to soc/arm/xmc4/hardware/xmc4_eru_pinmap.h diff --git a/arch/arm/src/xmc4/hardware/xmc4_ethernet.h b/soc/arm/xmc4/hardware/xmc4_ethernet.h similarity index 100% rename from arch/arm/src/xmc4/hardware/xmc4_ethernet.h rename to soc/arm/xmc4/hardware/xmc4_ethernet.h diff --git a/arch/arm/src/xmc4/hardware/xmc4_flash.h b/soc/arm/xmc4/hardware/xmc4_flash.h similarity index 100% rename from arch/arm/src/xmc4/hardware/xmc4_flash.h rename to soc/arm/xmc4/hardware/xmc4_flash.h diff --git a/arch/arm/src/xmc4/hardware/xmc4_memorymap.h b/soc/arm/xmc4/hardware/xmc4_memorymap.h similarity index 100% rename from arch/arm/src/xmc4/hardware/xmc4_memorymap.h rename to soc/arm/xmc4/hardware/xmc4_memorymap.h diff --git a/arch/arm/src/xmc4/hardware/xmc4_pinmux.h b/soc/arm/xmc4/hardware/xmc4_pinmux.h similarity index 100% rename from arch/arm/src/xmc4/hardware/xmc4_pinmux.h rename to soc/arm/xmc4/hardware/xmc4_pinmux.h diff --git a/arch/arm/src/xmc4/hardware/xmc4_ports.h b/soc/arm/xmc4/hardware/xmc4_ports.h similarity index 100% rename from arch/arm/src/xmc4/hardware/xmc4_ports.h rename to soc/arm/xmc4/hardware/xmc4_ports.h diff --git a/arch/arm/src/xmc4/hardware/xmc4_posif.h b/soc/arm/xmc4/hardware/xmc4_posif.h similarity index 100% rename from arch/arm/src/xmc4/hardware/xmc4_posif.h rename to soc/arm/xmc4/hardware/xmc4_posif.h diff --git a/arch/arm/src/xmc4/hardware/xmc4_scu.h b/soc/arm/xmc4/hardware/xmc4_scu.h similarity index 100% rename from arch/arm/src/xmc4/hardware/xmc4_scu.h rename to soc/arm/xmc4/hardware/xmc4_scu.h diff --git a/arch/arm/src/xmc4/hardware/xmc4_usic.h b/soc/arm/xmc4/hardware/xmc4_usic.h similarity index 100% rename from arch/arm/src/xmc4/hardware/xmc4_usic.h rename to soc/arm/xmc4/hardware/xmc4_usic.h diff --git a/arch/arm/src/xmc4/hardware/xmc4_vadc.h b/soc/arm/xmc4/hardware/xmc4_vadc.h similarity index 100% rename from arch/arm/src/xmc4/hardware/xmc4_vadc.h rename to soc/arm/xmc4/hardware/xmc4_vadc.h diff --git a/arch/arm/src/xmc4/xmc4_allocateheap.c b/soc/arm/xmc4/xmc4_allocateheap.c similarity index 100% rename from arch/arm/src/xmc4/xmc4_allocateheap.c rename to soc/arm/xmc4/xmc4_allocateheap.c diff --git a/arch/arm/src/xmc4/xmc4_ccu4.c b/soc/arm/xmc4/xmc4_ccu4.c similarity index 100% rename from arch/arm/src/xmc4/xmc4_ccu4.c rename to soc/arm/xmc4/xmc4_ccu4.c diff --git a/arch/arm/src/xmc4/xmc4_ccu4.h b/soc/arm/xmc4/xmc4_ccu4.h similarity index 100% rename from arch/arm/src/xmc4/xmc4_ccu4.h rename to soc/arm/xmc4/xmc4_ccu4.h diff --git a/arch/arm/src/xmc4/xmc4_clockconfig.c b/soc/arm/xmc4/xmc4_clockconfig.c similarity index 100% rename from arch/arm/src/xmc4/xmc4_clockconfig.c rename to soc/arm/xmc4/xmc4_clockconfig.c diff --git a/arch/arm/src/xmc4/xmc4_clockconfig.h b/soc/arm/xmc4/xmc4_clockconfig.h similarity index 100% rename from arch/arm/src/xmc4/xmc4_clockconfig.h rename to soc/arm/xmc4/xmc4_clockconfig.h diff --git a/arch/arm/src/xmc4/xmc4_clockutils.c b/soc/arm/xmc4/xmc4_clockutils.c similarity index 100% rename from arch/arm/src/xmc4/xmc4_clockutils.c rename to soc/arm/xmc4/xmc4_clockutils.c diff --git a/arch/arm/src/xmc4/xmc4_clrpend.c b/soc/arm/xmc4/xmc4_clrpend.c similarity index 100% rename from arch/arm/src/xmc4/xmc4_clrpend.c rename to soc/arm/xmc4/xmc4_clrpend.c diff --git a/arch/arm/src/xmc4/xmc4_config.h b/soc/arm/xmc4/xmc4_config.h similarity index 100% rename from arch/arm/src/xmc4/xmc4_config.h rename to soc/arm/xmc4/xmc4_config.h diff --git a/arch/arm/src/xmc4/xmc4_dma.h b/soc/arm/xmc4/xmc4_dma.h similarity index 100% rename from arch/arm/src/xmc4/xmc4_dma.h rename to soc/arm/xmc4/xmc4_dma.h diff --git a/arch/arm/src/xmc4/xmc4_ecat.c b/soc/arm/xmc4/xmc4_ecat.c similarity index 100% rename from arch/arm/src/xmc4/xmc4_ecat.c rename to soc/arm/xmc4/xmc4_ecat.c diff --git a/arch/arm/src/xmc4/xmc4_ecat.h b/soc/arm/xmc4/xmc4_ecat.h similarity index 100% rename from arch/arm/src/xmc4/xmc4_ecat.h rename to soc/arm/xmc4/xmc4_ecat.h diff --git a/arch/arm/src/xmc4/xmc4_flash.c b/soc/arm/xmc4/xmc4_flash.c similarity index 100% rename from arch/arm/src/xmc4/xmc4_flash.c rename to soc/arm/xmc4/xmc4_flash.c diff --git a/arch/arm/src/xmc4/xmc4_flash.h b/soc/arm/xmc4/xmc4_flash.h similarity index 100% rename from arch/arm/src/xmc4/xmc4_flash.h rename to soc/arm/xmc4/xmc4_flash.h diff --git a/arch/arm/src/xmc4/xmc4_gpio.c b/soc/arm/xmc4/xmc4_gpio.c similarity index 100% rename from arch/arm/src/xmc4/xmc4_gpio.c rename to soc/arm/xmc4/xmc4_gpio.c diff --git a/arch/arm/src/xmc4/xmc4_gpio.h b/soc/arm/xmc4/xmc4_gpio.h similarity index 100% rename from arch/arm/src/xmc4/xmc4_gpio.h rename to soc/arm/xmc4/xmc4_gpio.h diff --git a/arch/arm/src/xmc4/xmc4_i2c.c b/soc/arm/xmc4/xmc4_i2c.c similarity index 100% rename from arch/arm/src/xmc4/xmc4_i2c.c rename to soc/arm/xmc4/xmc4_i2c.c diff --git a/arch/arm/src/xmc4/xmc4_i2c.h b/soc/arm/xmc4/xmc4_i2c.h similarity index 100% rename from arch/arm/src/xmc4/xmc4_i2c.h rename to soc/arm/xmc4/xmc4_i2c.h diff --git a/arch/arm/src/xmc4/xmc4_idle.c b/soc/arm/xmc4/xmc4_idle.c similarity index 100% rename from arch/arm/src/xmc4/xmc4_idle.c rename to soc/arm/xmc4/xmc4_idle.c diff --git a/arch/arm/src/xmc4/xmc4_irq.c b/soc/arm/xmc4/xmc4_irq.c similarity index 100% rename from arch/arm/src/xmc4/xmc4_irq.c rename to soc/arm/xmc4/xmc4_irq.c diff --git a/arch/arm/src/xmc4/xmc4_lowputc.c b/soc/arm/xmc4/xmc4_lowputc.c similarity index 100% rename from arch/arm/src/xmc4/xmc4_lowputc.c rename to soc/arm/xmc4/xmc4_lowputc.c diff --git a/arch/arm/src/xmc4/xmc4_lowputc.h b/soc/arm/xmc4/xmc4_lowputc.h similarity index 100% rename from arch/arm/src/xmc4/xmc4_lowputc.h rename to soc/arm/xmc4/xmc4_lowputc.h diff --git a/arch/arm/src/xmc4/xmc4_mpuinit.c b/soc/arm/xmc4/xmc4_mpuinit.c similarity index 100% rename from arch/arm/src/xmc4/xmc4_mpuinit.c rename to soc/arm/xmc4/xmc4_mpuinit.c diff --git a/arch/arm/src/xmc4/xmc4_mpuinit.h b/soc/arm/xmc4/xmc4_mpuinit.h similarity index 100% rename from arch/arm/src/xmc4/xmc4_mpuinit.h rename to soc/arm/xmc4/xmc4_mpuinit.h diff --git a/arch/arm/src/xmc4/xmc4_pwm.c b/soc/arm/xmc4/xmc4_pwm.c similarity index 100% rename from arch/arm/src/xmc4/xmc4_pwm.c rename to soc/arm/xmc4/xmc4_pwm.c diff --git a/arch/arm/src/xmc4/xmc4_pwm.h b/soc/arm/xmc4/xmc4_pwm.h similarity index 100% rename from arch/arm/src/xmc4/xmc4_pwm.h rename to soc/arm/xmc4/xmc4_pwm.h diff --git a/arch/arm/src/xmc4/xmc4_serial.c b/soc/arm/xmc4/xmc4_serial.c similarity index 100% rename from arch/arm/src/xmc4/xmc4_serial.c rename to soc/arm/xmc4/xmc4_serial.c diff --git a/arch/arm/src/xmc4/xmc4_spi.c b/soc/arm/xmc4/xmc4_spi.c similarity index 100% rename from arch/arm/src/xmc4/xmc4_spi.c rename to soc/arm/xmc4/xmc4_spi.c diff --git a/arch/arm/src/xmc4/xmc4_spi.h b/soc/arm/xmc4/xmc4_spi.h similarity index 100% rename from arch/arm/src/xmc4/xmc4_spi.h rename to soc/arm/xmc4/xmc4_spi.h diff --git a/arch/arm/src/xmc4/xmc4_start.c b/soc/arm/xmc4/xmc4_start.c similarity index 100% rename from arch/arm/src/xmc4/xmc4_start.c rename to soc/arm/xmc4/xmc4_start.c diff --git a/arch/arm/src/xmc4/xmc4_start.h b/soc/arm/xmc4/xmc4_start.h similarity index 100% rename from arch/arm/src/xmc4/xmc4_start.h rename to soc/arm/xmc4/xmc4_start.h diff --git a/arch/arm/src/xmc4/xmc4_tickless.c b/soc/arm/xmc4/xmc4_tickless.c similarity index 100% rename from arch/arm/src/xmc4/xmc4_tickless.c rename to soc/arm/xmc4/xmc4_tickless.c diff --git a/arch/arm/src/xmc4/xmc4_timerisr.c b/soc/arm/xmc4/xmc4_timerisr.c similarity index 100% rename from arch/arm/src/xmc4/xmc4_timerisr.c rename to soc/arm/xmc4/xmc4_timerisr.c diff --git a/arch/arm/src/xmc4/xmc4_userspace.c b/soc/arm/xmc4/xmc4_userspace.c similarity index 100% rename from arch/arm/src/xmc4/xmc4_userspace.c rename to soc/arm/xmc4/xmc4_userspace.c diff --git a/arch/arm/src/xmc4/xmc4_userspace.h b/soc/arm/xmc4/xmc4_userspace.h similarity index 100% rename from arch/arm/src/xmc4/xmc4_userspace.h rename to soc/arm/xmc4/xmc4_userspace.h diff --git a/arch/arm/src/xmc4/xmc4_usic.c b/soc/arm/xmc4/xmc4_usic.c similarity index 100% rename from arch/arm/src/xmc4/xmc4_usic.c rename to soc/arm/xmc4/xmc4_usic.c diff --git a/arch/arm/src/xmc4/xmc4_usic.h b/soc/arm/xmc4/xmc4_usic.h similarity index 100% rename from arch/arm/src/xmc4/xmc4_usic.h rename to soc/arm/xmc4/xmc4_usic.h diff --git a/arch/arm/src/xmc4/xmc4_vadc.c b/soc/arm/xmc4/xmc4_vadc.c similarity index 100% rename from arch/arm/src/xmc4/xmc4_vadc.c rename to soc/arm/xmc4/xmc4_vadc.c diff --git a/arch/arm/src/xmc4/xmc4_vadc.h b/soc/arm/xmc4/xmc4_vadc.h similarity index 100% rename from arch/arm/src/xmc4/xmc4_vadc.h rename to soc/arm/xmc4/xmc4_vadc.h diff --git a/tools/Config.mk b/tools/Config.mk index 93d185f17f..7bbc1492ba 100644 --- a/tools/Config.mk +++ b/tools/Config.mk @@ -20,55 +20,36 @@ # ############################################################################ -# Disable all built-in rules - -.SUFFIXES: - -# Control build verbosity -# -# V=0: Exit silent mode -# V=1,2: Enable echo of commands -# V=2: Enable bug/verbose options in tools and scripts - -ifeq ($(V),1) -export Q := -else ifeq ($(V),2) -export Q := -else -export Q := @ +ifeq ($(realpath ${NXBASE}),) + $(error "NXBASE is not defined or invalid path") endif -ifeq ($(CONFIG_WINDOWS_NATIVE),y) - export SHELL=cmd -else - BASHCMD := $(shell command -v bash 2> /dev/null) - ifneq ($(BASHCMD),) - export SHELL=$(BASHCMD) - ifeq ($(V),) - export ECHO_BEGIN=@echo -ne "\033[1K\r" - export ECHO_END=$(ECHO_BEGIN) - endif - endif +ifeq ($(realpath ${NXOUT}),) + $(error "NXOUT is not defined or invalid path") endif -ifeq ($(ECHO_BEGIN),) - export ECHO_BEGIN=@echo # keep a trailing space here - export ECHO_END= +ifeq ($(realpath ${TOOLCHAIN}),) + $(error "TOOLCHAIN is not defined or invalid path") endif # These are configuration variables that are quoted by configuration tool # but which must be unquoted when used in the build system. -CONFIG_ARCH := $(patsubst "%",%,$(strip $(CONFIG_ARCH))) -CONFIG_ARCH_CHIP := $(patsubst "%",%,$(strip $(CONFIG_ARCH_CHIP))) -CONFIG_ARCH_BOARD := $(patsubst "%",%,$(strip $(CONFIG_ARCH_BOARD))) +ARCH_DIR := $(realpath ${NXBASE}/arch/${ARCH}) +ARCH_CHIP := $(patsubst "%",%,$(strip ${CONFIG_ARCH_CHIP})) +ARCH_FAMILY := $(patsubst "%",%,$(strip ${CONFIG_ARCH_FAMILY})) -# Some defaults. -# $(TOPDIR)/Make.defs can override these appropriately. +include ${TOOLCHAIN} -MODULECC ?= $(CC) -MODULELD ?= $(LD) -MODULESTRIP ?= $(STRIP) +# ARCHxxx means the predefined setting +# (either toolchain, arch, or system specific) +ARCHDEFINES += -D__NuttX__ + +CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) +CFLAGS += $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) + +AFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) +AFLAGS += $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) # ccache configuration. @@ -76,205 +57,16 @@ ifeq ($(CONFIG_CCACHE),y) CCACHE ?= ccache endif -# Define HOSTCC on the make command line if it differs from these defaults -# Define HOSTCFLAGS with -g on the make command line to build debug versions - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) - -# In the Windows native environment, the MinGW GCC compiler is used - -HOSTCC ?= mingw32-gcc.exe -HOSTCFLAGS ?= -O2 -Wall -Wstrict-prototypes -Wshadow -DCONFIG_WINDOWS_NATIVE=y - -else - -# GCC or clang is assumed in all other POSIX environments -# (Linux, Cygwin, MSYS2, macOS). -# strtok_r is used in some tools, but does not seem to be available in -# the MinGW environment. - -HOSTCC ?= cc -HOSTCFLAGS ?= -O2 -Wall -Wstrict-prototypes -Wshadow -HOSTCFLAGS += -DHAVE_STRTOK_C=1 -DHAVE_STRNDUP=1 - -ifeq ($(CONFIG_WINDOWS_CYGWIN),y) -HOSTCFLAGS += -DHOST_CYGWIN=1 -endif -endif - -# Some defaults just to prohibit some bad behavior if for some reason they -# are not defined - -ASMEXT ?= .S -OBJEXT ?= .o -LIBEXT ?= .a - -ifeq ($(CONFIG_WINDOWS_CYGWIN),y) - EXEEXT ?= .exe -endif - -ifeq ($(CONFIG_HOST_WINDOWS),y) - HOSTEXEEXT ?= .exe - HOSTDYNEXT ?= .dll -else ifeq ($(CONFIG_HOST_LINUX),y) - HOSTDYNEXT ?= .so -endif - -# This define is passed as EXTRAFLAGS for kernel-mode builds. It is also passed -# during PASS1 (but not PASS2) context and depend targets. - -KDEFINE ?= ${DEFINE_PREFIX}__KERNEL__ - -# DELIM - Path segment delimiter character -# -# Depends on this settings defined in board-specific defconfig file installed -# at $(TOPDIR)/.config: -# -# CONFIG_WINDOWS_NATIVE - Defined for a Windows native build - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) - DELIM ?= $(strip \) -else - DELIM ?= $(strip /) -endif - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) - EMPTYFILE := "NUL" -else - EMPTYFILE := "/dev/null" -endif - -# Process chip-specific directories - -ifeq ($(CONFIG_ARCH_CHIP_CUSTOM),y) - CUSTOM_CHIP_DIR = $(patsubst "%",%,$(CONFIG_ARCH_CHIP_CUSTOM_DIR)) -ifeq ($(CONFIG_ARCH_CHIP_CUSTOM_DIR_RELPATH),y) - CHIP_DIR ?= $(TOPDIR)$(DELIM)$(CUSTOM_CHIP_DIR) - CHIP_KCONFIG = $(TOPDIR)$(DELIM)$(CUSTOM_CHIP_DIR)$(DELIM)Kconfig -else - CHIP_DIR ?= $(CUSTOM_CHIP_DIR) - CHIP_KCONFIG = $(CUSTOM_CHIP_DIR)$(DELIM)Kconfig -endif -else - CHIP_DIR ?= $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)$(CONFIG_ARCH_CHIP) - CHIP_KCONFIG = $(TOPDIR)$(DELIM)arch$(DELIM)dummy$(DELIM)dummy_kconfig -endif - -# Process board-specific directories - -ifeq ($(CONFIG_ARCH_BOARD_CUSTOM),y) - CUSTOM_DIR = $(patsubst "%",%,$(CONFIG_ARCH_BOARD_CUSTOM_DIR)) - ifeq ($(CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH),y) - BOARD_DIR ?= $(TOPDIR)$(DELIM)$(CUSTOM_DIR) - else - BOARD_DIR ?= $(CUSTOM_DIR) - endif - CUSTOM_BOARD_KPATH = $(BOARD_DIR)$(DELIM)Kconfig -else - BOARD_DIR ?= $(TOPDIR)$(DELIM)boards$(DELIM)$(CONFIG_ARCH)$(DELIM)$(CONFIG_ARCH_CHIP)$(DELIM)$(CONFIG_ARCH_BOARD) -endif -ifeq (,$(wildcard $(CUSTOM_BOARD_KPATH))) - BOARD_KCONFIG = $(TOPDIR)$(DELIM)boards$(DELIM)dummy$(DELIM)dummy_kconfig -else - BOARD_KCONFIG = $(CUSTOM_BOARD_KPATH) -endif - -ifeq (,$(wildcard $(BOARD_DIR)$(DELIM)..$(DELIM)common)) - ifeq ($(CONFIG_ARCH_BOARD_COMMON),y) - BOARD_COMMON_DIR ?= $(wildcard $(TOPDIR)$(DELIM)boards$(DELIM)$(CONFIG_ARCH)$(DELIM)$(CONFIG_ARCH_CHIP)$(DELIM)common) - endif -else - BOARD_COMMON_DIR ?= $(wildcard $(BOARD_DIR)$(DELIM)..$(DELIM)common) -endif -BOARD_DRIVERS_DIR ?= $(wildcard $(BOARD_DIR)$(DELIM)..$(DELIM)drivers) -ifeq ($(BOARD_DRIVERS_DIR),) - BOARD_DRIVERS_DIR = $(TOPDIR)$(DELIM)drivers$(DELIM)dummy -endif - -# DIRLINK - Create a directory link in the portable way - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) -ifeq ($(CONFIG_WINDOWS_MKLINK),y) - DIRLINK ?= $(TOPDIR)$(DELIM)tools$(DELIM)link.bat -else - DIRLINK ?= $(TOPDIR)$(DELIM)tools$(DELIM)copydir.bat -endif - DIRUNLINK ?= $(TOPDIR)$(DELIM)tools$(DELIM)unlink.bat -else -ifeq ($(CONFIG_CYGWIN_WINTOOL),y) - DIRLINK ?= $(TOPDIR)$(DELIM)tools$(DELIM)copydir.sh -else ifeq ($(CONFIG_WINDOWS_MSYS),y) - DIRLINK ?= $(TOPDIR)$(DELIM)tools$(DELIM)copydir.sh -else - DIRLINK ?= $(TOPDIR)$(DELIM)tools$(DELIM)link.sh -endif - DIRUNLINK ?= $(TOPDIR)$(DELIM)tools$(DELIM)unlink.sh -endif - -# MKDEP - Create the depend rule in the portable way - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) - MKDEP ?= $(TOPDIR)$(DELIM)tools$(DELIM)mkdeps$(HOSTEXEEXT) --winnative -else ifeq ($(CONFIG_CYGWIN_WINTOOL),y) - MKDEP ?= $(TOPDIR)$(DELIM)tools$(DELIM)mkwindeps.sh -else - MKDEP ?= $(TOPDIR)$(DELIM)tools$(DELIM)mkdeps$(HOSTEXEEXT) -endif - -# Per-file dependency generation rules - -OBJPATH ?= . - -%.dds: %.S - $(Q) $(MKDEP) --obj-path $(OBJPATH) --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $< > $@ - -%.ddc: %.c - $(Q) $(MKDEP) --obj-path $(OBJPATH) --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $< > $@ - -%.ddp: %.cpp - $(Q) $(MKDEP) --obj-path $(OBJPATH) --obj-suffix $(OBJEXT) $(DEPPATH) "$(CXX)" -- $(CXXFLAGS) -- $< > $@ - -%.ddx: %.cxx - $(Q) $(MKDEP) --obj-path $(OBJPATH) --obj-suffix $(OBJEXT) $(DEPPATH) "$(CXX)" -- $(CXXFLAGS) -- $< > $@ - -%.ddh: %.c - $(Q) $(MKDEP) --obj-path $(OBJPATH) --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(HOSTCFLAGS) -- $< > $@ - -# INCDIR - Convert a list of directory paths to a list of compiler include -# directories -# Example: CFFLAGS += ${shell $(INCDIR) [options] "compiler" "dir1" "dir2" "dir2" ...} -# -# Note that the compiler string and each directory path string must quoted if -# they contain spaces or any other characters that might get mangled by the -# shell -# -# Depends on this setting passed as a make command line definition from the -# toplevel Makefile: -# -# TOPDIR - The path to the top level NuttX directory in the form -# appropriate for the current build environment -# -# Depends on this settings defined in board-specific defconfig file installed -# at $(TOPDIR)/.config: -# -# CONFIG_WINDOWS_NATIVE - Defined for a Windows native build - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) - DEFINE ?= $(TOPDIR)\tools\define.bat - INCDIR ?= $(TOPDIR)\tools\incdir.bat -else ifeq ($(CONFIG_CYGWIN_WINTOOL),y) - DEFINE ?= "$(TOPDIR)/tools/define.sh" -w - INCDIR ?= "$(TOPDIR)/tools/incdir$(HOSTEXEEXT)" -w -else - DEFINE ?= "$(TOPDIR)/tools/define.sh" - INCDIR ?= "$(TOPDIR)/tools/incdir$(HOSTEXEEXT)" +ifeq ($(ECHO_BEGIN),) + export ECHO_BEGIN=@echo # keep a trailing space here + export ECHO_END= endif # PREPROCESS - Default macro to run the C pre-processor # Example: $(call PREPROCESS, in-file, out-file) # # Depends on these settings defined in board-specific Make.defs file -# installed at $(TOPDIR)/Make.defs: +# installed at ${NXBASE}/Make.defs: # # CPP - The command to invoke the C pre-processor # CPPFLAGS - Options to pass to the C pre-processor @@ -293,7 +85,7 @@ endef # Example: $(call COMPILE, in-file, out-file, flags) # # Depends on these settings defined in board-specific Make.defs file -# installed at $(TOPDIR)/Make.defs: +# installed at ${NXBASE}/Make.defs: # # CC - The command to invoke the C compiler # CFLAGS - Options to pass to the C compiler @@ -311,7 +103,7 @@ endef # Example: $(call COMPILEXX, in-file, out-file, flags) # # Depends on these settings defined in board-specific Make.defs file -# installed at $(TOPDIR)/Make.defs: +# installed at ${NXBASE}/Make.defs: # # CXX - The command to invoke the C++ compiler # CXXFLAGS - Options to pass to the C++ compiler @@ -330,7 +122,7 @@ endef # Example: $(call COMPILERUST, in-file, out-file) # # Depends on these settings defined in board-specific Make.defs file -# installed at $(TOPDIR)/Make.defs: +# installed at ${NXBASE}/Make.defs: # # RUST - The command to invoke the Rust compiler # RUSTFLAGS - Options to pass to the Rust compiler @@ -349,7 +141,7 @@ endef # Example: $(call COMPILEZIG, in-file, out-file) # # Depends on these settings defined in board-specific Make.defs file -# installed at $(TOPDIR)/Make.defs: +# installed at ${NXBASE}/Make.defs: # # ZIG - The command to invoke the Zig compiler # ZIGFLAGS - Options to pass to the Zig compiler @@ -368,7 +160,7 @@ endef # Example: $(call COMPILED, in-file, out-file) # # Depends on these settings defined in board-specific Make.defs file -# installed at $(TOPDIR)/Make.defs: +# installed at ${NXBASE}/Make.defs: # # DC - The command to invoke the D compiler # DFLAGS - Options to pass to the D compiler @@ -387,7 +179,7 @@ endef # Example: $(call COMPILESWIFT, in-file, out-file) # # Depends on these settings defined in board-specific Make.defs file -# installed at $(TOPDIR)/Make.defs: +# installed at ${NXBASE}/Make.defs: # # SWIFTC - The command to invoke the Swift compiler # SWIFTFLAGS - Options to pass to the Swift compiler @@ -412,7 +204,7 @@ endef # definition in order to use the assembler directly. # # Depends on these settings defined in board-specific Make.defs file -# installed at $(TOPDIR)/Make.defs: +# installed at ${NXBASE}/Make.defs: # # CC - By default, the C compiler is used to compile assembly language # files @@ -428,15 +220,6 @@ define ASSEMBLE $(ECHO_END) endef -# INSTALL_LIB - Install a library $1 into target $2 -# Example: $(call INSTALL_LIB, libabc.a, $(TOPDIR)/staging/) - -define INSTALL_LIB - $(ECHO_BEGIN)"IN: $1 -> $2 " - $(Q) install -m 0644 $1 $2 - $(ECHO_END) -endef - # ARCHIVE - Add a list of files to an archive # Example: $(call ARCHIVE, archive-file, "file1 file2 file3 ...") # @@ -444,51 +227,32 @@ endef # interpreted strangely by the shell # # Depends on these settings defined in board-specific Make.defs file -# installed at $(TOPDIR)/Make.defs: +# installed at ${NXBASE}/Make.defs: # # AR - The command to invoke the archiver (includes any options) # # Depends on this settings defined in board-specific defconfig file installed -# at $(TOPDIR)/.config: +# at ${NXBASE}/.config: # # CONFIG_WINDOWS_NATIVE - Defined for a Windows native build define ARCHIVE - $(AR) $1 $2 + $(ECHO_BEGIN)"AS: $1 " + $(Q) $(AR) $1 $2 + $(ECHO_END) endef -# PRELINK - Prelink a list of files -# This is useful when files were compiled with fvisibility=hidden. -# Any symbol which was not explicitly made global is invisible outside the -# prelinked file. -# -# Example: $(call PRELINK, prelink-file, "file1 file2 file3 ...") -# -# Note: The fileN strings may not contain spaces or characters that may be -# interpreted strangely by the shell -# -# Depends on these settings defined in board-specific Make.defs file -# installed at $(TOPDIR)/Make.defs: -# -# LD - The command to invoke the linker (includes any options) -# OBJCOPY - The command to invoke the object cop (includes any options) -# -# Depends on this settings defined in board-specific defconfig file installed -# at $(TOPDIR)/.config: -# -# CONFIG_WINDOWS_NATIVE - Defined for a Windows native build +define LINK + $(ECHO_BEGIN)"LN: $1 " + $(Q) [ -L $2 ] || ln -s $1 $2 + $(ECHO_END) +endef -ifeq ($(CONFIG_WINDOWS_NATIVE),y) -define PRELINK - @echo PRELINK: $1 - $(Q) $(LD) -Ur -o $1 $2 && $(OBJCOPY) --localize-hidden $1 +define UNLINK + $(ECHO_BEGIN)"RM: $1 " + $(Q) [ -L $1 ] && rm -f $1 + $(ECHO_END) endef -else -define PRELINK - @echo "PRELINK: $1" - $(Q) $(LD) -Ur -o $1 $2 && $(OBJCOPY) --localize-hidden $1 -endef -endif # PREBUILD -- Perform pre build operations # Some architectures require the use of special tools and special handling @@ -507,290 +271,3 @@ endef define POSTBUILD endef - -# DELFILE - Delete one file - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) -define NEWLINE - - -endef -define DELFILE - $(foreach FILE, $(1), $(NEWLINE) $(Q) if exist $(FILE) (del /f /q $(FILE))) -endef -else -define DELFILE - $(Q) rm -f $1 -endef -endif - -# DELDIR - Delete one directory - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) -define DELDIR - $(Q) if exist $1 (rmdir /q /s $1) $(NEWLINE) -endef -else -define DELDIR - $(Q) rm -rf $1 -endef -endif - -# MOVEFILE - Move one file - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) -define MOVEFILE - $(Q) if exist $1 (move /Y $1 $2) -endef -else -define MOVEFILE - $(Q) mv -f $1 $2 -endef -endif - -# COPYFILE - Copy one file - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) -define COPYFILE - $(Q) if exist $1 (copy /y /b $1 $2) -endef -else -define COPYFILE - $(Q) cp -f $1 $2 -endef -endif - -# COPYDIR - Copy one directory - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) -define COPYDIR - $(Q) if exist $1 (xcopy /c /q /s /e /y /i $1 $2) -endef -else -define COPYDIR - $(Q) cp -fr $1 $2 -endef -endif - -# CATFILE - Cat a list of files -# -# USAGE: $(call CATFILE,dest,src1,src2,src3,...) - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) -define CATFILE - $(foreach FILE, $(2), $(NEWLINE) $(Q) type $(FILE) >> $1) -endef -else -define CATFILE - $(Q) if [ -z "$(strip $(2))" ]; then echo '' > $(1); else cat $(2) > $1; fi -endef -endif - -# RWILDCARD - Recursive wildcard used to get lists of files from directories -# -# USAGE: FILELIST = $(call RWILDCARD,, -name } - -define RWILDCARD - $(foreach d,$(wildcard $1/*),$(call RWILDCARD,$d,$2)$(filter $(subst *,%,$2),$d)) -endef - -# FINDSCRIPT - Find a given linker script. Prioritize the version from currently -# configured board. If not provided, use the linker script from the -# board common directory. -# Example: $(call FINDSCRIPT,script.ld) - -define FINDSCRIPT - $(if $(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(1)),$(BOARD_DIR)$(DELIM)scripts$(DELIM)$(1),$(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)$(1)) -endef - -# DOWNLOAD - Download file. The URL base is joined with TARBALL by '/' and -# downloaded to the TARBALL file. -# The third argument is an output path. The second argument is used -# if it is not provided or is empty. -# Example: $(call DOWNLOAD,$(FOO_URL_BASE),$(FOO_TARBALL),foo.out,foo-) - -define DOWNLOAD - $(ECHO_BEGIN)"Downloading: $(if $3,$3,$2) " - $(Q) curl -L $(if $(V),,-Ss) $(1)/$(2) -o $(if $(3),$(3),$(2)) - $(ECHO_END) -endef - -# CLONE - Git clone repository. Initializes a new Git repository in the -# folder on your local machine and populates it with the contents -# of the central repository. -# The third argument is an storage path. The second argument is used -# if it is not provided or is empty. -# Example: $(call CLONE,$(URL_BASE),$(PATH),$(STORAGE_FOLDER)) - -define CLONE - $(ECHO_BEGIN)"Clone: $(if $3,$3,$2) " - if [ -z $3 ]; then \ - git clone --quiet $1 $2; \ - else \ - if [ ! -d $3 ]; then \ - git clone --quiet $1 $3; \ - fi; \ - cp -fr $3 $2; \ - fi - $(ECHO_END) -endef - -# CHECK_COMMITSHA - Check if the branch contains the commit SHA-1. -# Remove the folder if the commit is not present in the branch. -# The first argument is the repository folder on the local machine. -# The second argument is a unique SHA-1 hash value. -# Example: $(call CHECK_COMMITSHA,$(GIT_FOLDER),$(COMMIT_SHA-1)) - -define CHECK_COMMITSHA - $(ECHO_BEGIN)"COMMIT SHA-1: $2 " - if [ -d $1 ]; then \ - if ! git -C $1 branch --contains $2 > /dev/null 2>&1; then \ - echo "Commit is not present removed folder $1 "; \ - rm -rf $1; \ - fi \ - fi - $(ECHO_END) -endef - -# CLEAN - Default clean target - -ifeq ($(CONFIG_COVERAGE_NONE),) - EXTRA = *.gcno *.gcda -endif - -ifeq ($(CONFIG_STACK_USAGE),y) - EXTRA += *.su -endif - -ifeq ($(CONFIG_ARCH_TOOLCHAIN_TASKING),y) - EXTRA += *.d - EXTRA += *.src -endif - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) -define CLEAN - $(Q) if exist *$(OBJEXT) (del /f /q *$(OBJEXT)) - $(Q) if exist *$(LIBEXT) (del /f /q *$(LIBEXT)) - $(Q) if exist *~ (del /f /q *~) - $(Q) if exist (del /f /q .*.swp) - $(call DELFILE,$(subst /,\,$(OBJS))) - $(Q) if exist $(BIN) (del /f /q $(subst /,\,$(BIN))) - $(Q) if exist $(BIN).lock (del /f /q $(subst /,\,$(BIN).lock)) - $(Q) if exist $(EXTRA) (del /f /q $(subst /,\,$(EXTRA))) -endef -else -define CLEAN - $(Q) rm -f *$(OBJEXT) *$(LIBEXT) *~ .*.swp $(OBJS) $(BIN) $(BIN).lock $(EXTRA) -endef -endif - -# TESTANDREPLACEFILE - Test if two files are different. If so replace the -# second with the first. Otherwise, delete the first. -# -# USAGE: $(call TESTANDREPLACEFILE, newfile, oldfile) -# -# args: $1 - newfile: Temporary file to test -# $2 - oldfile: File to replace - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) -define TESTANDREPLACEFILE - $(Q) move /Y $1 $2 -endef -else -define TESTANDREPLACEFILE - if [ -f $2 ]; then \ - if cmp -s $1 $2; then \ - rm -f $1; \ - else \ - mv $1 $2; \ - fi \ - else \ - mv $1 $2; \ - fi -endef -endif - -# Invoke make - -define MAKE_template - +$(Q) $(MAKE) -C $(1) $(2) APPDIR="$(APPDIR)" - -endef - -define SDIR_template -$(1)_$(2): - +$(Q) $(MAKE) -C $(1) $(2) APPDIR="$(APPDIR)" - -endef - -export DEFINE_PREFIX ?= $(subst X,,${shell $(DEFINE) "$(CC)" X 2> ${EMPTYFILE}}) -export INCDIR_PREFIX ?= $(subst "X",,${shell $(INCDIR) "$(CC)" X 2> ${EMPTYFILE}}) -export INCSYSDIR_PREFIX ?= $(subst "X",,${shell $(INCDIR) -s "$(CC)" X 2> ${EMPTYFILE}}) - -# ARCHxxx means the predefined setting(either toolchain, arch, or system specific) -ARCHDEFINES += ${DEFINE_PREFIX}__NuttX__ -ifeq ($(CONFIG_NDEBUG),y) - ARCHDEFINES += ${DEFINE_PREFIX}NDEBUG -endif - -# The default C/C++ search path - -ARCHINCLUDES += ${INCSYSDIR_PREFIX}$(TOPDIR)$(DELIM)include - -ifeq ($(CONFIG_LIBCXX),y) - ARCHXXINCLUDES += ${INCSYSDIR_PREFIX}$(TOPDIR)$(DELIM)include$(DELIM)libcxx -else ifeq ($(CONFIG_UCLIBCXX),y) - ARCHXXINCLUDES += ${INCSYSDIR_PREFIX}$(TOPDIR)$(DELIM)include$(DELIM)uClibc++ -else - ARCHXXINCLUDES += ${INCSYSDIR_PREFIX}$(TOPDIR)$(DELIM)include$(DELIM)cxx - ifeq ($(CONFIG_ETL),y) - ARCHXXINCLUDES += ${INCSYSDIR_PREFIX}$(TOPDIR)$(DELIM)include$(DELIM)etl - endif -endif - -ifeq ($(CONFIG_LIBCXXABI),y) -ARCHXXINCLUDES += ${INCSYSDIR_PREFIX}$(TOPDIR)$(DELIM)include$(DELIM)libcxxabi -endif - -ifeq ($(CONFIG_LIBM_NEWLIB),y) - ARCHINCLUDES += ${INCSYSDIR_PREFIX}$(TOPDIR)$(DELIM)include$(DELIM)newlib - ARCHXXINCLUDES += ${INCSYSDIR_PREFIX}$(TOPDIR)$(DELIM)include$(DELIM)newlib -endif - -#libmcs`s math.h should include after libcxx, or it will override libcxx/include/math.h and build error -ifeq ($(CONFIG_LIBM_LIBMCS),y) - ARCHDEFINES += ${DEFINE_PREFIX}LIBMCS_LONG_DOUBLE_IS_64BITS - ARCHINCLUDES += ${INCSYSDIR_PREFIX}$(TOPDIR)$(DELIM)include$(DELIM)libmcs - ARCHXXINCLUDES += ${INCSYSDIR_PREFIX}$(TOPDIR)$(DELIM)include$(DELIM)libmcs -endif - -ifeq ($(CONFIG_LIBM_OPENLIBM),y) - ARCHINCLUDES += ${INCSYSDIR_PREFIX}$(TOPDIR)$(DELIM)include$(DELIM)openlibm - ARCHXXINCLUDES += ${INCSYSDIR_PREFIX}$(TOPDIR)$(DELIM)include$(DELIM)openlibm -endif - -ARCHXXINCLUDES += ${INCSYSDIR_PREFIX}$(TOPDIR)$(DELIM)include - -# Convert filepaths to their proper system format (i.e. Windows/Unix) - -ifeq ($(CONFIG_CYGWIN_WINTOOL),y) - CONVERT_PATH = $(foreach FILE,$1,${shell cygpath -w $(FILE)}) -else - CONVERT_PATH = $1 -endif - -# Upper/Lower case string, add the `UL` prefix to private function - -ULPOP = $(wordlist 3,$(words $(1)),$(1)) -ULSUB = $(subst $(word 1,$(1)),$(word 2,$(1)),$(2)) -ULMAP = $(if $(1),$(call ULSUB,$(1),$(call ULMAP,$(call ULPOP,$(1)),$(2))),$(2)) -UPPERMAP = a A b B c C d D e E f F g G h H i I j J k K l L m M n N o O p P q Q r R s S t T u U v V w W x X y Y z Z -LOWERMAP = A a B b C c D d E e F f G g H h I i J j K k L l M m N n O o P p Q q R r S s T t U u V v W w X x Y y Z z - -UPPER_CASE = $(call ULMAP,$(UPPERMAP),$(1)) -LOWER_CASE = $(call ULMAP,$(LOWERMAP),$(1)) diff --git a/tools/Unix.mk b/tools/Unix.mk index a9e0a490cb..c06e8df9fc 100644 --- a/tools/Unix.mk +++ b/tools/Unix.mk @@ -20,61 +20,8 @@ # ############################################################################ -export TOPDIR := ${shell echo $(CURDIR) | sed -e 's/ /\\ /g'} -WSDIR := ${shell cd "${TOPDIR}"/.. && pwd -P} - -export NXTMPDIR := $(WSDIR)/nxtmpdir - -ifeq ($(V),) - MAKE := $(MAKE) -s --no-print-directory -endif - include $(TOPDIR)/Make.defs -# GIT directory present - -GIT_DIR = $(if $(wildcard $(TOPDIR)$(DELIM).git),y,) - -ifeq ($(GIT_DIR),y) -GIT_PRESENT = `git rev-parse --git-dir 2> /dev/null` -endif - -# In case we cannot get version information from GIT - -ifeq ($(GIT_PRESENT),) --include $(TOPDIR)/.version - -# In case the version file does not exist - -CONFIG_VERSION_STRING ?= "0.0.0" -CONFIG_VERSION_BUILD ?= "0" - -VERSION_ARG = -v $(CONFIG_VERSION_STRING) -b $(CONFIG_VERSION_BUILD) -else - -# Generate .version.tmp every time from GIT history -# Only update .version if the contents of version.tmp actually changes -# Note: this is executed before any rule is run - -$(shell tools/version.sh $(VERSION_ARG) .version.tmp > /dev/null) -$(shell $(call TESTANDREPLACEFILE, .version.tmp, .version)) -endif - -# Process architecture specific directories - -ARCH_DIR = arch/$(CONFIG_ARCH) -ARCH_SRC = $(ARCH_DIR)/src -ARCH_INC = $(ARCH_DIR)/include - -# CONFIG_APPS_DIR can be over-ridden from the command line or in the .config file. -# The default value of CONFIG_APPS_DIR is ../apps. Ultimately, the application -# will be built if APPDIR is defined. APPDIR will be defined if a directory containing -# a Makefile is found at the path provided by CONFIG_APPS_DIR - -ifeq ($(CONFIG_APPS_DIR),) -CONFIG_APPS_DIR = ../apps -endif -APPDIR := $(realpath ${shell if [ -r $(CONFIG_APPS_DIR)/Makefile ]; then echo "$(CONFIG_APPS_DIR)"; fi}) # External code support # If external/ contains a Kconfig, we define the EXTERNALDIR variable to 'external' @@ -668,106 +615,7 @@ pass2dep: context tools/mkdeps$(HOSTEXEEXT) tools/cnvwindeps$(HOSTEXEEXT) # location: https://bitbucket.org/nuttx/tools/downloads/. See README.txt # file in the NuttX tools GIT repository for additional information. -KCONFIG_ENV = APPSDIR=${CONFIG_APPS_DIR} EXTERNALDIR=$(EXTERNALDIR) -KCONFIG_ENV += APPSBINDIR=${CONFIG_APPS_DIR} BINDIR=${TOPDIR} - -KCONFIG_LIB = $(shell command -v menuconfig 2> /dev/null) - -# Prefer "kconfiglib" if host OS supports it - -ifeq ($(KCONFIG_LIB),) - KCONFIG_OLDCONFIG = kconfig-conf --oldconfig Kconfig - KCONFIG_OLDDEFCONFIG = kconfig-conf --olddefconfig Kconfig - KCONFIG_MENUCONFIG = kconfig-mconf Kconfig - KCONFIG_NCONFIG = kconfig-nconf Kconfig - KCONFIG_QCONFIG = kconfig-qconf Kconfig - KCONFIG_GCONFIG = kconfig-gconf Kconfig - KCONFIG_SAVEDEFCONFIG = kconfig-conf Kconfig --savedefconfig defconfig.tmp -define kconfig_tweak_disable - kconfig-tweak --file $1 -u $2 -endef -else - OVERWRITE_WARNING = "set more than once" - KCONFIG_WARNING = 2> >(grep -v ${OVERWRITE_WARNING} | tee kwarning) | \ - cat && if [ -s kwarning ]; \ - then rm kwarning; \ - exit 1; \ - else \ - rm kwarning; \ - fi - KCONFIG_OLDCONFIG = oldconfig ${KCONFIG_WARNING} - KCONFIG_OLDDEFCONFIG = olddefconfig ${KCONFIG_WARNING} - KCONFIG_MENUCONFIG = menuconfig $(subst | cat,,${KCONFIG_WARNING}) - KCONFIG_NCONFIG = guiconfig ${KCONFIG_WARNING} - KCONFIG_QCONFIG = ${KCONFIG_NCONFIG} - KCONFIG_GCONFIG = ${KCONFIG_NCONFIG} - KCONFIG_SAVEDEFCONFIG = savedefconfig --out defconfig.tmp ${KCONFIG_WARNING} -define kconfig_tweak_disable - $(Q) sed -i'.orig' '/$2/d' $1 - $(Q) rm -f $1.orig -endef -endif - -KCONFIG_CONF = kconfig-conf - -config: - $(Q) $(MAKE) clean_context - $(Q) $(MAKE) apps_preconfig - $(Q) ${KCONFIG_ENV} ${KCONFIG_CONF} - -oldconfig: - $(Q) $(MAKE) clean_context - $(Q) $(MAKE) apps_preconfig - $(Q) ${KCONFIG_ENV} ${KCONFIG_OLDCONFIG} - -olddefconfig: - $(Q) $(MAKE) clean_context - $(Q) $(MAKE) apps_preconfig - $(Q) ${KCONFIG_ENV} ${KCONFIG_OLDDEFCONFIG} - -menuconfig: - $(Q) $(MAKE) clean_context - $(Q) $(MAKE) apps_preconfig - $(Q) ${KCONFIG_ENV} ${KCONFIG_MENUCONFIG} - -nconfig: apps_preconfig - $(Q) $(MAKE) clean_context - $(Q) $(MAKE) apps_preconfig - $(Q) ${KCONFIG_ENV} ${KCONFIG_NCONFIG} - -qconfig: apps_preconfig - $(Q) $(MAKE) clean_context - $(Q) $(MAKE) apps_preconfig - $(Q) ${KCONFIG_ENV} ${KCONFIG_QCONFIG} - -gconfig: apps_preconfig - $(Q) $(MAKE) clean_context - $(Q) $(MAKE) apps_preconfig - $(Q) ${KCONFIG_ENV} ${KCONFIG_GCONFIG} - -savedefconfig: apps_preconfig - $(Q) ${KCONFIG_ENV} ${KCONFIG_SAVEDEFCONFIG} - $(Q) $(call kconfig_tweak_disable,defconfig.tmp,CONFIG_APPS_DIR) - $(Q) $(call kconfig_tweak_disable,defconfig.tmp,CONFIG_BASE_DEFCONFIG) - $(Q) grep "CONFIG_ARCH=" .config >> defconfig.tmp - $(Q) grep "^CONFIG_ARCH_CHIP_" .config >> defconfig.tmp; true - $(Q) grep "CONFIG_ARCH_CHIP=" .config >> defconfig.tmp; true - $(Q) grep "CONFIG_ARCH_BOARD=" .config >> defconfig.tmp; true - $(Q) grep "CONFIG_ARCH_BOARD_COMMON=" .config >> defconfig.tmp; true - $(Q) grep "^CONFIG_ARCH_CUSTOM" .config >> defconfig.tmp; true - $(Q) grep "^CONFIG_ARCH_BOARD_CUSTOM" .config >> defconfig.tmp; true - $(Q) export LC_ALL=C; cat defconfig.tmp | sort | uniq > sortedconfig.tmp - $(Q) echo "#" > warning.tmp - $(Q) echo "# This file is autogenerated: PLEASE DO NOT EDIT IT." >> warning.tmp - $(Q) echo "#" >> warning.tmp - $(Q) echo "# You can use \"make menuconfig\" to make any modifications to the installed .config file." >> warning.tmp - $(Q) echo "# You can then do \"make savedefconfig\" to generate a new defconfig file that includes your" >> warning.tmp - $(Q) echo "# modifications." >> warning.tmp - $(Q) echo "#" >> warning.tmp - $(Q) cat warning.tmp sortedconfig.tmp > defconfig - $(Q) rm -f warning.tmp - $(Q) rm -f defconfig.tmp - $(Q) rm -f sortedconfig.tmp +include tools/Kconfig.mk # export # diff --git a/tools/Win.mk b/tools/Win.mk deleted file mode 100644 index 0f3273e2ec..0000000000 --- a/tools/Win.mk +++ /dev/null @@ -1,747 +0,0 @@ -############################################################################ -# tools/Win.mk -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -export SHELL=cmd - -export TOPDIR := ${shell echo %CD%} - -include $(TOPDIR)\Make.defs --include $(TOPDIR)\.version - -# In case .version file does not exist - -CONFIG_VERSION_STRING ?= "0.0.0" -CONFIG_VERSION_MAJOR ?= 0 -CONFIG_VERSION_MINOR ?= 0 -CONFIG_VERSION_PATCH ?= 0 -CONFIG_VERSION_BUILD ?= "0" - -# Process architecture and board-specific directories - -ARCH_DIR = arch\$(CONFIG_ARCH) -ARCH_SRC = $(ARCH_DIR)\src -ARCH_INC = $(ARCH_DIR)\include - -# CONFIG_APPS_DIR can be over-ridden from the command line or in the .config file. -# The default value of CONFIG_APPS_DIR is ..\apps. Ultimately, the application -# will be built if APPDIR is defined. APPDIR will be defined if a directory containing -# a Makefile is found at the path provided by CONFIG_APPS_DIR - -ifeq ($(CONFIG_APPS_DIR),) -CONFIG_APPS_DIR = ..\apps -else -CONFIG_APPS_DIR := $(patsubst "%",%,$(CONFIG_APPS_DIR)) -endif -APPDIR := $(realpath ${shell if exist "$(CONFIG_APPS_DIR)\Makefile" echo $(CONFIG_APPS_DIR)}) - -# External code support -# If external/ contains a Kconfig, we define the EXTERNALDIR variable to 'external' -# so that main Kconfig can find it. Otherwise, we redirect it to a dummy Kconfig -# This is due to kconfig inability to do conditional inclusion. - -EXTERNALDIR := ${shell if exist "$(TOPDIR)\external\Kconfig" (echo external) else (echo dummy)} - -# CONTEXTDIRS include directories that have special, one-time pre-build -# requirements. Normally this includes things like auto-generation of -# configuration specific files or creation of configurable symbolic links -# CLEANDIRS are the directories that the clean target will executed in. -# These are all directories that we know about. -# CCLEANDIRS are directories that the clean_context target will execute in. -# The clean_context target "undoes" the actions of the context target. -# Only directories known to require cleaning are included. -# KERNDEPDIRS are the directories in which we will build target dependencies. -# If NuttX and applications are built separately (CONFIG_BUILD_PROTECTED or -# CONFIG_BUILD_KERNEL), then this holds only the directories containing -# kernel files. -# USERDEPDIRS. If NuttX and applications are built separately (CONFIG_BUILD_PROTECTED), -# then this holds only the directories containing user files. If -# CONFIG_BUILD_KERNEL is selected, then applications are not build at all. - -include tools\Directories.mk - -# -# Extra objects used in the final link. -# -# Pass 1 Incremental (relative) link objects should be put into the -# processor-specific source directory (where other link objects will -# be created). If the pass1 object is an archive, it could go anywhere. - -ifeq ($(CONFIG_BUILD_2PASS),y) -EXTRA_OBJS += $(CONFIG_PASS1_OBJECT) -endif - -# Library build selections -# -# NUTTXLIBS is the list of NuttX libraries that is passed to the -# processor-specific Makefile to build the final NuttX target. -# USERLIBS is the list of libraries used to build the final user-space -# application -# EXPORTLIBS is the list of libraries that should be exported by -# 'make export' is - -ifeq ($(CONFIG_BUILD_PROTECTED),y) -include tools\ProtectedLibs.mk -else ifeq ($(CONFIG_BUILD_KERNEL),y) -include tools\KernelLibs.mk -else -include tools\FlatLibs.mk -endif - -# LINKLIBS derives from NUTTXLIBS and is simply the same list with the -# subdirectory removed - -LINKLIBS = $(patsubst staging\\%,%,$(NUTTXLIBS)) - -# Export tool definitions - -MKEXPORT = tools\mkexport.bat -MKEXPORT_ARGS = -t "$(TOPDIR)" - -ifneq ($(CONFIG_BUILD_FLAT),y) -MKEXPORT_ARGS += -u -endif - -ifneq ($(APPDIR),) -ifneq ($(shell if exist "$(APPDIR)/Makefile" echo yes),) -MKEXPORT_ARGS += -a "$(APPDIR)" -MKEXPORT_ARGS += -m "$(MAKE)" -endif -endif - -ifeq ($(V),2) -MKEXPORT_ARGS += -d -endif - -# This is the name of the final target (relative to the top level directory) - -BIN = nuttx$(EXEEXT) - -all: $(BIN) -.PHONY: context clean_context config oldconfig menuconfig nconfig export subdir_clean clean subdir_distclean distclean apps_clean apps_distclean -.PHONY: pass1 pass1dep -.PHONY: pass2 pass2dep - -# Target used to copy include\nuttx\math.h. If CONFIG_ARCH_MATH_H is -# defined, then there is an architecture specific math.h header file -# that will be included indirectly from include\math.h. But first, we -# have to copy math.h from include\nuttx\. to include\. Logic within -# include\nuttx\math.h will hand the redirection to the architecture- -# specific math.h header file. -# -# If the CONFIG_LIBM is defined, the Rhombus libm will be built at libm\libm. -# Definitions and prototypes for the Rhombus libm are also contained in -# include\nuttx\math.h and so the file must also be copied in that case. -# -# If neither CONFIG_ARCH_MATH_H nor CONFIG_LIBM is defined, then no math.h -# header file will be provided. You would want that behavior if (1) you -# don't use libm, or (2) you want to use the math.h and libm provided -# within your toolchain. - -ifeq ($(CONFIG_ARCH_MATH_H),y) -NEED_MATH_H = y -else ifeq ($(CONFIG_LIBM),y) -NEED_MATH_H = y -endif - -ifeq ($(NEED_MATH_H),y) -include\math.h: include\nuttx\lib\math.h - $(Q) cp -f include\nuttx\lib\math.h include\math.h -else -include\math.h: -endif - -# The float.h header file defines the properties of your floating point -# implementation. It would always be best to use your toolchain's float.h -# header file but if none is available, a default float.h header file will -# provided if this option is selected. However there is no assurance that -# the settings in this float.h are actually correct for your platform! - -ifeq ($(CONFIG_ARCH_FLOAT_H),y) -include\float.h: include\nuttx\lib\float.h - $(Q) cp -f include\nuttx\lib\float.h include\float.h -else -include\float.h: -endif - -# Target used to copy include\nuttx\stdarg.h. If CONFIG_ARCH_STDARG_H is -# defined, then there is an architecture specific stdarg.h header file -# that will be included indirectly from include\stdarg.h. But first, we -# have to copy stdarg.h from include\nuttx\. to include\. - -ifeq ($(CONFIG_ARCH_STDARG_H),y) -include\stdarg.h: include\nuttx\lib\stdarg.h - $(Q) cp -f include\nuttx\lib\stdarg.h include\stdarg.h -else -include\stdarg.h: -endif - -# Target used to copy include\nuttx\setjmp.h. If CONFIG_ARCH_SETJMP_H is -# defined, then there is an architecture specific setjmp.h header file -# that will be included indirectly from include\setjmp.h. But first, we -# have to copy setjmp.h from include\nuttx\. to include\. - -ifeq ($(CONFIG_ARCH_SETJMP_H),y) -include\setjmp.h: include\nuttx\lib\setjmp.h - $(Q) cp -f include\nuttx\lib\setjmp.h include\setjmp.h -else -include\setjmp.h: -endif - -# Targets used to generate compiler-specific include paths -# Build this tools needed early in the build -# so we define it as a dependency of `context` target - -tools\incdir$(HOSTEXEEXT): - $(Q) $(MAKE) -C tools -f Makefile.host incdir INCDIR="$(TOPDIR)\tools\incdir.bat" - -# Targets used to build include\nuttx\version.h. Creation of version.h is -# part of the overall NuttX configuration sequence. Notice that the -# tools\mkversion tool is built and used to create include\nuttx\version.h - -tools\mkversion$(HOSTEXEEXT): - $(Q) $(MAKE) -C tools -f Makefile.host mkversion$(HOSTEXEEXT) - -$(TOPDIR)\.version: - $(Q) echo CONFIG_VERSION_STRING="0" > .version - $(Q) echo CONFIG_VERSION_MAJOR=0 >> .version - $(Q) echo CONFIG_VERSION_MINOR=0 >> .version - $(Q) echo CONFIG_VERSION_PATCH=0 >> .version - $(Q) echo CONFIG_VERSION_BUILD="0" >> .version - -include\nuttx\version.h: $(TOPDIR)\.version tools\mkversion$(HOSTEXEEXT) - $(Q) tools\mkversion$(HOSTEXEEXT) $(TOPDIR) > include\nuttx\version.h - -# Targets used to build include\nuttx\config.h. Creation of config.h is -# part of the overall NuttX configuration sequence. Notice that the -# tools\mkconfig tool is built and used to create include\nuttx\config.h - -tools\mkconfig$(HOSTEXEEXT): prebuild - $(Q) $(MAKE) -C tools -f Makefile.host mkconfig$(HOSTEXEEXT) - -include\nuttx\config.h: $(TOPDIR)\.config tools\mkconfig$(HOSTEXEEXT) - $(Q) grep -v "CONFIG_BASE_DEFCONFIG" "$(TOPDIR)\.config" > "$(TOPDIR)\.config.tmp" -# In-place edit can mess up permissions on Windows - $(Q) if ! cmp -s "$(TOPDIR)\.config.tmp" "$(TOPDIR)\.config.orig" ; then \ - sed "/CONFIG_BASE_DEFCONFIG/ { /-dirty/! s/\"$$/-dirty\"/ }" "$(TOPDIR)\.config" > "$(TOPDIR)\.config-temp"; \ - else \ - sed "s/-dirty//g" "$(TOPDIR)\.config" > "$(TOPDIR)\.config-temp"; \ - fi - $(Q) mv -f "$(TOPDIR)\.config-temp" "$(TOPDIR)\.config" - $(Q) rm -f "$(TOPDIR)\.config.tmp" - $(Q) tools\mkconfig$(HOSTEXEEXT) $(TOPDIR) > include\nuttx\config.h - -# Targets used to create dependencies - -tools\mkdeps$(HOSTEXEEXT): - $(Q) $(MAKE) -C tools -f Makefile.host mkdeps$(HOSTEXEEXT) - -# .dirlinks, and helpers -# -# Directories links. Most of establishing the NuttX configuration involves -# setting up symbolic links with 'generic' directory names to specific, -# configured directories. - -# Link the arch\\include directory to include\arch - -include\arch: - @echo "LN: $@ to $(ARCH_DIR)\include" - $(Q) $(DIRLINK) $(TOPDIR)\$(ARCH_DIR)\include $@ - -# Link the boards\\\\include directory to include\arch\board -# If the above path does not exist, then we try to link to common - -LINK_INCLUDE_DIR=$(BOARD_DIR)/include -ifeq ($(wildcard $(LINK_INCLUDE_DIR)),) - ifneq ($(strip $(BOARD_COMMON_DIR)),) - LINK_INCLUDE_DIR = $(BOARD_COMMON_DIR)/include - endif -endif - -include\arch\board: | include\arch - @echo "LN: $@ to $(BOARD_DIR)\include" - $(Q) $(DIRLINK) $(LINK_INCLUDE_DIR) $@ - -# Link the boards\\\common dir to arch\\src\board -# Link the boards\\\\src dir to arch\\src\board\board - -ifneq ($(BOARD_COMMON_DIR),) -ARCH_SRC_BOARD_SYMLINK=$(BOARD_COMMON_DIR) -ARCH_SRC_BOARD_BOARD_SYMLINK=$(BOARD_DIR)\src -else -ARCH_SRC_BOARD_SYMLINK=$(BOARD_DIR)\src -endif - -ifneq ($(ARCH_SRC_BOARD_SYMLINK),) -$(ARCH_SRC)\board: - @echo "LN: $@ to $(ARCH_SRC_BOARD_SYMLINK)" - $(Q) $(DIRLINK) $(ARCH_SRC_BOARD_SYMLINK) $@ -endif - -ifneq ($(ARCH_SRC_BOARD_BOARD_SYMLINK),) -$(ARCH_SRC)\board\board: | $(ARCH_SRC)\board - @echo "LN: $@ to $(ARCH_SRC_BOARD_BOARD_SYMLINK)" - $(Q) $(DIRLINK) $(ARCH_SRC_BOARD_BOARD_SYMLINK) $@ -endif - -# Link the boards\\\drivers dir to drivers\platform - -drivers\platform: - @echo "LN: $@ to $(BOARD_DRIVERS_DIR)" - $(Q) $(DIRLINK) $(BOARD_DRIVERS_DIR) $@ - -# Link arch\\src\ to arch\\src\chip - -ifeq ($(CONFIG_ARCH_CHIP_CUSTOM),y) -ARCH_SRC_CHIP_SYMLINK_DIR=$(CHIP_DIR) -else ifneq ($(CONFIG_ARCH_CHIP),) -ARCH_SRC_CHIP_SYMLINK_DIR=$(TOPDIR)\$(ARCH_SRC)\$(CONFIG_ARCH_CHIP) -endif - -ifneq ($(ARCH_SRC_CHIP_SYMLINK_DIR),) -$(ARCH_SRC)\chip: - @echo "LN: $@ to $(ARCH_SRC_CHIP_SYMLINK_DIR)" - $(Q) $(DIRLINK) $(ARCH_SRC_CHIP_SYMLINK_DIR) $@ -endif - -# Link arch\\include\ to include\arch\chip - -ifeq ($(CONFIG_ARCH_CHIP_CUSTOM),y) -INCLUDE_ARCH_CHIP_SYMLINK_DIR=$(CHIP_DIR)\include -else ifneq ($(CONFIG_ARCH_CHIP),) -INCLUDE_ARCH_CHIP_SYMLINK_DIR=$(TOPDIR)\$(ARCH_INC)\$(CONFIG_ARCH_CHIP) -endif - -ifneq ($(INCLUDE_ARCH_CHIP_SYMLINK_DIR),) -include\arch\chip: | include\arch - @echo "LN: $@ to $(INCLUDE_ARCH_CHIP_SYMLINK_DIR)" - $(DIRLINK) $(INCLUDE_ARCH_CHIP_SYMLINK_DIR) $@ -endif - -# Copy $(CHIP_KCONFIG) to arch\dummy\Kconfig - -arch\dummy\Kconfig: - @echo "CP: $@ to $(CHIP_KCONFIG)" - $(Q) cp -f $(CHIP_KCONFIG) $@ - -# Copy $(BOARD_KCONFIG) to boards\dummy\Kconfig - -boards\dummy\Kconfig: - @echo "CP: $@ to $(BOARD_KCONFIG)" - $(Q) cp -f $(BOARD_KCONFIG) $@ - -DIRLINKS_SYMLINK = \ - include\arch \ - include\arch\board \ - drivers\platform \ - -DIRLINKS_FILE = \ - arch\dummy\Kconfig \ - boards\dummy\Kconfig \ - -ifneq ($(INCLUDE_ARCH_CHIP_SYMLINK_DIR),) -DIRLINKS_SYMLINK += include\arch\chip -endif - -ifneq ($(ARCH_SRC_CHIP_SYMLINK_DIR),) -DIRLINKS_SYMLINK += $(ARCH_SRC)\chip -endif - -ifneq ($(ARCH_SRC_BOARD_SYMLINK),) -DIRLINKS_SYMLINK += $(ARCH_SRC)\board -endif - -ifneq ($(ARCH_SRC_BOARD_BOARD_SYMLINK),) -DIRLINKS_SYMLINK += $(ARCH_SRC)\board\board -endif - -ifneq ($(APPDIR),) -DIRLINKS_EXTERNAL_DIRS += $(APPDIR) -endif - -# Generate a pattern to build $(DIRLINKS_EXTERNAL_DIRS) -DIRLINKS_EXTERNAL_DEP = $(patsubst %,%\.dirlinks,$(DIRLINKS_EXTERNAL_DIRS)) -DIRLINKS_FILE += $(DIRLINKS_EXTERNAL_DEP) - -.dirlinks: $(DIRLINKS_FILE) | $(DIRLINKS_SYMLINK) - touch $@ - -# Pattern rule for $(DIRLINKS_EXTERNAL_DEP) - -%\.dirlinks: - $(Q) $(MAKE) -C $(patsubst %\.dirlinks,%,$@) dirlinks - $(Q) touch $@ - -# clean_dirlinks -# -# This is part of the distclean target. It removes all symbolic links created by the dirlink target. - -# The symlink subfolders need to be removed before the parent symlinks - -.PHONY: clean_dirlinks -clean_dirlinks: tools\incdir$(HOSTEXEEXT) - $(Q) $(call DELFILE, $(DIRLINKS_FILE)) - $(Q) $(call DELFILE, .dirlinks) - $(Q) $(DIRUNLINK) drivers\platform -ifneq ($(INCLUDE_ARCH_CHIP_SYMLINK_DIR),) - $(Q) $(DIRUNLINK) include\arch\chip -endif - $(Q) $(DIRUNLINK) include\arch\board - $(Q) $(DIRUNLINK) include\arch -ifneq ($(ARCH_SRC_BOARD_BOARD_SYMLINK),) - $(Q) $(DIRUNLINK) $(ARCH_SRC)\board\board -endif -ifneq ($(ARCH_SRC_BOARD_SYMLINK),) - $(Q) $(DIRUNLINK) $(ARCH_SRC)\board -endif -ifneq ($(ARCH_SRC_CHIP_SYMLINK_DIR),) - $(Q) $(DIRUNLINK) $(ARCH_SRC)\chip -endif - -# context -# -# The context target is invoked on each target build to assure that NuttX is -# properly configured. The basic configuration steps include creation of the -# the config.h and version.h header files in the include\nuttx directory and -# the establishment of symbolic links to configured directories. - -# Generate a pattern to make Directories.mk context - -CONTEXTDIRS_DEPS = $(patsubst %,%\.context,$(CONTEXTDIRS)) - -context: tools\incdir$(HOSTEXEEXT) include\nuttx\config.h include\nuttx\version.h $(CONTEXTDIRS_DEPS) .dirlinks | staging - -ifeq ($(NEED_MATH_H),y) -context: include\math.h -endif - -ifeq ($(CONFIG_ARCH_FLOAT_H),y) -context: include\float.h -endif - -ifeq ($(CONFIG_ARCH_STDARG_H),y) -context: include\stdarg.h -endif - -ifeq ($(CONFIG_ARCH_SETJMP_H),y) -context: include\setjmp.h -endif - -staging: - $(Q) mkdir $@ - -# Pattern rule for $(CONTEXTDIRS_DEPS) - -%.context: include\nuttx\config.h .dirlinks - $(Q) $(MAKE) -C $(patsubst %.context,%,$@) TOPDIR="$(TOPDIR)" context - $(Q) touch $@ - -# clean_context -# -# This is part of the distclean target. It removes all of the header files -# and symbolic links created by the context target. - -clean_context: - $(Q) for %%G in ($(CCLEANDIRS)) do ( if exist %%G\Makefile $(MAKE) -C %%G clean_context ) - $(call DELFILE, include\nuttx\config.h) - $(call DELFILE, include\nuttx\version.h) - $(call DELFILE, include\float.h) - $(call DELFILE, include\math.h) - $(call DELFILE, include\stdarg.h) - $(call DELFILE, include\setjmp.h) - $(call DELFILE, arch\dummy\Kconfig) - $(call DELFILE, $(subst /,\,$(CONTEXTDIRS_DEPS))) - $(Q) $(DIRUNLINK) include\arch\board - $(Q) $(DIRUNLINK) include\arch\chip - $(Q) $(DIRUNLINK) include\arch - $(Q) $(DIRUNLINK) $(ARCH_SRC)\board\board - $(Q) $(DIRUNLINK) $(ARCH_SRC)\board - $(Q) $(DIRUNLINK) $(ARCH_SRC)\chip - $(Q) $(DIRUNLINK) $(TOPDIR)\drivers\platform - -# Archive targets. The target build sequence will first create a series of -# libraries, one per configured source file directory. The final NuttX -# execution will then be built from those libraries. The following targets -# build those libraries. - -include tools/LibTargets.mk - -# prebuild -# -# Some architectures require the use of special tools and special handling -# BEFORE building NuttX. The `Make.defs` files for those architectures -# should override the following define with the correct operations for -# that platform. - -prebuild: - $(call PREBUILD, $(TOPDIR)) - -# pass1 and pass2 -# -# If the 2 pass build option is selected, then this pass1 target is -# configured to built before the pass2 target. This pass1 target may, as an -# example, build an extra link object (CONFIG_PASS1_OBJECT) which may be an -# incremental (relative) link object, but could be a static library (archive); -# some modification to this Makefile would be required if CONFIG_PASS1_OBJECT -# is an archive. Exactly what is performed during pass1 or what it generates -# is unknown to this makefile unless CONFIG_PASS1_OBJECT is defined. - -pass1: $(USERLIBS) - -pass2: $(NUTTXLIBS) - -# $(BIN) -# -# Create the final NuttX executable in a two pass build process. In the -# normal case, all pass1 and pass2 dependencies are created then pass1 -# and pass2 targets are built. However, in some cases, you may need to build -# pass1 dependencies and pass1 first, then build pass2 dependencies and pass2. -# in that case, execute 'make pass1 pass2' from the command line. - -$(BIN): pass1 pass2 -ifeq ($(CONFIG_BUILD_2PASS),y) - $(Q) if [ -z "$(CONFIG_PASS1_BUILDIR)" ]; then \ - echo "ERROR: CONFIG_PASS1_BUILDIR not defined"; \ - exit 1; \ - fi - $(Q) if [ ! -d "$(CONFIG_PASS1_BUILDIR)" ]; then \ - echo "ERROR: CONFIG_PASS1_BUILDIR does not exist"; \ - exit 1; \ - fi - $(Q) if [ ! -f "$(CONFIG_PASS1_BUILDIR)\Makefile" ]; then \ - echo "ERROR: No Makefile in CONFIG_PASS1_BUILDIR"; \ - exit 1; \ - fi - $(Q) $(MAKE) -C $(CONFIG_PASS1_BUILDIR) LINKLIBS="$(LINKLIBS)" USERLIBS="$(USERLIBS)" "$(CONFIG_PASS1_TARGET)" -endif - $(Q) $(MAKE) -C $(ARCH_SRC) EXTRA_OBJS="$(EXTRA_OBJS)" LINKLIBS="$(LINKLIBS)" APPDIR="$(APPDIR)" EXTRAFLAGS="$(KDEFINE) $(EXTRAFLAGS)" $(BIN) - $(Q) echo $(BIN) > nuttx.manifest - $(Q) printf '%s\n' *.map >> nuttx.manifest -ifeq ($(CONFIG_INTELHEX_BINARY),y) - @echo "CP: nuttx.hex" - $(Q) $(OBJCOPY) $(OBJCOPYARGS) -O ihex $(BIN) nuttx.hex - $(Q) echo nuttx.hex >> nuttx.manifest -endif -ifeq ($(CONFIG_MOTOROLA_SREC),y) - @echo "CP: nuttx.srec" - $(Q) $(OBJCOPY) $(OBJCOPYARGS) -O srec $(BIN) nuttx.srec - $(Q) echo nuttx.srec >> nuttx.manifest -endif -ifeq ($(CONFIG_RAW_BINARY),y) - @echo "CP: nuttx.bin" - $(Q) $(OBJCOPY) $(OBJCOPYARGS) -O binary $(BIN) nuttx.bin - $(Q) echo nuttx.bin >> nuttx.manifest -endif - $(call POSTBUILD, $(TOPDIR)) - -# flash (or download : DEPRECATED) -# -# This is a helper target that will rebuild NuttX and flash it to the target -# system in one step. The operation of this target depends completely upon -# implementation of the FLASH command in the user Make.defs file. It will -# generate an error if the FLASH command is not defined. - -flash: $(BIN) - $(call FLASH, $<) - -download: $(BIN) - $(call FLASH, $<) - -# bootloader -# -# Some architectures require the provisioning of a bootloader or other -# functions required for properly executing the NuttX binary. -# Make.defs files for those architectures should define a bootloader target -# with the correct operations for that platform. It will generate an error -# if the bootloader target is not defined. - -bootloader: - $(Q) $(MAKE) -C $(ARCH_SRC) bootloader - -# clean_bootloader -# -# Removes all of the files and directories created by the bootloader target. -# It will generate an error if the clean_bootloader target is not defined on -# the architecture-specific Makefile. - -clean_bootloader: - $(Q) $(MAKE) -C $(ARCH_SRC) clean_bootloader - -# pass1dep: Create pass1 build dependencies -# pass2dep: Create pass2 build dependencies - -pass1dep: context tools\mkdeps$(HOSTEXEEXT) -ifneq ($(USERDEPDIRS),) - $(Q) for %%G in ($(USERDEPDIRS)) do ( $(MAKE) -C %%G depend ) -endif - -pass2dep: context tools\mkdeps$(HOSTEXEEXT) - $(Q) for %%G in ($(KERNDEPDIRS)) do ( $(MAKE) -C %%G EXTRAFLAGS="$(KDEFINE) $(EXTRAFLAGS)" depend ) - -# Configuration targets -# -# These targets depend on the kconfig-frontends packages. To use these, you -# must first download and install the kconfig-frontends package from this -# location: https://bitbucket.org/nuttx/tools/downloads/. See -# misc\tools\README.txt for additional information. - -KCONFIG_ENV = set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& \ - set EXTERNALDIR=$(EXTERNALDIR)& \ - set APPSBINDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& \ - set BINDIR=$(patsubst "%",%,${TOPDIR})& - -config: - $(Q) $(MAKE) clean_context - $(Q) $(MAKE) apps_preconfig - $(Q) $(KCONFIG_ENV) kconfig-conf Kconfig - -oldconfig: - $(Q) $(MAKE) clean_context - $(Q) $(MAKE) apps_preconfig - $(Q) ${KCONFIG_ENV} kconfig-conf --oldconfig Kconfig - -olddefconfig: - $(Q) $(MAKE) clean_context - $(Q) $(MAKE) apps_preconfig - $(Q) ${KCONFIG_ENV} kconfig-conf --olddefconfig Kconfig - -menuconfig: - $(Q) $(MAKE) clean_context - $(Q) $(MAKE) apps_preconfig - $(Q) ${KCONFIG_ENV} kconfig-mconf Kconfig - -nconfig: - $(Q) $(MAKE) clean_context - $(Q) $(MAKE) apps_preconfig - $(Q) ${KCONFIG_ENV} kconfig-nconf Kconfig - -savedefconfig: apps_preconfig - $(Q) ${KCONFIG_ENV} kconfig-conf --savedefconfig defconfig.tmp Kconfig - $(Q) kconfig-tweak --file defconfig.tmp -u CONFIG_APPS_DIR - $(Q) kconfig-tweak --file defconfig.tmp -u CONFIG_BASE_DEFCONFIG - $(Q) grep "CONFIG_ARCH=" .config >> defconfig.tmp - -$(Q) grep "^CONFIG_ARCH_CHIP_" .config >> defconfig.tmp - -$(Q) grep "CONFIG_ARCH_CHIP=" .config >> defconfig.tmp - -$(Q) grep "CONFIG_ARCH_BOARD=" .config >> defconfig.tmp - -$(Q) grep "^CONFIG_ARCH_CUSTOM" .config >> defconfig.tmp - -$(Q) grep "^CONFIG_ARCH_BOARD_CUSTOM" .config >> defconfig.tmp - $(Q) export LC_ALL=C; cat defconfig.tmp | sort | uniq > sortedconfig.tmp - $(Q) echo "#" > warning.tmp - $(Q) echo "# This file is autogenerated: PLEASE DO NOT EDIT IT." >> warning.tmp - $(Q) echo "#" >> warning.tmp - $(Q) echo "# You can use \"make menuconfig\" to make any modifications to the installed .config file." >> warning.tmp - $(Q) echo "# You can then do \"make savedefconfig\" to generate a new defconfig file that includes your" >> warning.tmp - $(Q) echo "# modifications." >> warning.tmp - $(Q) echo "#" >> warning.tmp - $(Q) cat warning.tmp sortedconfig.tmp > defconfig - $(Q) rm -f warning.tmp - $(Q) rm -f defconfig.tmp - $(Q) rm -f sortedconfig.tmp - -# export -# -# The export target will package the NuttX libraries and header files into -# an exportable package. Caveats: (1) These needs some extension for the KERNEL -# build; it needs to receive USERLIBS and create a libuser.a). (2) The logic -# in tools\mkexport.sh only supports GCC and, for example, explicitly assumes -# that the archiver is 'ar' - -export: ${NUTTXLIBS} - $(Q) $(MKEXPORT) $(MKEXPORT_ARGS) -l "$(EXPORTLIBS)" - -# General housekeeping targets: dependencies, cleaning, etc. -# -# depend: Create both PASS1 and PASS2 dependencies -# clean: Removes derived object files, archives, executables, and -# temporary files, but retains the configuration and context -# files and directories. -# distclean: Does 'clean' then also removes all configuration and context -# files. This essentially restores the directory structure -# to its original, unconfigured stated. - -depend: pass1dep pass2dep - -$(foreach SDIR, $(CLEANDIRS), $(eval $(call SDIR_template,$(SDIR),clean))) - -subdir_clean: $(foreach SDIR, $(CLEANDIRS), $(SDIR)_clean) -ifeq ($(CONFIG_BUILD_2PASS),y) - $(Q) $(MAKE) -C $(CONFIG_PASS1_BUILDIR) clean -endif - -clean: subdir_clean - $(call DELFILE, $(BIN)) - $(call DELFILE, nuttx.*) - $(call DELFILE, *.map) - $(call DELFILE, _SAVED_APPS_config) - $(call DELFILE, nuttx-export*) - $(call DELFILE, nuttx_user*) - $(call DELFILE, .gdbinit) - $(call DELDIR, staging) - $(call DELFILE, uImage) - $(call CLEAN) - -$(foreach SDIR, $(CLEANDIRS), $(eval $(call SDIR_template,$(SDIR),distclean))) - -subdir_distclean: $(foreach SDIR, $(CLEANDIRS), $(SDIR)_distclean) - -distclean: clean subdir_distclean -ifeq ($(CONFIG_BUILD_2PASS),y) - $(Q) $(MAKE) -C $(CONFIG_PASS1_BUILDIR) distclean -endif -ifeq ($(CONFIG_ARCH_HAVE_BOOTLOADER),y) - $(Q) $(MAKE) clean_bootloader -endif - $(Q) $(MAKE) clean_context - $(Q) $(MAKE) -C tools -f Makefile.host clean - $(call DELFILE, Make.defs) - $(call DELFILE, defconfig) - $(call DELFILE, .config) - $(call DELFILE, .config.old) - $(call DELFILE, .config.orig) - -# Application housekeeping targets. The APPDIR variable refers to the user -# application directory. A sample apps\ directory is included with NuttX, -# however, this is not treated as part of NuttX and may be replaced with a -# different application directory. For the most part, the application -# directory is treated like any other build directory in this script. However, -# as a convenience, the following targets are included to support housekeeping -# functions in the user application directory from the NuttX build directory. -# -# apps_preconfig: Prepare applications to be configured -# apps_clean: Perform the clean operation only in the user application -# directory -# apps_distclean: Perform the distclean operation only in the user application -# directory. - -apps_preconfig: tools\incdir$(HOSTEXEEXT) .dirlinks -ifneq ($(APPDIR),) - $(Q) $(MAKE) -C "$(APPDIR)" preconfig -endif - -apps_clean: -ifneq ($(APPDIR),) - $(Q) $(MAKE) -C "$(APPDIR)" clean -endif - -apps_distclean: -ifneq ($(APPDIR),) - $(Q) $(MAKE) -C "$(APPDIR)" distclean -endif diff --git a/tools/arm/toolchain/gcc.arm.defs b/tools/arm/toolchain/gcc.arm.defs new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/arm/toolchain/gcc.armv6-m.defs b/tools/arm/toolchain/gcc.armv6-m.defs new file mode 100644 index 0000000000..ff284d67e6 --- /dev/null +++ b/tools/arm/toolchain/gcc.armv6-m.defs @@ -0,0 +1,2 @@ +TOOLCHAIN_MTUNE := -mcpu=cortex-m0 -mthumb +TOOLCHAIN_MFLOAT := -mfloat-abi=soft diff --git a/tools/arm/toolchain/gcc.armv7-a.defs b/tools/arm/toolchain/gcc.armv7-a.defs new file mode 100644 index 0000000000..2b81c28be9 --- /dev/null +++ b/tools/arm/toolchain/gcc.armv7-a.defs @@ -0,0 +1,42 @@ +ifeq ($(CONFIG_ARCH_CORTEXA5),y) + ARCHCPUFLAGS += -mcpu=cortex-a5 +else ifeq ($(CONFIG_ARCH_CORTEXA7),y) + ARCHCPUFLAGS += -mcpu=cortex-a7 +else ifeq ($(CONFIG_ARCH_CORTEXA8),y) + ARCHCPUFLAGS += -mcpu=cortex-a8 +else ifeq ($(CONFIG_ARCH_CORTEXA9),y) + ARCHCPUFLAGS += -mcpu=cortex-a9 +endif + +ifneq ($(CONFIG_ARM_DPFPU32),y) + ARCHFPUD16 = -d16 +endif + +# Cortex-A5 | -mfpu=vfpv4-fp16 | -mfpu=vfpv4-d16-fp16 | -mfpu=neon-fp16 +# Cortex-A7 | -mfpu=vfpv4 | -mfpu=vfpv4-d16 | -mfpu=neon-vfpv4 +# Cortex-A8 | -mfpu=vfpv3 | | -mfpu=neon (alias for neon-vfpv3) +# Cortex-A9 | -mfpu=vfpv3-fp16 | -mfpu=vfpv3-d16-fp16 | -mfpu=neon-fp16 +# Cortex-A15 | -mfpu=vfpv4 | | -mfpu=neon-vfpv4 + +ifeq ($(CONFIG_ARCH_FPU),y) + ifeq ($(CONFIG_ARM_FPU_ABI_SOFT),y) + ARCHCPUFLAGS += -mfloat-abi=softfp + else + ARCHCPUFLAGS += -mfloat-abi=hard + endif + + ifeq ($(CONFIG_ARM_NEON),y) + ARCHNEON = neon- + endif + ifeq ($(CONFIG_ARCH_CORTEXA8),y) + ARCHFPU = vfpv3 + else ifeq ($(CONFIG_ARCH_CORTEXA9),y) + ARCHFPU = vfpv3 + else + ARCHFPU = vfpv4 + endif + ARCHCPUFLAGS += -mfpu=$(ARCHNEON)$(ARCHFPU)$(ARCHFPUD16) + +else + ARCHCPUFLAGS += -mfloat-abi=soft +endif diff --git a/tools/arm/toolchain/gcc.armv7-m.defs b/tools/arm/toolchain/gcc.armv7-m.defs new file mode 100644 index 0000000000..525dbdcc2d --- /dev/null +++ b/tools/arm/toolchain/gcc.armv7-m.defs @@ -0,0 +1,35 @@ +ifeq ($(CONFIG_ARCH_CORTEXM4),y) + TOOLCHAIN_MTUNE := -mtune=cortex-m4 + TOOLCHAIN_MARCH := -march=armv7e-m + ifeq ($(CONFIG_ARCH_FPU),y) + TOOLCHAIN_MFLOAT := -mfpu=fpv4-sp-d16 + endif +else ifeq ($(CONFIG_ARCH_CORTEXM7),y) + TOOLCHAIN_MTUNE := -mtune=cortex-m7 + TOOLCHAIN_MARCH := -march=armv7e-m + ifeq ($(CONFIG_ARCH_FPU),y) + ifeq ($(CONFIG_ARCH_DPFPU),y) + TOOLCHAIN_MFLOAT := -mfpu=fpv5-d16 + else + TOOLCHAIN_MFLOAT := -mfpu=fpv5-sp-d16 + endif + endif +else ifeq ($(CONFIG_ARCH_CORTEXM3),y) + TOOLCHAIN_MTUNE := -mtune=cortex-m3 + TOOLCHAIN_MARCH := -march=armv7-m + TOOLCHAIN_MFLOAT := -mfloat-abi=soft +endif + +ifeq ($(CONFIG_ARCH_FPU),y) + ifeq ($(CONFIG_ARM_FPU_ABI_SOFT),y) + TOOLCHAIN_MFLOAT += -mfloat-abi=softfp + else + TOOLCHAIN_MFLOAT += -mfloat-abi=hard + endif +else + TOOLCHAIN_MFLOAT += -mfloat-abi=soft +endif + +ifeq ($(CONFIG_ARMV7M_STACKCHECK),y) + ARCHOPTIMIZATION += -finstrument-functions -ffixed-r10 +endif diff --git a/tools/arm/toolchain/gcc.armv7-r.defs b/tools/arm/toolchain/gcc.armv7-r.defs new file mode 100644 index 0000000000..8700cf2cea --- /dev/null +++ b/tools/arm/toolchain/gcc.armv7-r.defs @@ -0,0 +1,18 @@ +ifeq ($(CONFIG_ARCH_CORTEXR4),y) + ARCHCPUFLAGS += -mcpu=cortex-r4 +else ifeq ($(CONFIG_ARCH_CORTEXR5),y) + ARCHCPUFLAGS += -mcpu=cortex-r5 +else ifeq ($(CONFIG_ARCH_CORTEXR7),y) + ARCHCPUFLAGS += -mcpu=cortex-r7 +endif + +ifeq ($(CONFIG_ARCH_FPU),y) + ARCHCPUFLAGS += -mfpu=vfpv3-d16 + ifeq ($(CONFIG_ARM_FPU_ABI_SOFT),y) + ARCHCPUFLAGS += -mfloat-abi=softfp + else + ARCHCPUFLAGS += -mfloat-abi=hard + endif +else + ARCHCPUFLAGS += -mfloat-abi=soft +endif diff --git a/tools/arm/toolchain/gcc.armv8-m.defs b/tools/arm/toolchain/gcc.armv8-m.defs new file mode 100644 index 0000000000..33784788a3 --- /dev/null +++ b/tools/arm/toolchain/gcc.armv8-m.defs @@ -0,0 +1,85 @@ +# Parametrization for ARCHCPUFLAGS + +ifeq ($(CONFIG_ARM_DSP),y) + EXTCPUFLAGS = +dsp +endif + +ifeq ($(CONFIG_ARM_PACBTI),y) + EXTCPUFLAGS := $(EXTCPUFLAGS)+pacbti + + # Protects branches using pointer authentication and Branch Target Identification. + # + # The default is -mbranch-protection=none. + # + # -mbranch-protection=standard: + # Enables all types of branch protection to their standard values. + # The standard protection is equivalent to -mbranch-protection=bti+pac-ret. + # + # -mbranch-protection=bti: + # Enables branch protection using Branch Target Identification. + # + # -mbranch-protection=pac-ret: + # Enables branch protection using pointer authentication using key A. + # + # +leaf: + # Enables pointer authentication on all leaf functions, including the leaf + # functions that do not save the LR on the stack. + # + # +b-key: + # Enables pointer authentication with Key B, rather than Key A. + + ARCHOPTIMIZATION += -mbranch-protection=standard +endif + +ifeq ($(CONFIG_ARM_HAVE_MVE),y) + EXTCPUFLAGS := $(EXTCPUFLAGS)+mve.fp+fp.dp +endif + + +ifeq ($(CONFIG_ARCH_CORTEXM23),y) + TOOLCHAIN_MTUNE := -mtune=cortex-m23 + TOOLCHAIN_MARCH := -march=armv8-m.main + TOOLCHAIN_MFLOAT := -mfloat-abi=soft +else ifeq ($(CONFIG_ARCH_CORTEXM33),y) + TOOLCHAIN_MTUNE := -mtune=cortex-m33 + TOOLCHAIN_MARCH := -march=armv8-m.main$(EXTCPUFLAGS) + ifeq ($(CONFIG_ARCH_FPU),y) + TOOLCHAIN_MFLOAT := -mfpu=fpv5-sp-d16 + endif +else ifeq ($(CONFIG_ARCH_CORTEXM35P),y) + TOOLCHAIN_MTUNE := -mtune=cortex-m35p + TOOLCHAIN_MARCH := -march=armv8-m.main$(EXTCPUFLAGS) + ifeq ($(CONFIG_ARCH_FPU),y) + TOOLCHAIN_MFLOAT := -mfpu=fpv5-sp-d16 + endif +else ifeq ($(CONFIG_ARCH_CORTEXM55),y) + TOOLCHAIN_MTUNE := -mtune=cortex-m55 + TOOLCHAIN_MARCH := -march=armv8.1-m.main$(EXTCPUFLAGS) + ifeq ($(CONFIG_ARCH_FPU),y) + TOOLCHAIN_MFLOAT := -mfpu=fpv5-d16 + endif +else ifeq ($(CONFIG_ARCH_CORTEXM85),y) + TOOLCHAIN_MTUNE := -mtune=cortex-m85 + TOOLCHAIN_MARCH := -march=armv8.1-m.main$(EXTCPUFLAGS) + ifeq ($(CONFIG_ARCH_FPU),y) + TOOLCHAIN_MFLOAT := -mfpu=fpv5-d16 + endif +endif + +ifeq ($(CONFIG_ARCH_FPU),y) + ifeq ($(CONFIG_ARM_FPU_ABI_SOFT),y) + TOOLCHAIN_MFLOAT += -mfloat-abi=softfp + else + TOOLCHAIN_MFLOAT += -mfloat-abi=hard + endif +else + TOOLCHAIN_MFLOAT += -mfloat-abi=soft +endif + +ifeq ($(CONFIG_ARMV8M_STACKCHECK),y) + ARCHOPTIMIZATION += -finstrument-functions -ffixed-r10 +endif + +ifeq ($(CONFIG_ARMV8M_CMSE),y) + ARCHCPUFLAGS += -mcmse +endif diff --git a/tools/arm/toolchain/gcc.armv8-r.defs b/tools/arm/toolchain/gcc.armv8-r.defs new file mode 100644 index 0000000000..d3e365c4aa --- /dev/null +++ b/tools/arm/toolchain/gcc.armv8-r.defs @@ -0,0 +1,18 @@ +ARCHCPUFLAGS += -march=armv8-r + +ifeq ($(CONFIG_ARCH_FPU),y) + + ifeq ($(CONFIG_ARM_NEON),y) + ARCHCPUFLAGS += -mfpu=neon-fp-armv8 + else + ARCHCPUFLAGS += -mfpu=fp-armv8 + endif + ifeq ($(CONFIG_ARM_FPU_ABI_SOFT),y) + ARCHCPUFLAGS += -mfloat-abi=softfp + else + ARCHCPUFLAGS += -mfloat-abi=hard + endif + +else + ARCHCPUFLAGS += -mfloat-abi=soft +endif diff --git a/tools/arm/toolchain/gcc.defs b/tools/arm/toolchain/gcc.defs new file mode 100644 index 0000000000..cc4cc014ec --- /dev/null +++ b/tools/arm/toolchain/gcc.defs @@ -0,0 +1,250 @@ +# Each toolchain definition should set: +# +# CROSSDEV The GNU toolchain triple (command prefix) +# ARCHCPUFLAGS CPU-specific flags selecting the instruction set +# FPU options, etc. +# ARCHOPTIMIZATION The optimization level that results in +# reliable code generation. +# + +CROSSDEV = arm-none-eabi- + +CC = $(CROSSDEV)gcc +CXX = $(CROSSDEV)g++ +CPP = $(CROSSDEV)gcc -E -P -x c +STRIP = $(CROSSDEV)strip --strip-unneeded +OBJCOPY = $(CROSSDEV)objcopy +OBJDUMP = $(CROSSDEV)objdump + +ifeq ($(CONFIG_LTO_FULL),y) + LD := $(CROSSDEV)gcc + AR := $(CROSSDEV)gcc-ar rcs + NM := $(CROSSDEV)gcc-nm + ARCHOPTIMIZATION += -fno-builtin +else + LD := $(CROSSDEV)ld + AR := $(CROSSDEV)ar rcs + NM := $(CROSSDEV)nm +endif + +# The default C/C++ search path +ARCHINCLUDES += -isystem ${NXBASE}/include +ARCHXXINCLUDES += -isystem ${NXBASE}/include + +INCDIR_PREFIX = -I +DEFINE_PREFIX = -D + +include $(dir ${TOOLCHAIN})/gcc.${ARCH_FAMILY}.defs + +ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y) + ARCHOPTIMIZATION += $(CONFIG_DEBUG_OPTLEVEL) +else ifeq ($(CONFIG_DEBUG_FULLOPT),y) + ARCHOPTIMIZATION += -Os +endif + +ifeq ($(CONFIG_NDEBUG),y) + ARCHOPTIMIZATION += -DNDEBUG +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -fno-strict-aliasing +endif + +ifeq ($(CONFIG_FRAME_POINTER),y) + ARCHOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls +else + ARCHOPTIMIZATION += -fomit-frame-pointer +endif + +ifeq ($(CONFIG_STACK_CANARIES),y) + ARCHOPTIMIZATION += -fstack-protector-all +endif + +ifeq ($(CONFIG_STACK_USAGE),y) + ARCHOPTIMIZATION += -fstack-usage +endif + +ifneq ($(CONFIG_STACK_USAGE_WARNING),0) + ARCHOPTIMIZATION += -Wstack-usage=$(CONFIG_STACK_USAGE_WARNING) +endif + +ifeq ($(CONFIG_COVERAGE_ALL),y) + ARCHOPTIMIZATION += -fprofile-arcs -ftest-coverage -fno-inline +endif + +ifeq ($(CONFIG_PROFILE_ALL),y) + ARCHOPTIMIZATION += -pg +endif + +ifeq ($(CONFIG_MM_UBSAN_ALL),y) + ARCHOPTIMIZATION += $(CONFIG_MM_UBSAN_OPTION) +endif + +ifeq ($(CONFIG_MM_UBSAN_TRAP_ON_ERROR),y) + ARCHOPTIMIZATION += -fsanitize-undefined-trap-on-error +endif + +ifeq ($(CONFIG_MM_KASAN_INSTRUMENT_ALL),y) + ARCHOPTIMIZATION += -fsanitize=kernel-address +endif + +ifeq ($(CONFIG_MM_KASAN_GLOBAL),y) + ARCHOPTIMIZATION += --param asan-globals=1 +endif + +ifeq ($(CONFIG_MM_KASAN_DISABLE_READS_CHECK),y) + ARCHOPTIMIZATION += --param asan-instrument-reads=0 +endif + +ifeq ($(CONFIG_MM_KASAN_DISABLE_WRITES_CHECK),y) + ARCHOPTIMIZATION += --param asan-instrument-writes=0 +endif + +# Instrumentation options + +ifeq ($(CONFIG_ARCH_INSTRUMENT_ALL),y) + ARCHOPTIMIZATION += -finstrument-functions +endif + +ifeq ($(CONFIG_UNWINDER_ARM),y) + ARCHOPTIMIZATION += -funwind-tables -fasynchronous-unwind-tables +endif + +# Link Time Optimization + +ifeq ($(CONFIG_LTO_THIN),y) + ARCHOPTIMIZATION += -flto=thin +else ifeq ($(CONFIG_LTO_FULL),y) + ARCHOPTIMIZATION += -flto + ARCHOPTIMIZATION += -fuse-linker-plugin +endif + +ifeq ($(CONFIG_ARM_THUMB),y) + ARCHCPUFLAGS += -mthumb + + # GCC Manual: + # -mthumb + # ... If you want to force assembler files to be interpreted as Thumb + # code, either add a `.thumb' directive to the source or pass the + # -mthumb option directly to the assembler by prefixing it with -Wa. + + ARCHCPUFLAGS += -Wa,-mthumb + + # Outputs an implicit IT block when there is a conditional instruction + # without an enclosing IT block. + + ARCHCPUFLAGS += -Wa,-mimplicit-it=always +endif + +# Workaround to skip -Warray-bounds check due to bug of GCC-12: +# Wrong warning array subscript [0] is outside array bounds: +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105523 + +ifeq ($(GCCVER),) + export GCCVER := $(shell $(CC) --version | grep gcc | sed -E "s/.* ([0-9]+\.[0-9]+).*/\1/" | cut -d'.' -f1) +endif + +ifeq ($(shell expr "$(GCCVER)" \>= 12), 1) + ARCHOPTIMIZATION += --param=min-pagesize=0 + LDFLAGS += --print-memory-usage + ifeq ($(CONFIG_ARCH_RAMFUNCS),y) + LDFLAGS += --no-warn-rwx-segments + else ifeq ($(CONFIG_BOOT_RUNFROMFLASH),) + LDFLAGS += --no-warn-rwx-segments + endif +endif + +LDFLAGS += --entry=__start + +ifneq ($(CONFIG_LIBCXXTOOLCHAIN),y) + ARCHCXXFLAGS += -nostdinc++ +endif + +ifneq ($(CONFIG_CXX_STANDARD),) + ARCHCXXFLAGS += -std=$(CONFIG_CXX_STANDARD) +endif + +ifneq ($(CONFIG_CXX_EXCEPTION),y) + ARCHCXXFLAGS += -fno-exceptions -fcheck-new +endif + +ifneq ($(CONFIG_CXX_RTTI),y) + ARCHCXXFLAGS += -fno-rtti +endif + +ARCHOPTIMIZATION += -fno-common +ARCHOPTIMIZATION += -Wall -Wshadow -Wundef + +LDFLAGS += -nostdlib +LDFLAGS += --gc-sections +ARCHOPTIMIZATION += -ffunction-sections -fdata-sections + +ifeq ($(CONFIG_DEBUG_LINK_WHOLE_ARCHIVE),y) + LDFLAGS += --whole-archive +endif + +# Debug link map + +ifeq ($(CONFIG_DEBUG_LINK_MAP),y) + LDFLAGS += --strict --map --xref --symbols --info=unused --info=veneers + LDFLAGS += --info=summarysizes --info=summarystack +endif + +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) + ARCHOPTIMIZATION += ${CONFIG_DEBUG_SYMBOLS_LEVEL} +endif + +ifeq ($(CONFIG_BUILTIN_TOOLCHAIN),y) + COMPILER_RT_LIB = $(shell $(CC) $(ARCHCPUFLAGS) --print-libgcc-file-name) + EXTRA_LIBS += $(COMPILER_RT_LIB) +endif + +ifeq ($(CONFIG_LIBSUPCXX_TOOLCHAIN),y) + EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libsupc++.a)) +endif + +ifeq ($(CONFIG_COVERAGE_TOOLCHAIN),y) + EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libgcov.a)) +endif + +ifeq ($(CONFIG_LIBCXXTOOLCHAIN),y) + EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libstdc++.a)) +endif + +PICFLAGS = -fpic -fPIE -mno-pic-data-is-text-relative -msingle-pic-base + +ifneq ($(CONFIG_BUILD_PIC),) + ARCHCFLAGS += $(PICFLAGS) -mpic-register=r9 + ARCHCXXFLAGS += $(PICFLAGS) -mpic-register=r9 + LDFLAGS += --emit-relocs +endif + +# Loadable module definitions + +CMODULEFLAGS = $(CFLAGS) -fvisibility=hidden -mlong-calls # --target1-abs +LDMODULEFLAGS = -r -T $(call CONVERT_PATH,$(TOPDIR)/libs/libc/elf/gnu-elf.ld) + +# ELF module definitions + +CELFFLAGS = $(CFLAGS) -fvisibility=hidden -mlong-calls # --target1-abs +CXXELFFLAGS = $(CXXFLAGS)-fvisibility=hidden -mlong-calls + +ifeq ($(CONFIG_PIC),y) + CFLAGS += --fixed-r10 + CELFFLAGS += $(PICFLAGS) -mpic-register=r10 + CXXELFFLAGS += $(PICFLAGS) -mpic-register=r10 + + # Generate an executable elf, need to ignore undefined symbols + LDELFFLAGS += --unresolved-symbols=ignore-in-object-files --emit-relocs +else + ifneq ($(CONFIG_BINFMT_ELF_EXECUTABLE),y) + LDELFFLAGS += -r + endif +endif + +LDELFFLAGS += -e __start -T ${NXBASE}/libs/libc/elf/gnu-elf.ld + +SHCCFLAGS = -fPIC -fPIE -fvisibility=default +SHLDFLAGS = -shared -Bsymbolic -Bdynamic + +ARCHCPUFLAGS += $(TOOLCHAIN_MARCH) $(TOOLCHAIN_MTUNE) $(TOOLCHAIN_MFLOAT) diff --git a/tools/bdf-converter.c b/tools/bdf-converter.c deleted file mode 100644 index 0e54dd3bbf..0000000000 --- a/tools/bdf-converter.c +++ /dev/null @@ -1,755 +0,0 @@ -/**************************************************************************** - * tools/bdf-converter.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/* Based one the "Glyph Bitmap Distribution Format (BDF) Specification", - * Version 2.2, by Adobe Systems Incorporated. - */ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include -#include -#include -#include -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#if 0 -# define VERBOSE -# define DBG -#endif - -/* BDF Specification Version 2.2: - * This version lifts the restriction on line length. In this version, - * the new maximum length of a value of the type string is 65535 characters, - * and hence lines may now be at least this long. - */ - -#define BDF_MAX_LINE_LENGTH 65535 - -/* Ranges of 7-bit and 8-bit fonts */ - -#define NXFONT_MIN7BIT 33 -#define NXFONT_MAX7BIT 126 - -#define NXFONT_MIN8BIT 161 -#define NXFONT_MAX8BIT 255 - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/* This structure holds information about a glyph */ - -typedef struct glyphinfo_s -{ - char *name; /* Name for they glyph */ - int encoding; /* The Adobe Standard Encoding value */ - int dw_x0; /* Width in x of the vector indicating - * the position of the next glyph's origin - * relative to the origin of this glyph */ - int dw_y0; /* Width in y of the vector indicating - * the position of the next glyph's origin - * relative to the origin of this glyph */ - int bb_w; /* The width of the black pixels in x */ - int bb_h; /* The height of the black pixels in y */ - int bb_x_off; /* X displacement of the lower left corner - * of the bitmap from origin 0 */ - int bb_y_off; /* Y displacement of the lower left corner - * of the bitmap from origin 0 */ - uint64_t *bitmap; /* Hexadecimal data for the character bitmap */ -} glyphinfo_t; - -/* This structures provides the metrics for one glyph */ - -typedef struct nx_fontmetric_s -{ - uint32_t stride : 3; /* Width of one font row in bytes */ - uint32_t width : 6; /* Width of the font in bits */ - uint32_t height : 6; /* Height of the font in rows */ - uint32_t xoffset : 6; /* Top, left-hand corner X-offset in pixels */ - uint32_t yoffset : 6; /* Top, left-hand corner y-offset in pixels */ - uint32_t unused : 5; -} nx_fontmetric_t; - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: my_strtok_r - * - * Description: - * MinGW does not seem to provide strtok_r - * - ****************************************************************************/ - -#ifndef HAVE_STRTOK_R -static char *my_strtok_r(char *str, const char *delim, char **saveptr) -{ - char *pbegin; - char *pend = NULL; - - /* Decide if we are starting a new string or continuing from - * the point we left off. - */ - - if (str) - { - pbegin = str; - } - else if (saveptr && *saveptr) - { - pbegin = *saveptr; - } - else - { - return NULL; - } - - /* Find the beginning of the next token */ - - for (; - *pbegin && strchr(delim, *pbegin) != NULL; - pbegin++); - - /* If we are at the end of the string with nothing - * but delimiters found, then return NULL. - */ - - if (!*pbegin) - { - return NULL; - } - - /* Find the end of the token */ - - for (pend = pbegin + 1; - *pend && strchr(delim, *pend) == NULL; - pend++); - - /* pend either points to the end of the string or to - * the first delimiter after the string. - */ - - if (*pend) - { - /* Turn the delimiter into a null terminator */ - - *pend++ = '\0'; - } - - /* Save the pointer where we left off and return the - * beginning of the token. - */ - - if (saveptr) - { - *saveptr = pend; - } - - return pbegin; -} - -#undef strtok_r -#define strtok_r my_strtok_r -#endif - -/**************************************************************************** - * Name: trimline - * - * Description: - * Trims the line removing space characters at the front and at the end - * of the line. - * - * Input Parameters: - * line - The line to trim - * - ****************************************************************************/ - -static void trimline(char *line) -{ - char *str; - str = line; - char *strend; - for (strend = str + strlen(str) - 1; - strend >= str && isspace((int)(*strend)); - strend--); - *(strend + 1) = 0; -} - -/**************************************************************************** - * Name: bdf_parseIntLine - * - * Description: - * Parses a line containing a BDF property followed by integers. It will - * ignore the first token that corresponds to the property name. - * - * Input Parameters: - * line - A line with a BDF property followed by integers, i.e.: - * "FONTBOUNDINGBOX 8 13 0 -2" - * count - How many integers are specified by the BDF property. In the - * example above, count = 4. - * info - A pointer to memory provided by the caller in which to - * return the array of integers. For the example above: - * info[0] = 8 - * info[1] = 13 - * info[2] = 0 - * info[3] = -2 - * - ****************************************************************************/ - -static void bdf_parseintline(char *line, unsigned int count, int *info) -{ - char *str; - char *token; - char *saveptr1; - str = line; - - /* Ignore the key */ - - token = (char *)strtok_r(str, " ", &saveptr1); - - while ((token = (char *)strtok_r(NULL, " ", &saveptr1)) && count--) - { - *(info++) = atoi(token); - } -} - -/**************************************************************************** - * Name: bdf_printglyphinfo - * - * Description: - * Prints the information available for a glyph. - * - * Input Parameters: - * ginfo - A glyphinfo_t struct with the glyph's information. - * - ****************************************************************************/ - -#ifdef DBG -static void bdf_printglyphinfo(const glyphinfo_t *ginfo) -{ - printf("NAME = %s\n", ginfo->name); - printf("ENCODING = %d\n", ginfo->encoding); - printf("DW_X0 = %d\n", ginfo->dw_x0); - printf("DW_Y0 = %d\n", ginfo->dw_y0); - printf("BB_W = %d\n", ginfo->bb_w); - printf("BB_H = %d\n", ginfo->bb_h); - printf("BB_X_OFF = %d\n", ginfo->bb_x_off); - printf("BB_Y_OFF = %d\n", ginfo->bb_y_off); - int i; - for (i = 0; i < ginfo->bb_h; i++) - { - printf("BITMAP[%d] = %x\n", i, ginfo->bitmap[i]); - } -} -#endif /* DBG */ - -/**************************************************************************** - * Name: bdf_printnxmetricinfo - * - * Description: - * Prints the information available for a glyph's metric in the NX - * graphics system. - * - * Input Parameters: - * info - A nx_fontmetric_t struct with the glyph's information. - * - ****************************************************************************/ - -#ifdef DBG -static void bdf_printnxmetricinfo(const nx_fontmetric_t *info) -{ - printf("STRIDE = %d\n", info->stride); - printf("WIDTH = %d\n", info->width); - printf("HEIGHT = %d\n", info->height); - printf("XOFFSET = %d\n", info->xoffset); - printf("YOFFSET = %d\n", info->yoffset); -} -#endif /* DBG */ - -/**************************************************************************** - * Name: bdf_getglyphinfo - * - * Description: - * Obtains the information for an individual glyph. The BDF properties - * taken into account are: - * - ENCODING - * - DWIDTH - * - BBX - * BDF properties ignored: - * - SWIDTH - * - SWIDTH1 - * - DWIDTH1 - * - VVECTOR - * - * Input Parameters: - * file - The input file stream pointing to the first line of the - * glyph's information (right after STARTCHAR). - * ginfo - A glyphinfo_t struct to fill with the glyph's information. - * - ****************************************************************************/ - -static void bdf_getglyphinfo(FILE *file, glyphinfo_t *ginfo) -{ - char line[BDF_MAX_LINE_LENGTH]; - char linecopy[BDF_MAX_LINE_LENGTH]; - char *str; - char *token; - char *saveptr1; - bool done; - - done = false; - - while (fgets(line, BDF_MAX_LINE_LENGTH, file) != NULL && !done) - { - trimline(line); - strcpy(linecopy, line); - str = line; - - while ((token = (char *)strtok_r(str, " ", &saveptr1))) - { - /* ENCODING information */ - - if (strcmp(token, "ENCODING") == 0) - { - token = (char *)strtok_r(NULL, " ", &saveptr1); - ginfo->encoding = atoi(token); - } - - /* DWIDTH information */ - - if (strcmp(token, "DWIDTH") == 0) - { - token = (char *)strtok_r(NULL, " ", &saveptr1); - ginfo->dw_x0 = atoi(token); - token = (char *)strtok_r(NULL, " ", &saveptr1); - ginfo->dw_y0 = atoi(token); - } - - /* BBX information */ - - else if (strcmp(token, "BBX") == 0) - { - int bbxinfo[4]; - bdf_parseintline(linecopy, 4, bbxinfo); - ginfo->bb_w = bbxinfo[0]; - ginfo->bb_h = bbxinfo[1]; - ginfo->bb_x_off = bbxinfo[2]; - ginfo->bb_y_off = bbxinfo[3]; - - /* This is the last BDF property of interest */ - - done = true; - } - - str = NULL; - } - } -} - -/**************************************************************************** - * Name: bdf_getglyphbitmap - * - * Description: - * Obtains the character bitmap information for an individual glyph. - * - * Input Parameters: - * file - The input file stream pointing to the first line of the - * glyph's bitmap (right after BITMAP). - * ginfo - A glyphinfo_t struct to fill with the glyph's bitmap. - * - ****************************************************************************/ - -static void bdf_getglyphbitmap(FILE *file, glyphinfo_t *ginfo) -{ - char line[BDF_MAX_LINE_LENGTH]; - uint64_t *bitmap; - int readingbitmap; - - bitmap = ginfo->bitmap; - readingbitmap = ginfo->bb_h; - - while (readingbitmap > 0) - { - if (fgets(line, BDF_MAX_LINE_LENGTH, file) != NULL) - { - trimline(line); - - if (strcmp(line, "ENDCHAR") == 0) - { - readingbitmap = 0; - } - else - { - char *endptr; - *bitmap = strtoul(line, &endptr, 16); - bitmap++; - readingbitmap--; - } - } - else - { - /* error condition */ - - readingbitmap = 0; - } - } -} - -/**************************************************************************** - * Name: bdf_getstride - * - * Description: - * Obtains the stride for an individual glyph. The stride is the width - * of one glyph's bitmap row in bytes. - * - * Input Parameters: - * ginfo - A glyphinfo_t struct with the glyph's information. - * stride - A pointer to memory provided by the caller in which to - * return the stride. - * - ****************************************************************************/ - -static void bdf_getstride(glyphinfo_t *ginfo, uint32_t *stride) -{ - *stride = (ginfo->bb_w % 8 == 0) ? ginfo->bb_w / 8 : ginfo->bb_w / 8 + 1; -} - -/**************************************************************************** - * Name: bdf_printoutput - * - * Description: - * Prints to the output stream the information of an individual glyph in - * the NuttX font format. - * - * Input Parameters: - * out - The output stream. - * ginfo - A glyphinfo_t struct with the glyph's information. - * nxmetric - A nx_fontmetric_t struct with the glyph's information. - * - ****************************************************************************/ - -static void bdf_printoutput(FILE *out, - glyphinfo_t *ginfo, - nx_fontmetric_t *nxmetric) -{ - int i; - int j; - - /* Only interested in the 7 and 8 bit ranges */ - - if ((ginfo->encoding >= NXFONT_MIN7BIT && - ginfo->encoding <= NXFONT_MAX7BIT) || - (ginfo->encoding >= NXFONT_MIN8BIT && - ginfo->encoding <= NXFONT_MAX8BIT)) - { - /* Glyph general info */ - - if (ginfo->bb_x_off < 0) - { - fprintf(out, - "/* %s (%d) -- NOTE: Xoffset should be %d, not 0. */\n", - ginfo->name, - ginfo->encoding, - ginfo->bb_x_off); - } - else - { - fprintf(out, "/* %s (%d) */\n", ginfo->name, ginfo->encoding); - } - - /* Glyph metrics */ - - fprintf(out, - "#define NXFONT_METRICS_%d {%d, %d, %d, %d, %d, 0}\n", - ginfo->encoding, - nxmetric->stride, - nxmetric->width, - nxmetric->height, - nxmetric->xoffset, - nxmetric->yoffset); - - /* Glyph bitmap */ - - fprintf(out, "#define NXFONT_BITMAP_%d {", ginfo->encoding); - - for (i = 0; i < ginfo->bb_h - 1; i++) - { - for (j = 1; j <= nxmetric->stride; j++) - { - int nxbyteoffset; - uint8_t nxbyte = 0; - uint64_t tempbitmap = ginfo->bitmap[i]; - - /* Get the next byte */ - - nxbyteoffset = (nxmetric->stride - j) * 8; - nxbyte = (uint8_t)(tempbitmap >> nxbyteoffset); - fprintf(out, "0x%x, ", nxbyte); - } - } - - /* Different behavior for the last bitmap */ - - for (j = 1; j <= nxmetric->stride; j++) - { - int nxbyteoffset; - uint8_t nxbyte = 0; - uint64_t tempbitmap = ginfo->bitmap[i]; - - /* Get the next byte */ - - nxbyteoffset = (nxmetric->stride - j) * 8; - nxbyte = (uint8_t)(tempbitmap >> nxbyteoffset); - - if (j == nxmetric->stride) - { - fprintf(out, "0x%x}\n", nxbyte); - } - else - { - fprintf(out, "0x%x, ", nxbyte); - } - } - - fprintf(out, "\n"); - } -} - -/**************************************************************************** - * Main - ****************************************************************************/ - -int main(int argc, char **argv) -{ - FILE *file, *out; - char line[BDF_MAX_LINE_LENGTH]; - char linecopy[BDF_MAX_LINE_LENGTH]; - char *str; - char *token; - char *saveptr1; - char *input; - char *output; - - /* FONTBOUNDINGBOX properties */ - - int fbb_x = 0; - int fbb_y = 0; - int fbb_y_off = 0; - - /* int fbb_x_off = 0; */ - - /* Input BDF file */ - - input = argv[1]; - - if (input == NULL) - { - printf("%s: no input file\n", argv[0]); - exit(0); - } - - file = fopen(input, "r"); - - if (file == NULL) - { - printf("%s: error opening file %s\n", argv[0], input); - exit(0); - } - else - { -#ifdef VERBOSE - printf("Opening \"%s\"\n", input); -#endif /* VERBOSE */ - } - - /* Output file */ - - if (argv[2]) - { - output = argv[2]; - } - else - { - output = "nxfonts_myfont.h"; - } - - out = fopen(output, "w"); - - if (out == NULL) - { - printf("%s: error opening file %s\n", argv[0], output); - fclose(file); - exit(0); - } - else - { - while (fgets(line, BDF_MAX_LINE_LENGTH, file) != NULL) - { -#ifdef DBG - printf("--\n"); -#endif /* DBG */ - - /* Save a copy of the line */ - - strcpy(linecopy, line); - - /* Clean it */ - - trimline(line); - str = line; - - while ((token = (char *)strtok_r(str, " ", &saveptr1))) - { - /* FONTBOUNDINGBOX - Global font information */ - - if (strcmp(token, "FONTBOUNDINGBOX") == 0) - { - int fbbinfo[4]; - bdf_parseintline(linecopy, 4, fbbinfo); - fbb_x = fbbinfo[0]; - fbb_y = fbbinfo[1]; - - /* fbb_x_off = fbbinfo[2]; */ - - fbb_y_off = fbbinfo[3]; - - /* Print FONTBOUNDINGBOX information */ - - fprintf(out, "/* Maximum height and width of any"); - fprintf(out, " glyph in the set */\n\n"); - fprintf(out, "#define NXFONT_MAXHEIGHT %d\n", fbb_y); - fprintf(out, "#define NXFONT_MAXWIDTH %d\n\n", fbb_x); - } - - /* STARTCHAR - Individual glyph information */ - - if (strcmp(token, "STARTCHAR") == 0) - { - glyphinfo_t ginfo; - - /* Glyph name */ - - ginfo.name = (char *)strtok_r(NULL, " ", &saveptr1); - -#ifdef VERBOSE - printf("Processing glyph: %s\n", ginfo.name); -#endif /* VERBOSE */ - - /* Glyph information: - * ENCODING - * DWIDTH - * BBX - */ - - ginfo.encoding = 0; - ginfo.dw_x0 = 0; - ginfo.dw_y0 = 0; - ginfo.bb_w = 0; - ginfo.bb_h = 0; - ginfo.bb_x_off = 0; - ginfo.bb_y_off = 0; - bdf_getglyphinfo(file, &ginfo); - - /* Glyph bitmap */ - - ginfo.bitmap = malloc(sizeof(uint64_t) * ginfo.bb_h); - bdf_getglyphbitmap(file, &ginfo); - -#ifdef DBG - bdf_printglyphinfo(&ginfo); -#endif /* DBG */ - - /* Convert to nxfonts */ - - nx_fontmetric_t nxmetric; - uint32_t stride; - bdf_getstride(&ginfo, &stride); - nxmetric.stride = stride; - nxmetric.width = ginfo.bb_w; - nxmetric.height = ginfo.bb_h; - - /* The NuttX font format does not support - * negative X offsets. - */ - - if (ginfo.bb_x_off < 0) - { - nxmetric.xoffset = 0; - printf("%s: ignoring negative x offset for " - "glyph '%s' (%d)\n", - argv[0], - ginfo.name, - ginfo.encoding); - } - else - { - nxmetric.xoffset = ginfo.bb_x_off; - } - - nxmetric.yoffset = fbb_y + fbb_y_off - - ginfo.bb_y_off - ginfo.bb_h; - -#ifdef DBG - bdf_printnxmetricinfo(&nxmetric); -#endif /* DBG */ - - /* The space (32) character is treated differently */ - - if (ginfo.encoding == 32) - { - fprintf(out, "/* The width of a space */\n\n"); - fprintf(out, "#define NXFONT_SPACEWIDTH %d\n\n", - ginfo.dw_x0); - } - else - { - bdf_printoutput(out, &ginfo, &nxmetric); - } - - /* Free memory */ - - free(ginfo.bitmap); - } - - str = NULL; - } - } - - fclose(file); - fclose(out); - - /* The End */ - - printf("Generated \"%s\"\n", output); - } - - return EXIT_SUCCESS; -} diff --git a/tools/cfgdefine.c b/tools/cfgdefine.c deleted file mode 100644 index 674bf3c02f..0000000000 --- a/tools/cfgdefine.c +++ /dev/null @@ -1,356 +0,0 @@ -/**************************************************************************** - * tools/cfgdefine.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include -#include "cfgdefine.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -char line[LINESIZE + 1]; - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/* These are configuration variable name that are quoted by configuration - * tool but which must be unquoted when used in C code. - */ - -static const char *dequote_list[] = -{ - /* NuttX */ - - "CONFIG_DEBUG_OPTLEVEL", /* Custom debug level */ - "CONFIG_EXECFUNCS_NSYMBOLS_VAR", /* Variable holding number of symbols in the table */ - "CONFIG_EXECFUNCS_SYMTAB_ARRAY", /* Symbol table array used by exec[l|v] */ - "CONFIG_INIT_ARGS", /* Argument list of entry point */ - "CONFIG_INIT_SYMTAB", /* Global symbol table */ - "CONFIG_INIT_NEXPORTS", /* Global symbol table size */ - "CONFIG_INIT_ENTRYPOINT", /* Name of entry point function */ - "CONFIG_LIBC_ELF_SYMTAB_ARRAY", /* Symbol table array used by elf functions */ - "CONFIG_LIBC_ELF_NSYMBOLS_VAR", /* Variable holding number of symbols in the table */ - "CONFIG_PASS1_BUILDIR", /* Pass1 build directory */ - "CONFIG_PASS1_TARGET", /* Pass1 build target */ - "CONFIG_PASS1_OBJECT", /* Pass1 build object */ - "CONFIG_TTY_LAUNCH_ENTRYPOINT", /* Name of entry point from tty launch */ - "CONFIG_TTY_LAUNCH_ARGS", /* Argument list of entry point from tty launch */ - "CONFIG_BOARD_MEMORY_RANGE", /* Memory range for board */ - "CONFIG_FAKE_AUDIO_DEVICE_PARAMS", /* Arguments for the fake audio device */ - - /* NxWidgets/NxWM */ - - "CONFIG_NXWM_BACKGROUND_IMAGE", /* Name of bitmap image class */ - "CONFIG_NXWM_CALIBRATION_ICON", /* Name of bitmap image class */ - "CONFIG_NXWM_HEXCALCULATOR_ICON", /* Name of bitmap image class */ - "CONFIG_NXWM_MINIMIZE_BITMAP", /* Name of bitmap image class */ - "CONFIG_NXWM_NXTERM_ICON", /* Name of bitmap image class */ - "CONFIG_NXWM_STARTWINDOW_ICON", /* Name of bitmap image class */ - "CONFIG_NXWM_STOP_BITMAP", /* Name of bitmap image class */ - - /* apps/ definitions */ - - "CONFIG_NSH_SYMTAB_ARRAYNAME", /* Symbol table array name */ - "CONFIG_NSH_SYMTAB_COUNTNAME", /* Name of the variable holding the number of symbols */ - NULL /* Marks the end of the list */ -}; - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/* Skip over any spaces */ - -static char *skip_space(char *ptr) -{ - while (*ptr && isspace((int)*ptr)) ptr++; - return ptr; -} - -/* Find the end of a variable string */ - -static char *find_name_end(char *ptr) -{ - while (*ptr && (isalnum((int)*ptr) || *ptr == '_')) ptr++; - return ptr; -} - -/* Find the end of a value string */ - -static char *find_value_end(char *ptr) -{ - while (*ptr && !isspace((int)*ptr)) - { - if (*ptr == '"') - { - do ptr++; while (*ptr && (*ptr != '"' || *(ptr - 1) == '\\')); - if (*ptr) ptr++; - } - else - { - do ptr++; while (*ptr && !isspace((int)*ptr) && *ptr != '"'); - } - } - - return ptr; -} - -/* Read the next line from the configuration file */ - -static char *read_line(FILE *stream) -{ - char *ptr; - - for (; ; ) - { - line[LINESIZE] = '\0'; - if (!fgets(line, LINESIZE, stream)) - { - return NULL; - } - else - { - ptr = skip_space(line); - if (*ptr && *ptr != '#' && *ptr != '\n') - { - return ptr; - } - } - } -} - -/* Parse the line from the configuration file into a variable name - * string and a value string. - */ - -static void parse_line(char *ptr, char **varname, char **varval) -{ - *varname = ptr; - *varval = NULL; - - /* Parse to the end of the variable name */ - - ptr = find_name_end(ptr); - - /* An equal sign is expected next, perhaps after some white space */ - - if (*ptr && *ptr != '=') - { - /* Some else follows the variable name. Terminate the variable - * name and skip over any spaces. - */ - - *ptr = '\0'; - ptr = skip_space(ptr + 1); - } - - /* Verify that the equal sign is present */ - - if (*ptr == '=') - { - /* Make sure that the variable name is terminated (this was already - * done if the name was followed by white space. - */ - - *ptr = '\0'; - - /* The variable value should follow =, perhaps separated by some - * white space. - */ - - ptr = skip_space(ptr + 1); - if (*ptr) - { - /* Yes.. a variable follows. Save the pointer to the start - * of the variable string. - */ - - *varval = ptr; - - /* Find the end of the variable string and make sure that it - * is terminated. - */ - - ptr = find_value_end(ptr); - *ptr = '\0'; - } - } -} - -static char *dequote_value(const char *varname, char *varval) -{ - const char **dqnam; - char *dqval = varval; - char *ptr; - int len; - int i; - - if (dqval) - { - /* Check if the variable name is in the dequoted list of strings */ - - for (dqnam = dequote_list; *dqnam; dqnam++) - { - if (strcmp(*dqnam, varname) == 0) - { - break; - } - } - - /* Did we find the variable name in the list of configuration variables - * to be dequoted? - */ - - if (*dqnam) - { - /* Yes... Check if there is a trailing quote */ - - len = strlen(dqval); - if (dqval[len - 1] == '"') - { - /* Yes... replace it with a terminator */ - - dqval[len - 1] = '\0'; - len--; - } - - /* Is there a leading quote? */ - - if (dqval[0] == '"') - { - /* Yes.. skip over the leading quote */ - - dqval++; - len--; - } - - /* A special case is a quoted list of quoted strings. In that case - * we will need to remove the backspaces from the internally quoted - * strings. NOTE: this will not handle nested quoted quotes. - */ - - for (ptr = dqval; *ptr; ptr++) - { - /* Check for a quoted quote */ - - if (ptr[0] == '\\' && ptr[1] == '"') - { - /* Delete the backslash by moving the rest of the string */ - - for (i = 0; ptr[i]; i++) - { - ptr[i] = ptr[i + 1]; - } - - len--; - } - } - - /* Handle the case where nothing is left after dequoting */ - - if (len <= 0) - { - dqval = NULL; - } - } - } - - return dqval; -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -void generate_definitions(FILE *stream) -{ - char *varname; - char *varval; - char *ptr; - - /* Loop until the entire file has been parsed. */ - - do - { - /* Read the next line from the file */ - - ptr = read_line(stream); - if (ptr) - { - /* Parse the line into a variable and a value field */ - - parse_line(ptr, &varname, &varval); - - /* Was a variable name found? */ - - if (varname) - { - /* Yes.. dequote the value if necessary */ - - varval = dequote_value(varname, varval); - - /* If no value was provided or if the special value 'n' was - * provided, then undefine the configuration variable. - */ - - if (!varval || strcmp(varval, "n") == 0) - { - printf("#undef %s\n", varname); - } - - /* Simply define the configuration variable to '1' if it has - * the special value "y" - */ - - else if (strcmp(varval, "y") == 0) - { - printf("#define %s 1\n", varname); - } - - /* Or to '2' if it has the special value 'm' */ - - else if (strcmp(varval, "m") == 0) - { - printf("#define %s 2\n", varname); - } - - /* Otherwise, use the value as provided */ - - else - { - printf("#define %s %s\n", varname, varval); - } - } - } - } - while (ptr); -} diff --git a/tools/cfgdefine.h b/tools/cfgdefine.h deleted file mode 100644 index c31ca19077..0000000000 --- a/tools/cfgdefine.h +++ /dev/null @@ -1,51 +0,0 @@ -/**************************************************************************** - * tools/cfgdefine.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __TOOLS_CFGDEFINE_H -#define __TOOLS_CFGDEFINE_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#define LINESIZE ( PATH_MAX > 256 ? PATH_MAX : 256 ) - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -extern char line[LINESIZE + 1]; - -/**************************************************************************** - * Public Functions Definitions - ****************************************************************************/ - -void generate_definitions(FILE *stream); - -#endif /* __TOOLS_CFGDEFINE_H */ diff --git a/tools/cfgparser.c b/tools/cfgparser.c deleted file mode 100644 index 3a30868427..0000000000 --- a/tools/cfgparser.c +++ /dev/null @@ -1,285 +0,0 @@ -/**************************************************************************** - * tools/cfgparser.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include -#include - -#include "cfgparser.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -char line[LINESIZE + 1]; - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/* Skip over any spaces */ - -static char *skip_space(char *ptr) -{ - while (*ptr && isspace((int)*ptr)) ptr++; - return ptr; -} - -/* Find the end of a variable string */ - -static char *find_name_end(char *ptr) -{ - while (*ptr && (isalnum((int)*ptr) || *ptr == '_')) ptr++; - return ptr; -} - -/* Find the end of a value string */ - -static char *find_value_end(char *ptr) -{ - while (*ptr && !isspace((int)*ptr)) - { - if (*ptr == '"') - { - do ptr++; while (*ptr && *ptr != '"'); - if (*ptr) ptr++; - } - else - { - do ptr++; while (*ptr && !isspace((int)*ptr) && *ptr != '"'); - } - } - - return ptr; -} - -/* Read the next line from the configuration file */ - -static char *read_line(FILE *stream) -{ - char *ptr; - - for (; ; ) - { - line[LINESIZE] = '\0'; - if (!fgets(line, LINESIZE, stream)) - { - return NULL; - } - else - { - ptr = skip_space(line); - if (*ptr && *ptr != '#' && *ptr != '\n') - { - return ptr; - } - } - } -} - -/* Parse the line from the configuration file into a variable name - * string and a value string. - */ - -static void parse_line(char *ptr, char **varname, char **varval) -{ - /* Skip over any leading spaces */ - - ptr = skip_space(ptr); - - /* The first no-space is the beginning of the variable name */ - - *varname = skip_space(ptr); - *varval = NULL; - - /* Parse to the end of the variable name */ - - ptr = find_name_end(ptr); - - /* An equal sign is expected next, perhaps after some white space */ - - if (*ptr && *ptr != '=') - { - /* Some else follows the variable name. Terminate the variable - * name and skip over any spaces. - */ - - *ptr = '\0'; - ptr = skip_space(ptr + 1); - } - - /* Verify that the equal sign is present */ - - if (*ptr == '=') - { - /* Make sure that the variable name is terminated (this was already - * done if the name was followed by white space. - */ - - *ptr = '\0'; - - /* The variable value should follow =, perhaps separated by some - * white space. - */ - - ptr = skip_space(ptr + 1); - if (*ptr) - { - /* Yes.. a variable follows. Save the pointer to the start - * of the variable string. - */ - - *varval = ptr; - - /* Find the end of the variable string and make sure that it - * is terminated. - */ - - ptr = find_value_end(ptr); - *ptr = '\0'; - } - } -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -void parse_file(FILE *stream, struct variable_s **list) -{ - struct variable_s *curr; - struct variable_s *prev; - struct variable_s *next; - char *varname; - char *varval; - char *ptr; - - /* Loop until the entire file has been parsed. */ - - do - { - /* Read the next line from the file */ - - ptr = read_line(stream); - if (ptr) - { - /* Parse the line into a variable and a value field */ - - parse_line(ptr, &varname, &varval); - - /* If the variable has no value (or the special value 'n'), then - * ignore it. - */ - - if (!varval || strcmp(varval, "n") == 0) - { - continue; - } - - /* Make sure that a variable name was found. */ - - if (varname) - { - int varlen = strlen(varname) + 1; - int vallen = 0; - - /* Get the size of the value, including the NUL terminating - * character. - */ - - if (varval) - { - vallen = strlen(varval) + 1; - } - - /* Allocate memory to hold the struct variable_s with the - * variable name and the value. - */ - - curr = malloc(sizeof(struct variable_s) + - varlen + vallen - 1); - if (curr) - { - /* Add the variable to the list */ - - curr->var = &curr->storage[0]; - strcpy(curr->var, varname); - - curr->val = NULL; - if (varval) - { - curr->val = &curr->storage[varlen]; - strcpy(curr->val, varval); - } - - prev = 0; - next = *list; - while (next && strcmp(next->var, curr->var) <= 0) - { - prev = next; - next = next->flink; - } - - if (prev) - { - prev->flink = curr; - } - else - { - *list = curr; - } - - curr->flink = next; - } - } - } - } - while (ptr); -} - -struct variable_s *find_variable(const char *varname, - struct variable_s *list) -{ - while (list) - { - if (strcmp(varname, list->var) == 0) - { - return list; - } - - list = list->flink; - } - - return NULL; -} diff --git a/tools/cfgparser.h b/tools/cfgparser.h deleted file mode 100644 index 8f82426d40..0000000000 --- a/tools/cfgparser.h +++ /dev/null @@ -1,65 +0,0 @@ -/**************************************************************************** - * tools/cfgparser.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __TOOLS_CFGPARSER_H -#define __TOOLS_CFGPARSER_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#define LINESIZE ( PATH_MAX > 256 ? PATH_MAX : 256 ) - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -struct variable_s -{ - struct variable_s *flink; - char *var; - char *val; - char storage[1]; -}; - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -extern char line[LINESIZE + 1]; - -/**************************************************************************** - * Public Functions Definitions - ****************************************************************************/ - -void parse_file(FILE *stream, struct variable_s **list); -struct variable_s *find_variable(const char *varname, - struct variable_s *list); - -#endif /* __TOOLS_CFGPARSER_H */ diff --git a/tools/configure.bat b/tools/configure.bat deleted file mode 100755 index b70148f7f5..0000000000 --- a/tools/configure.bat +++ /dev/null @@ -1,163 +0,0 @@ -@echo off - -rem tools/configure.bat -rem -rem SPDX-License-Identifier: Apache-2.0 -rem -rem Licensed to the Apache Software Foundation (ASF) under one or more -rem contributor license agreements. See the NOTICE file distributed with -rem this work for additional information regarding copyright ownership. The -rem ASF licenses this file to you under the Apache License, Version 2.0 (the -rem "License"); you may not use this file except in compliance with the -rem License. You may obtain a copy of the License at -rem -rem http://www.apache.org/licenses/LICENSE-2.0 -rem -rem Unless required by applicable law or agreed to in writing, software -rem distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -rem WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -rem License for the specific language governing permissions and limitations -rem under the License. -rem - -if exist tools goto :GoToolDir -if exist ..\tools goto :SetToolDir - -echo Cannot find tools\ directory -goto End - -:GoToolDir -cd tools - -:SetTooldir -set tooldir=%CD% - -rem Parse command line arguments - -set debug= -set enforce_distclean= -set distclean= -set fmt=-b -set posix= -set help= -set appdir= -set config= -set hostopt= - -:ArgLoop -if "%1"=="" goto :NoConfig -if "%1"=="-h" goto :ShowUsage -if "%1"=="-d" goto :SetDebug -if "%1"=="-E" goto :SetEnforceDistclean -if "%1"=="-e" goto :SetDistclean -if "%1"=="-f" goto :SetFormat -if "%1"=="-b" goto :SetFormat -if "%1"=="-l" goto :SetHostOption -if "%1"=="-m" goto :SetHostOption -if "%1"=="-c" goto :SetHostOption -if "%1"=="-n" goto :SetHostOption -if "%1"=="-B" goto :SetHostOption -if "%1"=="-L" goto :SetList -if "%1"=="-a" goto :SetAppDir - -set config=%1 -goto EndOfLoop - -:SetDebug -set debug=%1 -goto :NextArg - -:SetEnforceDistclean -set enforce_distclean=%1 -goto :NextArg - -:SetDistclean -set distclean=%1 -goto :NextArg - -:SetFormat -set fmt=%1 -goto :NextArg - -:SetHostOption -set hostopt=%1 -goto :NextArg - -:SetList -set list=%1 -goto :EndOfLoop - -:SetAppDir -shift -set appdir=-a %1 - -:NextArg -shift -goto :ArgLoop - -:EndOfLoop - -rem Check if we have to build configure.exe - -if exist configure.exe goto :HaveConfigureExe - -set cc=mingw32-gcc.exe -set cflags=-Wall -Wstrict-prototypes -Wshadow -g -I. -DCONFIG_WINDOWS_NATIVE=y -echo %cc% %cflags% -o configure.exe configure.c cfgparser.c -%cc% %cflags% -o configure.exe configure.c cfgparser.c -if errorlevel 1 ( - echo ERROR: %cc% failed - echo Is mingw32-gcc.exe installed? Is it in the PATH variable? - goto End -) - -:HaveConfigureExe -cd .. -tools\configure.exe %debug% %enforce_distclean% %distclean% %fmt% %hostopt% %appdir% %config% %list% -if errorlevel 1 echo configure.exe failed -goto End - -:NoConfig -echo Missing ^:^ argument - -:ShowUsage -echo USAGE: %0 [-d] [-E] [-e] [-b|f] [-a ^] ^:^ -echo %0 [-h] -echo\nWhere: -echo -d: -echo Enables debug output -echo -E: -echo Enforces distclean if already configured. -echo -e: -echo Performs distclean if configuration changed. -echo -b: -echo Informs the tool that it should use Windows style paths like C:\\Program Files -echo instead of POSIX style paths are used like /usr/local/bin. Windows -echo style paths are used by default. -echo -f: -echo Informs the tool that it should use POSIX style paths like /usr/local/bin. -echo By default, Windows style paths like C:\\Program Files are used. -echo -l selects the Linux (l) host environment. The [-c^|n] options -echo select one of the Windows environments. Default: Use host setup -echo in the defconfig file -echo [-c^|n] selects the Windows host and a Windows environment: -echo Cygwin (c), or Windows native (n). Default Cygwin -echo -L: -echo List all available configurations. -echo -a ^: -echo Informs the configuration tool where the application build -echo directory. This is a relative path from the top-level NuttX -echo build directory. But default, this tool will look in the usual -echo places to try to locate the application directory: ../apps or -echo ../apps-xx.yy where xx.yy is the NuttX version number. -echo ^: -echo Identifies the board. This must correspond to a board directory -echo under nuttx/boards/. -echo ^: -echo Identifies the specific configuration for the selected ^. -echo This must correspond to a sub-directory under the board directory at -echo under nuttx/boards/^/configs/. -echo -h: -echo Prints this message and exits. - -:End diff --git a/tools/convert-comments.c b/tools/convert-comments.c deleted file mode 100644 index f0dbf5541f..0000000000 --- a/tools/convert-comments.c +++ /dev/null @@ -1,412 +0,0 @@ -/**************************************************************************** - * tools/convert-comments.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include -#include -#include - -/**************************************************************************** - * Preprocessor Definitions - ****************************************************************************/ - -#define LINESIZE 1024 /* Big so that we don't have to bother with range checks */ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -static char g_linea[LINESIZE + 3]; -static char g_lineb[LINESIZE + 3]; -static char g_iobuffer[LINESIZE]; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -int main(int argc, char **argv) -{ - char *g_line0; - char *g_line1; - char *ptr; - char *tmpptr; - FILE *instream; - FILE *outstream; - unsigned long lineno = 0; - unsigned int indent; - unsigned int lastindent; - unsigned int nextindent; - unsigned int tmpindent; - bool iscomment; - bool wascomment; - bool willbecomment; - bool isblank; - bool wasblank; - bool willbeblank; - bool willbevalid; - int ret = 1; - - if (argc != 3) - { - fprintf(stderr, "ERROR: Two arguments expected\n"); - return 1; - } - - /* Open the source file read-only */ - - instream = fopen(argv[1], "r"); - if (instream == NULL) - { - fprintf(stderr, "ERROR: Failed to open %s for reading\n", argv[1]); - return 1; - } - - /* Open the destination file write-only */ - - outstream = fopen(argv[2], "w"); - if (outstream == NULL) - { - fprintf(stderr, "ERROR: Failed to open %s for reading\n", argv[2]); - goto errout_with_instream; - } - - /* Prime the pump */ - - g_line0 = g_linea; - g_line1 = g_lineb; - wasblank = true; - wascomment = false; - lastindent = 0; - - /* Read line n + 1 (for n = 0) */ - - if (fgets(g_line1, LINESIZE, instream) == NULL) - { - fprintf(stderr, "ERROR: File is empty\n"); - goto errout_with_outstream; - } - - /* Skip over leading spaces in line n + 1 */ - - for (ptr = g_line1, nextindent = 0; - *ptr != '\0' && *ptr != '\n' && isspace(*ptr); - ptr++, nextindent++) - { - } - - /* Check for a blank line */ - - if (*ptr == '\0' || *ptr == '\n') - { - ptr = g_line1; - ptr[0] = '\n'; - ptr[1] = '\0'; - willbeblank = true; - willbecomment = false; - nextindent = 0; - } - else - { - /* Check for a C++ style comment at this indentation in line n + 1 */ - - willbeblank = false; - willbecomment = strncmp(ptr, "//", 2) == 0; - } - - /* Loop for each line in the file */ - - do - { - /* Swap line n and line n + 1 */ - - ptr = g_line0; - g_line0 = g_line1; /* New line n */ - g_line1 = ptr; /* Will be new line n + 1 */ - - /* Read the new line n + 1 */ - - willbevalid = (fgets(g_line1, LINESIZE, instream) != NULL); - - /* Update info for line 0 */ - - lineno++; - indent = nextindent; - isblank = willbeblank; - iscomment = willbecomment; - - if (willbevalid) - { - /* Strip trailing spaces and carriage returns from line n + 1 */ - - tmpptr = strchr(g_line1, '\r'); - if (tmpptr != NULL) - { - *tmpptr++ = '\n'; - *tmpptr++ = '\0'; - } - else - { - int len = strlen(ptr); - if (len > 0) - { - for (ptr += len - 1; isspace(*ptr); ptr--) - { - ptr[0] = '\n'; - ptr[1] = '\0'; - } - } - } - - /* Skip over leading spaces in line n + 1 */ - - for (ptr = g_line1, nextindent = 0; - *ptr != '\0' && *ptr != '\n' && isspace(*ptr); - ptr++, nextindent++) - { - } - - /* Check for a blank line */ - - if (*ptr == '\0' || *ptr == '\n') - { - ptr = g_line1; - ptr[0] = '\n'; - ptr[1] = '\0'; - willbeblank = true; - willbecomment = false; - nextindent = 0; - } - else - { - /* Check for a C++ style comment - * at this indentation in line n + 1 - */ - - willbeblank = false; - willbecomment = strncmp(ptr, "//", 2) == 0; - } - - /* Check for a C++ style comment - * at this indentation in line n + 1 - */ - - willbecomment = strncmp(ptr, "//", 2) == 0; - } - else - { - willbeblank = true; - willbecomment = false; - nextindent = 0; - } - - /* If current line is not a comment line, then check for a C++ style - * comment at the end of the line. - */ - - if (!iscomment) - { - /* Skip over leading spaces in line n + 1 */ - - for (ptr = g_line0 + indent, tmpindent = indent; - *ptr != '\0' && *ptr != '\n'; - ptr++, tmpindent++) - { - if (ptr[0] == '/' && ptr[1] == '/') - { - indent = tmpindent; - iscomment = true; - wascomment = false; - break; - } - } - } - - printf("***************************************" - "**************************************\n"); - printf("* %5lu. %s\n", lineno, g_line0); - printf("* indent: last=%u curr=%u next=%u\n", - lastindent, indent, nextindent); - printf("* comment: last=%u curr=%u next=%u\n", - wascomment, iscomment, willbecomment); - printf("* blank: last=%u curr=%u next=%u\n", - wasblank, isblank, willbeblank); - printf("***************************************" - "**************************************\n"); - - /* Does line n start with a comment */ - - ptr = g_line0 + indent; - if (iscomment) - { - char *endptr; - - /* Get a pointer for the first non-blank character following the - * comment. - */ - - for (endptr = &ptr[2]; - *endptr != '\0' && *endptr != '\n' && isspace(*endptr); - endptr++) - { - } - - /* Check for a comment only line that is was not preceded by a - * comment. - */ - - if ((*endptr == '\n' || *endptr == '\0') && !wascomment) - { - /* Avoid double spacing */ - - if (!wasblank) - { - /* Output a blank line */ - - fputc('\n', outstream); - } - - /* Reset to indicate a blank line */ - - indent = 0; - iscomment = false; - isblank = true; - } - - /* Did line n - 1 start with a comment? */ - - else if (wascomment) - { - /* Yes.. Change it to a C-style block comment continuation */ - - ptr[0] = ' '; - ptr[1] = '*'; - - /* Write the modified line to the output */ - - fputs(g_line0, outstream); - } - else - { - /* No.. Change it to a C-style opening comment. */ - - ptr[1] = '*'; - - if (!willbecomment) - { - int len; - - /* Remove final linefeed */ - - len = strlen(ptr); - if (len > 0 && ptr[len - 1] == '\n') - { - len--; - } - - /* Close the single line C comment */ - - ptr += len; - *ptr++ = ' '; - *ptr++ = '*'; - *ptr++ = '/'; - *ptr++ = '\n'; - *ptr++ = '\0'; - - iscomment = false; - - /* Write the modified line to the output */ - - fputs(g_line0, outstream); - - /* Closing comment must be followed by a blank line */ - - if (!willbeblank) - { - /* Output a blank line */ - - fputc('\n', outstream); - } - } - else - { - /* Write the modified line to the output */ - - fputs(g_line0, outstream); - } - } - } - else if (wascomment) - { - /* Line n is not a comment, but line n - 1 was. - * Output a closing on a newline at the same indentation. - */ - - memset(g_iobuffer, ' ', LINESIZE); - ptr = g_iobuffer + lastindent + 1; - *ptr++ = '*'; - *ptr++ = '/'; - *ptr++ = '\n'; - *ptr++ = '\0'; - - /* Write the closing line to the output */ - - fputs(g_iobuffer, outstream); - - /* Closing comment must be followed by a blank line */ - - if (!isblank) - { - /* Output a blank line */ - - fputc('\n', outstream); - } - - /* Write the noncomment line to the output */ - - fputs(g_line0, outstream); - } - else - { - /* Write the noncomment line to the output */ - - fputs(g_line0, outstream); - } - - wascomment = iscomment; - wasblank = isblank; - lastindent = indent; - } - while (willbevalid); - - ret = 0; - -errout_with_outstream: - fclose(outstream); - -errout_with_instream: - fclose(instream); - return ret; -} diff --git a/tools/copydir.bat b/tools/copydir.bat deleted file mode 100755 index ace2ebb82f..0000000000 --- a/tools/copydir.bat +++ /dev/null @@ -1,89 +0,0 @@ -@echo off - -rem tools/copydir.bat -rem -rem SPDX-License-Identifier: Apache-2.0 -rem -rem Licensed to the Apache Software Foundation (ASF) under one or more -rem contributor license agreements. See the NOTICE file distributed with -rem this work for additional information regarding copyright ownership. The -rem ASF licenses this file to you under the Apache License, Version 2.0 (the -rem "License"); you may not use this file except in compliance with the -rem License. You may obtain a copy of the License at -rem -rem http://www.apache.org/licenses/LICENSE-2.0 -rem -rem Unless required by applicable law or agreed to in writing, software -rem distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -rem WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -rem License for the specific language governing permissions and limitations -rem under the License. -rem - -rem -rem NuttX uses symbolic links to configure platform-specific directories into -rem the build system. This works great except for when a Windows native -rem toolchain is used in a Cygwin environment. In that case, symbolic -rem links do not work correctly when accessed from the Windows native toolchain; -rem rather, just look link files with the extension .lnk -rem -rem In this environment, the build system will work around this using this script -rem as a replacement for the 'ln' command. This script will simply copy the -rem directory into the expected positiion. -rem - -set src=%1 -set dest=%2 - -rem Verify that arguments were provided - -if "%src%"=="" goto :MissingSrc -if "%dest%"=="" goto :MissingDest -goto CheckSrc - -:MissingSrc - -echo Missing ^ and ^ arguments -goto :ShowUsage - -:MissingDest - -echo Missing ^ arguments -goto :ShowUsage - -rem Verify that a directory exists at the source path - -:CheckSrc - -if exist %src% goto :CheckDest - -echo No directory at %src% -goto :ShowUsage - -:CheckDest - -rem If something already exists at the destination path, remove it - -if not exist %dest% goto :CopyDir - -rmdir /q /s %dest% -if errorlevel 1 ( - echo Failed to remove existing object at %dest% - goto :ShowUsage -) - -rem Copy the directory - -:CopyDir - -xcopy %src% %dest% /c /q /s /e /y /i -echo FAKELNK > %dest%\.fakelnk -goto :End - -:ShowUsage -echo USAGE: %0 ^ ^ -echo Where: -echo ^ is the source directory to be copied -echo ^ is the destination directory to be created - -:End diff --git a/tools/csvparser.c b/tools/csvparser.c deleted file mode 100644 index e9f147b2f7..0000000000 --- a/tools/csvparser.c +++ /dev/null @@ -1,232 +0,0 @@ -/**************************************************************************** - * tools/csvparser.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include -#include -#include -#include -#include - -#include "csvparser.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -bool g_debug; -char g_line[LINESIZE + 1]; -char g_parm[MAX_FIELDS][MAX_PARMSIZE]; -int g_lineno; - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: skip_space - ****************************************************************************/ - -static char *skip_space(char *ptr) -{ - while (*ptr && isspace((int)*ptr)) ptr++; - return ptr; -} - -/**************************************************************************** - * Name: copy_parm - ****************************************************************************/ - -static char *copy_parm(char *src, char *dest) -{ - char *start = src; - int i; - - /* De-quote the parameter and copy it into the parameter array */ - - for (i = 0; i < MAX_PARMSIZE; i++) - { - if (*src == '"') - { - *dest = '\0'; - return src; - } - else if (*src == '\n' || *src == '\0') - { - fprintf(stderr, "%d: Unexpected end of line: \"%s\"\n", - g_lineno, start); - exit(4); - } - else - { - *dest++ = *src++; - } - } - - fprintf(stderr, "%d: Parameter too long: \"%s\"\n", g_lineno, start); - exit(3); -} - -/**************************************************************************** - * Name: find_parm - ****************************************************************************/ - -static char *find_parm(char *ptr) -{ - char *start = ptr; - - if (*ptr != '"') - { - fprintf(stderr, "%d: I'm confused: \"%s\"\n", g_lineno, start); - exit(5); - } - - ptr++; - - ptr = skip_space(ptr); - if (*ptr == '\n' || *ptr == '\0') - { - return NULL; - } - else if (*ptr != ',') - { - fprintf(stderr, "%d: Expected ',': \"%s\"\n", g_lineno, start); - exit(6); - } - - ptr++; - - ptr = skip_space(ptr); - if (*ptr != '"') - { - fprintf(stderr, "%d: Expected \": \"%s\"\n", g_lineno, start); - exit(7); - } - - ptr++; - - return ptr; -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: read_line - ****************************************************************************/ - -char *read_line(FILE *stream) -{ - char *ptr; - - for (; ; ) - { - g_line[LINESIZE] = '\0'; - if (!fgets(g_line, LINESIZE, stream)) - { - return NULL; - } - else - { - g_lineno++; - if (g_debug) - { - printf("Line: %s\n", g_line); - } - - ptr = skip_space(g_line); - if (*ptr && *ptr != '#' && *ptr != '\n') - { - return ptr; - } - } - } -} - -/**************************************************************************** - * Name: parse_csvline - ****************************************************************************/ - -int parse_csvline(char *ptr) -{ - int nparms; - int i; - - /* Format "arg1","arg2","arg3",... Spaces will be tolerated outside of the - * quotes. Any initial spaces have already been skipped so the first thing - * should be '"'. - */ - - if (*ptr != '"') - { - fprintf(stderr, "%d: Bad line: \"%s\"\n", g_lineno, g_line); - exit(2); - } - - ptr++; - nparms = 0; - - /* Copy each comma-separated value in an array (stripping quotes from each - * of the values). - */ - - do - { - if (nparms >= MAX_FIELDS) - { - fprintf(stderr, "%d: Too many Parameters: \"%s\"\n", - g_lineno, g_line); - exit(8); - } - - ptr = copy_parm(ptr, &g_parm[nparms][0]); - nparms++; - ptr = find_parm(ptr); - } - while (ptr); - - /* If debug is enabled, show what we got */ - - if (g_debug) - { - printf("Parameters: %d\n", nparms); - for (i = 0; i < nparms; i++) - { - printf(" Parm%d: \"%s\"\n", i + 1, g_parm[i]); - } - } - - return nparms; -} diff --git a/tools/csvparser.h b/tools/csvparser.h deleted file mode 100644 index e749a21184..0000000000 --- a/tools/csvparser.h +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** - * tools/csvparser.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __TOOLS_CSVPARSER_H -#define __TOOLS_CSVPARSER_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#define LINESIZE (PATH_MAX > 512 ? PATH_MAX : 512) - -#define MAX_FIELDS 16 -#define MAX_PARMSIZE 256 - -#define NAME_INDEX 0 -#define HEADER_INDEX 1 -#define COND_INDEX 2 -#define RETTYPE_INDEX 3 -#define PARM1_INDEX 4 - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -typedef char csvparm_t[MAX_PARMSIZE]; - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -extern bool g_debug; -extern char g_line[LINESIZE + 1]; -extern csvparm_t g_parm[MAX_FIELDS]; -extern int g_lineno; - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -char *read_line(FILE *stream); -int parse_csvline(char *ptr); - -#endif /* __TOOLS_CSVPARSER_H */ diff --git a/tools/define.bat b/tools/define.bat deleted file mode 100755 index 67c71d2665..0000000000 --- a/tools/define.bat +++ /dev/null @@ -1,164 +0,0 @@ -@echo off - -rem tools/define.bat -rem -rem SPDX-License-Identifier: Apache-2.0 -rem -rem Licensed to the Apache Software Foundation (ASF) under one or more -rem contributor license agreements. See the NOTICE file distributed with -rem this work for additional information regarding copyright ownership. The -rem ASF licenses this file to you under the Apache License, Version 2.0 (the -rem "License"); you may not use this file except in compliance with the -rem License. You may obtain a copy of the License at -rem -rem http://www.apache.org/licenses/LICENSE-2.0 -rem -rem Unless required by applicable law or agreed to in writing, software -rem distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -rem WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -rem License for the specific language governing permissions and limitations -rem under the License. - -rem Handle command line options -rem [-h] [=val1] [[=val2] [[=val3] ...]] -rem [-w] [-d] ignored for compatibility with define.sh - -set progname=%0 - -:ArgLoop -if "%1"=="-d" goto :NextArg -if "%1"=="-w" goto :NextArg -if "%1"=="-h" goto :ShowUsage - -goto :CheckCompilerPath - -:NextArg -shift -goto :ArgLoop - -:CheckCompilerPath - -if "%1"=="" ( - echo Missing compiler path - goto :ShowUsage -) - -set ccpath=%1 -shift - -set compiler= -for /F %%i in ("%ccpath%") do set compiler=%%~ni - -if "%1"=="" ( - echo Missing definition list - goto :ShowUsage -) - -rem Check for some well known, non-GCC Windows native tools that require -rem a special output format as well as special paths - -:GetFormat -set fmt=std -if "%compiler%"=="ez8cc" goto :SetZdsFormt -if "%compiler%"=="zneocc" goto :SetZdsFormt -if "%compiler%"=="ez80cc" goto :SetZdsFormt -goto :ProcessDefinitions - -:SetZdsFormt -set fmt=zds - -rem Now process each directory in the directory list - -:ProcessDefinitions -set response= - -:DefinitionLoop -if "%1"=="" goto :Done - -set varname=%1 -shift - -rem Handle the output depending on if there is a value for the variable or not - -if not "%1"=="" goto :GetValue - -rem Handle the output using the selected format - -:NoValue -if "%fmt%"=="zds" goto :NoValueZDS - -:NoValueStandard -rem Treat the first definition differently - -if "%response%"=="" ( - set response=-D%varname% - goto :DefinitionLoop -) - -set response=%response% -D%varname% -goto :DefinitionLoop - -:NoValueZDS -rem Treat the first definition differently - -if "%response%"=="" ( - set response=-define:%varname% - goto :DefinitionLoop -) - -set response=%response% -define:%varname% -goto :DefinitionLoop - -rem Get value following the variable name - -:GetValue -set varvalue=%1 -shift - -rem Handle the output using the selected format - -if "%fmt%"=="zds" goto :ValueZDS - -:ValueStandard -rem Treat the first definition differently - -if "%response%"=="" ( - set response=-D%varname%=%varvalue% - goto :DefinitionLoop -) - -set response=%response% -D%varname%=%varvalue% -goto :DefinitionLoop - -:ValueZds -rem Treat the first definition differently - -if "%response%"=="" ( - set response=-define:%varname%=%varvalue% - goto :DefinitionLoop -) - -set response=%response% -define:%varname%=%varvalue% -goto :DefinitionLoop - -:Done -echo %response% -goto :End - -:ShowUsage -echo %progname% is a tool for flexible generation of command line pre-processor -echo definitions arguments for a variety of different ccpaths in a variety of -echo compilation environments" -echo USAGE:%progname% [-h] ^ ^[=^] [^[=^] [^[=^] ...]] -echo Where:" -echo ^ -echo The full path to your ccpath -echo ^ ^ ^ ... -echo A list of pre-preprocesser variable names to be defined. -echo [=^] [=^] [=^] ... -echo optional values to be assigned to each pre-processor variable. -echo If not supplied, the variable will be defined with no explicit value. -echo -h -echo Show this text and exit - -:End diff --git a/tools/flash_writer.py b/tools/flash_writer.py deleted file mode 100755 index 80d13e07b7..0000000000 --- a/tools/flash_writer.py +++ /dev/null @@ -1,669 +0,0 @@ -#!/usr/bin/env python3 -# tools/flash_writer.py - -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -import argparse -import errno -import os -import re -import subprocess -import sys -import telnetlib -import time - -import xmodem - -import_serial_module = True - -# When SDK release, please set SDK_RELEASE as True. -SDK_RELEASE = False - -if SDK_RELEASE: - PRINT_RAW_COMMAND = False - REBOOT_AT_END = True -else: - PRINT_RAW_COMMAND = True - REBOOT_AT_END = True - -try: - import serial -except ImportError: - import_serial_module = False - -# supported environment various -# CXD56_PORT -# CXD56_TELNETSRV_PORT -# CXD56_TELNETSRV_IP - -PROTOCOL_SERIAL = 0 -PROTOCOL_TELNET = 1 - -MAX_DOT_COUNT = 70 - - -# configure parameters and default value -class ConfigArgs: - PROTOCOL_TYPE = None - SERIAL_PORT = "COM1" - SERVER_PORT = 4569 - SERVER_IP = "localhost" - EOL = bytes([10]) - WAIT_RESET = True - AUTO_RESET = False - DTR_RESET = False - XMODEM_BAUD = 0 - NO_SET_BOOTABLE = False - PACKAGE_NAME = [] - FILE_NAME = [] - ERASE_NAME = [] - PKGSYS_NAME = [] - PKGAPP_NAME = [] - PKGUPD_NAME = [] - - -ROM_MSG = [b"Welcome to nash"] -XMDM_MSG = "Waiting for XMODEM (CRC or 1K) transfer. Ctrl-X to cancel." - - -class ConfigArgsLoader: - def __init__(self): - self.parser = argparse.ArgumentParser( - formatter_class=argparse.RawTextHelpFormatter - ) - self.parser.add_argument( - "package_name", help="the name of the package to install", nargs="*" - ) - self.parser.add_argument( - "-f", "--file", dest="file_name", help="save file", action="append" - ) - self.parser.add_argument( - "-e", "--erase", dest="erase_name", help="erase file", action="append" - ) - - self.parser.add_argument( - "-S", - "--sys", - dest="pkgsys_name", - help="the name of the system package to install", - action="append", - ) - self.parser.add_argument( - "-A", - "--app", - dest="pkgapp_name", - help="the name of the application package to install", - action="append", - ) - self.parser.add_argument( - "-U", - "--upd", - dest="pkgupd_name", - help="the name of the updater package to install", - action="append", - ) - - self.parser.add_argument( - "-a", - "--auto-reset", - dest="auto_reset", - action="store_true", - default=None, - help="try to auto reset develop board if possible", - ) - self.parser.add_argument( - "-d", - "--dtr-reset", - dest="dtr_reset", - action="store_true", - default=None, - help="try to auto reset develop board if possible", - ) - self.parser.add_argument( - "-n", - "--no-set-bootable", - dest="no_set_bootable", - action="store_true", - default=None, - help="not to set bootable", - ) - - group = self.parser.add_argument_group() - group.add_argument( - "-i", - "--server-ip", - dest="server_ip", - help="the ip address connected to the telnet server", - ) - group.add_argument( - "-p", - "--server-port", - dest="server_port", - type=int, - help="the port connected to the telnet server", - ) - - group = self.parser.add_argument_group() - group.add_argument( - "-c", "--serial-port", dest="serial_port", help="the serial port" - ) - group.add_argument( - "-b", - "--xmodem-baudrate", - dest="xmodem_baud", - help="Use the faster baudrate in xmodem", - ) - - mutually_group = self.parser.add_mutually_exclusive_group() - mutually_group.add_argument( - "-t", - "--telnet-protocol", - dest="telnet_protocol", - action="store_true", - default=None, - help="use the telnet protocol for binary transmission", - ) - mutually_group.add_argument( - "-s", - "--serial-protocol", - dest="serial_protocol", - action="store_true", - default=None, - help="use the serial port for binary transmission, default options", - ) - - mutually_group2 = self.parser.add_mutually_exclusive_group() - mutually_group2.add_argument( - "-F", - "--force-wait-reset", - dest="wait_reset", - action="store_true", - default=None, - help="force wait for pressing RESET button", - ) - mutually_group2.add_argument( - "-N", - "--no-wait-reset", - dest="wait_reset", - action="store_false", - default=None, - help="if possible, skip to wait for pressing RESET button", - ) - - def update_config(self): - args = self.parser.parse_args() - - ConfigArgs.PACKAGE_NAME = args.package_name - ConfigArgs.FILE_NAME = args.file_name - ConfigArgs.ERASE_NAME = args.erase_name - ConfigArgs.PKGSYS_NAME = args.pkgsys_name - ConfigArgs.PKGAPP_NAME = args.pkgapp_name - ConfigArgs.PKGUPD_NAME = args.pkgupd_name - - # Get serial port or telnet server ip etc - if args.serial_protocol is True: - ConfigArgs.PROTOCOL_TYPE = PROTOCOL_SERIAL - elif args.telnet_protocol is True: - ConfigArgs.PROTOCOL_TYPE = PROTOCOL_TELNET - - if ConfigArgs.PROTOCOL_TYPE is None: - proto = os.environ.get("CXD56_PROTOCOL") - if proto is not None: - if "s" in proto: - ConfigArgs.PROTOCOL_TYPE = PROTOCOL_SERIAL - elif "t" in proto: - ConfigArgs.PROTOCOL_TYPE = PROTOCOL_TELNET - - if ConfigArgs.PROTOCOL_TYPE is None: - ConfigArgs.PROTOCOL_TYPE = PROTOCOL_SERIAL - - if ConfigArgs.PROTOCOL_TYPE == PROTOCOL_SERIAL: - if args.serial_port is not None: - ConfigArgs.SERIAL_PORT = args.serial_port - else: - # Get serial port from the environment - port = os.environ.get("CXD56_PORT") - if port is not None: - ConfigArgs.SERIAL_PORT = port - else: - print("CXD56_PORT is not set, Use " + ConfigArgs.SERIAL_PORT + ".") - else: - ConfigArgs.PROTOCOL_TYPE = PROTOCOL_TELNET - if args.server_port is not None: - ConfigArgs.SERVER_PORT = args.server_port - else: - port = os.environ.get("CXD56_TELNETSRV_PORT") - if port is not None: - ConfigArgs.SERVER_PORT = port - else: - print( - "CXD56_TELNETSRV_PORT is not set, Use " - + str(ConfigArgs.SERVER_PORT) - + "." - ) - if args.server_ip is not None: - ConfigArgs.SERVER_IP = args.server_ip - else: - ip = os.environ.get("CXD56_TELNETSRV_IP") - if ip is not None: - ConfigArgs.SERVER_IP = ip - else: - print( - "CXD56_TELNETSRV_IP is not set, Use " - + ConfigArgs.SERVER_IP - + "." - ) - - if args.xmodem_baud is not None: - ConfigArgs.XMODEM_BAUD = args.xmodem_baud - - if args.auto_reset is not None: - ConfigArgs.AUTO_RESET = args.auto_reset - - if args.dtr_reset is not None: - ConfigArgs.DTR_RESET = args.dtr_reset - - if args.no_set_bootable is not None: - ConfigArgs.NO_SET_BOOTABLE = args.no_set_bootable - - if args.wait_reset is not None: - ConfigArgs.WAIT_RESET = args.wait_reset - - -class TelnetDev: - def __init__(self): - srv_ipaddr = ConfigArgs.SERVER_IP - srv_port = ConfigArgs.SERVER_PORT - self.recvbuf = b"" - try: - self.telnet = telnetlib.Telnet(host=srv_ipaddr, port=srv_port, timeout=10) - # There is a ack to be sent after connecting to the telnet server. - self.telnet.write(b"\xff") - except Exception as e: - print("Cannot connect to the server %s:%d" % (srv_ipaddr, srv_port)) - sys.exit(e.args[0]) - - def readline(self, size=None): - res = b"" - ch = b"" - while ch != ConfigArgs.EOL: - ch = self.getc_raw(1, timeout=0.1) - if ch == b"": - return res - res += ch - return res - - def getc_raw(self, size, timeout=1): - res = b"" - tm = time.monotonic() - while size > 0: - while self.recvbuf == b"": - self.recvbuf = self.telnet.read_eager() - if self.recvbuf == b"": - if (time.monotonic() - tm) > timeout: - return res - time.sleep(0.1) - res += self.recvbuf[0:1] - self.recvbuf = self.recvbuf[1:] - size -= 1 - return res - - def write(self, buffer): - self.telnet.write(buffer) - - def discard_inputs(self, timeout=1.0): - while True: - ch = self.getc_raw(1, timeout=timeout) - if ch == b"": - break - - def getc(self, size, timeout=1): - c = self.getc_raw(size, timeout) - return c - - def putc(self, buffer, timeout=1): - self.telnet.write(buffer) - self.show_progress(len(buffer)) - - def reboot(self): - # no-op - pass - - def set_file_size(self, filesize): - self.bytes_transferred = 0 - self.filesize = filesize - self.count = 0 - - def show_progress(self, sendsize): - if PRINT_RAW_COMMAND: - if self.count < MAX_DOT_COUNT: - self.bytes_transferred = self.bytes_transferred + sendsize - cur_count = int(self.bytes_transferred * MAX_DOT_COUNT / self.filesize) - if MAX_DOT_COUNT < cur_count: - cur_count = MAX_DOT_COUNT - for idx in range(cur_count - self.count): - print("#", end="", flush=True) - self.count = cur_count - if self.count == MAX_DOT_COUNT: - print("\n") - - -class SerialDev: - def __init__(self): - if import_serial_module is False: - print("Cannot import serial module, maybe it's not install yet.") - print("\n", end="") - print("Please install python-setuptool by Cygwin installer.") - print("After that use easy_intall command to install serial module") - print(" $ cd tool/") - print(" $ python3 -m easy_install pyserial-2.7.tar.gz") - quit() - else: - port = ConfigArgs.SERIAL_PORT - try: - self.serial = serial.Serial( - port, - baudrate=115200, - parity=serial.PARITY_NONE, - stopbits=serial.STOPBITS_ONE, - bytesize=serial.EIGHTBITS, - timeout=0.1, - ) - except Exception as e: - print("Cannot open port : " + port) - sys.exit(e.args[0]) - - def readline(self, size=None): - return self.serial.readline(size) - - def write(self, buffer): - self.serial.write(buffer) - self.serial.flush() - - def discard_inputs(self, timeout=1.0): - time.sleep(timeout) - self.serial.flushInput() - - def getc(self, size, timeout=1): - self.serial.timeout = timeout - c = self.serial.read(size) - self.serial.timeout = 0.1 - return c - - def putc(self, buffer, timeout=1): - self.serial.timeout = timeout - self.serial.write(buffer) - self.serial.flush() - self.serial.timeout = 0.1 - self.show_progress(len(buffer)) - - # Note: windows platform dependent code - def putc_win(self, buffer, timeout=1): - self.serial.write(buffer) - self.show_progress(len(buffer)) - while True: - if self.serial.out_waiting == 0: - break - - def setBaudrate(self, baudrate): - # self.serial.setBaudrate(baudrate) - self.serial.baudrate = baudrate - - def reboot(self): - # Target Reset by DTR - self.serial.setDTR(False) - self.serial.setDTR(True) - self.serial.setDTR(False) - - def set_file_size(self, filesize): - self.bytes_transferred = 0 - self.filesize = filesize - self.count = 0 - - def show_progress(self, sendsize): - if PRINT_RAW_COMMAND: - if self.count < MAX_DOT_COUNT: - self.bytes_transferred = self.bytes_transferred + sendsize - cur_count = int(self.bytes_transferred * MAX_DOT_COUNT / self.filesize) - if MAX_DOT_COUNT < cur_count: - cur_count = MAX_DOT_COUNT - for idx in range(cur_count - self.count): - print("#", end="") - sys.stdout.flush() - self.count = cur_count - if self.count == MAX_DOT_COUNT: - print("\n") - - -class FlashWriter: - def __init__(self, protocol_sel=PROTOCOL_SERIAL): - if protocol_sel == PROTOCOL_TELNET: - self.serial = TelnetDev() - else: - self.serial = SerialDev() - - def cancel_autoboot(self): - boot_msg = "" - self.serial.reboot() # Target reboot before send 'r' - while boot_msg == "": - rx = self.serial.readline().strip() - self.serial.write(b"r") # Send "r" key to avoid auto boot - for msg in ROM_MSG: - if msg in rx: - boot_msg = msg - break - while True: - rx = self.serial.readline().decode(errors="replace").strip() - if "updater" in rx: - # Workaround : Sometime first character is dropped. - # Send line feed as air shot before actual command. - self.serial.write(b"\n") # Send line feed - self.serial.discard_inputs() # Clear input buffer to sync - return boot_msg.decode(errors="ignore") - - def recv(self): - rx = self.serial.readline() - if PRINT_RAW_COMMAND: - serial_line = rx.decode(errors="replace") - if serial_line.strip() != "" and not serial_line.startswith(XMDM_MSG): - print(serial_line, end="") - return rx - - def wait(self, string): - while True: - rx = self.recv() - if string.encode() in rx: - time.sleep(0.1) - break - - def wait_for_prompt(self): - prompt_pat = re.compile(b"updater") - while True: - rx = self.recv() - if prompt_pat.search(rx): - time.sleep(0.1) - break - - def send(self, string): - self.serial.write(str(string).encode() + b"\n") - rx = self.serial.readline() - if PRINT_RAW_COMMAND: - print(rx.decode(errors="replace"), end="") - - def read_output(self, prompt_text): - output = [] - while True: - rx = self.serial.readline() - if prompt_text.encode() in rx: - time.sleep(0.1) - break - if rx != "": - output.append(rx.decode(errors="ignore").rstrip()) - return output - - def install_files(self, files, command): - if ConfigArgs.XMODEM_BAUD: - command += " -b " + ConfigArgs.XMODEM_BAUD - if os.name == "nt": - modem = xmodem.XMODEM(self.serial.getc, self.serial.putc_win, "xmodem1k") - else: - modem = xmodem.XMODEM(self.serial.getc, self.serial.putc, "xmodem1k") - for file in files: - with open(file, "rb") as bin: - self.send(command) - print("Install " + file) - self.wait(XMDM_MSG) - print( - "|0%" - + "-" * (int(MAX_DOT_COUNT / 2) - 6) - + "50%" - + "-" * (MAX_DOT_COUNT - int(MAX_DOT_COUNT / 2) - 5) - + "100%|" - ) - if ConfigArgs.XMODEM_BAUD: - self.serial.setBaudrate(ConfigArgs.XMODEM_BAUD) - self.serial.discard_inputs() # Clear input buffer to sync - self.serial.set_file_size(os.path.getsize(file)) - modem.send(bin) - if ConfigArgs.XMODEM_BAUD: - self.serial.setBaudrate(115200) - self.wait_for_prompt() - - def save_files(self, files): - if ConfigArgs.XMODEM_BAUD: - command = "save_file -b " + ConfigArgs.XMODEM_BAUD + " -x " - else: - command = "save_file -x " - if os.name == "nt": - modem = xmodem.XMODEM(self.serial.getc, self.serial.putc_win, "xmodem1k") - else: - modem = xmodem.XMODEM(self.serial.getc, self.serial.putc, "xmodem1k") - for file in files: - with open(file, "rb") as bin: - self.send(command + os.path.basename(file)) - print("Save " + file) - self.wait(XMDM_MSG) - if ConfigArgs.XMODEM_BAUD: - self.serial.setBaudrate(ConfigArgs.XMODEM_BAUD) - self.serial.discard_inputs() # Clear input buffer to sync - self.serial.set_file_size(os.path.getsize(file)) - modem.send(bin) - if ConfigArgs.XMODEM_BAUD: - self.serial.setBaudrate(115200) - self.wait_for_prompt() - self.send("chmod d+rw " + os.path.basename(file)) - self.wait_for_prompt() - - def delete_files(self, files): - for file in files: - self.delete_binary(file) - - def delete_binary(self, bin_name): - self.send("rm " + bin_name) - self.wait_for_prompt() - - -def main(): - try: - config_loader = ConfigArgsLoader() - config_loader.update_config() - except Exception: - return errno.EINVAL - - # Wait to reset the board - writer = FlashWriter(ConfigArgs.PROTOCOL_TYPE) - - do_wait_reset = True - if ConfigArgs.AUTO_RESET: - if subprocess.call("cd " + sys.path[0] + "; ./reset_board.sh", shell=True) == 0: - print("auto reset board success!!") - do_wait_reset = False - bootrom_msg = writer.cancel_autoboot() - - if ConfigArgs.DTR_RESET: - do_wait_reset = False - bootrom_msg = writer.cancel_autoboot() - - if ConfigArgs.WAIT_RESET is False and do_wait_reset is True: - rx = writer.recv() - time.sleep(1) - for i in range(3): - writer.send("") - rx = writer.recv() - if "updater".encode() in rx: - # No need to wait for reset - do_wait_reset = False - break - time.sleep(1) - - if do_wait_reset: - # Wait to reset the board - print("Please press RESET button on target board") - sys.stdout.flush() - bootrom_msg = writer.cancel_autoboot() # noqa: F841 unused variable - - # Remove files - if ConfigArgs.ERASE_NAME: - print(">>> Remove existing files ...") - writer.delete_files(ConfigArgs.ERASE_NAME) - - # Install files - if ( - ConfigArgs.PACKAGE_NAME - or ConfigArgs.PKGSYS_NAME - or ConfigArgs.PKGAPP_NAME - or ConfigArgs.PKGUPD_NAME - ): - print(">>> Install files ...") - if ConfigArgs.PACKAGE_NAME: - writer.install_files(ConfigArgs.PACKAGE_NAME, "install") - if ConfigArgs.PKGSYS_NAME: - writer.install_files(ConfigArgs.PKGSYS_NAME, "install") - if ConfigArgs.PKGAPP_NAME: - writer.install_files(ConfigArgs.PKGAPP_NAME, "install") - if ConfigArgs.PKGUPD_NAME: - writer.install_files(ConfigArgs.PKGUPD_NAME, "install -k updater.key") - - # Save files - if ConfigArgs.FILE_NAME: - print(">>> Save files ...") - writer.save_files(ConfigArgs.FILE_NAME) - - # Set auto boot - if not ConfigArgs.NO_SET_BOOTABLE: - print(">>> Save Configuration to FlashROM ...") - writer.send("set bootable M0P") - writer.wait_for_prompt() - - # Sync all cached data to flash - writer.send("sync") - writer.wait_for_prompt() - - if REBOOT_AT_END: - print("Restarting the board ...") - writer.send("reboot") - - return 0 - - -if __name__ == "__main__": - try: - sys.exit(main()) - except KeyboardInterrupt: - print("Canceled by keyboard interrupt.") - pass diff --git a/tools/ide_exporter.py b/tools/ide_exporter.py deleted file mode 100755 index 155eae8a72..0000000000 --- a/tools/ide_exporter.py +++ /dev/null @@ -1,1076 +0,0 @@ -#!/usr/bin/env python3 -############################################################################ -# tools/ide_exporter.py -# -# SPDX-License-Identifier: BSD-3-Clause -# -# -# Copyright (C) 2016 Kha Vo. All rights reserved. -# Author: Kha Vo -# -# Based on convert_make2file_list.py and add_source_in_iar.py -# Author: avyhovanec@yahoo.com -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -import argparse -import os -import re -import subprocess -import sys -from copy import deepcopy - -from lxml import etree as ET - -HELP = """ -ide_exporter.pyis a tool for generation nuttx iar/keil workspace -usage: ide_exporter.py [-h] [-v] [-o OUT_DIR] [-d] - build_log {iar,uvision_gcc,uvision_armcc} template_dir - -positional arguments: - build_log Log file from make V=1 - {iar,uvision_gcc,uvision_armcc} - The target IDE: iar, uvision_gcc, (uvision_armcc is - experimental) - template_dir Directory that contains IDEs template projects - template_nuttx.eww : iar template workspace - template_nuttx_main.ewp : iar template project - template_nuttx_lib.ewp : iar library project - or - template_nuttx.uvmpw : uVision template workspace - template_nuttx_main.uvproj : uVision template project - template_nuttx_lib.uvproj : uVision library project - -optional arguments: - -h, --help show this help message and exit - -v, --version show program's version number and exit - -o OUT_DIR, --output OUT_DIR - Output directory - -d, --dump Dump project structure tree -""" - -IAR = "iar" -UVISION_GCC = "uvision_gcc" -UVISION_ARMCC = "uvision_armcc" - -COMPILE_PREFIX_LIST = ("CC: ", "AS: ", "CXX:") -LIB_PREFIX_LIST = "AR: " -LINK_PREFIX_LIST = "LD: " -MAKE_ENTER_DIR = "Entering directory" -PREFIX_LEN = 4 - -IAR_EXT_REMAP = {r"gnu/(\w+)\.S$": r"iar/\g<1>.S"} -ARMCC_EXT_REMAP = {r"gnu/(\w+)\.S$": r"armcc/\g<1>.S", r"(\w+)\.a$": r"\g<1>.lib"} -UVISION_GCC_EXT_REMAP = {} - -# file ext to FileTye in uVision project -UVISION_FILE_TYPE_MAP = {".c": "1", ".S": "1", ".cxx": "8", ".lib": "4", ".a": "4"} - -# tags convention: tag[0] = root_tags, create if doesn't exist -# tag[1] = (sub_tag,) tag without text, create new -# tag[2] = (leaf_tag,) with text, create new -IAR_PRJ_SETTINGS = { - "group_tags": ("", ("group",), ("name",)), - "file_tags": ("", ("file",), ("name",)), - "rel_base": "$PROJ_DIR$/", - "cleared_nodes": ( - "group", - "file", - ), - "include_pnodes": (".//*[name='CCIncludePath2']", ".//*[name='AUserIncludes']"), - "include_tag": "state", - "output_path": {"exe": "Obj", "obj": "Obj", "lst": "Lst"}, - "ext_remap": IAR_EXT_REMAP, -} - -IAR_WSP_SETTINGS = { - "group_tags": ("",), - "file_tags": ("", ("project",), ("path",)), - "rel_base": "$WS_DIR$/", - "cleared_nodes": ("project",), -} - - -UVISION_ARMCC_PRJ_SETTINGS = { - "root_group": "", - "group_tags": (".//Targets/Target/Groups", ("Group",), ("GroupName",)), - "file_tags": ( - "Files", - ("File",), - ( - "FileName", - "FileType", - "FilePath", - ), - ), - "rel_base": "", - "cleared_nodes": (".//Group",), - "include_pnodes": ".//VariousControls/IncludePath", - "output_path": {"exe": "Obj", "obj": "Obj", "lst": "Lst"}, - "ext_remap": ARMCC_EXT_REMAP, - "uv_file_type": UVISION_FILE_TYPE_MAP, -} - -UVISION_GCC_PRJ_SETTINGS = { - "root_group": "", - "group_tags": (".//Targets/Target/Groups", ("Group",), ("GroupName",)), - "file_tags": ( - "Files", - ("File",), - ( - "FileName", - "FileType", - "FilePath", - ), - ), - "rel_base": "", - "cleared_nodes": (".//Group",), - "include_pnodes": ".//VariousControls/IncludePath", - "saved_tags": (".//FileOption",), - "output_path": {"exe": "Obj", "obj": "Obj", "lst": "Lst"}, - "ext_remap": UVISION_GCC_EXT_REMAP, - "uv_file_type": UVISION_FILE_TYPE_MAP, - "c_misc": (".//Carm", "-fno-builtin -Wall -Wstrict-prototypes -Wshadow -Wundef -g"), - "cxx_misc": ( - ".//Carm", - "-fno-builtin -fno-exceptions -fcheck-new -fno-rtti -Wall -Wshadow -Wundef -g", - ), - "ld_misc": (".//LDarm", "--entry=__start -lgcc"), - "cxx_def": (".//Carm", ""), -} - -UVISION_WSP_SETTINGS = { - "group_tags": ("",), - "file_tags": ("", ("project",), ("PathAndName",)), - "rel_base": "", - "cleared_nodes": ("project",), -} - - -LIB_EXTS = (".a", ".lib") -ASM_EXTS = (".s", ".S") - - -def get_common_dir(dir_list): - """Get common parent directory of a given directory list""" - com_dir = dir_list[0] - found = False - while not found: - found = True - com_dir = os.path.split(com_dir)[0] - for directory in dir_list: - if com_dir not in directory: - found = False - break - - if found: - return com_dir - else: - return "/" # return root - - -class SourceInfo(object): - """Source file information - - Attributes: - src: source file - include: List of including dir in compiled command - flags: other compiled flags - """ - - def __init__(self, src, include=None, flags=""): - self.include = [] - if include is not None: - self.include = include - self.src = src - self.flags = flags - self.include = include - - @staticmethod - def get_common_src_dir(sinfo_list): - """Get Common directory from list of source code""" - source_list = [info.src for info in sinfo_list] - com_dir = get_common_dir(source_list) - return com_dir - - @staticmethod - def get_including_set(sinfo_list): - """Get including set from list of source code""" - include_set = set() - for sinfo in sinfo_list: - for inc in sinfo.include: - if inc != "": - include_set.add(inc) - return include_set - - -class IdeProject(object): - """Base IDE project class. - - make_src_nodes(self, source, group = None, parent_node = None): - make_include(self, sources, parent_node = None): - make_output_dir(self, target): - These functions need to override - - Attributes: - root: root of its etree - ewp_ET: Its etree - settings: specific IDE setting - proj_dir: base directory, files path are often relative from this - rel_base: base directory symbol, - """ - - def __init__(self, proj, settings, out_dir=None, use_gcc=False): - self.proj_dir = os.path.split(proj)[0] - if (out_dir is not None) and os.path.exists(out_dir): - self.proj_dir = out_dir - - self.root = None - self.ewp_ET = None - self.settings = {} - self.rel_base = "" - if settings is not None: - self.settings = settings - self.use_gcc = use_gcc - - self.rel_base = self.settings.get("rel_base", "") - self.saved_nodes = {} # some inside nodes need to save before clear all sources - try: - # Read template project xml structure - parser = ET.XMLParser( - remove_blank_text=True - ) # use parser to make pretty print works - self.ewp_ET = ET.parse(proj, parser) - self.root = self.ewp_ET.getroot() - - # Save some template nodes before clear - for tag in self.settings.get("saved_tags", []): - n = self.root.find(tag) - self.saved_nodes[tag] = deepcopy(n) - - self.clear_src_nodes() # Clear all source node in template file - except Exception as e: - print("ERR: {0}".format(str(e))) - raise Exception("Can't init IdeProject object") - - def get_relpath(self, dest): - """Get relative path from its base directory""" - return self.rel_base + os.path.relpath(dest, self.proj_dir) - - def get_output_dir(self): - """""" - out_paths = self.settings.get("output_path", {}) - return out_paths.get("exe", "") - - def get_obj_dir(self): - """""" - out_paths = self.settings.get("output_path", {}) - return out_paths.get("obj", "") - - def get_lst_dir(self): - """""" - out_paths = self.settings.get("output_path", {}) - return out_paths.get("lst", "") - - def write(self, ofile): - """Write etree to file""" - self.ewp_ET.write( - ofile, pretty_print=True, xml_declaration=True, encoding="UTF-8" - ) - - def remove_nodes(self, element, remove_list): - """Delete nodes in list from the xlm tree - - Args: - element: root node of etree - remove_list: tuple of all node that need to remove - - Returns: - Remove nodes from xlm tree - Raises: - None - """ - try: - for node in remove_list: - p = element.find(node) - while p is not None: - c = p.getparent() - c.remove(p) - p = element.find(node) - except Exception as e: - print(str(e)) - - def clear_src_nodes(self): - """Remove all predefined node in settings from its etree""" - self.remove_nodes(self.root, self.settings.get("cleared_nodes", [])) - - def make_nodes(self, parent_node, tags, *args): - """Create node(s) by using tag convention - Return most inner parent nodes - """ - if parent_node is None: - parent_node = self.root - - head = None - root = None - # print "Create tags: ", tags - if len(tags) == 3: - - # Check root, create if not exist - root_tag = tags[0] - if root_tag != "": - root = parent_node.find(root_tag) - if root is None: - root = ET.SubElement(parent_node, root_tag.split("/")[-1]) - else: - root = parent_node - - p_node = root - - # Create middle sub nodes - sub_tags = tags[1] - if len(sub_tags) > 0: - head = ET.Element(sub_tags[0]) - p_node = head - for tag in sub_tags[1:]: - p_node = ET.SubElement(p_node, tag) - - # Create leaf node with input text - for src_tag, text in zip(tags[2], args): - e = ET.SubElement(p_node, src_tag) - e.text = text - - if head is not None: - root.append(head) - else: - raise Exception("Wrong tag convention") - return p_node - - def make_group(self, parent_node, *args): - """Create group of source/lib tags - Tags info are get from settings - Args: - parent_node : - *args : nodes' text - return: - Return group node - """ - tags = self.settings.get("group_tags", []) - return self.make_nodes(parent_node, tags, *args) - - def make_file(self, parent_node, *args): - """Create group of source/lib tags - Tags info are get from settings - """ - tags = self.settings.get("file_tags", []) - return self.make_nodes(parent_node, tags, *args) - - def make_src_nodes(self, source, group=None, parent_node=None): - """Create xlm nodes for list of source file - - Args: - sources: list of SourceInfo - group : group name that contains all of these source - parent_node : etree fake root node - Returns: - - """ - pass - - def make_include(self, sources, parent_node=None): - """Create including nodes from source info for project - - Args: - sources: list of SourceInfo - parent_node: etree fake root node - Returns: - - """ - pass - - def make_output_dir(self, target): - """Update output directory setting for project - - Args: - target: project output target name - Returns: - - """ - pass - - def add_misc(self, mtype, misc=""): - pass - - def add_define(self, dtype, symbols): - pass - - def set_link_libs(self, lib_dir, libs): - pass - - def set_mcu(self, mcu): - pass - - def set_core(self, core): - pass - - @staticmethod - def factory(objtype, xml_file, out_dir=None): - """Factory to create obj by derived type""" - return objtype(xml_file, out_dir=out_dir) - - -class IARWorkspace(IdeProject): - """IAR workspace class. - - Depend on its settings only. - Use default add node from base to add sub library project - - Attributes: - """ - - def __init__(self, proj, out_dir=None): - super(IARWorkspace, self).__init__(proj, IAR_WSP_SETTINGS, out_dir) - - -class IARProject(IdeProject): - """IAR project class. - - Add some specific logics to create source, include and output setting - - """ - - def __init__(self, proj, settings=IAR_PRJ_SETTINGS, out_dir=None): - super(IARProject, self).__init__(proj, settings, out_dir) - - def make_include(self, sources, parent_node=None): - """Create including nodes from source info for project - IAR sample including nodes - - Args: - sources: list of SourceInfo - parent_node: etree fake root node - Returns: - - """ - if parent_node is None: - parent_node = self.root - - include_set = SourceInfo.get_including_set(sources) - - # Adding dir to user include node, tags is from setting - include_nodes = self.settings["include_pnodes"] - for path in include_nodes: - for p in parent_node.iterfind(path): # ex: ".//*[name='CCIncludePath2']" - # print(n.tag, n.text) - for inc in include_set: - state = ET.SubElement(p, self.settings["include_tag"]) - - # In cygwin, we need to convert windows path to relative - if sys.platform == "cygwin": - inc = subprocess.check_output(["cygpath", "-u", inc]) - inc = inc[:-1] # remove /n - - state.text = self.get_relpath(inc) - - def make_src_nodes(self, sources, group=None, parent_node=None): - """Create nodes for list of source file - - Args: - sources: list of SourceInfo - group: group name that contains all of these source - parent_node: etree fake root node - Returns: - - """ - if parent_node is None: - parent_node = self.root - - source_list = [info.src for info in sources] - - com_dir = get_common_dir(source_list) - com_dir_name = os.path.split(com_dir)[1] - - if group is None: - group = com_dir_name - - # Create group node to contain all source files - group_node = self.make_group(parent_node, group) - - # Add source files to group as sub node - for src in source_list: - fname = self.get_relpath(src) # make ref path from $PROJ_DIR$ to file - - ext_remap = self.settings.get("ext_remap", {}) - for ext, replacement in ext_remap.items(): - fname = re.sub(ext, replacement, fname) - - self.make_file(group_node, fname) - - def make_output_dir(self, target): - """Update output directory setting for IAR project - - Args: - target: project's target name - Returns: - - """ - sub_dir = "$PROJ_FNAME$" - exe_path = self.get_output_dir() - lst_path = self.get_output_dir() - obj_path = self.get_output_dir() - dirs = (exe_path, obj_path, lst_path) - tags = ('.//*[name="ExePath"]', './/*[name="ObjPath"]', './/*[name="ListPath"]') - - for path, tag in zip(dirs, tags): - if path != "": - p = self.root.findall(tag) - for n in p: - self.remove_nodes(n, ("state",)) - e = ET.SubElement(n, "state") - e.text = sub_dir + "/" + path - - -class UVisionWorkspace(IdeProject): - """uVision workspace class. - - Depend on its settings only. - Use default add node from base to add sub library project - - Attributes: - """ - - def __init__(self, proj, out_dir=None): - super(UVisionWorkspace, self).__init__(proj, UVISION_WSP_SETTINGS, out_dir) - - -class UVisionProject(IdeProject): - """uVision project class. - - Add some specific logics to create source, include and output setting - - """ - - def __init__( - self, proj, settings=UVISION_ARMCC_PRJ_SETTINGS, out_dir=None, use_gcc=False - ): - super(UVisionProject, self).__init__(proj, settings, out_dir, use_gcc) - self.use_gcc = use_gcc - - def make_include(self, sources, parent_node=None): - """Create including nodes from source info for uVision project - uVision sample including nodes: - - ../../../../apps/examples/hello;../../../../apps/examples/nsh> - - Args: - sources: list of SourceInfo - parent_node: etree fake root node - Returns: - - """ - if parent_node is None: - parent_node = self.root - - include_set = SourceInfo.get_including_set(sources) - - incs = [] - for inc in include_set: - # In cygwin, we need to convert windows path to relative - if sys.platform == "cygwin": - inc = subprocess.check_output(["cygpath", "-u", inc]) - inc = inc[:-1] # remove /n - - inc = self.get_relpath(inc) - incs.append(inc) - - inc_text = ";".join(incs) - - # Adding dir to user include node (both ASM & CC) - for n in parent_node.iterfind(self.settings["include_pnodes"]): - n.text = inc_text - - def make_src_nodes(self, sources, group=None, parent_node=None): - """Create nodes for list of source file - Sample uVision file: - - - board - - - stm32_boot.c - 1 - ../../../arch/arm/src/board/stm32_boot.c - - - - - - Args: - sources: list of SourceInfo - group: group name that contains all of these source - parent_node: etree fake root node - Returns: - - """ - if parent_node is None: - parent_node = self.root - - source_list = [info.src for info in sources] - - com_dir = get_common_dir(source_list) - com_dir_name = os.path.split(com_dir)[1] - - if group is None: - group = com_dir_name - - # Create group node to contain all source files - group_node = self.make_group(parent_node, group) # return node - - # Add source files to group as sub node - for src in source_list: - fname = self.get_relpath(src) - ext = os.path.splitext(fname)[1] - - # get uVison FileType - uv_file_type = self.settings.get("uv_file_type", {}) - ftype = uv_file_type.get(ext, "0") - - # Translate source to new format/location if need - ext_remap = self.settings.get("ext_remap", {}) - for find, replacement in ext_remap.items(): - fname = re.sub(find, replacement, fname) - - name = os.path.split(fname)[1] - file_node = self.make_file(group_node, name, ftype, fname) - - # Make exception for .S file (treat as C source with D__ASSEMBLY__) - if (self.use_gcc) and (ext in ASM_EXTS): - asm_opt_node = self.saved_nodes.get(".//FileOption") - if asm_opt_node is not None: - file_node.append(deepcopy(asm_opt_node)) - - def make_output_dir(self, target): - """Update output directory setting for IAR project - - Args: - target: project's target name - Returns: - - """ - - exe_path = self.get_output_dir() - if exe_path != "": - p = self.root.find(".//OutputDirectory") - if p is not None: - p.text = "\\".join((".", target, exe_path, "")) - - lst_path = self.get_lst_dir() - if lst_path != "": - p = self.root.find(".//ListingPath") - if p is not None: - p.text = "\\".join((".", target, lst_path, "")) - - p = self.root.find(".//OutputName") - if p is not None: - p.text = re.sub(r"^lib(.*)$", r"\g<1>", target) # prevent liblibapps.a - - def add_misc(self, mtype, misc=""): - misc_info = self.settings.get(mtype) - if misc_info is not None: - tag, default = misc_info - if misc == "": - misc = default - n = self.root.find(tag) - if n is not None: - m = n.find(".//MiscControls") - if m is not None: - m.text = (m.text or "") + " " + misc - - def add_define(self, dtype, symbols): - def_info = self.settings.get(dtype) - if def_info is not None: - tag, default = def_info - n = self.root.find(tag) - if n is not None: - m = n.find(".//Define") - if m is not None: - m.text = (m.text or "") + " " + symbols - - def set_link_libs(self, libs, lib_dir=".\\lib"): - if self.use_gcc: - # need to add static lib in group so that linker does not throw errors - # http://eli.thegreenplace.net/2013/07/09/library-order-in-static-linking - mist_text = " -Wl,--start-group" - - for sinfo in libs: - lib = os.path.split(sinfo.src)[1] - name, ext = os.path.splitext(lib) - mist_text += " -l" + name[3:] # remove lib in 'libAAA' - - mist_text += " -Wl,--end-group" - - misc_info = self.settings.get("ld_misc") - if misc_info is not None: - tag, default = misc_info - n = self.root.find(tag) - if n is not None: - m = n.find(".//Misc") - if m is not None: - m.text += mist_text - - m = n.find(".//IncludeDir") - if m is not None: - m.text = lib_dir - - def set_mcu(self, mcu): - # TODO: - pass - - def set_core(self, core): - # TODO: - pass - - -class UVisionARMCCProject(UVisionProject): - """uVision for ARMCC project class. - - Add some specific logics to create source, include and output setting - - """ - - def __init__(self, proj, out_dir=None): - super(UVisionARMCCProject, self).__init__( - proj, UVISION_ARMCC_PRJ_SETTINGS, out_dir - ) - - -class UVisionGCCProject(UVisionProject): - """uVision for GCC project class. - - Add some specific logics to create source, include and output setting - - """ - - def __init__( - self, proj, settings=UVISION_GCC_PRJ_SETTINGS, out_dir=None, use_gcc=True - ): - super(UVisionGCCProject, self).__init__(proj, settings, out_dir, use_gcc) - - -def get_project_structure(lines): - """Get project structure from make log file. - - Loop through make log to figure the project structure - - Args: - lines: A list of line from make log file (make V=1) - - Returns: - A dict mapping library/target to its source list - - { - 'libc.a': [ - {'src':/mynuttx/nuttx/libc/string/lib_strcat.c', 'include' : ['.', 'others include', ], 'flags': ''}, - {'src':/mynuttx/nuttx/libc/string/lib_memcpy.c', 'include' : ['.', 'others include', ], 'flags': ''}, - - ], - } - Source list is in full path form - Raises: - An error occurred when can't parse lib/target name - """ - - group_dict = {} - src_list = [] - make_path = "" - src_path = "" - ar_cmd = "" - cc_cmd = "" - - for line in lines: - - _lp = line[:PREFIX_LEN] - - if _lp in COMPILE_PREFIX_LIST: - src_path = os.path.join(make_path, line[PREFIX_LEN:].strip()) - cc_cmd = line.strip() - - elif _lp in LIB_PREFIX_LIST: - ar_cmd = line.strip() - - elif _lp in LINK_PREFIX_LIST: - match = re.search(_lp + r"(\w+)", line) - if match: - target = match.group(1) - if target not in group_dict: - group_dict[target] = [] - - for src in src_list: - group_dict[target].append(src) - - elif MAKE_ENTER_DIR in line: # Get current make directory - match = re.search(r"'(.+)'\n$", line) - if match: - make_path = match.group(1) - elif cc_cmd != "": # Get include dirs and flags - incs = [make_path] - match = re.findall(r'(-I|-isystem) "(.+?)"', line) - if match: - incs += [p[1] for p in match] - - # TODO: parse and other compile flags - - src_info = SourceInfo(src_path, incs) - src_list.append(src_info) - - cc_cmd = "" - src_path = "" - elif ar_cmd != "": # put all compiled files to library source list - match = re.search(r"(\w+?\.a)", line) - if match: - lib_name = match.group(1) # get library name - if lib_name not in group_dict: - group_dict[lib_name] = [] # create empty source info list - - lib_objs = re.findall( - r"(\w+?)\.o", line - ) # Get all obj name in libs (without ext) - # print("OBJ in .a: ", lib_objs) - remain_src_list = [] - for sinfo in src_list: - obj = os.path.basename(sinfo.src) - obj = os.path.splitext(obj)[ - 0 - ] # Get the obj name (without ext) from source file name - - # print("OBJ from file: ", obj) - if obj in lib_objs: # make sure the lib include this obj - group_dict[lib_name].append(sinfo) - # print('Put' + sinfo.src + "to lib: " + lib_name) - else: - remain_src_list.append(sinfo) - # print('Remain' + sinfo.src + " not in lib: " + lib_name) - - src_list = remain_src_list - ar_cmd = "" - - else: - raise AssertionError("Can't parse lib name ", line) - return group_dict - - -def dump_project_struct(project_structure): - """Dump project structure - - Print project structure - - Args: - A dict mapping library/target to its source list - - { - 'libc.a': [ - {'src':/mynuttx/nuttx/libc/string/lib_strcat.c', 'include' : ['.', 'others include', ], 'flags': ''}, - {'src':/mynuttx/nuttx/libc/string/lib_memcpy.c', 'include' : ['.', 'others include', ], 'flags': ''}, - - ], - } - - Returns: - - Raises: - None - """ - - for lib, sinfo_list in project_structure.items(): - print(lib) - for sinfo in sinfo_list: - print("\t" + sinfo.src) - - -IAR_EXPORT = { - "main": {"t": IARProject, "file": "template_nuttx_main.ewp"}, - "lib": {"t": IARProject, "file": "template_nuttx_lib.ewp"}, - "workspace": {"t": IARWorkspace, "file": "template_nuttx.eww"}, -} - -UVISION_ARMCC_EXPORT = { - "main": {"t": UVisionProject, "file": "template_nuttx_main.uvproj"}, - "lib": {"t": UVisionProject, "file": "template_nuttx_lib.uvproj"}, - "workspace": {"t": UVisionWorkspace, "file": "template_nuttx.uvmpw"}, -} - -UVISION_GCC_EXPORT = { - "main": {"t": UVisionGCCProject, "file": "template_nuttx_main.uvproj"}, - "lib": {"t": UVisionGCCProject, "file": "template_nuttx_lib.uvproj"}, - "workspace": {"t": UVisionWorkspace, "file": "template_nuttx.uvmpw"}, -} - -IDE_CONFIG_DICT = { - IAR: IAR_EXPORT, - UVISION_GCC: UVISION_GCC_EXPORT, - UVISION_ARMCC: UVISION_ARMCC_EXPORT, -} - - -if __name__ == "__main__": - - parser = argparse.ArgumentParser(version="1.1") - - parser.add_argument( - "build_log", help="Log file from make V=1", type=argparse.FileType("rt") - ) - - parser.add_argument( - "ide", - choices=[IAR, UVISION_GCC, UVISION_ARMCC], - help="The target IDE: iar, uvision_gcc, (uvision_armcc is experimental)", - ) - - parser.add_argument( - "template_dir", help="Directory that contains IDEs template projects" - ) - - parser.add_argument( - "-o", "--output", action="store", dest="out_dir", help="Output directory" - ) - - parser.add_argument( - "-d", - "--dump", - action="store_true", - dest="dump", - default=False, - help="Dump project structure tree", - ) - - options = parser.parse_args() - - fmake_log = options.build_log - - # read log file - lines = fmake_log.readlines() - fmake_log.close() - - # get project structure - project = get_project_structure(lines) - - if options.dump: - dump_project_struct(project) - - templ_dir = options.template_dir - if not os.path.exists(templ_dir): - print(templ_dir + " does not exist") - exit(1) - - prj_dir = templ_dir - if options.out_dir is not None: - prj_dir = os.path.abspath(options.out_dir) - - try: - if not os.path.exists(prj_dir): - os.makedirs(prj_dir) - except Exception as e: - print("ERR: {0}".format(str(e))) - exit(1) - - ide_config = IDE_CONFIG_DICT[options.ide] - xml_file = os.path.join(templ_dir, ide_config["workspace"]["file"]) - ws_ext = os.path.splitext(xml_file)[1] - ws = IdeProject.factory(ide_config["workspace"]["t"], xml_file, prj_dir) - - target = {"libs": [], "sources": []} - - # Create nuttx iar library projects - for lib, group_src_list in project.items(): - lib_name, lib_ext = os.path.splitext(lib) - if len(group_src_list) < 1: - print(lib_name, group_src_list) - elif lib_ext in LIB_EXTS: - xml_file = os.path.join(templ_dir, ide_config["lib"]["file"]) - lib_prj = IdeProject.factory(ide_config["lib"]["t"], xml_file, prj_dir) - - # print lib_name, group_src_list - lib_prj.make_src_nodes(group_src_list) - lib_prj.make_include(group_src_list) - lib_prj.make_output_dir(lib_name) - if lib_name == "libxx": - lib_prj.add_misc("cxx_misc") - else: - lib_prj.add_misc("c_misc") - - # save main xml project to file - xml_ext = os.path.splitext(xml_file)[1] - prj_fname = os.path.join(prj_dir, lib_name + xml_ext) - lib_prj.write(prj_fname) - print("Exported " + prj_fname) - - # Add library project to workspace - ws.make_file(ws.root, ws.get_relpath(prj_fname)) - - # Store output library file to ref from main project later - exe_dir = lib_prj.get_output_dir() - lib_fname = os.path.join(prj_dir, lib_name, exe_dir, lib) - target["libs"].append(SourceInfo(lib_fname)) - else: - # Save name and source list for main project - target["name"] = lib - target["sources"] = group_src_list - - # Create nuttx main project - xml_file = os.path.join(templ_dir, ide_config["main"]["file"]) - main_prj = IdeProject.factory(ide_config["main"]["t"], xml_file, prj_dir) - - main_prj.make_src_nodes(target["sources"]) - main_prj.make_include(target["sources"]) - - if main_prj.use_gcc: - target["libs"].append(SourceInfo("libgcc.a")) # need add libgcc in ld - main_prj.set_link_libs(target["libs"]) - else: - main_prj.make_src_nodes(target["libs"], group="libs") - - main_prj.make_output_dir(target["name"]) - - # save main xml project to file - xml_ext = os.path.splitext(xml_file)[1] - prj_fname = os.path.join(prj_dir, target["name"] + "_main" + xml_ext) - main_prj.write(prj_fname) - print("Exported " + prj_fname) - - # Add main project to workspace - ws.make_file(ws.root, ws.get_relpath(prj_fname)) - - # Write nuttx workspace - ww_fname = os.path.join(prj_dir, "nuttx" + ws_ext) - ws.write(ww_fname) - print("Exported " + ww_fname) diff --git a/tools/incdir.bat b/tools/incdir.bat deleted file mode 100755 index b0e4da1543..0000000000 --- a/tools/incdir.bat +++ /dev/null @@ -1,147 +0,0 @@ -@echo off - -rem tools/incdir.bat -rem -rem SPDX-License-Identifier: Apache-2.0 -rem -rem Licensed to the Apache Software Foundation (ASF) under one or more -rem contributor license agreements. See the NOTICE file distributed with -rem this work for additional information regarding copyright ownership. The -rem ASF licenses this file to you under the Apache License, Version 2.0 (the -rem "License"); you may not use this file except in compliance with the -rem License. You may obtain a copy of the License at -rem -rem http://www.apache.org/licenses/LICENSE-2.0 -rem -rem Unless required by applicable law or agreed to in writing, software -rem distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -rem WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -rem License for the specific language governing permissions and limitations -rem under the License. -rem - -rem Handle command line options - -set progname=%0 -set pathtype=user - -:ArgLoop - -rem [-d] [-w] [-s] [-h]. [-w] and [-d] Ignored for compatibility with incdir.sh - -if "%1"=="-d" goto :NextArg -if "%1"=="-w" goto :NextArg -if "%1"=="-h" goto :Usage - -if "%1"=="-s" ( - set pathtype=system - goto :NextArg -) - -goto :CheckCompiler - -:NextArg -shift -goto :ArgLoop - -:CheckCompiler -if "%1"=="" ( - echo ERROR: Missing compiler name - goto :Usage -) - -set ccpath=%1 -shift - -set compiler= -for /F %%i in ("%ccpath%") do set compiler=%%~ni - -if "%1"=="" ( - echo ERROR: Missing directory paths - goto :Usage -) - -rem Check for some well known, non-GCC Windows native tools that require -rem a special output format as well as special paths - -:GetFormat -set fmt=std -if "%compiler%"=="ez8cc" goto :SetZdsFormt -if "%compiler%"=="zneocc" goto :SetZdsFormt -if "%compiler%"=="ez80cc" goto :SetZdsFormt -goto :GeneratePaths - -:SetZdsFormt -set fmt=zds - -rem Generate the compiler include path directives. - -:GeneratePaths -set response= - -:DirLoop -if "%1" == "" ( - echo %response% - goto :End -) - -if "%fmt%"=="zds" goto :GenerateZdsPath -if "%response%"=="" goto :FirstStdPath -if "%pathtype%"=="system" goto :NextStdSystemPath - -set response=%response% -I "%1" -goto :EndOfDirLoop - -:NextStdSystemPath - -set response=%response% -isystem "%1" -goto :EndOfDirLoop - -:FirstStdPath - -if "%pathtype%"=="system" goto :FirstStdSystemPath -set response=-I "%1" -goto :EndOfDirLoop - -:FirstStdSystemPath - -set response=-isystem "%1" -goto :EndOfDirLoop - -:GenerateZdsPath - -if "%response%"=="" goto :FirstZdsPath -set response=%response%;%1 -goto :EndOfDirLoop - -:FirstZdsPath - -if "%pathtype%"=="system" goto :FirstZdsSystemPath -set response=-usrinc:%1 -goto :EndOfDirLoop - -:FirstZdsSystemPath - -set response=-stdinc:%1 - -:EndOfDirLoop -shift -goto :DirLoop - -:Usage -echo %progname% is a tool for flexible generation of include path arguments for a -echo variety of different compilers in a variety of compilation environments -echo USAGE: %progname% [-w] [-d] [-s] [-h] ^ ^ [^ [^ ...]] -echo Where: -echo ^ -echo The full path to your compiler -echo ^ [^ [^ ...]] -echo A list of include directories -echo -w, -d -echo For compatibility with incdir.sh (ignored) -echo -s -echo Generate standard, system header file paths instead of normal user -echo header file paths. -echo -h -echo Shows this help text and exits. -:End diff --git a/tools/incdir.c b/tools/incdir.c deleted file mode 100644 index 7d6e1fd050..0000000000 --- a/tools/incdir.c +++ /dev/null @@ -1,520 +0,0 @@ -/**************************************************************************** - * tools/incdir.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ -#ifndef CONFIG_WINDOWS_NATIVE -#include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef HOST_CYGWIN -# include -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -enum pathtype_e -{ - USER_PATH = 0, - SYSTEM_PATH -}; - -enum os_e -{ - OS_UNKNOWN = 0, - OS_LINUX, - OS_WINDOWS, - OS_CYGWIN, - OS_MSYS, - OS_WSL, - OS_MACOS, - OS_BSD -}; - -enum compiler_e -{ - COMPILER_UNKNOWN = 0, - COMPILER_GCC, - COMPILER_CLANG, - COMPILER_MINGW, - COMPILER_SDCC, - COMPILER_ZDSII, - COMPILER_TASKING, - COMPILER_GHS -}; - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -static void show_advice(const char *progname, int exitcode) -{ - fprintf(stderr, "\nUSAGE: %s [-h] [-w] [-s] " - " [ [ ...]]\n", - progname); - fprintf(stderr, "Try '%s -h' for more information\n", progname); - - exit(exitcode); -} - -static void show_help(const char *progname, int exitcode) -{ - fprintf(stderr, "%s is a tool for flexible generation of include path " - "arguments for a\n", - progname); - fprintf(stderr, "variety of different compilers in a variety of " - "compilation environments\n"); - fprintf(stderr, "\nUSAGE: %s [-w] [-s] " - " [ [ ...]]\n", - progname); - fprintf(stderr, " %s -h\n\n", progname); - - fprintf(stderr, "Where:\n"); - fprintf(stderr, " \n"); - fprintf(stderr, " The full path to your compiler\n"); - fprintf(stderr, " [ [ ...]]\n"); - fprintf(stderr, " A list of include directories\n"); - fprintf(stderr, " -w\n"); - fprintf(stderr, " The compiler is a Windows native tool and requires " - "Windows\n"); - fprintf(stderr, " style pathnames like C:\\Program Files\n"); - fprintf(stderr, " -s\n"); - fprintf(stderr, " Generate standard, system header file paths instead " - "of normal user\n"); - fprintf(stderr, " header file paths.\n"); - fprintf(stderr, " -h\n"); - fprintf(stderr, " Shows this help text and exits.\n"); - - exit(exitcode); -} - -static enum os_e get_os(void) -{ -#ifdef CONFIG_WINDOWS_NATIVE - return OS_WINDOWS; -#else - struct utsname buf; - int ret; - - /* Get the context names */ - - ret = uname(&buf); - if (ret < 0) - { - int errcode = errno; - fprintf(stderr, "ERROR: uname failed: %s\n", strerror(errcode)); - exit(EXIT_FAILURE); - } - - if (strcmp(buf.sysname, "Linux") == 0) - { - return OS_LINUX; /* Or OS_WSL */ - } - else if (strncmp(buf.sysname, "CYGWIN", 6) == 0) - { - return OS_CYGWIN; - } - else if (strncmp(buf.sysname, "MINGW", 5) == 0) - { - return OS_CYGWIN; - } - else if (strncmp(buf.sysname, "MSYS", 4) == 0) - { - return OS_CYGWIN; - } - else if (strcmp(buf.sysname, "Darwin") == 0) - { - return OS_MACOS; - } - else if (strcmp(buf.sysname, "FreeBSD") == 0 || - strcmp(buf.sysname, "OpenBSD") == 0 || - strcmp(buf.sysname, "GNU/kFreeBSD") == 0) - { - return OS_BSD; - } - else - { - fprintf(stderr, "ERROR: Unknown operating system: %s\n", - buf.sysname); - return OS_UNKNOWN; - } -#endif -} - -static enum compiler_e get_compiler(char *ccname) -{ - /* Let's assume that all GCC compiler paths contain the string gcc or - * g++ and no non-GCC compiler paths include these substrings. - * - * If the compiler is called cc, let's assume that is GCC too. - */ - - if (strstr(ccname, "gcc") != NULL || - strstr(ccname, "g++") != NULL || - strncmp(ccname, "cc.", 3) == 0) - { - return COMPILER_GCC; - } - else if (strstr(ccname, "clang") != NULL) - { - return COMPILER_CLANG; - } - else if (strstr(ccname, "sdcc") != NULL) - { - return COMPILER_SDCC; - } - else if (strstr(ccname, "ccarm") != NULL || - strstr(ccname, "cxarm") != NULL) - { - return COMPILER_GHS; - } - else if (strstr(ccname, "mingw") != NULL) - { - return COMPILER_MINGW; - } - else if (strstr(ccname, "ez8cc") != NULL || - strstr(ccname, "zneocc") != NULL || - strstr(ccname, "ez80cc") != NULL) - { - return COMPILER_ZDSII; - } - else if (strstr(ccname, "ctc") != NULL) - { - return COMPILER_TASKING; - } - else - { - /* Unknown compiler. Assume GCC-compatible */ - - return COMPILER_GCC; - } -} - -static int my_asprintf(char **strp, const char *fmt, ...) -{ - va_list ap; - ssize_t bufsize; - char *buffer; - - /* Get the size of the buffer */ - - va_start(ap, fmt); - bufsize = vsnprintf(NULL, 0, fmt, ap); - va_end(ap); - - if (bufsize <= 0) - { - fprintf(stderr, "ERROR: vsnprintf() failed.\n"); - exit (EXIT_FAILURE); - } - - buffer = malloc(bufsize + 1); - if (buffer == NULL) - { - fprintf(stderr, "ERROR: Failed allocated vsnprintf() buffer.\n"); - exit (EXIT_FAILURE); - } - - va_start(ap, fmt); - vsnprintf(buffer, bufsize + 1, fmt, ap); - va_end(ap); - - *strp = buffer; - return bufsize; -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -int main(int argc, char **argv, char **envp) -{ -#ifdef HOST_CYGWIN - char *convpath = NULL; - bool wintool = false; -#endif - enum pathtype_e pathtype = USER_PATH; - enum os_e os; - enum compiler_e compiler; - const char *progname = argv[0]; - const char *cmdarg; - char *ccname; - char * const *dirlist; - size_t respsize = 0; - char *response = NULL; - int ndirs; - int ret; - int ch; - int i; - - /* Handle command line options */ - - while ((ch = getopt(argc, argv, "wsh")) >= 0) - { - switch (ch) - { - case 'w': -#ifdef HOST_CYGWIN - wintool = true; -#endif - break; - - case 's': - pathtype = SYSTEM_PATH; - break; - - case 'h': - show_help(progname, EXIT_SUCCESS); - } - } - - if (optind >= argc) - { - fprintf(stderr, "ERROR: Missing \n"); - show_advice(progname, EXIT_FAILURE); - } - - ccname = basename(argv[optind]); - optind++; - - if (optind >= argc) - { - fprintf(stderr, "ERROR: At least one directory must be supplied\n"); - show_advice(progname, EXIT_FAILURE); - } - - dirlist = &argv[optind]; - ndirs = argc - optind; - - /* Most compilers support CFLAG options like '-I' to add include - * file header paths. Some (like the Zilog tools), do not. This script - * makes the selection of header file paths compiler independent. - * - * Below are all known compiler names (as found in the board/ Make.defs - * files). If a new compiler is used that has some unusual syntax, then - * additional logic needs to be added to this file. - * - * NAME Syntax - * $(CROSSDEV)gcc -I -I -I ... - * sdcc -I -I -I ... - * $(ZDSBINDIR)/ez8cc.exe -usrinc:':::...` - * $(ZDSBINDIR)/zneocc.exe -usrinc:':::...` - * $(ZDSBINDIR)/ez80cc.exe -usrinc:':::...` - * - * Furthermore, just to make matters more difficult, with Windows based - * toolchains, we have to use the full windows-style paths to the header - * files. - */ - - os = get_os(); - if (os == OS_UNKNOWN) - { - fprintf(stderr, "ERROR: Operating system not recognized\n"); - show_advice(progname, EXIT_FAILURE); - } - - compiler = get_compiler(ccname); - if (compiler == COMPILER_UNKNOWN) - { - fprintf(stderr, "ERROR: Compiler not recognized.\n"); - show_advice(progname, EXIT_FAILURE); - } - - /* Select system or user header file path command line option */ - - if (compiler == COMPILER_ZDSII) - { - cmdarg = (pathtype == SYSTEM_PATH) ? "-stdinc:" : "-usrinc:"; -#ifdef HOST_CYGWIN - wintool = true; -#endif - } - else if (compiler == COMPILER_SDCC || compiler == COMPILER_TASKING || - compiler == COMPILER_GHS) - { - cmdarg = "-I"; - } - else - { - cmdarg = (pathtype == SYSTEM_PATH) ? "-isystem" : "-I"; - } - - /* Now process each directory in the directory list */ - - for (i = 0; i < ndirs; i++) - { - const char *dirname; - const char *incpath; - char *saveresp; - char *segment = NULL; - size_t segsize; - - dirname = dirlist[i]; - -#ifdef HOST_CYGWIN - /* Check if the path needs to be extended for Windows-based tools under - * Cygwin: - * - * wintool == true: The platform is Cygwin and we are using a windows - * native tool - */ - - if (os == OS_CYGWIN && wintool) - { - ssize_t bufsize; - - bufsize = cygwin_conv_path(CCP_POSIX_TO_WIN_A, dirname, NULL, 0); - convpath = malloc(bufsize); - if (convpath == NULL) - { - fprintf(stderr, "ERROR: Failed to allocate buffer.\n"); - exit(EXIT_FAILURE); - } - - cygwin_conv_path(CCP_POSIX_TO_WIN_A, dirname, convpath, - bufsize); - incpath = convpath; - } - else -#endif - { - incpath = dirname; - } - - /* Handle the output using the selected format */ - - if (compiler == COMPILER_ZDSII) - { - /* FORM: -stdinc:'dir1;dir2;...;dirN' - * -usrinc:'dir1;dir2;...;dirN' - */ - - /* Treat the first directory differently */ - - if (response == NULL) - { - if (i == ndirs - 1) - { - ret = my_asprintf(&segment, "%s'%s'", cmdarg, incpath); - } - else - { - ret = my_asprintf(&segment, "%s'%s", cmdarg, incpath); - } - } - else - { - if (i == ndirs - 1) - { - ret = my_asprintf(&segment, ";%s'", incpath); - } - else - { - ret = my_asprintf(&segment, ";%s", incpath); - } - } - } - else - { - /* FORM: -isystem: "dir1" -isystem "dir2" ... -isystem "dirN" - * -I: "dir1" -I "dir2" ... -I "dirN" - */ - - /* Treat the first directory differently */ - - if (response == NULL) - { - ret = my_asprintf(&segment, "%s \"%s\"", cmdarg, incpath); - } - else - { - ret = my_asprintf(&segment, " %s \"%s\"", cmdarg, incpath); - } - } - - if (ret < 0) - { - fprintf(stderr, "ERROR: my_asprintf failed.\n"); - exit(EXIT_FAILURE); - } - - /* Append the new response segment */ - - saveresp = response; - segsize = ret; - respsize += (response == NULL) ? segsize + 1 : segsize; - - response = malloc(respsize); - if (response == NULL) - { - fprintf(stderr, "ERROR: Failed to allocate response.\n"); - exit(EXIT_FAILURE); - } - - if (saveresp == NULL) - { - strncpy(response, segment, respsize); - } - else - { - snprintf(response, respsize, "%s%s", saveresp, segment); - } - - /* Clean up for the next pass */ - - if (saveresp != NULL) - { - free(saveresp); - } - - if (segment != NULL) - { - free(segment); - segment = NULL; - } - -#ifdef HOST_CYGWIN - if (convpath != NULL) - { - free(convpath); - convpath = NULL; - } -#endif - } - - fputs(response, stdout); - free(response); - - return EXIT_SUCCESS; -} diff --git a/tools/incdir.sh b/tools/incdir.sh deleted file mode 100755 index c3425dacbd..0000000000 --- a/tools/incdir.sh +++ /dev/null @@ -1,216 +0,0 @@ -#!/usr/bin/env bash -# tools/incdir.sh -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# - -# Handle command line options - -progname=$0 -wintool=n -pathtype=user -usage="USAGE: $progname [-w] [-d] [-h] [ [ ...]]" -advice="Try '$progname -h' for more information" - -while [ ! -z "$1" ]; do - case $1 in - -d ) - set -x - ;; - -w ) - wintool=y - ;; - -s ) - pathtype=system - ;; - -h ) - echo "$progname is a tool for flexible generation of include path arguments for a" - echo "variety of different compilers in a variety of compilation environments" - echo "" - echo $usage - echo "" - echo "Where:" - echo " " - echo " The full path to your compiler" - echo " [ [ ...]]" - echo " A list of include directories" - echo " -w" - echo " The compiler is a Windows native tool and requires Windows" - echo " style pathnames like C:\\Program Files" - echo " -s" - echo " Generate standard, system header file paths instead of normal user" - echo " header file paths." - echo " -d" - echo " Enable script debug" - echo " -h" - echo " Shows this help text and exits." - exit 0 - ;; - * ) - break - ;; - esac - shift -done - -ccpath=$1 -shift -dirlist=$@ - -if [ -z "$ccpath" ]; then - echo "Missing compiler path" - echo $usage - echo $advice - exit 1 -fi - -if [ -z "$dirlist" ]; then - echo "Missing include directory list" - echo $usage - echo $advice - exit 1 -fi - -# -# Most compilers support CFLAG options like '-I' to add include -# file header paths. Some (like the Zilog tools), do not. This script -# makes the selection of header file paths compiler independent. -# -# Below are all known compiler names (as found in the config/*/*/Make.defs -# files). If a new compiler is used that has some unusual syntax, then -# additional logic needs to be added to this file. -# -# NAME Syntax -# $(CROSSDEV)gcc -I -I -I ... -# sdcc -I -I -I ... -# $(ZDSBINDIR)/ez8cc.exe -usrinc:':::...` -# $(ZDSBINDIR)/zneocc.exe -usrinc:':::...` -# $(ZDSBINDIR)/ez80cc.exe -usrinc:':::...` -# -# Furthermore, just to make matters more difficult, with Windows based -# toolchains, we have to use the full windows-style paths to the header -# files. - -os=`uname -o 2>/dev/null || echo "Other"` - -# Let's assume that all GCC compiler paths contain the string gcc or -# g++ and no non-GCC compiler paths include these substrings - -gcc=`echo $ccpath | grep gcc` -if [ -z "${gcc}" ]; then - gcc=`echo $ccpath | grep g++` -fi - -sdcc=`echo $ccpath | grep sdcc` - -if [ "X$os" = "XCygwin" ]; then - # We can treat Cygwin native toolchains just like Linux native - # toolchains in the Linux. Let's assume: - # 1. GCC or SDCC are the only possible Cygwin native compilers - # 2. If this is a Window native GCC version, then -w must be - # provided on the command line (wintool=y) - - if [ -z "$gcc" -a -z "$sdcc" ]; then - # Not GCC or SDCC, must be Windows native - windows=yes - compiler=`cygpath -u "$ccpath"` - else - if [ "X$wintool" == "Xy" ]; then - # It is a native GCC or SDCC compiler - windows=yes - compiler=`cygpath -u "$ccpath"` - else - # GCC or SDCC and not for Windows - windows=no - compiler="$ccpath" - fi - fi -else - # Otherwise, we must be in a Linux environment where there are - # only Linux native toolchains - windows=no - compiler="$ccpath" -fi -exefile=`basename "$compiler"` - -# Check for some well known, non-GCC Windows native tools that require -# a special output format as well as special paths - -if [ "X$exefile" = "Xez8cc.exe" -o "X$exefile" = "Xzneocc.exe" -o "X$exefile" = "Xez80cc.exe" ]; then - fmt=zds -else - fmt=std -fi - -# Select system or user header file path command line option - -if [ "X$fmt" = "Xzds" ]; then - if [ "X$pathtype" = "Xsystem" ]; then - cmdarg=-stdinc: - else - cmdarg=-usrinc: - fi -else - if [ "X$pathtype" = "Xsystem" ]; then - cmdarg=-isystem - else - cmdarg=-I - fi -fi - -# Now process each directory in the directory list - -unset response -for dir in $dirlist; do - - # Check if the path needs to be extended for Windows-based tools under Cygwin - # windows=yes: We are building for a windows platform - # wintool=y: The platform is Cygwin and we are using a windows native tool - - if [ "X$windows" = "Xyes" -a "X$wintool" == "Xy" ]; then - path=`cygpath -w $dir` - else - path=$dir - fi - - # Handle the output using the selected format - - if [ "X$fmt" = "Xzds" ]; then - # Treat the first directory differently - - if [ -z "$response" ]; then - response="${cmdarg}'"${path} - else - response=${response}";${path}" - fi - else - # Treat the first directory differently - - if [ -z "$response" ]; then - response="${cmdarg} \"$path\"" - else - response="${response} ${cmdarg} \"$path\"" - fi - fi -done - -if [ "X$fmt" = "Xzds" ]; then - response=$response"'" -fi - -echo $response diff --git a/tools/indent.sh b/tools/indent.sh deleted file mode 100755 index 994ada2943..0000000000 --- a/tools/indent.sh +++ /dev/null @@ -1,141 +0,0 @@ -#!/usr/bin/env bash -############################################################################ -# tools/indent.sh -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ -# -# This script uses the Linux 'indent' utility to re-format C source files -# to match the coding style that I use. It differs from the NuttX coding -# style in that: -# -# 1. I normally put the trailing */ of a multi-line comment on a separate -# line. If your C file already has properly formatted comments then -# using -nfca instead of -fca eliminates that bad behavior -# 2. I usually align things vertically (like '=' in assignments), -# 3. indent.sh puts a bogus blank line at the top of the file, -# 4. I don't like the way it handles nested conditional compilation -# intermixed with code. I prefer the preprocessor conditiona tests -# be all right justified in that case. -# 5. I also indent brackets differently on structures than does this script. -# 6. I normally use no spaces in casts. indent.sh adds spaces in casts like -# "(FAR void *)&foo" becomes "(FAR void *) & foo". -# 7. When used with header files, the initial idempotence conditional test -# causes all preprecessor directives to be indented in the file. So for -# header files, you will need to substitute "^# " with "#" in the -# converted header file. -# -# You will manually need to check for the issues listed above after -# performing the conversion. - -# Constants - -advice="Try '$0 -h' for more information" - -# Parse inputs - -unset filelist -unset outfile -files=none -mode=inplace -fca=-fca - -while [ ! -z "${1}" ]; do - case ${1} in - -d ) - set -x - ;; - -p ) - fca=-nfca - ;; - -o ) - shift - outfile=${1} - mode=copy - ;; - -h ) - echo "$0 is a tool for generation of proper version files for the NuttX build" - echo "" - echo "USAGE:" - echo " $0 [-d] [-p] -o " - echo " $0 [-d] [-p] " - echo " $0 [-d] -h" - echo "" - echo "Where:" - echo " -" - echo " A single, unformatted input file" - echo " -" - echo " A list of unformatted input files that will be reformatted in place." - echo " -o " - echo " Write the single, reformatted to . " - echo " will not be modified." - echo " -d" - echo " Enable script debug" - echo " -p" - echo " Comments are pre-formatted. Do not reformat." - echo " -h" - echo " Show this help message and exit" - exit 0 - ;; - * ) - if [ ! -r ${1} ]; then - echo "Readable ${1} does not exist" - echo ${advice} - exit 1 - fi - if [ -z "${filelist}" ]; then - filelist="${1}" - files=single - else - filelist="${filelist} ${1}" - files=multiple - fi - ;; - esac - shift -done - -# Verify that at least one input file was provided - -if [ "X${files}" == "Xnone" ]; then - echo "ERROR: Neither nor provided" - echo ${advice} - exit 1 -fi - -# Options - -options="-nbad -bap -bbb -nbbo -nbc -bl -bl2 -bls -nbs -cbi2 -ncdw -nce -ci2 -cli0 -cp40 -ncs -nbfda -nbfde -di1 -nfc1 ${fca} -i2 -l80 -lp -ppi2 -lps -npcs -pmt -nprs -npsl -saf -sai -sbi2 -saw -sc -sob -nss -nut" - -# Perform the indentation - -if [ "X${mode}" == "Xcopy" ]; then - if [ "X${files}" == "Xmultiple" ]; then - echo "ERROR: Only a single can be used with the -o option" - echo ${advice} - exit 1 - fi - if [ -f $outfile ]; then - echo "Removing old $outfile" - rm $outfile || { echo "Failed to remove $outfile" ; exit 1 ; } - fi - indent $options $filelist -o $outfile -else - indent $options $filelist -fi diff --git a/tools/kconfig.bat b/tools/kconfig.bat deleted file mode 100755 index d9ac27fe5f..0000000000 --- a/tools/kconfig.bat +++ /dev/null @@ -1,117 +0,0 @@ -@echo off - -rem tools/kconfig.bat -rem -rem SPDX-License-Identifier: Apache-2.0 -rem -rem Licensed to the Apache Software Foundation (ASF) under one or more -rem contributor license agreements. See the NOTICE file distributed with -rem this work for additional information regarding copyright ownership. The -rem ASF licenses this file to you under the Apache License, Version 2.0 (the -rem "License"); you may not use this file except in compliance with the -rem License. You may obtain a copy of the License at -rem -rem http://www.apache.org/licenses/LICENSE-2.0 -rem -rem Unless required by applicable law or agreed to in writing, software -rem distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -rem WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -rem License for the specific language governing permissions and limitations -rem under the License. -rem - -rem Remember the state of the PATH variable on entry - -set oldpath=%PATH% - -rem Handle command line options - -set action=%1 -shift -if "%action%"=="" goto :MissingArgument - -set appsdir=..\apps -set cygwindir=C:\Cygwin - -:ArgLoop - -if "%1"=="" goto :CheckArguments - -if "%1"=="-a" ( - shift - set appsdir=%1 - goto :NextArg -) - -if "%1"=="-c" ( - shift - set cygwindir=%1 - goto :NextArg -) - -echo ERROR: Unrecognized option: %1 -goto :ShowUsage - -:NextArg -shift -goto :ArgLoop - -rem Verify that all of the paths are valid - -:CheckArguments -if exist "%appsdir%" goto :CheckCygwinDir - -echo ERROR: %appsdir% does not exist -goto :ShowUsage - -:CheckCygwinDir - -if exist "%cygwindir%" goto :SetPath - -echo ERROR: %cygwindir% does not exist -goto :ShowUsage - -rem Setup some required environment variables and PATH settings - -:SetPath -set PATH=%cygwindir%\usr\local\bin;%cygwindir%\usr\bin;%cygwindir%\bin;%PATH% -set APPSDIR=%appsdir% - -rem Execute the requested action - -if "%action%"=="config" goto :DoConfig -if "%action%"=="oldconfig" goto :DoOldConfig -if "%action%"=="menuconfig" goto :DoMenuConfig - -echo ERROR: Unrecognized action: %action% -goto :ShowUsage - -:DoConfig -kconfig-conf Kconfig -goto End - -:DoOldConfig -kconfig-conf --oldconfig Kconfig -goto End - -:DoMenuConfig -kconfig-mconf Kconfig -goto End - -:MissingArgument - -echo ERROR: Missing required argument - -:ShowUsage -echo USAGE: %0 ^ [-a ^] [-c ^] -echo Where: -echo ^ is one of config, oldconf, or menuconfig -echo ^ is the relative path to the apps\ directory. -echo This defaults to ..\apps -echo ^ is the relative path to the Cygwin installation -echo directory. This defaults to C:\Cygwin - -rem Restore the original PATH settings - -:End -set PATH=%oldpath% diff --git a/tools/kconfig2html.c b/tools/kconfig2html.c deleted file mode 100644 index 9c973718a2..0000000000 --- a/tools/kconfig2html.c +++ /dev/null @@ -1,2777 +0,0 @@ -/**************************************************************************** - * tools/kconfig2html.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#define _GNU_SOURCE 1 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#undef USE_JQUERY - -#define LINE_SIZE 1024 -#define SCRATCH_SIZE 2048 -#define MAX_DEPENDENCIES 128 -#define MAX_LEVELS 100 -#define MAX_SELECT 64 -#define MAX_DEFAULTS 196 -#define TAB_SIZE 4 -#define VAR_SIZE 80 -#define HTML_VAR_SIZE (2*VAR_SIZE + 64) - -#define BODYFILE_NAME ".k2h-body.dat" -#define APNDXFILE_NAME ".k2h-apndx.dat" - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -enum token_type_e -{ - TOKEN_NONE = 0, - TOKEN_NOTRESERVED, - TOKEN_COMMENT, - TOKEN_CONFIG, - TOKEN_MENUCONFIG, - TOKEN_BOOL, - TOKEN_TRISTATE, - TOKEN_INT, - TOKEN_HEX, - TOKEN_STRING, - TOKEN_DEFAULT, - TOKEN_RANGE, - TOKEN_SELECT, - TOKEN_DEPENDS, - TOKEN_ON, - TOKEN_OPTION, - TOKEN_HELP, - TOKEN_MAINMENU, - TOKEN_MENU, - TOKEN_ENDMENU, - TOKEN_CHOICE, - TOKEN_ENDCHOICE, - TOKEN_PROMPT, - TOKEN_IF, - TOKEN_ENDIF, - TOKEN_SOURCE -}; - -enum config_type_e -{ - VALUE_NONE = 0, - VALUE_INT, - VALUE_HEX, - VALUE_BOOL, - VALUE_TRISTATE, - VALUE_STRING -}; - -enum error_e -{ - ERROR_UNRECOGNIZED_OPTION = 1, - ERROR_MISSING_OPTION_ARGUMENT, - ERROR_UNEXPECTED_OPTION, - ERROR_TOO_MANY_ARGUMENTS, - ERROR_OUTFILE_OPEN_FAILURE, - ERROR_BODYFILE_OPEN_FAILURE, - ERROR_APNDXFILE_OPEN_FAILURE, - ERROR_KCONFIG_OPEN_FAILURE, - ERROR_APPENDFILE_OPEN_FAILURE, - ERROR_MENU_LEVEL_UNDERRUN, - ERROR_TOO_MANY_DEFAULTS, - ERROR_MISSING_DEFAULT_VALUE, - ERROR_GARBAGE_AFTER_DEFAULT, - ERROR_DEFAULT_UNDERFLOW, - ERROR_TOO_MANY_SELECT, - ERROR_TOO_MANY_DEPENDENCIES, - ERROR_DEPENDENCIES_UNDERFLOW, - ERRROR_MISSING_ON_AFTER_DEPENDS, - ERRROR_ON_AFTER_DEPENDS, - ERROR_NESTING_TOO_DEEP, - ERROR_NESTING_UNDERFLOW -}; - -typedef void (*output_t)(const char *fmt, ...); - -struct reserved_s -{ - enum token_type_e ttype; - const char *tname; -}; - -struct default_item_s -{ - char *d_default; - char *d_dependency; -}; - -struct default_s -{ - int d_nitems; - struct default_item_s d_item[MAX_DEFAULTS]; -}; - -struct select_s -{ - int s_nvar; - char *s_varname[MAX_SELECT]; -}; - -struct config_s -{ - enum config_type_e c_type; - char *c_name; - char *c_desc; - char *c_lower; - char *c_upper; - struct default_s c_default; - struct select_s c_select; - int c_ndependencies; -}; - -struct choice_s -{ - char *c_prompt; - struct default_s c_default; - int c_ndependencies; -}; - -struct menu_s -{ - char *m_name; - int m_ndependencies; -}; - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -static char g_line[LINE_SIZE + 1]; -static char g_scratch[SCRATCH_SIZE + 1]; -static FILE *g_outfile; -static FILE *g_bodyfile; -static FILE *g_apndxfile; -static char *g_lnptr; -static bool g_debug; -static bool g_preread; -static const char *g_kconfigroot; -static const char *g_appsdir; -static int g_paranum[MAX_LEVELS]; -static int g_level; -static char *g_dependencies[MAX_DEPENDENCIES]; -static int g_ndependencies; -static int g_inchoice; -static int g_menu_number; -static int g_choice_number; -static int g_toggle_number; - -static const char g_delimiters[] = -" ,"; - -static struct reserved_s g_reserved[] = -{ - {TOKEN_COMMENT, "comment"}, - {TOKEN_CONFIG, "config"}, - {TOKEN_MENUCONFIG, "menuconfig"}, - {TOKEN_BOOL, "bool"}, - {TOKEN_TRISTATE, "tristate"}, - {TOKEN_INT, "int"}, - {TOKEN_HEX, "hex"}, - {TOKEN_STRING, "string"}, - {TOKEN_DEFAULT, "default"}, - {TOKEN_RANGE, "range"}, - {TOKEN_SELECT, "select"}, - {TOKEN_DEPENDS, "depends"}, - {TOKEN_ON, "on"}, - {TOKEN_OPTION, "option"}, - {TOKEN_HELP, "help"}, - {TOKEN_HELP, "---help---"}, - {TOKEN_MAINMENU, "mainmenu"}, - {TOKEN_MENU, "menu"}, - {TOKEN_ENDMENU, "endmenu"}, - {TOKEN_CHOICE, "choice"}, - {TOKEN_ENDCHOICE, "endchoice"}, - {TOKEN_PROMPT, "prompt"}, - {TOKEN_SOURCE, "source"}, - {TOKEN_IF, "if"}, - {TOKEN_ENDIF, "endif"}, - {TOKEN_NOTRESERVED, NULL} -}; - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: debug - * - * Description: - * Debug output (conditional) - * - ****************************************************************************/ - -static void debug(const char *fmt, ...) -{ - va_list ap; - - if (g_debug) - { - va_start(ap, fmt); - vfprintf(stderr, fmt, ap); - va_end(ap); - } -} - -/**************************************************************************** - * Name: error - * - * Description: - * Error output (unconditional) - * - ****************************************************************************/ - -static void error(const char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - vfprintf(stderr, fmt, ap); - va_end(ap); -} - -/**************************************************************************** - * Name: output - * - * Description: - * Output to the final HTML file - * - ****************************************************************************/ - -static void output(const char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - vfprintf(g_outfile, fmt, ap); - va_end(ap); -} - -/**************************************************************************** - * Name: body - * - * Description: - * HTML body output to a temporary file. - * - ****************************************************************************/ - -static void body(const char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - vfprintf(g_bodyfile, fmt, ap); - va_end(ap); -} - -/**************************************************************************** - * Name: appendix - * - * Description: - * Output to a appendix file. - * - ****************************************************************************/ - -static void appendix(const char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - vfprintf(g_apndxfile, fmt, ap); - va_end(ap); -} - -/**************************************************************************** - * Name: append_file - * - * Description: - * Append the specified file to the output file and remove it. - * - ****************************************************************************/ - -static void append_file(const char *filename) -{ - FILE *stream; - int ch; - - /* Open the file for reading */ - - stream = fopen(filename, "r"); - if (!stream) - { - error("open %s failed: %s\n", filename, strerror(errno)); - exit(ERROR_APPENDFILE_OPEN_FAILURE); - } - - /* Copy the file to the output */ - - while ((ch = getc(stream)) != EOF) - { - putc(ch, g_outfile); - } - - /* Close and remove the file */ - - fclose(stream); - unlink(filename); -} - -/**************************************************************************** - * Name: show_usage - * - * Description: - * Show usage of this program and exit with the specified error code - * - ****************************************************************************/ - -static void show_usage(const char *progname, int exitcode) -{ - error("USAGE: " - "%s [-d] [-a ] {-o ] []\n", - progname); - error(" %s [-h]\n\n", progname); - error("Where:\n\n"); - error("\t-a : Select relative path to the apps/ directory." - " This path is relative\n"); - error("\t to the . Default: ../apps\n"); - error("\t-o : Send output to . " - "Default: Output goes to stdout\n"); - error("\t-d : Enable debug output\n"); - error("\t-h : Prints this message and exits\n"); - error("\t " - "is the directory containing the root Kconfig file.\n"); - error("\t Default : .\n"); - exit(exitcode); -} - -/**************************************************************************** - * Name: skip_space - * - * Description: - * Skip over any spaces - * - ****************************************************************************/ - -static char *skip_space(char *ptr) -{ - while (*ptr && isspace((int)*ptr)) ptr++; - return ptr; -} - -/**************************************************************************** - * Name: dequote - * - * Description: - * Remove quotation marks from a string. - * - ****************************************************************************/ - -static char *dequote(char *ptr) -{ - int len; - - /* Check if there is a trailing quote */ - - len = strlen(ptr); - if (ptr[len - 1] == '"') - { - /* Yes... replace it with a terminator */ - - ptr[len - 1] = '\0'; - len--; - } - - /* Is there a leading quote? */ - - if (ptr[0] == '"') - { - /* Yes.. skip over the leading quote */ - - ptr++; - len--; - } - - /* Handle the case where nothing is left after dequoting */ - - if (len <= 0) - { - ptr = NULL; - } - - return ptr; -} - -/**************************************************************************** - * Name: htmlize_character - * - * Description: - * Transfer and HTML-ize a character. Convert characters: - * - * " " quotation mark - * ' ' apostrophe - * & & ampersand - * < < less-than - * > > greater-than - * - ****************************************************************************/ - -static int htmlize_character(char *dest, char ch) -{ - const char *str; - - /* Transfer the character from into the destination buffer, perform the - * conversion only if the character is one of the special characters. - */ - - str = NULL; - - switch (ch) - { - case '"': - str = """; - break; - - case '\'': - str = "'"; - break; - - case '&': - str = "&"; - break; - - case '<': - str = "<"; - break; - - case '>': - str = ">"; - break; - - default: - *dest++ = ch; - *dest = '\0'; - return 1; - } - - /* Transfer a string */ - - *dest = '\0'; - strcat(dest, str); - return strlen(str); -} - -/**************************************************************************** - * Name: htmlize_text - * - * Description: - * HTML-ize a free-text string. This function performs the conversions of - * in htmlize_character() for a text string. - * - ****************************************************************************/ - -static char *htmlize_text(const char *src) -{ - char *dest = g_scratch; - - /* We may get here with the source pointer equal to NULL (or a pointer to - * a NUL string). Return the - * disfavor. - */ - - if (!src || !*src) - { - return NULL; - } - - /* Transfer each character from the source string into the scratch buffer */ - - for (; *src; src++) - { - /* Expand characters as necessary. NOTE: There is no check if the - * HTML-expanded text overflows the g_scratch[] buffer. If you see - * errors, be suspicious. - */ - - dest += htmlize_character(dest, *src); - } - - return g_scratch; -} - -/**************************************************************************** - * Name: htmlize_expression - * - * Description: - * HTML-ize an expression of configuration variables. This function - * performs the same conversions as in htmlize_character(), but also - * expands and adds hyper links for configuration variables. - * - ****************************************************************************/ - -static char *htmlize_expression(const char *src) -{ - char varname[VAR_SIZE + 1]; - char htmlvar[HTML_VAR_SIZE + 1]; - char *dest = g_scratch; - char ch = '\0'; - char lastc; - - /* We may get here with the source pointer equal to NULL. Return the - * disfavor. - */ - - if (!src) - { - return NULL; - } - - /* Transfer each character from the source string into the scratch buffer */ - - dest = g_scratch; - *dest = '\0'; - - while (*src) - { - /* Remember the last character and advance to the next character */ - - lastc = ch; - ch = *src; - - /* Skip control characters and out-of-range 7-bit ASCII characters */ - - if (*src < 0x20 || *src > 0x7e) - { - src++; - continue; - } - - /* Output no more than one consecutive space character. This depends - * on the fact that kconfig_line has replaces all of the forms of - * whitespace with a space character. - */ - - if (*src == ' ') - { - if (lastc != ' ') - { - *dest++ = *src; - *dest = '\0'; - } - - src++; - continue; - } - - /* Concatenate variable name strings. There strings probably begin - * with a uppercase letter, but here all alphanumeric values (plus '_'_ - * are concatenated. - */ - - if (isalnum(((int)*src)) || *src == '_') - { - int namlen = 0; - - do - { - /* Don't overflow the tiny variable name buffer */ - - if (namlen >= VAR_SIZE) - { - error("Configuration variable name too long\n"); - break; - } - - /* Add the next character to the name */ - - varname[namlen] = *src++; - namlen++; - varname[namlen] = '\0'; - } - while (isalnum(((int)*src)) || *src == '_'); - - /* HTML-ize the name into our bigger, local scratch buffer */ - - snprintf(htmlvar, HTML_VAR_SIZE, - "CONFIG_%s", - varname, varname); - - /* Then transfer the string into the scratch buffer */ - - strcat(dest, htmlvar); - dest += strlen(htmlvar); - } - - /* All that remains are space and the punctuation characters */ - - else - { - /* Expand characters as necessary */ - - dest += htmlize_character(dest, *src); - src++; - } - } - - return g_scratch; -} - -/**************************************************************************** - * Name: read_line - * - * Description: - * Read a new line from the Kconfig file into the g_line[] buffer, using - * the g_scratch buffer if necessary to concatenate lines that end with a - * line continuation character (backslash). - * - ****************************************************************************/ - -static char *read_line(FILE *stream) -{ - char *ptr; - int len; - - g_lnptr = NULL; - - /* Read the next line */ - - g_line[LINE_SIZE] = '\0'; - if (!fgets(g_line, LINE_SIZE, stream)) - { - return NULL; - } - - /* Loop to handle continuation lines */ - - for (; ; ) - { - /* How long is the line so far? */ - - len = strlen(g_line); - - /* Remove any newline character at the end of the buffer */ - - if (g_line[len - 1] == '\n') - { - len--; - g_line[len] = '\0'; - } - - /* Does this continue on the next line? Note that this check - * could erroneoulsy combine two lines if a comment line ends with - * a line continuation... Don't do that! - */ - - if (g_line[len - 1] != '\\') - { - /* No.. return now */ - - g_lnptr = g_line; - return g_line; - } - - /* Yes.. Replace the backslash with a space delimiter */ - - g_line[len - 1] = ' '; - - /* Read the next line into the scratch buffer */ - - g_scratch[SCRATCH_SIZE] = '\0'; - if (!fgets(g_scratch, SCRATCH_SIZE, stream)) - { - return NULL; - } - - /* Skip any leading whitespace and copy the rest of the next line - * into the line buffer. Note that the leading white space is - * replaced with a single character to serve as a delimiter. - */ - - ptr = skip_space(g_scratch); - strncpy(&g_line[len], ptr, LINE_SIZE - len); - } -} - -/**************************************************************************** - * Name: kconfig_line - * - * Description: - * Read a new line, skipping over leading white space and ignore lines - * that contain only comments. - * - ****************************************************************************/ - -static char *kconfig_line(FILE *stream) -{ - char *ptr; - - for (; ; ) - { - /* Read the next line from the Kconfig file */ - - /* Is there already valid data in the line buffer? This can happen - * while parsing help text and we read one line too far. - */ - - if (!g_preread) - { - /* Read the next line */ - - if (!read_line(stream)) - { - return NULL; - } - } - - g_preread = false; - - /* Replace all whitespace characters with spaces to simplify parsing */ - - for (ptr = g_line; *ptr; ptr++) - { - if (isspace(((int)*ptr))) - { - *ptr = ' '; - } - } - - /* Skip any leading whitespace. Ignore empty lines and lines that - * contain only comments. - */ - - ptr = skip_space(g_line); - if (*ptr && *ptr != '#' && *ptr != '\n') - { - g_lnptr = ptr; - return ptr; - } - } -} - -/**************************************************************************** - * Name: tokenize - * - * Description: - * Check if this string corresponds to a string in the reserved word table. - * - ****************************************************************************/ - -static enum token_type_e tokenize(const char *token) -{ - struct reserved_s *ptr; - - for (ptr = g_reserved; ptr->tname; ptr++) - { - if (strcmp(token, ptr->tname) == 0) - { - break; - } - } - - return ptr->ttype; -} - -/**************************************************************************** - * Name: findchar - * - * Description: - * Find a character in a string. This differs from strchr() because it - * skips over quoted characters. For example, if you are searching for - * '"', encountering '"' will terminate the search, but "\"" will not. - * - ****************************************************************************/ - -static char *findchar(char *ptr, char ch) -{ - bool escaped = false; - - /* Search for the leading quotation marked */ - - for (; *ptr; ptr++) - { - if (escaped) - { - /* Skip over this character and reset the escaped flag */ - - escaped = false; - } - else if (*ptr == '\\') - { - /* Set the escaped flag to skip over the next character */ - - escaped = true; - } - else if (*ptr == ch) - { - /* We have found the (unescaped) character we are looking for */ - - return ptr; - } - } - - return NULL; -} - -/**************************************************************************** - * Name: get_token - * - * Description: - * Get the next delimited token from the line buffer. - * - ****************************************************************************/ - -static char *get_token(void) -{ - char *pbegin; - char *pend = NULL; - - /* The position to begin/resume parsing is in g_lnptr. */ - - if (g_lnptr && *g_lnptr) - { - pbegin = g_lnptr; - } - else - { - return NULL; - } - - /* Find the beginning of the next token */ - - for (; - *pbegin && strchr(g_delimiters, *pbegin) != NULL; - pbegin++); - - /* If we are at the end of the string with nothing - * but delimiters found, then return NULL. - */ - - if (!*pbegin) - { - g_lnptr = pbegin; - return NULL; - } - - /* Get if the token is a quoted string */ - - if (*pbegin == '"') - { - /* Search for the trailing quotation mark */ - - pend = findchar(pbegin + 1, '"'); - - /* Did we find the trailing quotation mark */ - - if (pend) - { - /* Yes.. skip over it */ - - pend++; - } - } - else - { - /* Find the end of the token */ - - for (pend = pbegin + 1; - *pend && strchr(g_delimiters, *pend) == NULL; - pend++); - } - - /* pend either points to the end of the string or to - * the first delimiter after the string. - */ - - if (*pend) - { - /* Turn the delimiter into a null terminator */ - - *pend++ = '\0'; - } - - /* Save the pointer where we left off and return the - * beginning of the token. - */ - - g_lnptr = pend; - return pbegin; -} - -/**************************************************************************** - * Name: get_html_string - * - * Description: - * Extract a quoted string from the line buffer, dequote it, and make it - * HTML ready. - * - ****************************************************************************/ - -static char *get_html_string(void) -{ - char *pbegin; - char *pend; - int len; - - /* Search for the leading quotation mark in the line buffer */ - - pbegin = strchr(g_lnptr, '"'); - if (pbegin) - { - /* We found the leading quote. Skip over the leading quote */ - - pbegin++; - } - else - { - /* The string is unquoted. The beginning of the string is here, - * skipping over any leading whitespace. - */ - - pbegin = skip_space(g_lnptr); - } - - /* Search for the trailing quotation mark. If there is none, then - * the string goes to the end of the line. - */ - - pend = findchar(pbegin, '"'); - if (pend) - { - /* Replace the final quote with a NUL. g_lnptr is set to - * the next valid character after the terminating quote. - */ - - *pend = '\0'; - g_lnptr = pend + 1; - } - else - { - /* Get the length of the string. Return NULL if all that is - * left on the line is a NUL string. - */ - - len = strlen(pbegin); - if (len < 1) - { - return NULL; - } - - /* Use the rest of the line. g_lnptr is set to point at the - * terminating NUL. - */ - - pend = pbegin + len; - g_lnptr = pend; - } - - return htmlize_text(pbegin); -} - -/**************************************************************************** - * Name: push_dependency - * - * Description: - * Add the new dependency to the current list of dependencies. - * - ****************************************************************************/ - -static void push_dependency(const char *dependency) -{ - int ndx = g_ndependencies; - - if (ndx >= MAX_DEPENDENCIES) - { - error("Too many dependencies, aborting\n"); - exit(ERROR_TOO_MANY_DEPENDENCIES); - } - - g_dependencies[ndx] = strdup(dependency); - g_ndependencies = ndx + 1; -} - -/**************************************************************************** - * Name: pop_dependency - * - * Description: - * Remove the last, pushed dependency - * - ****************************************************************************/ - -static void pop_dependency(void) -{ - int ndx = g_ndependencies - 1; - if (ndx < 0) - { - error("Dependency underflow, aborting\n"); - exit(ERROR_DEPENDENCIES_UNDERFLOW); - } - - if (g_dependencies[ndx]) - { - free(g_dependencies[ndx]); - g_dependencies[ndx] = NULL; - } - - g_ndependencies = ndx; -} - -/**************************************************************************** - * Name: incr_level - * - * Description: - * Increment the paragraph numbering level - * - ****************************************************************************/ - -static void incr_level(void) -{ - int ndx = g_level; - - if (ndx >= MAX_LEVELS) - { - error("Nesting level is too deep, aborting\n"); - exit(ERROR_NESTING_TOO_DEEP); - } - - g_paranum[ndx] = 1; - g_level = ndx + 1; -} - -/**************************************************************************** - * Name: decr_level - * - * Description: - * Decrease the paragraph numbering level. - * - ****************************************************************************/ - -static void decr_level(void) -{ - int ndx = g_level; - - g_paranum[ndx] = '\0'; - ndx--; - - if (ndx < 0) - { - error("Nesting level underflow, aborting\n"); - exit(ERROR_NESTING_UNDERFLOW); - } - - g_level = ndx; -} - -/**************************************************************************** - * Name: incr_paranum - * - * Description: - * Increment the paragraph number at this level - * - ****************************************************************************/ - -static void incr_paranum(void) -{ - int ndx = g_level - 1; - - if (ndx < 0) - { - error("Nesting level underflow, aborting\n"); - exit(ERROR_NESTING_UNDERFLOW); - } - - g_paranum[ndx]++; -} - -/**************************************************************************** - * Name: get_paranum - * - * Description: - * Return a string for this paragraph (uses g_scratch[]). - * - ****************************************************************************/ - -static const char *get_paranum(void) -{ - char buffer[16]; - int i; - - g_scratch[0] = '\0'; - for (i = 0; i < g_level; i++) - { - if (i > 0) - { - strcat(g_scratch, "."); - } - - snprintf(buffer, 16, "%d", g_paranum[i]); - strcat(g_scratch, buffer); - } - - return g_scratch; -} - -/**************************************************************************** - * Name: type2str - * - * Description: - * Return a string given a member of the configuration variable type - * enumeration. - * - ****************************************************************************/ - -static const char *type2str(enum config_type_e valtype) -{ - switch (valtype) - { - case VALUE_BOOL: - return "Boolean"; - - case VALUE_TRISTATE: - return "Tristate"; - - case VALUE_INT: - return "Integer"; - - case VALUE_HEX: - return "Hexadecimal"; - - case VALUE_STRING: - return "String"; - - default: - break; - } - - return "Unknown"; -} - -/**************************************************************************** - * Name: process_help - * - * Description: - * Read and generate HTML for the help text that is expected after the - * configuration configuration variable description. - * - ****************************************************************************/ - -static inline void process_help(FILE *stream, output_t outfunc) -{ - char *ptr; - int help_indent = 0; - int indent; - bool blank; - bool done; - bool newpara; - bool preformatted; - - /* Read each comment line */ - - newpara = true; - preformatted = false; - - for (; ; ) - { - /* Read the next line of comment text */ - - if (!read_line(stream)) - { - break; - } - - /* What is the indentation level? The first help line sets the - * indentation level. The first line encounter with lower - * indentation terminates the help. - */ - - ptr = g_line; - indent = 0; - blank = false; - done = false; - - while (!done) - { - int ch = (int)*ptr; - switch (ch) - { - case ' ': - indent++; - ptr++; - break; - - case '\t': - indent += TAB_SIZE; - ptr++; - break; - - case '#': -#if 0 - blank = true; -#endif - done = true; - break; - - case '\n': - case '\0': - blank = true; - done = true; - break; - - default: - done = true; - break; - } - } - - /* Blank lines are a special case */ - - if (blank) - { - /* Avoid putting an empty paragraph at the end of the help */ - - if (preformatted) - { - outfunc("\n"); - preformatted = false; - } - - if (!newpara) - { - outfunc("

\n"); - newpara = true; - } - - continue; - } - - /* Check the indentation level */ - - if (indent == 0) - { - g_preread = true; - break; - } - else if (!help_indent) - { - help_indent = indent; - } - else if (indent < help_indent) - { - g_preread = true; - break; - } - - /* Add the next line of help text */ - - if (newpara) - { - outfunc("

\n"); - newpara = false; - } - - /* Lines that are indented at greater levels are assumed to be - * pre-formatted text. This is not part of the Kconfig language but - * rather simply a NuttX Kconfig convention. - */ - - if (indent > help_indent) - { - if (!preformatted) - { - outfunc("

    \n");
    -              newpara = false;
    -              preformatted = true;
    -            }
    -
    -          outfunc("%s\n", htmlize_text(ptr));
    -        }
    -      else
    -        {
    -          if (preformatted)
    -            {
    -              outfunc("
\n"); - preformatted = false; - } - - outfunc(" %s", htmlize_text(ptr)); - } - } - - if (!newpara) - { - outfunc("\n

\n"); - } - - if (preformatted) - { - outfunc("\n"); - } -} - -/**************************************************************************** - * Name: process_default - * - * Description: - * Read and parse the Kconfig default statement. - * - ****************************************************************************/ - -static void process_default(FILE *stream, struct default_s *defp) -{ - enum token_type_e tokid; - char *token; - int ndx; - - /* Check if we have space for another default value */ - - ndx = defp->d_nitems; - if (ndx >= MAX_DEFAULTS) - { - error("Too many default values\n"); - exit(ERROR_TOO_MANY_DEFAULTS); - } - - /* Get the next token which will be the value of the default */ - - token = get_token(); - if (!token) - { - error("Missing default value\n"); - exit(ERROR_MISSING_DEFAULT_VALUE); - } - - defp->d_item[ndx].d_default = strdup(token); - defp->d_item[ndx].d_dependency = NULL; - - /* Check if the default value is followed by "depends on" */ - - token = get_token(); - if (token) - { - /* Yes.. something follows the default value. */ - - tokid = tokenize(token); - if (tokid != TOKEN_IF) - { - error("Unrecognized garbage after default value\n"); - exit(ERROR_GARBAGE_AFTER_DEFAULT); - } - - /* The rest of the line is the dependency */ - - defp->d_item[ndx].d_dependency = strdup(g_lnptr); - } - - /* Update the number of defaults we have encountered in this block */ - - defp->d_nitems++; -} - -/**************************************************************************** - * Name: print_default - * - * Description: - * Output and the list of defaults to the HTML body file. - * - ****************************************************************************/ - -static void print_default(struct default_s *defp, output_t outfunc) -{ - struct default_item_s *item; - int i; - - /* Check if there are any default value */ - - if (defp->d_nitems > 0) - { - /* Yes, output the defaults differently if there is only one */ - - if (defp->d_nitems == 1) - { - /* Output the Default */ - - item = &defp->d_item[0]; - outfunc("
  • \n"); - outfunc(" Default: %s\n", item->d_default); - - /* Output the dependency */ - - if (item->d_dependency) - { - outfunc("

    \n"); - outfunc(" Dependency:\n"); - outfunc(" %s\n", htmlize_expression(item->d_dependency)); - outfunc("

    \n"); - } - - outfunc("
  • \n"); - } - else - { - /* Output a sub-list of defaults. */ - - outfunc("
  • \n"); - outfunc(" Default Values:\n"); - outfunc("
      \n"); - - for (i = 0; i < defp->d_nitems; i++) - { - /* Output the Default */ - - item = &defp->d_item[i]; - outfunc("
    • \n"); - outfunc(" Default: %s\n", item->d_default); - - /* Output the dependency */ - - if (item->d_dependency) - { - outfunc("

      \n"); - outfunc(" Dependency:\n"); - outfunc(" %s\n", - htmlize_expression(item->d_dependency)); - outfunc("

      \n"); - } - } - - outfunc("
    \n"); - outfunc("
  • \n"); - } - } -} - -/**************************************************************************** - * Name: free_default - * - * Description: - * Output and the list of defaults to the HTML body file. - * - ****************************************************************************/ - -static void free_default(struct default_s *defp) -{ - struct default_item_s *item; - int i; - - /* Free strings for each default */ - - for (i = 0; i < defp->d_nitems; i++) - { - /* Free the default value string */ - - item = &defp->d_item[i]; - free(item->d_default); - - /* Free any dependency on the default */ - - if (item->d_dependency) - { - free(item->d_dependency); - } - } -} - -/**************************************************************************** - * Name: process_dependson - * - * Description: - * Parse a "depends on" dependency and add the new dependency to the - * stack of dependencies. - * - ****************************************************************************/ - -static void process_dependson(void) -{ - char *value = get_token(); - if (strcmp(value, "on") != 0) - { - error("Expected \"on\" after \"depends\"\n"); - exit(ERRROR_ON_AFTER_DEPENDS); - } - - push_dependency(htmlize_expression(g_lnptr)); -} - -/**************************************************************************** - * Name: print_dependencies - * - * Description: - * Output the current stack of dependencies - * - ****************************************************************************/ - -static void print_dependencies(output_t outfunc) -{ - int i; - - if (g_ndependencies > 0) - { - outfunc("
  • Dependencies: %s", g_dependencies[0]); - - for (i = 1; i < g_ndependencies; i++) - { - outfunc(", %s\n", g_dependencies[i]); - } - - outfunc("
  • \n"); - } -} - -/**************************************************************************** - * Name: free_dependencies - * - * Description: - * Pop dependencies from the stack. - * - ****************************************************************************/ - -static void free_dependencies(int ndependencies) -{ - int i; - - for (i = 0; i < ndependencies; i++) - { - pop_dependency(); - } -} - -/**************************************************************************** - * Name: process_config - * - * Description: - * Process one configuration variable paragraph - * - ****************************************************************************/ - -static inline char *process_config(FILE *stream, const char *varname, - const char *kconfigdir, - const char *kconfigname) -{ - enum token_type_e tokid; - struct config_s config; - output_t outfunc; - bool help; - bool hidden; - const char *paranum; - char *token; - char *ptr; - int i; - - /* Get the configuration information */ - - memset(&config, 0, sizeof(struct config_s)); - config.c_name = strdup(varname); - - /* Process each line in the configuration */ - - help = false; - token = NULL; - - while ((ptr = kconfig_line(stream)) != NULL) - { - /* Process the first token on the Kconfig file line */ - - token = get_token(); - if (token != NULL) - { - tokid = tokenize(token); - switch (tokid) - { - case TOKEN_BOOL: - case TOKEN_TRISTATE: - { - /* Save the type of the configuration variable */ - - config.c_type = tokid == - TOKEN_BOOL ? VALUE_BOOL : VALUE_TRISTATE; - - /* Get the description following the type */ - - ptr = get_html_string(); - if (ptr) - { - config.c_desc = strdup(ptr); - } - - /* Indicate that the line has been consumed */ - - token = NULL; - } - break; - - case TOKEN_INT: - { - /* Save the type of the configuration variable */ - - config.c_type = VALUE_INT; - - /* Get the description following the type */ - - ptr = get_html_string(); - if (ptr) - { - config.c_desc = strdup(ptr); - } - - /* Indicate that the line has been consumed */ - - token = NULL; - } - break; - - case TOKEN_HEX: - { - /* Save the type of the configuration variable */ - - config.c_type = VALUE_HEX; - - /* Get the description following the type */ - - ptr = get_html_string(); - if (ptr) - { - config.c_desc = strdup(ptr); - } - - /* Indicate that the line has been consumed */ - - token = NULL; - } - break; - - case TOKEN_STRING: - { - /* Save the type of the configuration variable */ - - config.c_type = VALUE_STRING; - - /* Get the description following the type */ - - ptr = get_html_string(); - if (ptr) - { - config.c_desc = strdup(ptr); - } - - /* Indicate that the line has been consumed */ - - token = NULL; - } - break; - - case TOKEN_DEFAULT: - { - process_default(stream, &config.c_default); - token = NULL; - } - break; - - case TOKEN_RANGE: - { - char *value = get_token(); - if (value) - { - config.c_lower = strdup(value); - - value = get_token(); - if (value) - { - config.c_upper = strdup(value); - } - } - - token = NULL; - } - break; - - case TOKEN_SELECT: - { - char *value; - int ndx; - - ndx = config.c_select.s_nvar; - if (ndx >= MAX_SELECT) - { - error("Too many 'select' lines\n"); - exit(ERROR_TOO_MANY_SELECT); - } - - value = get_token(); - config.c_select.s_varname[ndx] = strdup(value); - config.c_select.s_nvar = ndx + 1; - token = NULL; - } - break; - - case TOKEN_DEPENDS: - { - process_dependson(); - config.c_ndependencies++; - token = NULL; - } - break; - - case TOKEN_OPTION: - { - token = NULL; /* Ignored */ - } - break; - - case TOKEN_HELP: - { - help = true; - token = NULL; - } - break; - - default: - { - debug("CONFIG_%s: Terminating token: %s\n", - config.c_name, token); - } - break; - } - - /* Break out on the help token (or the first unhandled token) */ - - if (help || token != NULL) - { - break; - } - } - } - - /* Is this an internal configuration variable with no description? - * If so, send the output to the appendix file. - */ - - hidden = (config.c_desc == NULL); - outfunc = hidden ? appendix : body; - hidden |= g_inchoice; - - /* Print the configuration variable name and the short description */ - - outfunc("

    ", config.c_name); - - /* If we are not in a choice block, than give the variable a paragraph - * number and put it in the table of contents. - */ - - if (!hidden) - { - paranum = get_paranum(); - output("
  • %s CONFIG_%s", - config.c_name, paranum, config.c_name); - outfunc("%s ", paranum); - incr_paranum(); - } - - outfunc("CONFIG_%s", config.c_name); - - /* Output the short description in the paragraph title (if we have one) */ - - if (config.c_desc) - { - if (!hidden) - { - output(": %s", config.c_desc); - } - - outfunc(": %s", config.c_desc); - } - - outfunc("
  • \n"); - - if (!hidden) - { - output("\n"); - } - - /* Configuration description is indented */ - - outfunc("
      \n"); - - /* Print the type of the configuration variable */ - - if (config.c_type != VALUE_NONE) - { - outfunc("
    • Type: %s
    • \n", type2str(config.c_type)); - } - - /* Print the default values of the configuration variable */ - - print_default(&config.c_default, outfunc); - - /* Print the range of values of the configuration variable */ - - if (config.c_lower || config.c_upper) - { - outfunc("
    • Range:\n"); - if (config.c_lower) - { - outfunc(" %s", config.c_lower); - } - - outfunc(" -", config.c_lower); - - if (config.c_upper) - { - outfunc(" %s", config.c_upper); - } - - outfunc("
    • \n"); - } - - /* Print the default value of the configuration variable auto-selected by - * this setting - */ - - if (config.c_select.s_nvar > 0) - { - outfunc("
    • Selects: " - "CONFIG_%s", - config.c_select.s_varname[0], config.c_select.s_varname[0]); - - for (i = 1; i < config.c_select.s_nvar; i++) - { - outfunc(", CONFIG_%s", - config.c_select.s_varname[i], - config.c_select.s_varname[i]); - } - - outfunc("
    • \n"); - } - - /* Print the list of dependencies (if any) */ - - print_dependencies(outfunc); - - /* Show the configuration file. */ - - outfunc("
    • Kconfig file: %s/%s\n", - kconfigdir, kconfigname); - - /* Print any help text */ - - if (help) - { - process_help(stream, outfunc); - token = NULL; - } - - /* End of configuration description */ - - outfunc("
    \n"); - - /* Free allocated memory */ - - free_dependencies(config.c_ndependencies); - free_default(&config.c_default); - - if (config.c_name) - { - free(config.c_name); - } - - if (config.c_desc) - { - free(config.c_desc); - } - - if (config.c_lower) - { - free(config.c_lower); - } - - if (config.c_upper) - { - free(config.c_upper); - } - - if (config.c_select.s_nvar > 0) - { - for (i = 0; i < config.c_select.s_nvar; i++) - { - free(config.c_select.s_varname[i]); - } - } - - return token; -} - -/**************************************************************************** - * Name: process_choice - * - * Description: - * Process a choice paragraph - * - ****************************************************************************/ - -static char *parse_kconfigfile(FILE *stream, const char *kconfigdir, - const char *kconfigfile); /* Forward reference */ - -static inline char *process_choice(FILE *stream, const char *kconfigdir, - const char *kconfigname) -{ - enum token_type_e tokid; - struct choice_s choice; - const char *paranum; - char *token = NULL; - char *ptr; - bool help = false; - - /* Get the choice information */ - - memset(&choice, 0, sizeof(struct choice_s)); - - /* Process each line in the choice */ - - while ((ptr = kconfig_line(stream)) != NULL) - { - /* Process the first token on the Kconfig file line */ - - token = get_token(); - if (token != NULL) - { - tokid = tokenize(token); - switch (tokid) - { - case TOKEN_PROMPT: - { - /* Get the prompt string */ - - ptr = get_html_string(); - if (ptr) - { - choice.c_prompt = strdup(ptr); - } - - /* Indicate that the line has been consumed */ - - token = NULL; - } - break; - - case TOKEN_DEFAULT: - { - process_default(stream, &choice.c_default); - token = NULL; - } - break; - - case TOKEN_DEPENDS: - { - process_dependson(); - choice.c_ndependencies++; - token = NULL; - } - break; - - case TOKEN_HELP: - { - help = true; - token = NULL; - } - break; - - default: - { - debug("Choice: Terminating token: %s\n", token); - } - break; - } - - /* Break out on the help token (or the first unhandled token) */ - - if (help || token != NULL) - { - break; - } - } - } - - paranum = get_paranum(); - output("
  • %s Choice", g_choice_number, paranum); - body("\n

    %s Choice", g_choice_number, paranum); - - if (choice.c_prompt) - { - output(": %s", choice.c_prompt); - body(": %s", choice.c_prompt); - } - - output("

  • \n"); - body("\n"); - g_choice_number++; - - /* Print the default values of the configuration variable */ - - body("
      \n"); - print_default(&choice.c_default, body); - - /* Print the list of dependencies (if any) */ - - print_dependencies(body); - - /* Show the configuration file. - * REVISIT: Shows wrong file name if the name of the Kconfig file is not - * Kconfig. - */ - - body("
    • Kconfig file: %s/%s\n
    • ", - kconfigdir, kconfigname); - - /* Print any help text */ - - if (help) - { - process_help(stream, body); - token = NULL; - } - - body("
    \n"); - - /* Then show the choice options */ - - body("

    Choice Options:

    "); - body("
      \n"); - - /* Free allocated memory */ - - free_dependencies(choice.c_ndependencies); - free_default(&choice.c_default); - - if (choice.c_prompt) - { - free(choice.c_prompt); - } - - /* Increment the paragraph level */ - - incr_level(); - - debug("process_choice: TOKEN_CHOICE\n"); - debug(" kconfigdir: %s\n", kconfigdir); - debug(" kconfigname: %s\n", kconfigname); - debug(" level: %d\n", g_level); - - /* Then return in choice mode */ - - g_inchoice++; - return token; -} - -/**************************************************************************** - * Name: process_menu - * - * Description: - * Process a menu paragraph - * - ****************************************************************************/ - -static inline char *process_menu(FILE *stream, const char *kconfigdir, - const char *kconfigname) -{ - enum token_type_e tokid; - struct menu_s menu; - const char *paranum; - char *menuname; - char *token = NULL; - - /* Get the menu information */ - - memset(&menu, 0, sizeof(struct menu_s)); - - /* Get the menu name */ - - menuname = get_html_string(); - menu.m_name = strdup(menuname); - - /* Process each line in the choice */ - - while (kconfig_line(stream) != NULL) - { - /* Process the first token on the Kconfig file line */ - - token = get_token(); - if (token != NULL) - { - tokid = tokenize(token); - switch (tokid) - { - case TOKEN_DEPENDS: - { - process_dependson(); - menu.m_ndependencies++; - token = NULL; - } - break; - - default: - { - debug("Menu: Terminating token: %s\n", token); - } - break; - } - - /* Break out on the first unhandled token */ - - if (token != NULL) - { - break; - } - } - } - - /* Output menu information */ - - paranum = get_paranum(); - if (menu.m_name) - { - output("
    • " - "%s Menu: %s
    • \n", - g_menu_number, g_menu_number, paranum, menu.m_name); - body("\n

      %s Menu: %s

      \n", - g_menu_number, paranum, menu.m_name); - } - else - { - output("
    • " - "%s Menu
    • \n", - g_menu_number, g_menu_number, paranum); - body("\n

      %s Menu

      \n", - g_menu_number, paranum); - } - - /* Output logic to toggle the contents below the menu in the table of - * contents. - */ - -#ifdef USE_JQUERY - output("" - "Expand\n", - g_menu_number, g_toggle_number, g_toggle_number); -#else - output("" - "Expand\n", - g_menu_number, g_toggle_number); -#endif - output("
        \n", - g_toggle_number); - - g_menu_number++; - g_toggle_number++; - - /* Print the list of dependencies (if any) */ - - body("
          \n"); - print_dependencies(body); - - /* Show the configuration file */ - - body("
        • Kconfig file: %s/%s\n", - kconfigdir, kconfigname); - body("
        \n"); - - /* Free any allocated memory */ - - free_dependencies(menu.m_ndependencies); - - if (menu.m_name) - { - free(menu.m_name); - } - - /* Increment the paragraph level */ - - incr_level(); - - debug("process_menu: TOKEN_MENU\n"); - debug(" kconfigdir: %s\n", kconfigdir); - debug(" kconfigname: %s\n", kconfigname); - debug(" level: %d\n", g_level); - - /* Return the terminating token */ - - return token; -} - -/**************************************************************************** - * Name: parse_kconfigfile - * - * Description: - * Parse a Kconfig file. - * - ****************************************************************************/ - -static void process_kconfigfile(const char *kconfigdir, - const char *kconfigname); /* Forward reference */ -static char *parse_kconfigfile(FILE *stream, const char *kconfigdir, - const char *kconfigname) -{ - enum token_type_e tokid; - char *token = NULL; - - /* Process each line in the Kconfig file */ - - while (kconfig_line(stream) != NULL) - { - /* Process the first token on the Kconfig file line */ - - token = get_token(); - while (token != NULL) - { - tokid = tokenize(token); - - switch (tokid) - { - case TOKEN_SOURCE: - { - /* Get the relative path from the Kconfig file line */ - - char *source = get_token(); - - /* Remove optional quoting */ - - source = dequote(source); - if (source) - { - char *configname = basename(source); - char *subdir = dirname(source); - char *dirpath; - - /* Check for an absolute path */ - - if (source[0] == '/') - { - dirpath = strdup(subdir); - } - else - { - /* Check if the directory path contains $APPSDIR */ - - char *appsdir = strstr(subdir, "$APPSDIR"); - if (appsdir) - { - char *tmp = appsdir + strlen("$APPSDIR"); - - *appsdir = '\0'; - asprintf(&dirpath, "%s/%s%s%s", - g_kconfigroot, subdir, - g_appsdir, tmp); - } - else - { - asprintf(&dirpath, "%s/%s", - g_kconfigroot, subdir); - } - } - - configname = strdup(configname); - - debug("parse_kconfigfile: " - "Recursing for TOKEN_SOURCE\n"); - debug(" source: %s\n", source); - debug(" subdir: %s\n", subdir); - debug(" dirpath: %s\n", dirpath); - debug(" configname: %s\n", configname); - - /* Then recurse */ - - process_kconfigfile(dirpath, configname); - token = NULL; - free(dirpath); - free(configname); - } - - /* Set the token string to NULL to indicate that - * we need to read the next line - */ - - token = NULL; - } - break; - - case TOKEN_CONFIG: - case TOKEN_MENUCONFIG: - { - char *varname = get_token(); - token = process_config(stream, varname, kconfigdir, - kconfigname); - } - break; - - case TOKEN_COMMENT: - case TOKEN_MAINMENU: - { - token = NULL; /* ignored */ - } - break; - - case TOKEN_MENU: - { - token = process_menu(stream, kconfigdir, kconfigname); - } - break; - - case TOKEN_CHOICE: - { - token = process_choice(stream, kconfigdir, kconfigname); - } - break; - - case TOKEN_ENDCHOICE: - { - /* Reduce body indentation level */ - - body("
      \n"); - g_inchoice--; - - /* Decrement the paragraph level */ - - decr_level(); - incr_paranum(); - token = NULL; - } - break; - - case TOKEN_ENDMENU: - { - /* Reduce table of contents indentation level. NOTE that - * this also terminates the toggle block that - * began with the matching
        - */ - - output("
      \n"); - - /* Decrement the paragraph level */ - - decr_level(); - incr_paranum(); - token = NULL; - } - break; - - case TOKEN_IF: - { - char *dependency = get_token(); - push_dependency(htmlize_expression(dependency)); - token = NULL; - } - break; - - case TOKEN_ENDIF: - { - pop_dependency(); - token = NULL; - } - break; - - default: - { - /* Set token to NULL to skip to the next line. */ - - error("File %s/%s Unhandled token: %s\n", - kconfigdir, kconfigname, token); - token = NULL; - } - break; - } - } - } - - return token; -} - -/**************************************************************************** - * Name: process_kconfigfile - * - * Description: - * Open and parse a Kconfig file - * - ****************************************************************************/ - -static void process_kconfigfile(const char *kconfigdir, - const char *kconfigname) -{ - FILE *stream; - char *kconfigpath; - - /* Create the full path to the Kconfig file */ - - asprintf(&kconfigpath, "%s/%s", kconfigdir, kconfigname); - debug("process_kconfigfile: Entry\n"); - debug(" kconfigdir: %s\n", kconfigdir); - debug(" kconfigpath: %s\n", kconfigpath); - debug(" level: %d\n", g_level); - - /* Open the Kconfig file */ - - stream = fopen(kconfigpath, "r"); - if (!stream) - { - error("open %s failed: %s\n", kconfigpath, strerror(errno)); - exit(ERROR_KCONFIG_OPEN_FAILURE); - } - - /* Process each line in the Kconfig file */ - - parse_kconfigfile(stream, kconfigdir, kconfigname); - - /* Close the Kconfig file and release the memory holding the full path */ - - fclose(stream); - free(kconfigpath); -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: main - * - * Description: - * Program entry point. - * - ****************************************************************************/ - -int main(int argc, char **argv, char **envp) -{ - char *outfile; - const char *paranum; - time_t now; - struct tm *ptm; - int ch; - - /* Parse command line options */ - - g_debug = false; - g_kconfigroot = "."; - g_appsdir = "../apps"; - g_outfile = stdout; - outfile = NULL; - - while ((ch = getopt(argc, argv, ":dhia:o:")) > 0) - { - switch (ch) - { - case 'a' : - g_appsdir = optarg; - break; - - case 'o' : - outfile = optarg; - break; - - case 'h' : - show_usage(argv[0], 0); - - case 'd' : - g_debug = true; - break; - - case '?' : - error("Unrecognized option: %c\n", optopt); - show_usage(argv[0], ERROR_UNRECOGNIZED_OPTION); - - case ':' : - error("Missing option argument, option: %c\n", optopt); - show_usage(argv[0], ERROR_MISSING_OPTION_ARGUMENT); - - default: - error("Unexpected option: %c\n", ch); - show_usage(argv[0], ERROR_UNEXPECTED_OPTION); - } - } - - if (optind < argc) - { - g_kconfigroot = argv[optind]; - optind++; - } - - debug("Using : %s\n", g_kconfigroot); - debug("Using : %s\n", g_appsdir); - debug("Using : %s\n", outfile ? outfile : "stdout"); - - if (optind < argc) - { - error("Unexpected garbage at the end of the line\n"); - show_usage(argv[0], ERROR_TOO_MANY_ARGUMENTS); - } - - /* Open the output file (if any). The output file will hold the - * Table of Contents as the HTML document is generated. - */ - - if (outfile) - { - g_outfile = fopen(outfile, "w"); - if (!g_outfile) - { - error("open %s failed: %s\n", outfile, strerror(errno)); - exit(ERROR_OUTFILE_OPEN_FAILURE); - } - } - - /* Open the temporary file that holds the HTML body. The HTML - * body will be appended after the Table of contents. - */ - - g_bodyfile = fopen(BODYFILE_NAME, "w"); - if (!g_bodyfile) - { - error("open %s failed: %s\n", BODYFILE_NAME, strerror(errno)); - exit(ERROR_BODYFILE_OPEN_FAILURE); - } - - /* Open the temporary file that holds the appendix. The appendix - * will be appended after the HTML body. - */ - - g_apndxfile = fopen(APNDXFILE_NAME, "w"); - if (!g_apndxfile) - { - error("open %s failed: %s\n", APNDXFILE_NAME, strerror(errno)); - exit(ERROR_APNDXFILE_OPEN_FAILURE); - } - - /* Get the current date string in the scratch buffer */ - - now = time(NULL); - ptm = localtime(&now); - strftime(g_scratch, SCRATCH_SIZE, "%B %d, %Y", ptm); - - /* Output header boilerplater */ - - output("\n"); - output("\n"); - output("NuttX Configuration Options\n"); - output("\n"); - - output("\n"); - output("

      \n"); - output("\n"); - output("\n"); - output("\n"); - output("\n"); - output("
      \n"); - output("

      " - "NuttX Configuration Variables

      \n"); - output("

      Last Updated: %s

      \n", g_scratch); - output("
      \n"); - -#ifdef USE_JQUERY - output("\n"); - output("\n"); -#else - output("\n"); -#endif - - output("

      \n"); - output("\n"); - output(" \n"); - output(" \n"); - output(" \n"); - output("
      \n"); - output("

      Table of Contents

      \n"); - output("
      \n"); - output("
        \n"); - - incr_level(); - paranum = get_paranum(); - output("
      • %s Menu: Main
      • \n", - g_menu_number, paranum); - - body("\n"); - body(" \n"); - body(" \n"); - body(" \n"); - body("
        \n"); - body("

        %s Menu: Main

        \n", - g_menu_number, paranum); - body("
        \n"); - - g_menu_number++; - - /* Increment the paragraph level again: - * Everything is included within the main menu. - */ - - incr_level(); - - /* Tell the reader that this is an auto-generated file */ - - body("

        \n"); - body(" Overview.\n"); - body(" The NuttX RTOS is highly configurable.\n"); - body(" The NuttX configuration files are maintained using the " - "kconfig-frontends tool.\n"); - body(" That configuration tool uses Kconfig " - "files that can be found through the NuttX source tree.\n"); - body(" Each Kconfig files contains " - "declarations of configuration variables.\n"); - body(" Each configuration variable provides one configuration " - "option for the NuttX RTOS.\n"); - body(" This configurable options are described in this document.\n"); - body("

        \n"); - body("

        \n"); - body(" Main Menu.\n"); - body(" The normal way to start the NuttX configuration is to enter " - "this command line from the NuttX build directory: " - "make menuconfig.\n"); - body(" Note that NuttX must first be configured before " - "this command so that the configuration file (.config) " - "is present in the top-level build directory.\n"); - body(" The main menu is the name give to the opening menu display " - "after this command is executed.\n"); - body("

        \n"); - body("

        \n"); - body(" Maintenance Note.\n"); - body(" This documentation was auto-generated using the " - "kconfig2html tool\n"); - body(" That tool analyzes the NuttX Kconfig " - "files and generates this HTML document.\n"); - body(" This HTML document file should not be edited manually.\n"); - body(" In order to make changes to this document, " - "you should instead modify the Kconfig file(s) " - "that were used to generated this document and then execute the " - "kconfig2html again " - "to regenerate the HTML document file.\n"); - body("

        \n"); - - /* Process the Kconfig files through recursive descent */ - - process_kconfigfile(g_kconfigroot, "Kconfig"); - - /* Terminate the table of contents */ - - output("
      • " - "Appendix A: Hidden Configuration Variables
      • \n"); - output("
      \n"); - - /* Close the HTML body file and copy it to the output file */ - - fclose(g_bodyfile); - append_file(BODYFILE_NAME); - - /* Output introductory information for the appendix */ - - output("\n"); - output(" \n"); - output(" \n"); - output(" \n"); - output("
      \n"); - output(" " - "

      Appendix A: Hidden Configuration Variables

      \n"); - output("
      \n"); - - output("

      \n"); - output(" This appendix holds internal configurations variables that " - "are not visible to the user.\n"); - output(" These settings are presented out-of-context because " - "they cannot be directly controlled by the user.\n"); - output(" Many of these settings are selected automatically and " - "indirectly when other, visible configuration variables " - "are selected.\n"); - output(" One purpose of these hidden configuration variables " - "is to control menuing in the kconfig-frontends " - "configuration tool.\n"); - output(" Many configuration variables with a form like " - "CONFIG_ARCH_HAVE_feature, for example, " - "are used only to indicate that the selected architecture supports " - "feature and so addition selection associated with " - "feature will become accessible to the user.\n"); - output("

      \n"); - output("
        \n"); - - /* Close the appendix file and copy it to the output file */ - - fclose(g_apndxfile); - append_file(APNDXFILE_NAME); - - /* Output trailer boilerplater */ - - output("
      \n"); - output("\n"); - output("\n"); - - /* Close the output file (if any) and the temporary file */ - - if (outfile) - { - fclose(g_outfile); - } - - return 0; -} diff --git a/tools/link.bat b/tools/link.bat deleted file mode 100755 index eab4b820dc..0000000000 --- a/tools/link.bat +++ /dev/null @@ -1,90 +0,0 @@ -@echo off - -rem tools/link.bat -rem -rem SPDX-License-Identifier: Apache-2.0 -rem -rem Licensed to the Apache Software Foundation (ASF) under one or more -rem contributor license agreements. See the NOTICE file distributed with -rem this work for additional information regarding copyright ownership. The -rem ASF licenses this file to you under the Apache License, Version 2.0 (the -rem "License"); you may not use this file except in compliance with the -rem License. You may obtain a copy of the License at -rem -rem http://www.apache.org/licenses/LICENSE-2.0 -rem -rem Unless required by applicable law or agreed to in writing, software -rem distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -rem WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -rem License for the specific language governing permissions and limitations -rem under the License. -rem - -set usemklink= -if "%1"=="-m" ( - set usemklink="y" -shift -) - -set src=%1 -set link=%2 - -rem Verify that arguments were provided - -if "%src%"=="" goto :MissingSrc -if "%link%"=="" goto :MissingLink -goto CheckSrc - -:MissingSrc - -echo Missing ^ and ^ arguments -goto :ShowUsage - -:MissingLink - -echo Missing ^ arguments -goto :ShowUsage - -rem Verify that a directory exists at the source path - -:CheckSrc - -if exist %src% goto :CheckLink - -echo No directory at %src% -goto :ShowUsage - -:CheckLink - -rem If something already exists at the destination path, remove it - -if not exist %link% goto :MkLink - -rmdir /q /s %link% -if errorlevel 1 ( - echo Failed to remove existing object at %link% - goto :ShowUsage -) - -rem Copy the directory - -:MkLink - -if "%usemklink%"=="y" ( - /user:administrator mklink /d %src% %link% -goto :End -) - -rem %src% may include forward slashes. That upsets xcopy, but not GNUWin32 cp -rem xcopy %src% %link% /c /q /s /e /y /i -cp -dR %src% %link% -echo FAKELNK > %link%\.fakelnk -goto :End - -:ShowUsage -echo USAGE: %0 ^ ^ -echo Where: -echo ^ is the source directory to be linked -echo ^ is the link to be created - -:End diff --git a/tools/macar-qcs.sh b/tools/macar-qcs.sh deleted file mode 100755 index 9791e0999e..0000000000 --- a/tools/macar-qcs.sh +++ /dev/null @@ -1,53 +0,0 @@ -#! /usr/bin/env bash - ############################################################################ - # tools/macar-qcs.sh - # - # SPDX-License-Identifier: Apache-2.0 - # - # Licensed to the Apache Software Foundation (ASF) under one or more - # contributor license agreements. See the NOTICE file distributed with - # this work for additional information regarding copyright ownership. The - # ASF licenses this file to you under the Apache License, Version 2.0 (the - # "License"); you may not use this file except in compliance with the - # License. You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - # License for the specific language governing permissions and limitations - # under the License. - # - ############################################################################ - -# This is an "ar rcs" equivalent without "no symbols" warnings. - -# Background: -# -# NuttX assumes that it's ok to create -# -# - An object without any symbols ("has no symbols") -# - A library without any symbols ("the table of contents is empty") -# -# While macOS's ranlib/libtool can handle those cases, -# it produces warnings cited in the parentheses. -# NuttX developers are not happy with those warnings. -# NuttX developers are not happy with providing per-library dummy -# objects either. -# -# The "has no symbols" warning can be suppressed with -# the -no_warning_for_no_symbols option if you are using -# a recent enough version of ranlib/libtool. -# (Unfortunately, ar doesn't have a way to pass the option to ranlib.) -# However, there seems to be no way to suppress the -# "the table of contents is empty" warning. (thus the grep below) -# -# Reference: -# -# https://opensource.apple.com/source/cctools/cctools-949.0.1/misc/ - -set -e -ar qcS "$@" -# Note: the following line is using bash process substitution -ranlib -no_warning_for_no_symbols "$1" 2> >(grep -F -v "the table of contents is empty") diff --git a/tools/mkconfig.c b/tools/mkconfig.c deleted file mode 100644 index aed6d1887f..0000000000 --- a/tools/mkconfig.c +++ /dev/null @@ -1,121 +0,0 @@ -/**************************************************************************** - * tools/mkconfig.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include -#include - -#include "cfgdefine.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#define DEFCONFIG ".config" - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -static inline char *getfilepath(const char *name) -{ - snprintf(line, PATH_MAX, "%s/" DEFCONFIG, name); - line[PATH_MAX] = '\0'; - return strdup(line); -} - -static void show_usage(const char *progname) -{ - fprintf(stderr, "USAGE: %s \n", progname); - exit(1); -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -int main(int argc, char **argv, char **envp) -{ - char *filepath; - FILE *stream; - - if (argc != 2) - { - fprintf(stderr, "Unexpected number of arguments\n"); - show_usage(argv[0]); - } - - filepath = getfilepath(argv[1]); - if (!filepath) - { - fprintf(stderr, "getfilepath failed\n"); - exit(2); - } - - stream = fopen(filepath, "r"); - if (!stream) - { - fprintf(stderr, "open %s failed: %s\n", filepath, strerror(errno)); - exit(3); - } - - printf( - "/* config.h -- Autogenerated! Do not edit. */\n\n" - "#ifndef __INCLUDE_NUTTX_CONFIG_H\n" - "#define __INCLUDE_NUTTX_CONFIG_H\n\n" - "/* Used to represent the values of tristate options */\n\n" - "#define CONFIG_y 1\n" - "#define CONFIG_m 2\n\n" - "/* General Definitions ***********************************/\n"); - - generate_definitions(stream); - - printf( - "\n/* Sanity Checks *****************************************/\n\n" - "/* If the end of RAM is not specified then it is assumed to be\n" - " * the beginning of RAM plus the RAM size.\n" - " */\n\n" - "#ifndef CONFIG_RAM_END\n" - "# define CONFIG_RAM_END (CONFIG_RAM_START+CONFIG_RAM_SIZE)\n" - "#endif\n\n" - "#ifndef CONFIG_RAM_VEND\n" - "# define CONFIG_RAM_VEND (CONFIG_RAM_VSTART+CONFIG_RAM_SIZE)\n" - "#endif\n\n" - "/* If the end of FLASH is not specified then it is assumed to be\n" - " * the beginning of FLASH plus the FLASH size.\n" - " */\n\n" - "#ifndef CONFIG_FLASH_END\n" - "# define CONFIG_FLASH_END (CONFIG_FLASH_START+CONFIG_FLASH_SIZE)\n" - "#endif\n\n" - "#endif /* __INCLUDE_NUTTX_CONFIG_H */\n"); - - fclose(stream); - - /* Exit (without bothering to clean up allocations) */ - - free(filepath); - return 0; -} diff --git a/tools/mkconfigvars.sh b/tools/mkconfigvars.sh deleted file mode 100755 index 2005264625..0000000000 --- a/tools/mkconfigvars.sh +++ /dev/null @@ -1,131 +0,0 @@ -#!/usr/bin/env bash -# tools/mkconfivars.sh -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# - -USAGE="USAGE: $0 [-d|h] [-v ]" -ADVICE="Try '$0 -h' for more information" - -unset VERSION - -while [ ! -z "$1" ]; do - case $1 in - -v ) - shift - VERSION=$1 - ;; - -d ) - set -x - ;; - -h ) - echo "$0 is a tool for generation of configuration variable documentation" - echo "" - echo $USAGE - echo "" - echo "Where:" - echo " -v " - echo " The NuttX version number expressed as a major, minor and patch number separated" - echo " by a period" - echo " -d" - echo " Enable script debug" - echo " -h" - echo " show this help message and exit" - exit 0 - ;; - * ) - echo "Unrecognized option: ${1}" - echo $USAGE - echo $ADVICE - exit 1 - ;; - esac - shift -done - -# Find the directory we were executed from and were we expect to -# see the directories to tar up - -MYNAME=`basename $0` -KCONFIG2HTML_TARGET=kconfig2html -KCONFIG2HTML1=tools/kconfig2html -KCONFIG2HTML2=tools/kconfig2html.exe -KCONFIG2MAKEFILE=Makefile.host -KCONFIG2MAKEDIR=tools -HTMLFILE=Documentation/NuttXConfigVariables.html -BKUPFILE=Documentation/NuttXConfigVariables.bkp - -if [ -x ./${MYNAME} ] ; then - cd .. || { echo "ERROR: cd .. failed" ; exit 1 ; } -fi - -if [ ! -x tools/${MYNAME} ] ; then - echo "ERROR: This file must be executed from the top-level NuttX directory: $PWD" - exit 1 -fi - -WD=${PWD} - -# Find the application directory - -if [ -d ../apps ]; then - APPSDIR="../apps" -else - if [ -d "../apps-${VERSION}" ]; then - APPSDIR="../apps-${VERSION}" - else - echo "ERROR: Cannot find the application directory" - exit 1 - fi -fi - -# If the kconfig2html executable does not exist, then build it - -if [ -x ${KCONFIG2HTML1} ]; then - KCONFIG2HTML=${KCONFIG2HTML1} -else - if [ -x ${KCONFIG2HTML2} ]; then - KCONFIG2HTML=${KCONFIG2HTML2} - else - make -C ${KCONFIG2MAKEDIR} -f ${KCONFIG2MAKEFILE} ${KCONFIG2HTML_TARGET} 1>/dev/null || \ - { echo "ERROR: make ${KCONFIG2HTML1} failed" ; exit 1 ; } - fi -fi - -if [ -x ${KCONFIG2HTML1} ]; then - KCONFIG2HTML=${KCONFIG2HTML1} -else - if [ -x ${KCONFIG2HTML2} ]; then - KCONFIG2HTML=${KCONFIG2HTML2} - else - echo "ERROR: Failed to create ${KCONFIG2HTML1}" - exit 1 - fi -fi - -# Keep a backup of the previous HTML file. This is usefully primarily -# for testing the effects of changes. - -if [ -e "${HTMLFILE}" ]; then - rm -f ${BKUPFILE} || { echo "ERROR: Failed to remove ${BKUPFILE}" ; exit 1 ; } - mv ${HTMLFILE} ${BKUPFILE} || { echo "ERROR: Failed to move ${HTMLFILE}" ; exit 1 ; } -fi - -# Now re-create the configuration variable document - -${KCONFIG2HTML} -a "${APPSDIR}" -o ${HTMLFILE} diff --git a/tools/mkctags.sh b/tools/mkctags.sh deleted file mode 100755 index 8bfa134792..0000000000 --- a/tools/mkctags.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash -# tools/mkctags.sh -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# - -WD=`pwd` -if [[ "$WD" =~ "nuttx/tools" ]] -then - cd .. -fi - -find .. -type f -iname "*.[chs]" -o -iname "*.cxx" -o -iname "*.hxx" | xargs ctags -a diff --git a/tools/mkdeps.c b/tools/mkdeps.c deleted file mode 100644 index 8f8a219dc9..0000000000 --- a/tools/mkdeps.c +++ /dev/null @@ -1,1020 +0,0 @@ -/**************************************************************************** - * tools/mkdeps.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#define _FILE_OFFSET_BITS 64 - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef HOST_CYGWIN -# include -#endif - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#define MAX_BUFFER (65536) -#define MAX_EXPAND (65536) -#define MAX_SHQUOTE (65536) - -/* MAX_PATH might be defined in stdlib.h */ - -#if !defined(MAX_PATH) -# define MAX_PATH (512) -#endif - -/* NAME_MAX is typically defined in limits.h */ - -#if !defined(NAME_MAX) - - /* FILENAME_MAX might be defined in stdio.h */ - -# if defined(FILENAME_MAX) -# define NAME_MAX FILENAME_MAX -# else - - /* MAXNAMELEN might be defined in dirent.h */ - -# if defined(MAXNAMLEN) -# define NAME_MAX MAXNAMLEN -# else - - /* Lets not let a silly think like this stop us... just make something up */ - -# define NAME_MAX 256 -# endif -# endif -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -typedef enum -{ - COMPILER_GNU = 0, - COMPILER_TASKING = 1, - COMPILER_NUM = 2 -} compiler_t; - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -static char *g_cc = NULL; -static char *g_cflags = NULL; -static char *g_files = NULL; -static char *g_altpath = NULL; -static char *g_objpath = NULL; -static char *g_suffix = ".o"; -static int g_debug = 0; -static bool g_winnative = false; -#ifdef HOST_CYGWIN -static bool g_winpath = false; -#endif - -static char g_command[MAX_BUFFER]; -static char g_path[MAX_PATH]; -#ifdef HOST_CYGWIN -static char g_expand[MAX_EXPAND]; -static char g_dequoted[MAX_PATH]; -static char g_posixpath[MAX_PATH]; -#endif -#ifndef CONFIG_WINDOWS_NATIVE -static char g_shquote[MAX_SHQUOTE]; -#endif - -static const char * const g_moptions[COMPILER_NUM][2] = -{ - /* GNU C/C++ Compiler */ - - { - " -M ", - " -MT " - }, - - /* Tasking C/C++ Compiler */ - - { - " -Em ", - " --pass-c=--make-target=" - } -}; - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -static compiler_t get_compiler(char *ccname) -{ - if (strstr(ccname, "ctc") != NULL) - { - return COMPILER_TASKING; - } - - return COMPILER_GNU; -} - -/* MinGW does not seem to provide strtok_r */ - -#ifndef HAVE_STRTOK_R -static char *my_strtok_r(char *str, const char *delim, char **saveptr) -{ - char *pbegin; - char *pend = NULL; - - /* Decide if we are starting a new string or continuing from - * the point we left off. - */ - - if (str) - { - pbegin = str; - } - else if (saveptr && *saveptr) - { - pbegin = *saveptr; - } - else - { - return NULL; - } - - /* Find the beginning of the next token */ - - for (; - *pbegin && strchr(delim, *pbegin) != NULL; - pbegin++); - - /* If we are at the end of the string with nothing - * but delimiters found, then return NULL. - */ - - if (!*pbegin) - { - return NULL; - } - - /* Find the end of the token */ - - for (pend = pbegin + 1; - *pend && strchr(delim, *pend) == NULL; - pend++); - - /* pend either points to the end of the string or to - * the first delimiter after the string. - */ - - if (*pend) - { - /* Turn the delimiter into a null terminator */ - - *pend++ = '\0'; - } - - /* Save the pointer where we left off and return the - * beginning of the token. - */ - - if (saveptr) - { - *saveptr = pend; - } - - return pbegin; -} - -#undef strtok_r -#define strtok_r my_strtok_r -#endif - -static void append(char **base, const char *str) -{ - char *oldbase; - char *newbase; - int alloclen; - - oldbase = *base; - if (!oldbase) - { - newbase = strdup(str); - if (!newbase) - { - fprintf(stderr, "ERROR: Failed to strdup %s\n", str); - exit(EXIT_FAILURE); - } - } - else - { - alloclen = strlen(oldbase) + strlen(str) + - sizeof((char) ' ') + sizeof((char) '\0'); - newbase = malloc(alloclen); - if (!newbase) - { - fprintf(stderr, "ERROR: Failed to allocate %d bytes\n", alloclen); - exit(EXIT_FAILURE); - } - - snprintf(newbase, alloclen, "%s %s", oldbase, str); - free(oldbase); - } - - *base = newbase; -} - -static void show_usage(const char *progname, const char *msg, int exitcode) -{ - if (msg) - { - fprintf(stderr, "\n"); - fprintf(stderr, "%s:\n", msg); - } - - fprintf(stderr, "\n"); - fprintf(stderr, "%s [OPTIONS] CC -- CFLAGS -- file [file [file...]]\n", - progname); - fprintf(stderr, "\n"); - fprintf(stderr, "Where:\n"); - fprintf(stderr, " CC\n"); - fprintf(stderr, " A variable number of arguments that define how to\n"); - fprintf(stderr, " execute the compiler\n"); - fprintf(stderr, " CFLAGS\n"); - fprintf(stderr, " The compiler compilation flags\n"); - fprintf(stderr, " file\n"); - fprintf(stderr, " One or more C files whose dependencies will be\n"); - fprintf(stderr, " checked. Each file is expected\n"); - fprintf(stderr, " to reside in the current directory unless\n"); - fprintf(stderr, " --dep-path is provided on the command line\n"); - fprintf(stderr, "\n"); - fprintf(stderr, "And [OPTIONS] include:\n"); - fprintf(stderr, " --dep-debug\n"); - fprintf(stderr, " Enable script debug\n"); - fprintf(stderr, " --dep-path \n"); - fprintf(stderr, " Do not look in the current directory for the\n"); - fprintf(stderr, " file. Instead, look in to see\n"); - fprintf(stderr, " if the file resides there. --dep-path may be\n"); - fprintf(stderr, " used multiple times to specify\n"); - fprintf(stderr, " multiple alternative location\n"); - fprintf(stderr, " --obj-path \n"); - fprintf(stderr, " The final objects will not reside in this path\n"); - fprintf(stderr, " but, rather, at the path provided by\n"); - fprintf(stderr, " . if provided multiple time, only the last\n"); - fprintf(stderr, " --obj-path will be used.\n"); - fprintf(stderr, " --obj-suffix \n"); - fprintf(stderr, " If an object path is provided, then the extension\n"); - fprintf(stderr, " will be assumed to be .o. This\n"); - fprintf(stderr, " default suffix can be overridden with this\n"); - fprintf(stderr, " command line option.\n"); - fprintf(stderr, " --winnative\n"); - fprintf(stderr, " By default, a POSIX-style environment is assumed\n"); - fprintf(stderr, " (e.g., Linux, Cygwin, etc.) This option is\n"); - fprintf(stderr, " inform the tool that is working in a pure Windows\n"); - fprintf(stderr, " native environment.\n"); -#ifdef HOST_CYGWIN - fprintf(stderr, " --winpaths\n"); - fprintf(stderr, " This option is useful when using a Windows native\n"); - fprintf(stderr, " toolchain in a POSIX environment (such such as\n"); - fprintf(stderr, " Cygwin). In this case, will CC\n"); - fprintf(stderr, " generates dependency lists using Windows paths\n"); - fprintf(stderr, " (e.g., C:\\blablah\\blabla).\n"); -#endif - fprintf(stderr, " --help\n"); - fprintf(stderr, " Shows this message and exits\n"); - exit(exitcode); -} - -/**************************************************************************** - * Name: do_shquote - * - * Description: - * Escape the given string for use with the shell. - * - * The idea was taken from: - * https://netbsd.gw.com/cgi-bin/man-cgi?shquote++NetBSD-current - * However, this implementation doesn't try to elide extraneous quotes. - ****************************************************************************/ -#ifndef CONFIG_WINDOWS_NATIVE -static const char *do_shquote(const char *argument) -{ - const char *src; - char *dest; - int len; - - src = argument; - dest = g_shquote; - len = 0; - - if (len < sizeof(g_shquote)) - { - *dest++ = '\''; - len++; - } - - while (*src && len < sizeof(g_shquote)) - { - if (*src == '\'') - { - /* Expand single quote to '\'' */ - - if (len + 4 > sizeof(g_shquote)) - { - break; - } - - src++; - memcpy(dest, "\'\\\'\'", 4); - dest += 4; - len += 4; - } - else - { - *dest++ = *src++; - len++; - } - } - - if (*src || len + 2 > sizeof(g_shquote)) - { - fprintf(stderr, - "ERROR: Truncated during shquote string is too long" - "[%zu/%zu]\n", strlen(argument), sizeof(g_shquote)); - exit(EXIT_FAILURE); - } - - *dest++ = '\''; - *dest = '\0'; - return g_shquote; -} -#endif - -static void parse_args(int argc, char **argv) -{ - char *args = NULL; - int argidx; - int group = 0; - - /* Always look in the current directory */ - - g_altpath = strdup("."); - - /* Ensure dep target obj path has a default value */ - - g_objpath = strdup("."); - - /* Accumulate CFLAGS up to "--" */ - - for (argidx = 1; argidx < argc; argidx++) - { - if (strcmp(argv[argidx], "--") == 0) - { - g_cc = g_cflags; - g_cflags = args; - args = NULL; - group++; - } - else if (strcmp(argv[argidx], "--dep-debug") == 0) - { - g_debug++; - } - else if (strcmp(argv[argidx], "--dep-path") == 0) - { - argidx++; - if (argidx >= argc) - { - show_usage(argv[0], "ERROR: Missing argument to --dep-path", - EXIT_FAILURE); - } - - if (args) - { - append(&args, argv[argidx]); - } - else - { - append(&g_altpath, argv[argidx]); - } - } - else if (strcmp(argv[argidx], "--obj-path") == 0) - { - argidx++; - if (argidx >= argc) - { - show_usage(argv[0], "ERROR: Missing argument to --obj-path", - EXIT_FAILURE); - } - - g_objpath = argv[argidx]; - } - else if (strcmp(argv[argidx], "--obj-suffix") == 0) - { - argidx++; - if (argidx >= argc) - { - show_usage(argv[0], "ERROR: Missing argument to --obj-suffix", - EXIT_FAILURE); - } - - g_suffix = argv[argidx]; - } - else if (strcmp(argv[argidx], "--winnative") == 0) - { - g_winnative = true; - } -#ifdef HOST_CYGWIN - else if (strcmp(argv[argidx], "--winpath") == 0) - { - g_winpath = true; - } -#endif - else if (strcmp(argv[argidx], "--help") == 0) - { - show_usage(argv[0], NULL, EXIT_SUCCESS); - } - else - { - const char *arg = argv[argidx]; - - /* This condition means "perform shquote for - * g_cflags, but not g_cc or g_files". - * - * It isn't safe to escape g_cc because, for some reasons, - * Makefile passes it as a single argument like: - * - * $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) - * - * It isn't safe to escape g_files because - * do_dependency() uses them as bare filenames as well. - * (In addition to passing them to system().) - */ -#ifndef CONFIG_WINDOWS_NATIVE - if (group == 1) - { - arg = do_shquote(arg); - } - -#endif - append(&args, arg); - } - } - - /* The final thing accumulated is the list of files */ - - g_files = args; - - if (g_debug) - { - fprintf(stderr, "SELECTIONS\n"); - fprintf(stderr, " CC : [%s]\n", - g_cc ? g_cc : "(None)"); - fprintf(stderr, " CFLAGS : [%s]\n", - g_cflags ? g_cflags : "(None)"); - fprintf(stderr, " FILES : [%s]\n", - g_files ? g_files : "(None)"); - fprintf(stderr, " PATHS : [%s]\n", - g_altpath ? g_altpath : "(None)"); - if (g_objpath) - { - fprintf(stderr, " OBJDIR : [%s]\n", g_objpath); - fprintf(stderr, " SUFFIX : [%s]\n", g_suffix); - } - else - { - fprintf(stderr, " OBJDIR : (None)\n"); - } - -#ifdef HOST_CYGWIN - fprintf(stderr, " Windows Paths : [%s]\n", - g_winpath ? "TRUE" : "FALSE"); -#endif - fprintf(stderr, " Windows Native : [%s]\n", - g_winnative ? "TRUE" : "FALSE"); - } - - /* Check for required parameters */ - - if (!g_cc) - { - show_usage(argv[0], "ERROR: No compiler specified", EXIT_FAILURE); - } - - if (!g_files) - { - /* Don't report an error -- - * this happens normally in some configurations - */ - - printf("# No files specified for dependency generation\n"); - exit(EXIT_SUCCESS); - } - -#ifdef HOST_CYGWIN - if (g_winnative && g_winpath) - { - show_usage(argv[0], - "ERROR: Both --winnative and --winpath makes no sense", - EXIT_FAILURE); - } -#endif -} - -static const char *do_expand(const char *argument) -{ -#ifdef HOST_CYGWIN - if (g_winpath) - { - const char *src; - char *dest; - int len; - - src = argument; - dest = g_expand; - len = 0; - - while (*src && len < MAX_EXPAND) - { - if (*src == '\\') - { - /* Copy backslash */ - - *dest++ = *src++; - if (++len >= MAX_EXPAND) - { - break; - } - - /* Already expanded? */ - - if (*src == '\\') - { - /* Yes... just copy all consecutive backslashes */ - - do - { - *dest++ = *src++; - if (++len >= MAX_EXPAND) - { - break; - } - } - while (*src == '\\'); - } - else - { - /* No.. expeand */ - - *dest++ = '\\'; - if (++len >= MAX_EXPAND) - { - break; - } - } - } - else - { - *dest++ = *src++; - len++; - } - } - - if (*src) - { - fprintf(stderr, - "ERROR: Truncated during expansion string is too long" - "[%zu/%u]\n", strlen(argument), MAX_EXPAND); - exit(EXIT_FAILURE); - } - - *dest = '\0'; - return g_expand; - } - else -#endif - { - return argument; - } -} - -#ifdef HOST_CYGWIN -static bool dequote_path(const char *winpath) -{ - char *dest = g_dequoted; - const char *src = winpath; - int len = 0; - bool quoted = false; - - while (*src && len < MAX_PATH) - { - if (*src != '\\' || (src[1] != ' ' && src[1] != '(' && src[1] != ')')) - { - *dest++ = *src; - len++; - } - else - { - quoted = true; - } - - src++; - } - - if (*src || len >= MAX_PATH) - { - fprintf(stderr, "# ERROR: Path truncated\n"); - exit(EXIT_FAILURE); - } - - *dest = '\0'; - return quoted; -} -#endif - -static const char *convert_path(const char *path) -{ -#ifdef HOST_CYGWIN - if (g_winpath) - { - const char *retptr; - ssize_t size; - ssize_t ret; - bool quoted; - - quoted = dequote_path(path); - if (quoted) - { - retptr = g_posixpath; - } - else - { - retptr = &g_posixpath[1]; - } - - size = cygwin_conv_path(CCP_POSIX_TO_WIN_A | CCP_RELATIVE, g_dequoted, - NULL, 0); - if (size > (MAX_PATH - 3)) - { - fprintf(stderr, "# ERROR: POSIX path too long: %zd\n", size); - exit(EXIT_FAILURE); - } - - ret = cygwin_conv_path(CCP_POSIX_TO_WIN_A | CCP_RELATIVE, g_dequoted, - &g_posixpath[1], MAX_PATH - 3); - if (ret < 0) - { - fprintf(stderr, "# ERROR: cygwin_conv_path '%s' failed: %s\n", - g_dequoted, strerror(errno)); - exit(EXIT_FAILURE); - } - - if (quoted) - { - size++; - g_posixpath[0] = '"'; - g_posixpath[size] = '"'; - } - - g_posixpath[size + 1] = '\0'; - return retptr; - } - else -#endif - { - return path; - } -} - -static void do_dependency(const char *file) -{ - const char * const * moption; - struct stat buf; - char *alloc; - char *altpath; - char *path; - char *lasts; - char separator; - int cmdlen; - int pathlen; - int filelen; - int totallen; - int ret; - - /* Initialize the separator */ - -#ifdef HOST_CYGWIN - separator = (g_winnative || g_winpath) ? '\\' : '/'; -#else - separator = g_winnative ? '\\' : '/'; -#endif - - moption = g_moptions[get_compiler(g_cc)]; - - /* Copy the compiler into the command buffer */ - - cmdlen = strlen(g_cc); - if (cmdlen >= MAX_BUFFER) - { - fprintf(stderr, "ERROR: Compiler string is too long [%d/%d]: %s\n", - cmdlen, MAX_BUFFER, g_cc); - exit(EXIT_FAILURE); - } - - strcpy(g_command, g_cc); - - /* Copy " -MT " */ - - if (g_objpath) - { - char tmp[NAME_MAX + 6]; - char *dupname; - char *objname; - char *dotptr; - const char *expanded; - - dupname = strdup(file); - if (!dupname) - { - fprintf(stderr, "ERROR: Failed to dup: %s\n", file); - exit(EXIT_FAILURE); - } - - /* Check g_altpath. If only the CURRENT path is included, - * the obj target use its own full path. - */ - - if (strcmp(g_altpath, ".") == 0) - { - objname = dupname; - } - else - { - objname = basename(dupname); - } - - dotptr = strrchr(objname, '.'); - if (dotptr) - { - *dotptr = '\0'; - } - - snprintf(tmp, NAME_MAX + 6, "%s%s%c%s%s ", - moption[1], g_objpath, separator, objname, g_suffix); - expanded = do_expand(tmp); - - cmdlen += strlen(expanded); - if (cmdlen >= MAX_BUFFER) - { - fprintf(stderr, "ERROR: Option string is too long [%d/%d]: %s\n", - cmdlen, MAX_BUFFER, moption[0]); - exit(EXIT_FAILURE); - } - - strcat(g_command, expanded); - free(dupname); - } - - /* Copy " -M " */ - - cmdlen += strlen(moption[0]); - if (cmdlen >= MAX_BUFFER) - { - fprintf(stderr, "ERROR: Option string is too long [%d/%d]: %s\n", - cmdlen, MAX_BUFFER, moption[0]); - exit(EXIT_FAILURE); - } - - strcat(g_command, moption[0]); - - /* Copy the CFLAGS into the command buffer */ - - if (g_cflags) - { - const char *expanded; - - expanded = do_expand(g_cflags); - cmdlen += strlen(expanded); - - if (cmdlen >= MAX_BUFFER) - { - fprintf(stderr, "ERROR: CFLAG string is too long [%d/%d]: %s\n", - cmdlen, MAX_BUFFER, g_cflags); - exit(EXIT_FAILURE); - } - - strcat(g_command, expanded); - } - - /* Add a space */ - - g_command[cmdlen] = ' '; - cmdlen++; - g_command[cmdlen] = '\0'; - - /* Make a copy of g_altpath. We need to do this because at least the - * version of strtok_r above does modify it. - */ - - alloc = strdup(g_altpath); - if (!alloc) - { - fprintf(stderr, "ERROR: Failed to strdup paths\n"); - exit(EXIT_FAILURE); - } - - altpath = alloc; - - /* Try each path. This loop will continue until each path has been tried - * (failure) or until stat() finds the file - */ - - while ((path = strtok_r(altpath, " ", &lasts)) != NULL) - { - const char *expanded; - const char *converted; - - /* Create a full path to the file */ - - pathlen = strlen(path); - if (pathlen >= MAX_PATH) - { - fprintf(stderr, "ERROR: Path is too long [%d/%d]: %s\n", - pathlen, MAX_PATH, path); - exit(EXIT_FAILURE); - } - - strcpy(g_path, path); - - if (g_path[pathlen] != '\0') - { - fprintf(stderr, "ERROR: Missing NUL terminator\n"); - exit(EXIT_FAILURE); - } - - if (g_path[pathlen - 1] != separator) - { - g_path[pathlen] = separator; - g_path[pathlen + 1] = '\0'; - pathlen++; - } - - filelen = strlen(file); - pathlen += filelen; - if (pathlen >= MAX_PATH) - { - fprintf(stderr, "ERROR: Path+file is too long [%d/%d]\n", - pathlen, MAX_PATH); - exit(EXIT_FAILURE); - } - - strcat(g_path, file); - - /* Check that a file actually exists at this path */ - - if (g_debug) - { - fprintf(stderr, "Trying path=%s file=%s fullpath=%s\n", - path, file, g_path); - } - - converted = convert_path(g_path); - ret = stat(converted, &buf); - if (ret < 0) - { - altpath = NULL; - continue; - } - - if (!S_ISREG(buf.st_mode)) - { - fprintf(stderr, - "ERROR: File %s exists but is not a regular file\n", - g_path); - exit(EXIT_FAILURE); - } - - /* Append the expanded path to the command */ - - expanded = do_expand(g_path); - pathlen = strlen(expanded); - totallen = cmdlen + pathlen; - - if (totallen >= MAX_BUFFER) - { - fprintf(stderr, "ERROR: Path string is too long [%d/%d]: %s\n", - totallen, MAX_BUFFER, g_path); - exit(EXIT_FAILURE); - } - - strcat(g_command, expanded); - - /* Okay.. we have everything. Create the dependency. One a failure - * to start the compiler, system() will return -1; Otherwise, the - * returned value from the compiler is in WEXITSTATUS(ret). - */ - - if (g_debug) - { - fprintf(stderr, "Executing: %s\n", g_command); - } - - ret = system(g_command); -#ifdef WEXITSTATUS - if (ret < 0 || WEXITSTATUS(ret) != 0) - { - if (ret < 0) - { - fprintf(stderr, "ERROR: system failed: %s\n", strerror(errno)); - } - else - { - fprintf(stderr, - "ERROR: %s failed: %d\n", g_cc, WEXITSTATUS(ret)); - } - - fprintf(stderr, " command: %s\n", g_command); - exit(EXIT_FAILURE); - } -#else - if (ret < 0) - { - fprintf(stderr, "ERROR: system failed: %s\n", strerror(errno)); - fprintf(stderr, " command: %s\n", g_command); - exit(EXIT_FAILURE); - } -#endif - - /* We don't really know that the command succeeded... - * Let's assume that it did - */ - - free(alloc); - return; - } - - printf("# ERROR: File \"%s\" not found at any location\n", file); - exit(EXIT_FAILURE); -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -int main(int argc, char **argv, char **envp) -{ - char *lasts; - char *files; - char *file; - - /* Parse command line parameters */ - - parse_args(argc, argv); - - /* Then generate dependencies for each path on the command line. NOTE - * strtok_r will clobber the files list. But that is okay because we are - * only going to traverse it once. - */ - - files = g_files; - while ((file = strtok_r(files, " ", &lasts)) != NULL) - { - /* Check if we need to do path conversions for a Windows-natvive tool - * being using in a POSIX/Cygwin environment. - */ - - do_dependency(file); - files = NULL; - } - - return EXIT_SUCCESS; -} diff --git a/tools/mkfsdata.pl b/tools/mkfsdata.pl deleted file mode 100755 index 55e11073ab..0000000000 --- a/tools/mkfsdata.pl +++ /dev/null @@ -1,118 +0,0 @@ -#!/usr/bin/perl -# tools/mkfsdata.pl -# -# SPDX-License-Identifier: BSD-3-Clause -# -# Extracted from uIP which has a license that is compatible with NuttX. -# There is no authorship, copyright, or licensing information in the -# original file. Possibly written by Adam Dunkels. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# - -open(OUTPUT, "> httpd_fsdata.c"); - -chdir("httpd-fs"); - -opendir(DIR, "."); -@files = grep { !/^\./ && !/(CVS|~)/ } readdir(DIR); -closedir(DIR); - -print(OUTPUT "#include \"netutils/httpd.h\"\n\n"); -print(OUTPUT "#ifndef NULL\n#define NULL 0\n#endif\n\n"); - -foreach $file (@files) { - - if(-d $file && $file !~ /^\./) { - print "Processing directory $file\n"; - opendir(DIR, $file); - @newfiles = grep { !/^\./ && !/(CVS|~)/ } readdir(DIR); - closedir(DIR); - printf "Adding files @newfiles\n"; - @files = (@files, map { $_ = "$file/$_" } @newfiles); - next; - } -} - -foreach $file (@files) { - if(-f $file) { - - print "Adding file $file\n"; - - open(FILE, $file) || die "Could not open file $file\n"; - - $file =~ s-^-/-; - $fvar = $file; - $fvar =~ s-/-_-g; - $fvar =~ s-\.-_-g; - # for AVR, add PROGMEM here - print(OUTPUT "static const unsigned char data".$fvar."[] =\n"); - print(OUTPUT "{\n /* $file */\n\n "); - for($j = 0; $j < length($file); $j++) { - printf(OUTPUT "%#02x, ", unpack("C", substr($file, $j, 1))); - } - printf(OUTPUT "0x00,\n "); - - $i = 0; - while(read(FILE, $data, 1)) { - printf(OUTPUT "%#02x, ", unpack("C", $data)); - $i++; - if($i == 10) { - print(OUTPUT "\n"); - $i = 0; - print(OUTPUT " "); - } - } -# print(OUTPUT "0x00\n};\n\n"); - print(OUTPUT "\n};\n\n"); - close(FILE); - push(@fvars, $fvar); - push(@pfiles, $file); - } -} - -for($i = 0; $i < @fvars; $i++) { - $file = $pfiles[$i]; - $fvar = $fvars[$i]; - - if($i == 0) { - $prevfile = "NULL"; - } else { - $prevfile = "file" . $fvars[$i - 1]; - } - if($i == @fvars-1) { - print(OUTPUT "const struct httpd_fsdata_file g_httpdfs_root[] =\n {{$prevfile, data$fvar, "); - } else { - print(OUTPUT "const struct httpd_fsdata_file file".$fvar."[] =\n {{$prevfile, data$fvar, "); - } - print(OUTPUT "data$fvar + ". (length($file) + 1) .", "); - print(OUTPUT "sizeof(data$fvar) - ". (length($file) + 1) ."}};\n\n"); -} - -# print(OUTPUT "#define HTTPD_FS_ROOT file$fvars[$i - 1]\n\n"); -print(OUTPUT "const int g_httpd_numfiles = $i;\n"); diff --git a/tools/mknulldeps.sh b/tools/mknulldeps.sh deleted file mode 100755 index bd94788d70..0000000000 --- a/tools/mknulldeps.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -# tools/mknulldeps.sh -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -echo "# The selected toolchain does not support dependency generation" diff --git a/tools/mkversion.c b/tools/mkversion.c deleted file mode 100644 index 92b9fc9fc4..0000000000 --- a/tools/mkversion.c +++ /dev/null @@ -1,99 +0,0 @@ -/**************************************************************************** - * tools/mkversion.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include -#include - -#include "cfgdefine.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#define DEFCONFIG ".version" - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -static inline char *getfilepath(const char *name) -{ - snprintf(line, PATH_MAX, "%s/" DEFCONFIG, name); - line[PATH_MAX] = '\0'; - return strdup(line); -} - -static void show_usage(const char *progname) -{ - fprintf(stderr, "USAGE: %s \n", progname); - exit(1); -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -int main(int argc, char **argv, char **envp) -{ - char *filepath; - FILE *stream; - - if (argc != 2) - { - fprintf(stderr, "Unexpected number of arguments\n"); - show_usage(argv[0]); - } - - filepath = getfilepath(argv[1]); - if (!filepath) - { - fprintf(stderr, "getfilepath failed\n"); - exit(2); - } - - stream = fopen(filepath, "r"); - if (!stream) - { - fprintf(stderr, "open %s failed: %s\n", filepath, strerror(errno)); - exit(3); - } - - printf("/* version.h -- Autogenerated! Do not edit. */\n\n"); - printf("#ifndef __INCLUDE_NUTTX_VERSION_H\n"); - printf("#define __INCLUDE_NUTTX_VERSION_H\n\n"); - generate_definitions(stream); - printf("\n#define CONFIG_VERSION ((CONFIG_VERSION_MAJOR << 16) |\\\n" - " (CONFIG_VERSION_MINOR << 8) |\\\n" - " (CONFIG_VERSION_PATCH))\n\n"); - printf("#endif /* __INCLUDE_NUTTX_VERSION_H */\n"); - fclose(stream); - - /* Exit (without bothering to clean up allocations) */ - - free(filepath); - return 0; -} diff --git a/tools/mkwindeps.sh b/tools/mkwindeps.sh deleted file mode 100755 index 345bc0a66c..0000000000 --- a/tools/mkwindeps.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env bash -# tools/mkwindeps.sh -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# - -# Uncomment to enable debug options -# set -x -# DEBUG=--dep-debug - -# Make sure that we know where we are - -TOOLDIR=$(dirname $0) - -if [ ! -x ${TOOLDIR}/mkwindeps.sh ]; then - echo "# ERROR: tools/ directory not found" - exit 1 -fi - -# Make sure that executables are ready - -MKDEPS=${TOOLDIR}/mkdeps.exe -CNVWINDEPS=${TOOLDIR}/cnvwindeps.exe - -if [ ! -x ${MKDEPS} ]; then - echo "# ERROR: tools/mkdeps.exe does not exist" - exit 1 -fi - -if [ ! -x ${CNVWINDEPS} ]; then - echo "# ERROR: tools/cnvwindeps.exe does not exist" - exit 1 -fi - -# Run the mkdeps.exe program to generate a Windows dependency file - -TMPFILE=$(mktemp) -${MKDEPS} ${DEBUG} --winpath $* > ${TMPFILE} || { echo "# ERROR: mkdeps.exe failed"; exit 1; } - -# Then convert this to a POSIX dependency file (on stdout) - -${CNVWINDEPS} ${TMPFILE} -rm -f ${TMPFILE} diff --git a/tools/noteinfo.c b/tools/noteinfo.c deleted file mode 100644 index c8c076c2fe..0000000000 --- a/tools/noteinfo.c +++ /dev/null @@ -1,927 +0,0 @@ -/**************************************************************************** - * tools/noteinfo.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include - -/**************************************************************************** - * The following is autogenerated and comes from: - * - * (gdb) p &g_note_info.ni_buffer - * $3 = (uint8_t (*)[2048]) 0x10831004 - * (gdb) dump binary memory noteinfo.bin 0x10831004 0x10831804 - * - * $ xxd -g 1 -i noteinfo.bin >noteinfo.h - * - ****************************************************************************/ - -unsigned char noteinfo_bin[] = -{ - 0x06, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, - 0x06, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, - 0x06, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, - 0x06, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0b, 0x02, 0x64, 0x00, - 0x06, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x06, 0x0a, 0x03, 0x00, 0x00, 0x00, - 0x00, 0xc0, 0x00, 0x00, 0x00, 0x0b, 0x02, 0x00, 0x00, 0x00, 0x00, 0xc0, - 0x00, 0x00, 0x00, 0x03, 0x0a, 0x03, 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, - 0x00, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0b, 0x02, 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, 0x00, 0x00, - 0x06, 0x0a, 0x03, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x0b, - 0x02, 0x00, 0x00, 0x00, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x03, 0x0a, 0x03, - 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x0c, 0x0d, 0x64, 0x00, - 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, - 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, - 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, - 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, - 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0a, 0x64, 0x00, - 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, - 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0b, 0x64, 0x00, - 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0d, 0x64, 0x00, - 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, - 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, - 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, - 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, - 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, - 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0b, 0x02, 0x64, 0x00, - 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x06, 0x0a, 0x03, 0x00, 0x00, 0x00, - 0x00, 0xc1, 0x00, 0x00, 0x00, 0x0b, 0x02, 0x00, 0x00, 0x00, 0x00, 0xc1, - 0x00, 0x00, 0x00, 0x03, 0x0a, 0x03, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, - 0x00, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0b, 0x02, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x06, 0x0a, 0x03, 0x00, 0x00, 0x00, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x0b, - 0x02, 0x00, 0x00, 0x00, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x03, 0x0a, 0x03, - 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x0c, 0x0d, 0x64, 0x00, - 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, - 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, - 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, - 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, - 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0a, 0x64, 0x00, - 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, - 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0b, 0x64, 0x00, - 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0d, 0x64, 0x00, - 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, - 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, - 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, - 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, - 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, - 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0b, 0x02, 0x64, 0x00, - 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x06, 0x0a, 0x03, 0x00, 0x00, 0x00, - 0x00, 0xc1, 0x00, 0x00, 0x00, 0x0b, 0x02, 0x00, 0x00, 0x00, 0x00, 0xc1, - 0x00, 0x00, 0x00, 0x03, 0x0a, 0x03, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, - 0x00, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0a, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0b, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0a, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0b, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0a, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0b, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0a, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0b, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x11, 0x00, 0x64, 0x00, 0x07, 0x00, 0xc1, 0x00, 0x00, 0x00, - 0x6f, 0x73, 0x74, 0x65, 0x73, 0x74, 0x00, 0x0b, 0x06, 0x64, 0x00, 0x06, - 0x00, 0xc1, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0a, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0b, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0a, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0b, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0b, 0x04, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0b, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x40, 0x00, 0x00, 0x00, 0x02, 0x0b, 0x04, 0x00, 0x00, 0x00, 0x00, - 0x7f, 0x00, 0x00, 0x00, 0x03, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0b, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0b, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0b, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0b, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x11, 0x00, 0xc0, 0x00, 0x05, 0x00, 0xbf, - 0x00, 0x00, 0x00, 0x68, 0x70, 0x77, 0x6f, 0x72, 0x6b, 0x00, 0x0b, 0x02, - 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x03, 0x0a, 0x03, 0xc0, - 0x00, 0x05, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0xc0, 0x00, 0x05, - 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0a, 0xc0, 0x00, 0x05, - 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0b, 0x02, 0xc0, 0x00, 0x05, - 0x00, 0xbf, 0x00, 0x00, 0x00, 0x07, 0x0a, 0x03, 0x00, 0x00, 0x00, 0x00, - 0xbf, 0x00, 0x00, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0b, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0b, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0b, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0b, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0f, 0x00, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x69, 0x6e, 0x69, 0x74, 0x00, 0x0b, 0x02, 0x00, 0x00, 0x00, - 0x00, 0xbf, 0x00, 0x00, 0x00, 0x03, 0x0a, 0x03, 0x64, 0x00, 0x06, 0x00, - 0xbf, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0b, 0x02, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x06, 0x0a, 0x03, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, 0x00, - 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x0b, 0x02, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x03, - 0x0a, 0x03, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x0c, 0x0d, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0a, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0b, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0d, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0a, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0b, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0d, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0b, 0x02, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x06, 0x0a, 0x03, 0x00, - 0x00, 0x00, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x0c, 0x0d, 0x00, 0x00, 0x00, - 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0b, 0x02, 0x00, 0x00, 0x00, - 0x00, 0xbf, 0x00, 0x00, 0x00, 0x03, 0x0a, 0x03, 0x64, 0x00, 0x06, 0x00, - 0xbf, 0x00, 0x00, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0a, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0b, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0b, 0x02, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x06, 0x0a, 0x03, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, 0x00, - 0x00, 0x0b, 0x02, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x03, - 0x0a, 0x03, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x0c, 0x0d, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0a, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0b, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0d, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0b, 0x02, - 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x06, 0x0a, 0x03, 0x00, - 0x00, 0x00, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x0b, 0x02, 0x00, 0x00, 0x00, - 0x00, 0xbf, 0x00, 0x00, 0x00, 0x03, 0x0a, 0x03, 0x64, 0x00, 0x06, 0x00, - 0xbf, 0x00, 0x00, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0b, 0x02, 0x64, 0x00, 0x06, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x06, 0x0a, 0x03, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, 0x00, - 0x00, 0x0b, 0x02, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x03, - 0x0a, 0x03, 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x0c, 0x0d, - 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, - 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, - 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, - 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, - 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0a, - 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, - 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, - 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, - 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, - 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, - 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0b, - 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0d, - 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, - 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, - 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, - 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, - 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, - 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0b, 0x02, - 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x06, 0x0a, 0x03, 0x00, - 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x0b, 0x02, 0x00, 0x00, 0x00, - 0x00, 0xc0, 0x00, 0x00, 0x00, 0x03, 0x0a, 0x03, 0x64, 0x00, 0x06, 0x00, - 0xc0, 0x00, 0x00, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0a, 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0b, 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0a, 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0b, 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0d, 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0c, 0x64, 0x00, 0x06, 0x00, 0xc0, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x0c, 0x0d, 0x64, 0x00 -}; -unsigned int noteinfo_bin_len = 8192; - -/**************************************************************************** - * This comes from: - * - * (gdb) p g_note_info - * $1 = {ni_head = 915, ni_tail = 925, - * ni_buffer = ... - * - ****************************************************************************/ - -unsigned int ni_head = 1866; -unsigned int ni_tail = 1868; - -/**************************************************************************** - * The following does not change - ****************************************************************************/ - -#define CONFIG_SMP 1 -struct note_common_s -{ - uint8_t nc_length; /* Length of the note */ - uint8_t nc_type; /* See enum note_type_e */ - uint8_t nc_priority; /* Thread/task priority */ -#ifdef CONFIG_SMP - uint8_t nc_cpu; /* CPU thread/task running on */ -#endif - uint8_t nc_pid[2]; /* ID of the thread/task */ - uint8_t nc_systime[4]; /* Time when note buffered */ -}; - -#define NTYPES 18 -static char *noteid[NTYPES] = -{ - "NOTE_START", /* type = 0 */ - "NOTE_STOP", /* type = 1 */ - "NOTE_SUSPEND", /* type = 2 */ - "NOTE_RESUME", /* type = 3 */ - - "NOTE_CPU_START", /* type = 4 */ - "NOTE_CPU_STARTED", /* type = 5 */ - "NOTE_CPU_PAUSE", /* type = 6 */ - "NOTE_CPU_PAUSED", /* type = 7 */ - "NOTE_CPU_RESUME", /* type = 8 */ - "NOTE_CPU_RESUMED", /* type = 9 */ - - "NOTE_PREEMPT_LOCK", /* type = 10 */ - "NOTE_PREEMPT_UNLOCK", /* type = 11 */ - - "NOTE_CSECTION_ENTER", /* type = 12 */ - "NOTE_CSECTION_LEAVE", /* type = 13 */ - - "NOTE_SPINLOCK_LOCK", /* type = 14 */ - "NOTE_SPINLOCK_LOCKED", /* type = 15 */ - "NOTE_SPINLOCK_UNLOCK", /* type = 16 */ - "NOTE_SPINLOCK_ABORT" /* type = 17 */ -}; - -static unsigned int next_ndx(unsigned int ndx) -{ - if (++ndx >= noteinfo_bin_len) - { - ndx -= noteinfo_bin_len; - } - - return ndx; -} - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -int main(int argc, char **argv) -{ - struct note_common_s *note; - unsigned int size; - unsigned int notndx; - unsigned int bufndx; - unsigned int remainder; - unsigned int value; - char buffer[64]; - - notndx = ni_tail; - while (notndx != ni_head) - { - printf("%5u: ", notndx); - - /* Copy the note into the buffer */ - - size = noteinfo_bin[notndx]; - if (size > 64) - { - printf("ERROR: size to big: %u\n", size); - exit(1); - } - - for (bufndx = 0; bufndx < size; ) - { - buffer[bufndx] = noteinfo_bin[notndx]; - - bufndx++; - notndx = next_ndx(notndx); - - if (notndx == ni_head && bufndx < size) - { - printf("Incomplete record\n"); - exit(1); - } - } - - note = (struct note_common_s *)buffer; - printf("CPU%1u PID%-3uprio=%-3u: %-20s time=%08lx", - note->nc_cpu, - (unsigned int) note->nc_pid[1] << 8 | - (unsigned int) note->nc_pid[0], - note->nc_priority, - note->nc_type < NTYPES ? noteid[note->nc_type] : "Unrecognized", - (unsigned long)note->nc_systime[3] << 24 | - (unsigned long)note->nc_systime[2] << 16 | - (unsigned long)note->nc_systime[1] << 8 | - (unsigned long)note->nc_systime[0]); - - bufndx = sizeof(struct note_common_s); - remainder = size - bufndx; - if (remainder > 0) - { - switch (note->nc_type) - { - /* Followed by a variable length, NULL terminated name */ - - case 0: /* NOTE_START */ - buffer[size - 1] = '\0'; - printf(" Name: %s", &buffer[bufndx]); - bufndx = size; - remainder = 0; - break; - - /* Followed by an 8-bit task state */ - - case 2: /* NOTE_SUSPEND */ - printf(" State=%u", (unsigned int)buffer[bufndx]); - bufndx++; - remainder--; - break; - - /* Followed by an 8-bit target CPU number */ - - case 4: /* NOTE_CPU_START */ - case 6: /* NOTE_CPU_PAUSE */ - case 8: /* NOTE_CPU_RESUME */ - printf(" Target CPU%u", (unsigned int)buffer[bufndx]); - bufndx++; - remainder--; - break; - - /* Followed by a 16-bit count */ - - case 10: /* NOTE_PREEMPT_LOCK */ - case 11: /* NOTE_PREEMPT_UNLOCK */ - case 12: /* NOTE_CSECTION_ENTER */ - case 13: /* NOTE_CSECTION_LEAVE */ - if (remainder >= 2) - { - value = (unsigned int)buffer[bufndx] << 8 | - (unsigned int)buffer[bufndx + 1]; - bufndx += 2; - remainder -= 2; - break; - } - - /* Followed by an 8-bit spinlock value */ - - case 14: /* NOTE_SPINLOCK_LOCK */ - case 15: /* NOTE_SPINLOCK_LOCKED */ - case 16: /* NOTE_SPINLOCK_UNLOCK */ - case 17: /* NOTE_SPINLOCK_ABORT */ - printf(" Spinlock=%u", (unsigned int)buffer[bufndx]); - bufndx++; - remainder--; - break; - - /* Nothing addition shoold follow these types */ - - case 1: /* NOTE_STOP */ - case 3: /* NOTE_RESUME */ - case 5: /* NOTE_CPU_STARTED */ - case 7: /* NOTE_CPU_PAUSED */ - case 9: /* NOTE_CPU_RESUMED */ - default: - break; - } - } - - for (; bufndx < size; bufndx++) - { - printf(" %02x", buffer[bufndx]); - } - - printf("\n"); - } -} diff --git a/tools/pre-commit b/tools/pre-commit deleted file mode 100755 index f9210fc7ce..0000000000 --- a/tools/pre-commit +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash -# tools/pre-commit -# git hook to run check-patch on the output and stop any commits -# that do not pass. Note, only for git-commit, and not for any of the -# other scenarios -# -# Copyright 2010 Ben Dooks, - -if git rev-parse --verify HEAD 2>/dev/null >/dev/null -then - against=HEAD -else - # Initial commit: diff against an empty tree object - against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 -fi - -git diff --cached $against -- | ../nuttx/tools/checkpatch.sh -r - diff --git a/tools/rmcr.c b/tools/rmcr.c deleted file mode 100644 index d6ff44694d..0000000000 --- a/tools/rmcr.c +++ /dev/null @@ -1,110 +0,0 @@ -/**************************************************************************** - * tools/rmcr.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include -#include -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#define LINESIZE 1024 - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -static char g_line[LINESIZE]; - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -int main(int argc, char **argv) -{ - FILE *instream; - FILE *outstream; - int len; - int ret = 1; - - if (argc != 3) - { - fprintf(stderr, "ERROR: Two arguments expected\n"); - return 1; - } - - /* Open the source file read-only */ - - instream = fopen(argv[1], "r"); - if (instream == NULL) - { - fprintf(stderr, "ERROR: Failed to open %s for reading\n", argv[1]); - return 1; - } - - /* Open the destination file write-only */ - - outstream = fopen(argv[2], "w"); - if (outstream == NULL) - { - fprintf(stderr, "ERROR: Failed to open %s for reading\n", argv[2]); - goto errout_with_instream; - } - - /* Process each line in the file */ - - while ((fgets(g_line, LINESIZE, instream) != NULL)) - { - /* Remove all whitespace (including newline) from the end of the line */ - - len = strlen(g_line) - 1; - while (len >= 0 && isspace(g_line[len])) - { - len--; - } - - /* Put the newline back. len is either -1, or points to the last, non- - * space character in the line. - */ - - g_line[len + 1] = '\n'; - g_line[len + 2] = '\0'; - fputs(g_line, outstream); - } - - ret = 0; - fclose(outstream); - -errout_with_instream: - fclose(instream); - return ret; -} diff --git a/tools/showsize.sh b/tools/showsize.sh deleted file mode 100755 index c0dfff55c5..0000000000 --- a/tools/showsize.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/env bash -############################################################################ -# tools/showsize.sh -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -# set -x - -# Host nm should always work -# vs. NM=arm-none-eabi-nm - -NM=nm - -# This should be executed from the top-level NuttX directory - -if [ ! -x "tools/showsize.sh" ]; then - echo "This script must executed from the top-level NuttX directory" - exit 1 -fi - -# Support pass a NuttX executable - -if [ -n "$1" ]; then - NUTTX=$1 -else - # On the cywin simulation, the executable will be nuttx.exe - - if [ -f "nuttx" ]; then - NUTTX=nuttx - else - if [ -x "nuttx.exe" ]; then - NUTTX=nuttx.exe - else - echo "Cannot find the NuttX executable" - exit 1 - fi - fi -fi - -echo "NuttX executable:" $NUTTX - -# Show what we were asked for - -echo "TOP 10 BIG DATA" -$NM --print-size --size-sort --radix dec -C $NUTTX | grep ' [DdBb] ' | tail -20 - -echo "TOP 10 BIG CODE" -$NM --print-size --size-sort --radix dec -C $NUTTX | grep ' [TtWw] ' | tail -20 diff --git a/tools/showstack.sh b/tools/showstack.sh deleted file mode 100755 index ad1f5e2270..0000000000 --- a/tools/showstack.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env bash -############################################################################ -# tools/showstack.sh -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -function analyse() -{ - sufiles=$(find $1 -name "*.su") - if [[ $sufiles != "" ]] - then - echo $sufiles | xargs -n1 cat | awk -F'\t' '{print $2", "$1}' | sort -n -r | head -n $2 - fi -} - -if [[ $# == 0 ]]; then - echo "usage: $0 ..." - exit -fi - -rank=20 - -if [[ "$1" =~ ^[0-9]+$ ]]; then - rank=$1 - shift -fi - -for dir in $@; do - analyse $dir $rank -done diff --git a/tools/stm32_pinmap_tool.py b/tools/stm32_pinmap_tool.py deleted file mode 100755 index b9c5d2bec5..0000000000 --- a/tools/stm32_pinmap_tool.py +++ /dev/null @@ -1,573 +0,0 @@ -#!/usr/bin/env python3 -############################################################################ -# tools/stm32_pinmap_tool.py -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -# for python2.7 compatibility -from __future__ import print_function - -import argparse -import os -import re -import sys -from argparse import RawTextHelpFormatter -from glob import glob - -suffix = "_0" -remaps_re = re.compile(r"(.*REMAP.*)=y") -ip_block_re = re.compile(r"CONFIG_STM32[A-Z0-9]*_([A-Z0-9]+[0-9]*)=") -stm32f1_re = re.compile(r"stm32f10[0-9][a-z]*_pinmap") -speed_re = re.compile(r"(GPIO_(?:SPEED|MODE)_[zA-Z0-9]+)") -port_re = re.compile(r"GPIO_PORT([A-Z])\|") -pin_re = re.compile(r"GPIO_PIN(\d+)") -define_re = re.compile(r"#\s*define\s+(GPIO.*)\s+(GPIO.*?)\s+") - - -class GPIODef: - def __init__(self, original_name, name, description): - self.original_name = original_name - self.name = name - self.block = name.split("_")[1] - self.speed = None - s = speed_re.search(description) - if s: - self.speed = s.group(1) - s = port_re.search(description) - if s: - self.port = s.group(1) - s = pin_re.search(description) - if s: - self.pin = s.group(1) - - def __str__(self): - fmt = "#define {0: <20} {1} /* P{2} */" - if self.speed: - if "MODE" in self.speed: - if "MHz" in self.speed: - # F1 has mode, MHz is output, we must adjust the speed - fmt = "#define {0: <20} GPIO_ADJUST_MODE({1}, {3}) /* P{2} */ " - else: - # All others had a OSPEDD reg so we just set it - fmt = "#define {0: <20} ({1} | {3}) /* P{2} */ " - - return fmt.format( - self.original_name, - self.name, - self.port + self.pin, - self.speed, - ) - - def __repr__(self): - return f"" - - -# Detect python version -if sys.version_info[0] < 3: - runningPython3 = False -else: - runningPython3 = True - - -def parse_args(): - # Parse commandline arguments - parser = argparse.ArgumentParser( - formatter_class=RawTextHelpFormatter, - description="""stm32_pinmap_tool.py - - This tool is used to migrate legacy stm32 pinmap files that - had included pin speed (slew rate control) in pinmap pin definitions - - These speeds should have never been part of the arch defines as these - are layout and board dependent. Therefore, the complete definition - should be a composition of the pinmap defines and speed, and defined in - board.h - - Furthermore, pinmaps did not suffix pins that had only one ALT - appearance on a GPIO. Therefore there was no way to change the speed - or any other pins attribute i.e. Pullup Pulldown, Push pull. Open Drain etc. - - The tool has a conversion mode and a report mode. - - Conversion mode tool use: - - Run the tool to do the conversion: - i.e tools/stm32_pinmap_tool.py - --pinmap arch/arm/src/stm32h7/hardware/stm32h7x3xx_pinmap.h - --legacy > arch/arm/src/stm32h7/hardware/stm32h7x3xx_pinmap-new.h - - -- pinmap - the file to convert - --legacy will make a copy of the pinmap. Properly updating the file with - xxxx/xxxxxxx_legacy to the title block, - and adding _LEGACY to the #ifdef, #define and endif comment of the inclusion guard. - - Conversion mode follow up edits: - 1. diff and verify the original pinmap and the pinmap-new.h are as expected. - delete original pinmap - rename pinmap-new.h to the original pinmap name. - 2. Edit the top level pinmap (i.e. arch/arm/src/stm32x/stm32x_pinmap.h) file and - add a CONFIG_STM32xx_USE_LEGACY_PINMAP section - that includes the legacy pinmap files. - - For example - if defined(CONFIG_STM32H7_USE_LEGACY_PINMAP) - if defined(CONFIG_STM32H7_STM32H7X3XX) - include "hardware/stm32h7x3xx_pinmap_legacy.h" - elif defined(CONFIG_STM32H7_STM32H7B3XX) - include "hardware/stm32h7x3xx_pinmap_legacy.h" - elif defined(CONFIG_STM32H7_STM32H7X7XX) - include "hardware/stm32h7x3xx_pinmap_legacy.h" - else - error "Unsupported STM32 H7 Pin map" - endif - else - if defined(CONFIG_STM32H7_STM32H7X3XX) - include "hardware/stm32h7x3xx_pinmap.h" - elif defined(CONFIG_STM32H7_STM32H7B3XX) - include "hardware/stm32h7x3xx_pinmap.h" - elif defined(CONFIG_STM32H7_STM32H7X7XX) - include "hardware/stm32h7x3xx_pinmap.h" - else - error "Unsupported STM32 H7 Pin map" - endif - endif - - 3. Add a STM32Hx_USE_LEGACY_PINMAP to the Kconfig defaulted to y - - For example - - config STM32H7_USE_LEGACY_PINMAP - bool "Use the legacy pinmap with GPIO_SPEED_xxx included." - default y - ---help--- - In the past, pinmap files included GPIO_SPEED_xxxMhz. These speed - settings should have come from the board.h as it describes the wiring - of the SoC to the board. The speed is really slew rate control and - therefore is related to the layout and can only be properly set - in board.h. - - STM32H7_USE_LEGACY_PINMAP is provided, to allow lazy migration to - using pinmaps without speeds. The work required to do this can be aided - by running tools/stm32_pinmap_tool.py. The tools will take a board.h - file and a legacy pinmap and output the required changes that one needs - to make to a board.h file. - - Eventually, STM32H7_USE_LEGACY_PINMAP will be deprecated and the legacy - pinmaps removed from NuttX. Any new boards added should set - STM32H7_USE_LEGACY_PINMAP=n and fully define the pins in board.h - 4. Add a warning to the xxx_gpio.c file - - For example - - #if defined(CONFIG_STM32_USE_LEGACY_PINMAP) - # pragma message "CONFIG_STM32_USE_LEGACY_PINMAP will be deprecated migrate board.h see tools/stm32_pinmap_tool.py" - #endif - - Report mode tool use: - - Run the tool to aid in migrating a board.h - - tools/stm32_pinmap_tool.py --pinmap arch/arm/src/stm32h7/hardware/stm32h7x3xx_pinmap_legacy.h - --report /include/board.h - - it will output 2 sections that should be used to update the board.h. - board.h defines that need to have speeds added. - board.h defines that will need to be added: - """, - ) - - parser.add_argument( - "--pinmap", - action="store", - help="""pin map file to convert (changes are printed on stdout) or - Legacy file pin map file named _legacy. to report board.h changes""", - ) - parser.add_argument( - "--report", - default=False, - action="store", - help="Generate change set for a board", - ) - parser.add_argument( - "--legacy", - default=False, - action="store_true", - help="If one does not exist, create a copy of the original pin map named _legacy.", - ) - args = parser.parse_args() - return args - - -def create_legacy(source): - legacy = source.replace(".h", "_legacy.h") - sourceshort = source[source.find("arch") :] - legacyshort = legacy[legacy.find("arch") :] - srctag = "__" + sourceshort.upper().replace("/", "_") - destag = "__" + legacyshort.upper().replace("/", "_").replace(".", "_") - if not os.path.isfile(legacy): - fout = open(legacy, "w") - fin = open(source, "r") - - for line in fin: - out = re.sub(sourceshort, legacyshort, line) - out = re.sub(srctag, destag, out) - fout.write(out) - fout.close() - fin.close() - - -def read_defconfigs(boardfile_path): - configs_lines = [] - defconfigs_files = [] - - for dir, _, _ in os.walk(boardfile_path[: boardfile_path.find("include/board.h")]): - defconfigs_files.extend(glob(os.path.join(dir, "defconfig"))) - - for file in defconfigs_files: - defconfigfile = open(file, "r") - configs_lines.extend(defconfigfile.readlines()) - defconfigfile.close() - return configs_lines - - -def build_ip_remap_list(boardfile_path): - ip_blocks = [] - ip_remaps = [] - configs_lines = read_defconfigs(boardfile_path) - configs_lines = sorted(set(configs_lines)) - - for line in configs_lines: - s = ip_block_re.search(line) - if s: - ip_blocks.extend([s.group(1)]) - else: - s = remaps_re.search(line) - if s: - ip_remaps.extend([s.group(1)]) - return [ip_blocks, ip_remaps] - - -def read_board_h(boardfile_path): - boardfile = open(boardfile_path, "r") - lines = boardfile.readlines() - boardfile.close() - return lines - - -def formated_print(lines): - maxlen = 0 - for line in lines: - linelen = line.find("/*") - if linelen > maxlen: - maxlen = linelen - - for line in lines: - linelen = line.find("/*") - if linelen > 1 and linelen < maxlen: - nl = line[:linelen] + " " * (maxlen - linelen) + line[linelen:] - line = nl - print(line) - - -def report(boardfile_path, boards_ip_blocks, changelog, changelog_like): - output = [ - "", - ] - output.extend( - [ - """ -There were 3 issues with the Legacy pinmaps. - - 1. The legacy version of the pin defines included speed settings. (These are - in reality, slew rates). - - 2. Legacy pinmaps erroneously added speeds on pins that are only used - as an inputs (i.e UART4_RX). These speeds can be removed from the board.h - defines. - - 3. Also the legacy version of the pin defines did not have a suffix on all - pins and therefore all pins could not have the attributes set or changed - by board.h - -The new pinmaps correct these issues: - - Pin that had an explicit (GPIO_SPEED|MODE)_xxxMHz are removed or set to - the lowest speed. - - If the pin had only one choice previously (un-suffixed) the pin name now - contains _0 as the suffix. - - N.B. The correct speed setting for a given pin is very dependent on the - layout of the circuit board and load presented to the SoC on that pin. - - The speeds listed below are from the Legacy pinmaps and are provided ONLY - to insure these changes do not break existing systems that are relying on - the legacy speed settings. - - It highly recommended that the speed setting for each pin be verified for - overshoot and undershoot on real hardware and adjusted in the board,h - appropriately. - - -board.h defines that need to have speeds added. - -""" - ] - ) - - boards_blocks = [] - Lines = read_board_h(boardfile_path) - for line in Lines: - s = define_re.search(line) - if s: - # #define GPIO_SD_CK GPIO_SD_CK_1 /* PD6 FC_PD6_SD_CK */ - define = s.group(1) - original_name = s.group(2) - change = changelog.get(original_name) - if change: - pindef = GPIODef(define, original_name, line) - if pindef.block not in boards_blocks: - boards_blocks.append(pindef.block) - output.extend([f"\n/* {pindef.block} */\n"]) - output.extend([str(changelog[original_name])]) - if len(boards_blocks) == 0: - output.extend( - [ - """ - No pins are defined in board.h to change speeds on (most likely an stm32f1") - We will define all the pins used next... - """ - ] - ) - - formated_print(output) - output = [] - - output.extend( - [ - """ - - Pin that had only one choice previously (un-suffixed) pins will need to be - defined in board.h to map the un-suffixed) pin name used in the drives to - the _0 suffixed ones. - - Pins that did not have an explicit (GPIO_SPEED|MODE)_xxxMHz specified are - listed with the pin name containing the new suffix. - - -board.h defines that may need to be added if the pins are used on the board: - - -""" - ] - ) - - for block in boards_ip_blocks: - change = changelog_like.get(block) - if change: - block_title = f"\n/* {block} */\n" - for gpio in change: - if re.search(r"_\d+$", gpio.original_name) is None: - if block_title: - output.extend([block_title]) - block_title = None - output.extend([str(gpio)]) - - formated_print(output) - - -def formatcols(list, cols): - lines = ("\t".join(list[i : i + cols]) for i in range(0, len(list), cols)) - return "\n".join(lines) - - -def parse_conditional(lines, conditions): - defines = [] - - def_remap_re = re.compile(r"\s*defined\s*\((.*REMAP.*)\)") - def_else_re = re.compile(r"#\s*else") - def_endif_re = re.compile(r"#\s*endif") - - active_define = None - output = True - once = False - - for line in lines: - # process #[el]if define(...REMAP) - s = def_remap_re.search(line) - if s: - once = True - define = s.group(1) - if define in conditions: - active_define = define - output = True - else: - output = False - else: - # process #endif - s = def_endif_re.search(line) - if s: - active_define = None - output = True - else: - # process #elese - s = def_else_re.search(line) - if s: - once = True - # the if or elif was taken do not output the else - if active_define: - output = False - else: - output = output ^ True - - if once or output: - once = False - defines.extend([line]) - return defines - - -def formatter(args): - # if pinmap passed is a legacy pinmap. Just generate a report - report_only = args.report is not False - - speed_not_mode = stm32f1_re.search(args.pinmap) is None - - if not report_only and args.legacy is True: - create_legacy(args.pinmap) - - pinfile = open(args.pinmap, "r") - Lines = pinfile.readlines() - - if report_only: - boards_ip_blocks, remaps = build_ip_remap_list(args.report) - print( - f"\n\nBoard enabled Blocks:\n\n{formatcols(sorted(boards_ip_blocks), 8)}\n\n" - ) - if ( - "ADC1" in boards_ip_blocks - or "ADC2" in boards_ip_blocks - or "ADC3" in boards_ip_blocks - ): - boards_ip_blocks.extend(["ADC12"]) - boards_ip_blocks.extend(["ADC123"]) - boards_ip_blocks = sorted(boards_ip_blocks) - # Filter out ifdefed by remap conditionals (F1) - if len(remaps) > 0: - Lines = parse_conditional(Lines, remaps) - - Pass = False - inComment = False - - changelog = {} - changelog_like = {} - pass_list = [r"#\s*if", r"#\s*else", r"#\s*end", r"#\s*include", r"#\s*undef"] - pass_list_re = re.compile("|".join(pass_list)) - - for line in Lines: - if len(line.strip()) == 0: - Pass = True - if pass_list_re.search(line): - Pass = True - if "#define" in line and "GPIO" not in line: - Pass = True - if "defined(" in line: - Pass = True - if "/*" in line: - inComment = True - Pass = True - if "*/" in line: - inComment = False - Pass = True - if Pass or inComment: - Pass = False - if not report_only: - print(line.rstrip(), end="") - else: - changed = False - # split the line on spaces - pieces = line.split() - # deal with white space in the # define for nested defines - sel = 0 - # Does it have white space then use next set? - if pieces[0] == "#": - sel = 1 - original_name = pieces[sel + 1] - gpiocgf = pieces[sel + 2] - new_name = original_name - if re.search(r"_\d+$", original_name) is None: - # Add suffix - pad = "" - sel = line.find(original_name) + len(original_name) - if line[sel + len(suffix)] == "(": - pad = " " - if line[sel + len(suffix)] == "G": - pad = " (" - nl = line[:sel] + suffix + pad + line[sel + len(suffix) :] - new_name = original_name + suffix - changed = True - else: - nl = line - # Remove the speed or chege the Mode - if speed_not_mode: - ol = re.sub(r"\s*GPIO_SPEED_[zA-Z0-9]+\s*\|", "", nl) - else: - ol = re.sub( - r"(\s*)GPIO_MODE_[0-9]+MHz(\s*\|)", r"\g<1>GPIO_MODE_2MHz\g<2>", nl - ) - - changed = changed or ol != nl - if not report_only: - print(ol.strip(), end="") - if args.report and changed: - changelog[original_name] = pindef = GPIODef( - original_name, new_name, gpiocgf - ) - - # create changes by block if enabled - if pindef.block in boards_ip_blocks: - # Is block in already? - if pindef.block in changelog_like: - # do not duplicate it - if pindef not in changelog_like[pindef.block]: - changelog_like[pindef.block].append(pindef) - else: - changelog_like[pindef.block] = [pindef] - - if not report_only: - print("") - if args.report: - report(args.report, boards_ip_blocks, changelog, changelog_like) - - -def main(): - # Python2 is EOL - if not runningPython3: - raise RuntimeError( - "Python 2 is not supported. Please try again using Python 3." - ) - args = parse_args() - formatter(args) - - -if __name__ == "__main__": - main() diff --git a/tools/unlink.bat b/tools/unlink.bat deleted file mode 100755 index ba41563d4d..0000000000 --- a/tools/unlink.bat +++ /dev/null @@ -1,61 +0,0 @@ -@echo off - -rem tools/unlink.bat -rem -rem SPDX-License-Identifier: Apache-2.0 -rem -rem Licensed to the Apache Software Foundation (ASF) under one or more -rem contributor license agreements. See the NOTICE file distributed with -rem this work for additional information regarding copyright ownership. The -rem ASF licenses this file to you under the Apache License, Version 2.0 (the -rem "License"); you may not use this file except in compliance with the -rem License. You may obtain a copy of the License at -rem -rem http://www.apache.org/licenses/LICENSE-2.0 -rem -rem Unless required by applicable law or agreed to in writing, software -rem distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -rem WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -rem License for the specific language governing permissions and limitations -rem under the License. -rem - -rem Verify that arguments were provided - -set link=%1 -if "%link%"=="" goto :MissingArgument - -rem Check if something already exists at the link path - -if exist "%link%" goto :LinkExists - -rem It is not an error if the link does not exist -rem echo %link% does not exist -rem goto :ShowUsage - -goto :End - -rem %link% make be a symbolic link or it may be a copied director (with -rem a .fakelnk file in it). It really does not matter which: We do the -rem same thing in either case - -:LinkExists - -rmdir /q /s %link% -if errorlevel 1 ( - echo Failed to remove existing object at %link% - goto :ShowUsage -) - -goto :End - -:MissingArgument - -echo Missing Argument - -:ShowUsage -echo USAGE: %0 ^ -echo Where: -echo ^ is the linked (or copied) directory to be removed - -:End diff --git a/tools/unlink.sh b/tools/unlink.sh deleted file mode 100755 index 48fcf36416..0000000000 --- a/tools/unlink.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env bash -############################################################################ -# tools/unlink.sh -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -link=$1 - -# Verify that arguments were provided - -if [ -z "${link}" ]; then - echo "Missing link argument" - exit 1 -fi - -# Check if something already exists at the link path - -if [ -e "${link}" ]; then - - # Yes, is it a symbolic link? If so, then remove it - - if [ -h "${link}" ]; then - rm -f "${link}" - else - - # If the path is a directory and contains the "fake link" mark, then - # treat it like a soft link (i.e., remove the directory) - - if [ -d "${link}" -a -f "${link}/.fakelnk" ]; then - rm -rf "${link}" - else - - # It is something else (like a file) or directory that does - # not contain the "fake link" mark - - echo "${link} already exists but is not a symbolic link" - exit 1 - fi - fi -fi diff --git a/tools/zds/.gitignore b/tools/zds/.gitignore deleted file mode 100644 index 42295c8c27..0000000000 --- a/tools/zds/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/zdsar -/zdsgen diff --git a/tools/zds/Config.mk b/tools/zds/Config.mk deleted file mode 100644 index dad66a2306..0000000000 --- a/tools/zds/Config.mk +++ /dev/null @@ -1,149 +0,0 @@ -############################################################################ -# tools/zds/Config.mk -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -# These are the macros that will be used in the NuttX make system to compile -# and assembly source files and to insert the resulting object files into an -# archive. These replace the default definitions at tools/Config.mk - -# PREPROCESS -# -# Run a file through the C Pre-processor - -define PREPROCESS - @echo "CPP: $(1)->$(2)" - $(Q) $(CPP) $(CPPFLAGS) $($(strip $(1))_CPPFLAGS) $(1) -o $(2) -endef - -# COMPILE, ASSEMBLE, and helpers -# -# The ZDS-II compiler and assembler both generate object files in the -# current directory with the same name as the source file, but with the .obj -# extension. The build system expects these behaviors when compiling some -# file, say foo.c: -# -# 1. If the foo.obj object belongs in a lower level directory (such as bin/), -# then the relative path will be preface the object file name (such as -# bin/foo.obj)). -# 2. In other cases, the build system may decorate the object file name such -# as a.b.c.foo.obj. This case is distinguished here by because does not -# lie in a lower directory, but lies in the current directory. - -define RMOBJS - $(call DELFILE, $(1)) - $(call DELFILE, $(subst .obj,.lst,$(1))) - $(call DELFILE, $(subst .obj,.src,$(1))) -endef - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) - -define CONDMOVE - $(Q) if not exist $1 if exist $2 (move /Y $2 $3) -endef - -define MVOBJS - $(call CONDMOVE, $(1),$(subst .obj,.src,$(2)),$(subst .obj,.src,$(3))) - $(call CONDMOVE, $(1),$(subst .obj,.lst,$(2)),$(subst .obj,.lst,$(3))) - $(call CONDMOVE, $(1),$(2),$(3)) -endef - -define COMPILE - $(call RMOBJS, $(2)) - $(Q) $(CC) $(CFLAGS) $($(strip $(1))_CFLAGS) ${shell echo $(1) | sed -e "s/\//\\/g"} - $(call MVOBJS, $(2), $(subst .c,.obj,$(notdir $(1))), $(2)) -endef - -define ASSEMBLE - $(call RMOBJS, $(2)) - $(Q) $(AS) $(AFLAGS) $($(strip $(1))_AFLAGS) ${shell echo $(1) | sed -e "s/\//\\/g"} - $(call MVOBJS, $(2), $(subst .asm,.obj,$(notdir $(1))), $(2)) -endef - -else - -define CONDMOVE - $(Q) if [ ! -e $(1) -a -e $(2) ] ; then mv -f $(2) $(3) ; fi -endef - -define MVOBJS - $(call CONDMOVE, $(1),$(subst .obj,.src,$(2)),$(subst .obj,.src,$(3))) - $(call CONDMOVE, $(1),$(subst .obj,.lst,$(2)),$(subst .obj,.lst,$(3))) - $(call CONDMOVE, $(1),$(2),$(3)) -endef - -define COMPILE - $(call RMOBJS, $(2)) - $(Q) $(CC) $(CFLAGS) $($(strip $(1))_CFLAGS) `cygpath -w "$(1)"` - $(call MVOBJS, $(2), $(subst .c,.obj,$(notdir $(1))), $(2)) -endef - -define ASSEMBLE - $(call RMOBJS, $(2)) - $(Q) $(AS) $(AFLAGS) $($(strip $(1))_AFLAGS) `cygpath -w "$(1)"` - $(call MVOBJS, $(2), $(subst .asm,.obj,$(notdir $(1))), $(2)) -endef - -endif - -# ARCHIVE will move a list of object files into the library. This is -# complex because: -# -# 1. The ZDS-II librarian expects the library to reside within the -# current directory; it expects the library argument to a file name -# like foo.lib. -# 2. Normally, the library file is in the current directory, but other -# times, the library is an absolute path such as -# D:\Spuda\Documents\projects\nuttx\master\apps-fork\libapps.lib. In -# this case, the base library name is extract as the ARCHIVE logic CD's -# to the directory containing the library. - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) - -define ARCHIVE - for %%G in ($(2)) do ( $(AR) $(ARFLAGS) $(1)=-+%%G ) -endef - -define ARCHIVE - $(MAKE) -C $(TOPDIR)\tools\zds zdsar.exe - $(TOPDIR)\tools\zds\zdsar.exe --ar "$(AR)" --ar_flags "$(ARFLAGS)" --library "$(1)" $(2) -endef - -define CLEAN - $(Q) if exist *.obj (del /f /q *.obj) - $(Q) if exist *.src (del /f /q *.src) - $(Q) if exist *.lib (del /f /q *.lib) - $(Q) if exist *.hex (del /f /q *.hex) - $(Q) if exist *.lod (del /f /q *.lod) - $(Q) if exist *.lst (del /f /q *.lst) -endef - -else - -define ARCHIVE - $(MAKE) -C $(TOPDIR)/tools/zds zdsar.exe - $(TOPDIR)/tools/zds/zdsar.exe --ar "$(AR)" --ar_flags "$(ARFLAGS)" --library $(1) $(2) -endef - -define CLEAN - $(Q) rm -f *.obj *.src *.lib *.hex *.lod *.lst -endef - -endif diff --git a/tools/zds/Makefile b/tools/zds/Makefile deleted file mode 100644 index 2793e314d5..0000000000 --- a/tools/zds/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -############################################################################ -# tools/zds/Makefile -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -############################################################################ - -TOPDIR ?= $(CURDIR)/.. -include $(TOPDIR)/Make.defs - -# Targets - -all: zdsar.exe -default: all -.PHONY: clean - -# Add CFLAGS=-g on the make command line to build debug versions - -CFLAGS = -O2 -Wall -Wstrict-prototypes -Wshadow -CFLAGS += -DHAVE_STRTOK_C=1 - -# zdsar - Wrapper for the ZDS-II librarian - -zdsar.exe: zdsar.c - $(Q) $(HOSTCC) $(HOSTCFLAGS) -o zdsar.exe zdsar.c - -clean: - @rm -f *.o *.a *.dSYM *~ .*.swp - @rm -f zdsar zdsar.exe diff --git a/tools/zds/README.txt b/tools/zds/README.txt deleted file mode 100644 index 39c7b48300..0000000000 --- a/tools/zds/README.txt +++ /dev/null @@ -1,17 +0,0 @@ -README.txt -========== - -tools/zds/zdsar.c: This is a wrapper around the ZDS_II librarian. It - simplifies the build scripts by replacing large sequences of complex Bash - script that were added to the build files. Not only does this clean upi - the build files but it also improves performance and, more importantly,i - provides a common solution for the Windows native build case. - -tools/zds/Config.mk: This makefile fragment is include by ZDS-II Make.defs - files after including tools/Config.mk. The definitions in this file - override some of the the definitions in tools/Config.mk to customize the - build for use with the ZDS-II tools. - -These tools should work with all ZDS-II based platforms including z8, zNeo, -and ez80. - diff --git a/tools/zds/zdsar.c b/tools/zds/zdsar.c deleted file mode 100644 index 3fea19bce8..0000000000 --- a/tools/zds/zdsar.c +++ /dev/null @@ -1,1067 +0,0 @@ -/**************************************************************************** - * tools/zds/zdsar.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef HOST_CYGWIN -# include -#endif - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#define MAX_BUFFER (4096) -#define MAX_EXPAND (2048) - -/* MAX_PATH might be defined in stdlib.h */ - -#if !defined(MAX_PATH) -# define MAX_PATH (512) -#endif - -/* NAME_MAX is typically defined in limits.h */ - -#if !defined(NAME_MAX) - - /* FILENAME_MAX might be defined in stdio.h */ - -# if defined(FILENAME_MAX) -# define NAME_MAX FILENAME_MAX -# else - - /* MAXNAMELEN might be defined in dirent.h */ - -# include -# if defined(MAXNAMLEN) -# define NAME_MAX MAXNAMLEN -# else - - /* Lets not let a silly think like this stop us... just make something up */ - -# define NAME_MAX 256 -# endif -# endif -#endif - -/* Maximum objects per librarian call. - * - * REVISIT: The librarian is supposed to handle multiple object insertions - * per call, but my experience was that it was unreliable in that case. That - * may have improved, however, and perhaps we can increase MAX_OPBJEXT.. TRY - * IT! - */ - -#define MAX_OBJECTS 1 /* 64 */ - -/* Name of the host. The ZDS-II toolchain runs only on Windows. Therefore, - * the only options are (1) Windows native, or (2) Cygwin or environments - * that derive for Cygwin (like MSYS2). - */ - -#define WINSEPARATOR '\\' - -#if defined(HOST_NATIVE) -# define SEPARATOR '\\' -# define HOSTNAME "Native" /* Windows native */ -#elif defined(HOST_CYGWIN) -# define SEPARATOR '/' -# define HOSTNAME "Cygwin" /* Cygwin or MSYS under Windows */ -#endif - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -static char *g_current_wd = NULL; /* Current working directory */ -static char *g_ar = NULL; /* Full path to the librarian program */ -static char *g_arflags = NULL; /* Flags to use with the librarian program */ -static char *g_libpath = NULL; /* Path to the library */ -static char *g_libname = NULL; /* Library file name*/ -static char *g_objects = NULL; /* List of object files */ -static int g_debug = 0; /* Debug output enabled if >0 */ - -static char g_command[MAX_BUFFER]; /* Full librarian command */ -static char g_initial_wd[MAX_PATH]; /* Initial working directory */ -static char g_path[MAX_PATH]; /* Temporary for path generation */ -static char g_objpath[MAX_PATH]; /* Holds the relative path to the objects */ -#ifdef HOST_CYGWIN -static char g_expand[MAX_EXPAND]; /* Temporary for quoted path */ -static char g_dequoted[MAX_PATH]; /* Temporary for de-quoted path */ -static char g_hostpath[MAX_PATH]; /* Temporary for host path conversions */ -#endif - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/* MinGW does not seem to provide strtok_r */ - -#ifndef HAVE_STRTOK_R -static char *my_strtok_r(char *str, const char *delim, char **saveptr) -{ - char *pbegin; - char *pend = NULL; - - /* Decide if we are starting a new string or continuing from - * the point we left off. - */ - - if (str) - { - pbegin = str; - } - else if (saveptr && *saveptr) - { - pbegin = *saveptr; - } - else - { - return NULL; - } - - /* Find the beginning of the next token */ - - for (; - *pbegin && strchr(delim, *pbegin) != NULL; - pbegin++); - - /* If we are at the end of the string with nothing - * but delimiters found, then return NULL. - */ - - if (!*pbegin) - { - return NULL; - } - - /* Find the end of the token */ - - for (pend = pbegin + 1; - *pend && strchr(delim, *pend) == NULL; - pend++); - - /* pend either points to the end of the string or to - * the first delimiter after the string. - */ - - if (*pend) - { - /* Turn the delimiter into a null terminator */ - - *pend++ = '\0'; - } - - /* Save the pointer where we left off and return the - * beginning of the token. - */ - - if (saveptr) - { - *saveptr = pend; - } - - return pbegin; -} - -#undef strtok_r -# define strtok_r my_strtok_r -#endif - -static void append(char **base, char *str) -{ - char *oldbase; - char *newbase; - int alloclen; - - oldbase = *base; - if (oldbase == NULL) - { - newbase = strdup(str); - if (!newbase) - { - fprintf(stderr, "ERROR: Failed to strdup %s\n", str); - exit(EXIT_FAILURE); - } - } - else - { - alloclen = strlen(oldbase) + strlen(str) + sizeof((char) ' ') + - sizeof((char) '\0'); - newbase = (char *)malloc(alloclen); - if (!newbase) - { - fprintf(stderr, "ERROR: Failed to allocate %d bytes\n", alloclen); - exit(EXIT_FAILURE); - } - - snprintf(newbase, alloclen, "%s %s", oldbase, str); - free(oldbase); - } - - *base = newbase; -} - -static const char *quote_backslash(const char *argument) -{ -#ifdef HOST_CYGWIN - const char *src; - char *dest; - int len; - - src = argument; - dest = g_expand; - len = 0; - - while (*src && len < MAX_EXPAND) - { - if (*src == '\\') - { - /* Copy backslash */ - - *dest++ = *src++; - if (++len >= MAX_EXPAND) - { - break; - } - - /* Already quoted? */ - - if (*src == '\\') - { - /* Yes... just copy all consecutive backslashes */ - - do - { - *dest++ = *src++; - if (++len >= MAX_EXPAND) - { - break; - } - } - while (*src == '\\'); - } - else - { - /* No.. expend */ - - *dest++ = '\\'; - if (++len >= MAX_EXPAND) - { - break; - } - } - } - else - { - *dest++ = *src++; - len++; - } - } - - if (*src) - { - fprintf(stderr, "ERROR: Truncated during expansion string " - "is too long [%lu/%u]\n", - (unsigned long)strlen(argument), MAX_EXPAND); - exit(EXIT_FAILURE); - } - - *dest = '\0'; - return g_expand; -#else - return argument; -#endif -} - -/* Remove backslash quoting from a path */ - -#ifdef HOST_CYGWIN -static bool dequote_path(const char *winpath) -{ - char *dest = g_dequoted; - const char *src = winpath; - int len = 0; - bool quoted = false; - - while (*src && len < MAX_PATH) - { - if (src[0] != '\\' || - (src[1] != ' ' && src[1] != '(' && src[1] != ')')) - { - *dest++ = *src; - len++; - } - else - { - quoted = true; - } - - src++; - } - - if (*src || len >= MAX_PATH) - { - fprintf(stderr, "# ERROR: Path truncated\n"); - exit(EXIT_FAILURE); - } - - *dest = '\0'; - return quoted; -} -#endif - -/* If using Cygwin with a Window's Toolchain, then we have to convert the - * POSIX path to a Windows or POSIX path. - */ - -#ifdef HOST_CYGWIN -static const char *convert_path(const char *path, cygwin_conv_path_t what) -{ - const char *retptr; - ssize_t size; - ssize_t ret; - bool quoted; - - quoted = dequote_path(path); - if (quoted) - { - retptr = g_hostpath; - } - else - { - retptr = &g_hostpath[1]; - } - - size = cygwin_conv_path(what | CCP_RELATIVE, g_dequoted, NULL, 0); - if (size > (MAX_PATH - 3)) - { - fprintf(stderr, "# ERROR: POSIX path too long: %lu\n", - (unsigned long)size); - exit(EXIT_FAILURE); - } - - ret = cygwin_conv_path(what | CCP_RELATIVE, g_dequoted, - &g_hostpath[1], MAX_PATH - 3); - if (ret < 0) - { - fprintf(stderr, "# ERROR: cygwin_conv_path '%s' failed: %s\n", - g_dequoted, strerror(errno)); - exit(EXIT_FAILURE); - } - - if (quoted) - { - size++; - g_hostpath[0] = '"'; - g_hostpath[size] = '"'; - } - - g_hostpath[size + 1] = '\0'; - return retptr; -} -#endif - -static const char *convert_path_windows(const char *path) -{ -#ifdef HOST_CYGWIN - return convert_path(path, CCP_POSIX_TO_WIN_A); -#else - strcpy(g_path, path); - return g_path; -#endif -} - -static const char *convert_path_posix(const char *path) -{ -#ifdef HOST_CYGWIN - return convert_path(path, CCP_WIN_A_TO_POSIX); -#else - strcpy(g_path, path); - return g_path; -#endif -} - -static void show_usage(const char *progname, const char *msg, int exitcode) -{ - if (msg) - { - fprintf(stderr, "\n"); - fprintf(stderr, "%s:\n", msg); - } - - fprintf(stderr, "\n"); - fprintf(stderr, "%s [OPTIONS] --ar \"\" --library \"\" " - "obj [obj [obj...]]\n", - progname); - fprintf(stderr, "\n"); - fprintf(stderr, "Where:\n"); - fprintf(stderr, " --ar \n"); - fprintf(stderr, " A command line string that defines how to execute the " - "ZDS-II librarian\n"); - fprintf(stderr, " --library \"\"\n"); - fprintf(stderr, " The library into which the object files will be " - "inserted\n"); - fprintf(stderr, " obj\n"); - fprintf(stderr, " One or more object files that will be inserted into " - "the archive. Each expected\n"); - fprintf(stderr, " to reside in the current directory unless --obj-path " - "is provided on the command line\n"); - fprintf(stderr, "\n"); - fprintf(stderr, "And [OPTIONS] include:\n"); - fprintf(stderr, " --ar_flags \"\"\n"); - fprintf(stderr, " Optional librarian flags\n"); - fprintf(stderr, " --obj-path \n"); - fprintf(stderr, " Do not look in the current directory for the object " - "files. Instead, look in for\n"); - fprintf(stderr, " the object files. --obj-path may be used only once " - "on the command line\n"); - fprintf(stderr, " --debug\n"); - fprintf(stderr, " Enable %s debug output\n", progname); - fprintf(stderr, " --help\n"); - fprintf(stderr, " Shows this message and exits\n"); - exit(exitcode); -} - -static void parse_args(int argc, char **argv) -{ - const char *tmp = NULL; - char *library = NULL; - char *objpath = NULL; - int pathlen; - int argidx; - - /* Parse arguments */ - - for (argidx = 1; argidx < argc; argidx++) - { - if (strcmp(argv[argidx], "--ar") == 0) - { - argidx++; - if (argidx >= argc) - { - show_usage(argv[0], "ERROR: Missing argument to --ar", - EXIT_FAILURE); - } - else if (g_ar != NULL) - { - show_usage(argv[0], "ERROR: Multiple --ar arguments", - EXIT_FAILURE); - } - - g_ar = argv[argidx]; - } - else if (strcmp(argv[argidx], "--ar_flags") == 0) - { - argidx++; - if (argidx >= argc) - { - show_usage(argv[0], "ERROR: Missing argument to --ar_flags", - EXIT_FAILURE); - } - else if (g_arflags != NULL) - { - show_usage(argv[0], "ERROR: Multiple --ar_flags arguments", - EXIT_FAILURE); - } - - g_arflags = argv[argidx]; - } - else if (strcmp(argv[argidx], "--library") == 0) - { - const char *tmp_path; - - argidx++; - if (argidx >= argc) - { - show_usage(argv[0], "ERROR: Missing argument to --library", - EXIT_FAILURE); - } - else if (library != NULL) - { - show_usage(argv[0], "ERROR: Multiple --library arguments", - EXIT_FAILURE); - } - - /* Convert the library path a POSIX. NOTE this is a no-op in Windows - * native mode. - */ - - tmp_path = convert_path_posix(argv[argidx]); - library = strdup(tmp_path); - if (library == NULL) - { - fprintf(stderr, "ERROR: strdup() failed\n"); - exit(EXIT_FAILURE); - } - } - else if (strcmp(argv[argidx], "--obj-path") == 0) - { - argidx++; - if (argidx >= argc) - { - show_usage(argv[0], "ERROR: Missing argument to --obj-path", - EXIT_FAILURE); - } - else if (objpath != NULL) - { - show_usage(argv[0], "ERROR: Multiple --obj-path arguments", - EXIT_FAILURE); - } - - objpath = argv[argidx]; - } - else if (strcmp(argv[argidx], "--debug") == 0) - { - g_debug++; - } - else if (strcmp(argv[argidx], "--help") == 0) - { - show_usage(argv[0], NULL, EXIT_SUCCESS); - } - else if (strncmp(argv[argidx], "--", 2) == 0) - { - show_usage(argv[0], "ERROR: Unrecognized option", EXIT_FAILURE); - } - else - { - break; - } - } - - /* Accumulate object files */ - - for (; argidx < argc; argidx++) - { - append(&g_objects, argv[argidx]); - } - - if (g_debug) - { - fprintf(stderr, "Selections:\n"); - fprintf(stderr, " CWD : [%s]\n", - g_initial_wd); - fprintf(stderr, " Host Environ : [%s]\n", - HOSTNAME); - fprintf(stderr, " AR : [%s]\n", - g_ar ? g_ar : "(None)"); - fprintf(stderr, " AR Flags : [%s]\n", - g_arflags ? g_arflags : "(None)"); - fprintf(stderr, " Library : [%s]\n", - library ? library : "(None)"); - fprintf(stderr, " Object Path : [%s]\n", - objpath ? objpath : "(None"); - fprintf(stderr, " Object Files : [%s]\n\n", - g_objects ? g_objects : "(None)"); - } - - /* Check for required parameters */ - - if (g_ar == NULL) - { - show_usage(argv[0], "ERROR: No librarian specified", - EXIT_FAILURE); - } - - if (library == NULL) - { - show_usage(argv[0], "ERROR: No library specified", - EXIT_FAILURE); - } - else - { - /* Separate the library file name from the path. The ZDS-II librarian - * expects the library to be in the current working directory. - */ - - g_libname = basename(library); /* Must come first */ - g_libpath = dirname(library); - } - - if (g_objects == NULL) - { - /* Don't report an error -- this happens normally in some configurations */ - - printf("No object files specified\n"); - exit(EXIT_SUCCESS); - } - - g_objpath[0] = '\0'; - if (objpath != NULL) - { - /* If the object path relative to the current working directory? */ - - /* It is a relative path if the path does not begin with the path - * segment separator or if in the Windows native case, it begins - * with a volume specified like C:. - */ - - pathlen = 0; - -#ifdef HOST_NATIVE - if (objpath[0] != SEPARATOR || - (isalpha(objpath[0]) && objpath[1] != ':')) -#else - if (objpath[0] != SEPARATOR) -#endif - { - /* Add the default working directory to the path */ - - /* Copy the initial working directory */ - - pathlen = strlen(g_initial_wd); - if (pathlen >= MAX_PATH) - { - fprintf(stderr, "ERROR: Working directory path is " - "too long [%d/%d]: %s\n", - pathlen, MAX_PATH, g_initial_wd); - exit(EXIT_FAILURE); - } - - strcpy(g_path, g_initial_wd); - - /* Append a separator is one is not already present */ - - if (g_path[pathlen - 1] != SEPARATOR) - { - int newlen = pathlen + 1; - if (newlen >= MAX_PATH) - { - fprintf(stderr, "ERROR: Object path is too long " - "with separator[%d/%d]: %s\n", - newlen, MAX_PATH, g_initial_wd); - exit(EXIT_FAILURE); - } - - g_path[pathlen] = SEPARATOR; - g_path[pathlen + 1] = '\0'; - pathlen = newlen; - } - } - - /* Add the object file path after the current working directory */ - - pathlen += strlen(objpath); - if (pathlen >= MAX_PATH) - { - fprintf(stderr, "ERROR: Path+objpath is too long [%d/%d]\n", - pathlen, MAX_PATH); - exit(EXIT_FAILURE); - } - - strcat(g_path, objpath); - } - - /* The object was in the current working directory. If a library path - * is NOT the current working directory, then the library path will now - * be the current working directory and the path to the objects will be - * the working directory when the program was started. - */ - - else if (g_libpath != NULL && strcmp(g_libpath, ".") != 0) - { - strcpy(g_path, g_initial_wd); - } - - /* Convert the absolute objection file path to the native host path form - * NOTE that convert_path_posix() is a no-op in Windows native mode. - */ - - tmp = convert_path_posix(g_path); - strcpy(g_path, tmp); - - /* Check for a relative path. We will CD to g_libpath because the - * library must be in the current working directory. - */ - - pathlen = strlen(g_libpath); - if (strncmp(g_path, g_libpath, pathlen) == 0) - { - const char *relpath = &g_path[pathlen]; - - /* Skip over leading path segment delimiters.. that should be as - * least one. - */ - - while (*relpath == SEPARATOR) - { - relpath++; - } - - /* Convert the relative object file path to the Windows path form - * for the ZDS-II tool tool. NOTE that convert_path_windows() is - * a no-op in Windows native mode. - */ - - tmp = convert_path_windows(relpath); - } - else - { - /* Convert the absolute object file path to the Windows path form - * for the ZDS-II tool tool. NOTE that convert_path_windows() is - * a no-op in Windows native mode. - */ - - tmp = convert_path_windows(g_path); - } - - /* And save the path in as a native Windows path */ - - strcpy(g_objpath, tmp); - - /* Dump some intermediate results */ - - if (g_debug) - { - fprintf(stderr, "Derived:\n"); - fprintf(stderr, " Object Path : [%s]\n", - g_objpath[0] != '\0' ? g_objpath : "(None"); - fprintf(stderr, " Library Path : [%s]\n", - g_libpath ? g_libpath : "(None)"); - fprintf(stderr, " Library Name : [%s]\n\n", - g_libname ? g_libname : "(None)"); - } -} - -static void do_archive(void) -{ - struct stat buf; - char *alloc; - char *objects; - char *object; - char *lasts; - int cmdlen; - int pathlen; - int objlen; - int totallen; - int nobjects; - int ret; - - /* Make a copy of g_objects. We need to do this because at least the version - * of strtok_r above does modify it. - */ - - alloc = strdup(g_objects); - if (alloc == NULL) - { - fprintf(stderr, "ERROR: Failed to strdup object list\n"); - exit(EXIT_FAILURE); - } - - objects = alloc; - - /* We may have to loop since we limit the number of objects in each call - * to the librarian. - */ - - lasts = NULL; - for (; ; ) - { - /* Copy the librarian into the command buffer */ - - cmdlen = strlen(g_ar); - if (cmdlen >= MAX_BUFFER) - { - fprintf(stderr, "ERROR: Librarian string is too long [%d/%d]: %s\n", - cmdlen, MAX_BUFFER, g_ar); - exit(EXIT_FAILURE); - } - - strcpy(g_command, g_ar); - - /* Add a space */ - - g_command[cmdlen] = ' '; - cmdlen++; - g_command[cmdlen] = '\0'; - - /* Copy the librarian flags into the command buffer */ - - if (g_arflags != NULL) - { - const char *quoted; - - quoted = quote_backslash(g_arflags); - cmdlen += strlen(quoted); - - if (cmdlen >= MAX_BUFFER) - { - fprintf(stderr, "ERROR: CFLAG string is too long [%d/%d]: %s\n", - cmdlen, MAX_BUFFER, g_arflags); - exit(EXIT_FAILURE); - } - - strcat(g_command, quoted); - } - - /* Add each object file. This loop will continue until each path has been - * tried (failure) or until stat() finds the object file - */ - - nobjects = 0; - while ((object = strtok_r(objects, " ", &lasts)) != NULL) - { - const char *quoted; - const char *converted; - - /* Set objects to NULL. This will force strtok_r to move from the - * the first object in the list. - */ - - objects = NULL; - - /* Add a space */ - - g_command[cmdlen] = ' '; - cmdlen++; - g_command[cmdlen] = '\0'; - - /* Create a full path to the object file */ - - g_path[0] = '\0'; - pathlen = 0; - - /* Add the path to buffer path buffer first */ - - if (g_objpath[0] != '\0') - { - /* Copy the obj_path */ - - pathlen = strlen(g_objpath); - if (pathlen >= MAX_PATH) - { - fprintf(stderr, "ERROR: Path is too long [%d/%d]: %s\n", - pathlen, MAX_PATH, g_objpath); - exit(EXIT_FAILURE); - } - - strcpy(g_path, g_objpath); - - /* Append a separator is one is not already present */ - - if (g_path[pathlen - 1] != WINSEPARATOR) - { - int newlen = pathlen + 1; - if (newlen >= MAX_PATH) - { - fprintf(stderr, "ERROR: Path is too long with " - "separator[%d/%d]: %s\n", - newlen, MAX_PATH, g_path); - exit(EXIT_FAILURE); - } - - g_path[pathlen] = WINSEPARATOR; - g_path[pathlen + 1] = '\0'; - pathlen = newlen; - } - } - - /* Add the object file name after the path */ - - objlen = strlen(object); - pathlen += objlen; - if (pathlen >= MAX_PATH) - { - fprintf(stderr, "ERROR: Path+objfile is too long [%d/%d]\n", - pathlen, MAX_PATH); - exit(EXIT_FAILURE); - } - - strcat(g_path, object); - - /* Check that a object file actually exists at this path. NOTE - * that convert_path_posix() is a no-op in Windows native mode. - */ - - converted = convert_path_posix(g_path); - ret = stat(converted, &buf); - if (ret < 0) - { - fprintf(stderr, "WARNING: Stat of object %s failed: %s\n", - g_path, strerror(errno)); - continue; - } - - if (!S_ISREG(buf.st_mode)) - { - fprintf(stderr, "ERROR: Object %s exists but is not a regular " - "file\n", - g_path); - exit(EXIT_FAILURE); - } - - /* Expand the path */ - - /* Copy the librarian argument of form like: - * - * =-+ - */ - - pathlen = 4; /* For =-+ and terminator */ - - quoted = quote_backslash(g_path); - pathlen += strlen(quoted); - - /* Get the full length */ - - pathlen += strlen(g_libname); - totallen = cmdlen + pathlen; - - if (totallen >= MAX_BUFFER) - { - fprintf(stderr, "ERROR: object argument is too long [%d/%d]: " - "%s=-+%s\n", - totallen, MAX_BUFFER, g_libname, quoted); - exit(EXIT_FAILURE); - } - - /* Append the next librarian command */ - - pathlen = snprintf(&g_command[cmdlen], MAX_BUFFER - cmdlen, "%s=-+%s", - g_libname, quoted); - cmdlen += pathlen; - - /* Terminate early if we have a LOT files in the command line */ - - if (++nobjects >= MAX_OBJECTS) - { - break; - } - } - - /* Handling the final command which may have not objects to insert */ - - if (nobjects > 0) - { - /* Okay.. we have everything. Add the object files to the library. - * On a failure to start the compiler, system() will return -1; - * Otherwise, the returned value from the compiler is in - * WEXITSTATUS(ret). - */ - - if (g_debug) - { - fprintf(stderr, "Executing: %s\n", g_command); - } - - ret = system(g_command); -#ifdef WEXITSTATUS - if (ret < 0 || WEXITSTATUS(ret) != 0) - { - if (ret < 0) - { - fprintf(stderr, "ERROR: system failed: %s\n", - strerror(errno)); - } - else - { - fprintf(stderr, "ERROR: %s failed: %d\n", g_ar, - WEXITSTATUS(ret)); - } - - fprintf(stderr, " command: %s\n", g_command); - exit(EXIT_FAILURE); - } -#else - if (ret < 0) - { - fprintf(stderr, "ERROR: system failed: %s\n", strerror(errno)); - fprintf(stderr, " command: %s\n", g_command); - exit(EXIT_FAILURE); - } -#endif - - /* We don't really know that the command succeeded... Let's - * assume that it did - */ - } - - /* Check if we have more objects to process */ - - if (object == NULL) - { - /* No, we are finished */ - - break; - } - } - - free(alloc); -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -int main(int argc, char **argv, char **envp) -{ - char *wd; - int ret; - - /* Get the current working directory */ - - wd = getcwd(g_initial_wd, MAX_PATH); - if (wd == NULL) - { - fprintf(stderr, "ERROR: getcwd failed: %s\n", strerror(errno)); - return EXIT_FAILURE; - } - - g_current_wd = g_initial_wd; - - /* Parse command line parameters */ - - parse_args(argc, argv); - - /* Change to the directory containing the library */ - - if (g_libpath != NULL && strcmp(g_libpath, ".") != 0) - { - ret = chdir(g_libpath); - if (ret < 0) - { - fprintf(stderr, "ERROR: getcwd failed: %s\n", strerror(errno)); - return EXIT_FAILURE; - } - - g_current_wd = g_libpath; - } - - /* Then generate dependencies for each path on the command line. */ - - do_archive(); - return EXIT_SUCCESS; -} diff --git a/video/Kconfig b/video/Kconfig index 1467d52ca2..32e98baf3b 100644 --- a/video/Kconfig +++ b/video/Kconfig @@ -3,9 +3,7 @@ # see the file kconfig-language.txt in the NuttX tools repository. # -comment "Video subsystem" - -config VIDEO +menuconfig VIDEO bool "Video Support" default n ---help--- diff --git a/wireless/Kconfig b/wireless/Kconfig index aaefa4f014..102ace2e73 100644 --- a/wireless/Kconfig +++ b/wireless/Kconfig @@ -3,7 +3,7 @@ # see the file kconfig-language.txt in the NuttX tools repository. # -config WIRELESS +menuconfig WIRELESS bool "Wireless Support" default n ---help---