Difference between revisions of "Create project directory structure version 1"

From Wiki at Neela Nurseries
Jump to: navigation, search
(Created page with " ARM processor notes  :  STM32F10x notes  :  LPCXpresso 1114 (this article)  :  Heap-1-dot...")
 
m
Line 1: Line 1:
  
[[ARM_processor|ARM processor notes]]  :  [[stm32f100_notes|STM32F10x notes]]  :  [[LPCXpresso|LPCXpresso 1114 (this article)]]  :  [[Heap-1-dot-c|heap_1.c build recipe]]  :  [[lpc_makefiles_full_mapping|LPCXpresso makefiles mapping]]
+
[[ARM_processor|ARM processor notes]]  :  [[stm32f100_notes|STM32F10x notes]]  :  [[LPCXpresso|LPCXpresso 1114]]  :  [[Heap-1-dot-c|heap_1.c build recipe]]  :  [[lpc_makefiles_full_mapping|LPCXpresso makefiles mapping]]
  
  
 
<span id="script_version_1"></span>
 
<span id="script_version_1"></span>
  
<i>Figure x - create-project-directory-structure.sh</i>
+
<i>Figure 1 - create-project-directory-structure.sh</i>
 
<pre>
 
<pre>
 
#!/bin/bash
 
#!/bin/bash
Line 72: Line 72:
 
<span id="script_version_2"></span>
 
<span id="script_version_2"></span>
  
 +
<i>Figure 2 - create-project-directory-structure.sh</i>
 +
<pre>
 
#!/bin/bash
 
#!/bin/bash
  

Revision as of 21:16, 12 July 2018

ARM processor notes  :  STM32F10x notes  :  LPCXpresso 1114  :  heap_1.c build recipe  :  LPCXpresso makefiles mapping


Figure 1 - create-project-directory-structure.sh

#!/bin/bash

# 2018-05-14 - Monday, started by Ted to carry out the work of DOS batch file included with NXP's RTOS demo . . .

MKDIR=/bin/mkdir
MKDIR_OPTIONS="-p -v"
COPY=/bin/cp
COPY_OPTIONS="-v"


echo "$0:  creating the required directory structure . . ."
${MKDIR} ${MKDIR_OPTIONS} Source/FreeRTOS_Source
${MKDIR} ${MKDIR_OPTIONS} Source/FreeRTOS_Source/include
${MKDIR} ${MKDIR_OPTIONS} Source/FreeRTOS_Source/portable
${MKDIR} ${MKDIR_OPTIONS} Source/FreeRTOS_Source/portable/GCC
${MKDIR} ${MKDIR_OPTIONS} Source/FreeRTOS_Source/portable/GCC/ARM_CM0
${MKDIR} ${MKDIR_OPTIONS} Source/FreeRTOS_Source/portable/MemMang
${MKDIR} ${MKDIR_OPTIONS} Source/Common_Demo_Tasks
${MKDIR} ${MKDIR_OPTIONS} Source/Common_Demo_Tasks/Include


echo "$0:  copying core FreeRTOS kernel files . . ."
${COPY} ${COPY_OPTIONS} ../../../Source/tasks.c Source/FreeRTOS_Source
${COPY} ${COPY_OPTIONS} ../../../Source/queue.c Source/FreeRTOS_Source
${COPY} ${COPY_OPTIONS} ../../../Source/list.c Source/FreeRTOS_Source
${COPY} ${COPY_OPTIONS} ../../../Source/timers.c Source/FreeRTOS_Source


