summaryrefslogtreecommitdiff
path: root/ports_module/cortex_m0+/iar
diff options
context:
space:
mode:
Diffstat (limited to 'ports_module/cortex_m0+/iar')
-rw-r--r--ports_module/cortex_m0+/iar/example_build/tx_initialize_low_level.s20
-rw-r--r--ports_module/cortex_m0+/iar/example_build/txm.ewp2
-rw-r--r--ports_module/cortex_m0+/iar/inc/tx_port.h2
-rw-r--r--ports_module/cortex_m0+/iar/module_manager/src/tx_iar.c9
4 files changed, 12 insertions, 21 deletions
diff --git a/ports_module/cortex_m0+/iar/example_build/tx_initialize_low_level.s b/ports_module/cortex_m0+/iar/example_build/tx_initialize_low_level.s
index 16404d63..2f7c98c8 100644
--- a/ports_module/cortex_m0+/iar/example_build/tx_initialize_low_level.s
+++ b/ports_module/cortex_m0+/iar/example_build/tx_initialize_low_level.s
@@ -1,5 +1,6 @@
;/***************************************************************************
; * Copyright (c) 2024 Microsoft Corporation
+; * Copyright (c) 2026-present Eclipse ThreadX contributors
; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
@@ -7,6 +8,7 @@
; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
+; Portions of this file were generated with AI assistance.
;
;
;/**************************************************************************/
@@ -30,10 +32,8 @@
;#include "tx_timer.h"
;
;
- EXTERN _tx_thread_system_stack_ptr
EXTERN _tx_initialize_unused_memory
EXTERN _tx_timer_interrupt
- EXTERN __vector_table
EXTERN _tx_execution_isr_enter
EXTERN _tx_execution_isr_exit
;
@@ -99,19 +99,6 @@ _tx_initialize_low_level:
ADDS r1, r1, #4 //
STR r1, [r0] // Setup first unused memory pointer
- /* Setup Vector Table Offset Register. */
-
- LDR r0, =0xE000ED08 // Build address of NVIC registers
- LDR r1, =__vector_table // Pickup address of vector table
- STR r1, [r0] // Set vector table address
-
- /* Set system stack pointer from vector value. */
-
- LDR r0, =_tx_thread_system_stack_ptr // Build address of system stack pointer
- LDR r1, =__vector_table // Pickup address of vector table
- LDR r1, [r1] // Pickup reset stack pointer
- STR r1, [r0] // Save system stack pointer
-
/* Enable the cycle count register. */
LDR r0, =0xE0001000 // Build address of DWT register
@@ -123,6 +110,9 @@ _tx_initialize_low_level:
/* Configure SysTick for 100Hz clock, or 16384 cycles if no reference. */
LDR r0, =0xE000E000 // Build address of NVIC registers
+ LDR r1, =0
+ STR r1, [r0, #0x10] // Reset SysTick Control
+ STR r1, [r0, #0x18] // Reset SysTick Counter Value
LDR r1, =SYSTICK_CYCLES
MOVS r2, #0x14
STR r1, [r0, r2] // Setup SysTick Reload Value
diff --git a/ports_module/cortex_m0+/iar/example_build/txm.ewp b/ports_module/cortex_m0+/iar/example_build/txm.ewp
index e13721eb..12463c9e 100644
--- a/ports_module/cortex_m0+/iar/example_build/txm.ewp
+++ b/ports_module/cortex_m0+/iar/example_build/txm.ewp
@@ -1048,7 +1048,7 @@
</option>
<option>
<name>IarchiveOutput</name>
- <state>C:\azure_rtos\threadx\ports_module\cortex_m0+\iar\example_build\Debug\Exe\txm.a</state>
+ <state>###Unitialized###</state>
</option>
</data>
</settings>
diff --git a/ports_module/cortex_m0+/iar/inc/tx_port.h b/ports_module/cortex_m0+/iar/inc/tx_port.h
index 63ba51e4..15073a78 100644
--- a/ports_module/cortex_m0+/iar/inc/tx_port.h
+++ b/ports_module/cortex_m0+/iar/inc/tx_port.h
@@ -559,7 +559,7 @@ void tx_thread_fpu_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M0+/IAR Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M0+/IAR Version 6.5.2.202603 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports_module/cortex_m0+/iar/module_manager/src/tx_iar.c b/ports_module/cortex_m0+/iar/module_manager/src/tx_iar.c
index 238b485e..ab6c209c 100644
--- a/ports_module/cortex_m0+/iar/module_manager/src/tx_iar.c
+++ b/ports_module/cortex_m0+/iar/module_manager/src/tx_iar.c
@@ -9,6 +9,7 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+// Portions of this file were generated with AI assistance.
/**************************************************************************/
/**************************************************************************/
@@ -270,7 +271,7 @@ TX_MUTEX *mutex_ptr;
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
/* Check for wrap-around on the next free mutex. */
- if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
+ if (__tx_iar_file_lock_next_free_mutex >= _MAX_FLOCK)
{
/* Yes, set the free index back to 0. */
@@ -287,7 +288,7 @@ TX_MUTEX *mutex_ptr;
}
/* Determine if a free mutex was found. */
- if (i >= _MAX_LOCK)
+ if (i >= _MAX_FLOCK)
{
/* Error! No more free mutexes! */
@@ -678,7 +679,7 @@ TX_MUTEX *mutex_ptr;
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
/* Check for wrap-around on the next free mutex. */
- if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
+ if (__tx_iar_file_lock_next_free_mutex >= _MAX_FLOCK)
{
/* Yes, set the free index back to 0. */
@@ -695,7 +696,7 @@ TX_MUTEX *mutex_ptr;
}
/* Determine if a free mutex was found. */
- if (i >= _MAX_LOCK)
+ if (i >= _MAX_FLOCK)
{
/* Error! No more free mutexes! */