From b454ed4a7fcf9796958b88e088bf65e716abb1d1 Mon Sep 17 00:00:00 2001 From: MMS Date: Mon, 22 Nov 2021 20:02:38 -0500 Subject: [PATCH] 0.19 Updated lesson-19 for the new CCS 11. Specifically added external GNU-ARM compiler and a README.md --- lesson-19/.ccsproject | 8 +- lesson-19/.cproject | 202 ++++++++++-------- lesson-19/README.md | 32 +++ lesson-19/startup_tm4c_gnu.c | 8 +- .../targetConfigs/Tiva TM4C123GH6PM.ccxml | 22 ++ 5 files changed, 177 insertions(+), 95 deletions(-) create mode 100644 lesson-19/README.md diff --git a/lesson-19/.ccsproject b/lesson-19/.ccsproject index 4a356f6..255f3f5 100644 --- a/lesson-19/.ccsproject +++ b/lesson-19/.ccsproject @@ -1,15 +1,17 @@ + - + - - + + + diff --git a/lesson-19/.cproject b/lesson-19/.cproject index 86d4696..f31749b 100644 --- a/lesson-19/.cproject +++ b/lesson-19/.cproject @@ -1,146 +1,171 @@ - - + + - + - - - - - - + + - + - - - - @@ -148,7 +173,7 @@ - + @@ -160,4 +185,5 @@ - + + \ No newline at end of file diff --git a/lesson-19/README.md b/lesson-19/README.md new file mode 100644 index 0000000..f21065a --- /dev/null +++ b/lesson-19/README.md @@ -0,0 +1,32 @@ +Update for Code Composer Studio 11: +----------------------------------- +Code Composer Studio (CCS) 11 no longer comes with the GNU-ARM compiler. +(Before that, CCS came bundled with the GNU-ARM Linaro toolchain). + +But CCS 11 can be easily configured to use other GNU-ARM toolchains, for +example the GNU-ARM toolchain available from ARM-Developer website: + +https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads + + +Changed CCS Project +------------------- +The CCS project in this lesson has been updated to use the GNU v10.3.1 +from the directory C:/qp/qtools/gnu_arm-none.eabi. This latter directory +is the default location of installing the "QP-bundle", which contains +the GNU-ARM toolchain. + + +Adding an External GNU-ARM Compielr to CCS +------------------------------------------ +However, you can also install the GNU-ARM compiler separately in any +other directory. Then, you need to update the "Tool discovery path" +in the Preferences dialog box. + +To open the Preferences dialog box, first select the "Project|Properties" +menu and go to the Gneral section (on the left). In the "Compiler version" +selection, click on the "More..." button. + + +Quantum Leaps, +2021-11-22 diff --git a/lesson-19/startup_tm4c_gnu.c b/lesson-19/startup_tm4c_gnu.c index b6c6d40..9a02340 100644 --- a/lesson-19/startup_tm4c_gnu.c +++ b/lesson-19/startup_tm4c_gnu.c @@ -42,7 +42,7 @@ ---------------------------------------------------------------------------*/ /* start and end of stack defined in the linker script ---------------------*/ -extern int __stack_start__; +//extern int __stack_start__; extern int __stack_end__; /* Weak prototypes for error handlers --------------------------------------*/ @@ -59,7 +59,7 @@ __attribute__ ((naked)) void assert_failed(char const *module, int loc); /* Function prototypes -----------------------------------------------------*/ void Default_Handler(void); /* Default empty handler */ void Reset_Handler(void); /* Reset Handler */ -void SystemInit(void); /* CMSIS system initialization */ +//void SystemInit(void); /* CMSIS system initialization */ /*---------------------------------------------------------------------------- * weak aliases for each Exception handler to the Default_Handler. @@ -385,8 +385,8 @@ void Reset_Handler(void) { software_init_hook(); /* this will also call __libc_init_array */ } else { - /* call all static constructors in C++ (harmless in C programs) */ - __libc_init_array(); + /* call all static constructors in C++ (comment out in C programs) */ + //__libc_init_array(); (void)main(); /* application's entry point; should never return! */ } diff --git a/lesson-19/targetConfigs/Tiva TM4C123GH6PM.ccxml b/lesson-19/targetConfigs/Tiva TM4C123GH6PM.ccxml index 0d8842e..c156333 100644 --- a/lesson-19/targetConfigs/Tiva TM4C123GH6PM.ccxml +++ b/lesson-19/targetConfigs/Tiva TM4C123GH6PM.ccxml @@ -1,13 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + +