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...")
(No difference)

Revision as of 21:15, 12 July 2018

ARM processor notes  :  STM32F10x notes  :  LPCXpresso 1114 (this article)  :  heap_1.c build recipe  :  LPCXpresso makefiles mapping


Figure x - 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


  1. !/bin/bash
  1. 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

  1. 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 . . ."

  1. ${COPY} ${COPY_OPTIONS} ../../../Source/tasks.c Source/FreeRTOS_Source
  2. ${COPY} ${COPY_OPTIONS} ../../../Source/queue.c Source/FreeRTOS_Source
  3. ${COPY} ${COPY_OPTIONS} ../../../Source/list.c Source/FreeRTOS_Source
  4. ${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 . . ."

  1. ${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 . . ."

  1. ${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 . . ."

  1. ${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 . . ."

  1. ${COPY} ${COPY_OPTIONS} ../../Common/Minimal/blocktim.c Source/Common_Demo_Tasks
  2. ${COPY} ${COPY_OPTIONS} ../../Common/Minimal/recmutex.c Source/Common_Demo_Tasks
  3. ${COPY} ${COPY_OPTIONS} ../../Common/Minimal/countsem.c Source/Common_Demo_Tasks
  4. ${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 . . .":

  1. ${COPY} ${COPY_OPTIONS} ../../Common/include/blocktim.h Source/Common_Demo_Tasks/include
  2. ${COPY} ${COPY_OPTIONS} ../../Common/include/recmutex.h Source/Common_Demo_Tasks/include
  3. ${COPY} ${COPY_OPTIONS} ../../Common/include/countsem.h Source/Common_Demo_Tasks/include
  4. ${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


  1. ${MKDIR} ${MKDIR_OPTIONS}

echo "$0: done." echo


exit 0 </pre>




- - - top of page - - -