echo "$0:  copying common header files . . ."
${COPY} ${COPY_OPTIONS} ../../../Source/include/*.* Source/FreeRTOS_Source/include

echo "$0:  copying portable layer files . . ."
${COPY} ${COPY_OPTIONS} ../../../Source/portable/GCC/ARM_CM0/*.* Source/FreeRTOS_Source/portable/GCC/ARM_CM0

echo "$0:  copying basic memory allocation files . . ."
${COPY} ${COPY_OPTIONS} ../../../Source/portable/MemMang/heap_1.c Source/FreeRTOS_Source/portable/MemMang


echo "$0:  copying files that define the common demo tasks . . ."
${COPY} ${COPY_OPTIONS} ../../Common/Minimal/blocktim.c Source/Common_Demo_Tasks
${COPY} ${COPY_OPTIONS} ../../Common/Minimal/recmutex.c Source/Common_Demo_Tasks
${COPY} ${COPY_OPTIONS} ../../Common/Minimal/countsem.c Source/Common_Demo_Tasks
${COPY} ${COPY_OPTIONS} ../../Common/Minimal/IntQueue.c Source/Common_Demo_Tasks


echo "$0:  copying common demo file headers . . .":
${COPY} ${COPY_OPTIONS} ../../Common/include/blocktim.h Source/Common_Demo_Tasks/include
${COPY} ${COPY_OPTIONS} ../../Common/include/recmutex.h Source/Common_Demo_Tasks/include
${COPY} ${COPY_OPTIONS} ../../Common/include/countsem.h Source/Common_Demo_Tasks/include
${COPY} ${COPY_OPTIONS} ../../Common/include/IntQueue.h Source/Common_Demo_Tasks/include



# ${MKDIR} ${MKDIR_OPTIONS}

echo "$0:  done."
echo


exit 0


Figure 2 - create-project-directory-structure.sh

#!/bin/bash

# 2018-05-14 - Monday, started by Ted to carry out the work of DOS batch file included with NXP's RTOS demo . . .

MKDIR=/bin/mkdir
MKDIR_OPTIONS="-p -v"
COPY=/bin/cp
COPY_OPTIONS="-v"


// 2018-06-26 - Adding path elements that can change: 
PATH_TO_FREERTOS_SOURCE=${HOME}/Downloads/freertos/FreeRTOSv10.0.1/FreeRTOS
# PATH_TO_FREERTOS_COMMON_MINIMAL=${HOME}/Downloads/freertos/FreeRTOSv10.0.1/FreeRTOS/Demo/Common/Minimal
PATH_TO_FREERTOS_COMMON_MINIMAL=${PATH_TO_FREERTOS_SOURCE}/Demo/Common/Minimal
PATH_TO_FREERTOS_COMMON_INCLUDE=${PATH_TO_FREERTOS_SOURCE}/Demo/Common/include




echo "$0:  creating the required directory structure . . ."
${MKDIR} ${MKDIR_OPTIONS} Source/FreeRTOS_Source
${MKDIR} ${MKDIR_OPTIONS} Source/FreeRTOS_Source/include
${MKDIR} ${MKDIR_OPTIONS} Source/FreeRTOS_Source/portable
${MKDIR} ${MKDIR_OPTIONS} Source/FreeRTOS_Source/portable/GCC
${MKDIR} ${MKDIR_OPTIONS} Source/FreeRTOS_Source/portable/GCC/ARM_CM0
${MKDIR} ${MKDIR_OPTIONS} Source/FreeRTOS_Source/portable/MemMang
${MKDIR} ${MKDIR_OPTIONS} Source/Common_Demo_Tasks
${MKDIR} ${MKDIR_OPTIONS} Source/Common_Demo_Tasks/Include


echo "$0:  copying core FreeRTOS kernel files . . ."
# ${COPY} ${COPY_OPTIONS} ../../../Source/tasks.c Source/FreeRTOS_Source
# ${COPY} ${COPY_OPTIONS} ../../../Source/queue.c Source/FreeRTOS_Source
# ${COPY} ${COPY_OPTIONS} ../../../Source/list.c Source/FreeRTOS_Source
# ${COPY} ${COPY_OPTIONS} ../../../Source/timers.c Source/FreeRTOS_Source

${COPY} ${COPY_OPTIONS} ${PATH_TO_FREERTOS_SOURCE}/Source/tasks.c Source/FreeRTOS_Source
${COPY} ${COPY_OPTIONS} ${PATH_TO_FREERTOS_SOURCE}/Source/queue.c Source/FreeRTOS_Source
${COPY} ${COPY_OPTIONS} ${PATH_TO_FREERTOS_SOURCE}/Source/list.c Source/FreeRTOS_Source
${COPY} ${COPY_OPTIONS} ${PATH_TO_FREERTOS_SOURCE}/Source/timers.c Source/FreeRTOS_Source


echo "$0:  copying common header files . . ."
echo "$0:  copying common header files . . ."
# ${COPY} ${COPY_OPTIONS} ../../../Source/include/*.* Source/FreeRTOS_Source/include
${COPY} ${COPY_OPTIONS} ${PATH_TO_FREERTOS_SOURCE}/Source/include/*.* Source/FreeRTOS_Source/include

echo "$0:  copying portable layer files . . ."
# ${COPY} ${COPY_OPTIONS} ../../../Source/portable/GCC/ARM_CM0/*.* Source/FreeRTOS_Source/portable/GCC/ARM_CM0
${COPY} ${COPY_OPTIONS} ${PATH_TO_FREERTOS_SOURCE}/Source/portable/GCC/ARM_CM0/*.* Source/FreeRTOS_Source/portable/GCC/ARM_CM0

echo "$0:  copying basic memory allocation files . . ."
# ${COPY} ${COPY_OPTIONS} ../../../Source/portable/MemMang/heap_1.c Source/FreeRTOS_Source/portable/MemMang
${COPY} ${COPY_OPTIONS} ${PATH_TO_FREERTOS_SOURCE}/Source/portable/MemMang/heap_1.c Source/FreeRTOS_Source/portable/MemMang


echo "$0:  copying files that define the common demo tasks . . ."
# ${COPY} ${COPY_OPTIONS} ../../Common/Minimal/blocktim.c Source/Common_Demo_Tasks
# ${COPY} ${COPY_OPTIONS} ../../Common/Minimal/recmutex.c Source/Common_Demo_Tasks
# ${COPY} ${COPY_OPTIONS} ../../Common/Minimal/countsem.c Source/Common_Demo_Tasks
# ${COPY} ${COPY_OPTIONS} ../../Common/Minimal/IntQueue.c Source/Common_Demo_Tasks

${COPY} ${COPY_OPTIONS} ${PATH_TO_FREERTOS_COMMON_MINIMAL}/blocktim.c Source/Common_Demo_Tasks
${COPY} ${COPY_OPTIONS} ${PATH_TO_FREERTOS_COMMON_MINIMAL}/recmutex.c Source/Common_Demo_Tasks
${COPY} ${COPY_OPTIONS} ${PATH_TO_FREERTOS_COMMON_MINIMAL}/countsem.c Source/Common_Demo_Tasks
${COPY} ${COPY_OPTIONS} ${PATH_TO_FREERTOS_COMMON_MINIMAL}/IntQueue.c Source/Common_Demo_Tasks


echo "$0:  copying common demo file headers . . .":
# ${COPY} ${COPY_OPTIONS} ../../Common/include/blocktim.h Source/Common_Demo_Tasks/include
# ${COPY} ${COPY_OPTIONS} ../../Common/include/recmutex.h Source/Common_Demo_Tasks/include
# ${COPY} ${COPY_OPTIONS} ../../Common/include/countsem.h Source/Common_Demo_Tasks/include
# ${COPY} ${COPY_OPTIONS} ../../Common/include/IntQueue.h Source/Common_Demo_Tasks/include

${COPY} ${COPY_OPTIONS} ${PATH_TO_FREERTOS_COMMON_INCLUDE}/blocktim.h Source/Common_Demo_Tasks/include
${COPY} ${COPY_OPTIONS} ${PATH_TO_FREERTOS_COMMON_INCLUDE}/recmutex.h Source/Common_Demo_Tasks/include
${COPY} ${COPY_OPTIONS} ${PATH_TO_FREERTOS_COMMON_INCLUDE}/countsem.h Source/Common_Demo_Tasks/include
${COPY} ${COPY_OPTIONS} ${PATH_TO_FREERTOS_COMMON_INCLUDE}/IntQueue.h Source/Common_Demo_Tasks/include



# ${MKDIR} ${MKDIR_OPTIONS}

echo "$0:  done."
echo


exit 0




- - - top of page - - -