mirror of
https://github.com/mytechnotalent/Embedded-Hacking.git
synced 2026-07-30 15:49:03 +02:00
remove unused coprocessor driver from all CBM projects
No project uses floating-point, so coprocessor_enable() was dead code. Removes rp2350_coprocessor.c/.h and all references from reset handlers and Makefiles across all 15 CBM drivers (0x01-0x0f).
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file rp2350_coprocessor.h
|
||||
* @author Kevin Thomas
|
||||
* @brief Coprocessor access control driver header for RP2350.
|
||||
*
|
||||
* Enables coprocessor access via the CPACR register.
|
||||
*
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* Copyright (c) 2026 Kevin Thomas.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software is licensed under terms that can be found in the LICENSE file
|
||||
* in the root directory of this software component.
|
||||
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef __RP2350_COPROCESSOR_H
|
||||
#define __RP2350_COPROCESSOR_H
|
||||
|
||||
#include "rp2350.h"
|
||||
|
||||
/**
|
||||
* @brief Enable coprocessor access via CPACR with DSB/ISB barriers.
|
||||
* @retval None
|
||||
*/
|
||||
void coprocessor_enable(void);
|
||||
|
||||
#endif /* __RP2350_COPROCESSOR_H */
|
||||
@@ -36,7 +36,6 @@ SRCS = $(SRC_DIR)/vector_table.c \
|
||||
$(SRC_DIR)/rp2350_stack.c \
|
||||
$(SRC_DIR)/rp2350_xosc.c \
|
||||
$(SRC_DIR)/rp2350_reset.c \
|
||||
$(SRC_DIR)/rp2350_coprocessor.c \
|
||||
$(SRC_DIR)/rp2350_uart.c \
|
||||
$(SRC_DIR)/rp2350_delay.c \
|
||||
$(SRC_DIR)/rp2350_timer.c \
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file rp2350_coprocessor.c
|
||||
* @author Kevin Thomas
|
||||
* @brief Coprocessor access control driver implementation for RP2350.
|
||||
*
|
||||
* Grants access to coprocessors 0 and 1 by setting the
|
||||
* corresponding bits in CPACR with DSB/ISB barriers.
|
||||
*
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* Copyright (c) 2026 Kevin Thomas.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software is licensed under terms that can be found in the LICENSE file
|
||||
* in the root directory of this software component.
|
||||
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include "rp2350_coprocessor.h"
|
||||
|
||||
void coprocessor_enable(void)
|
||||
{
|
||||
uint32_t value;
|
||||
value = *CPACR;
|
||||
value |= (1U << CPACR_CP1_SHIFT);
|
||||
value |= (1U << CPACR_CP0_SHIFT);
|
||||
*CPACR = value;
|
||||
__asm__ volatile ("dsb");
|
||||
__asm__ volatile ("isb");
|
||||
}
|
||||
@@ -5,8 +5,8 @@
|
||||
* @brief Reset handler implementation for RP2350.
|
||||
*
|
||||
* Entry point after power-on or system reset. Initializes the
|
||||
* stack, XOSC, subsystem resets, UART, TIMER0 tick generator,
|
||||
* coprocessor, then branches to main().
|
||||
* stack, XOSC, subsystem resets, UART, TIMER0 tick
|
||||
* generator, then branches to main().
|
||||
*
|
||||
******************************************************************************
|
||||
* @attention
|
||||
@@ -27,19 +27,17 @@
|
||||
#include "rp2350_reset.h"
|
||||
#include "rp2350_uart.h"
|
||||
#include "rp2350_timer.h"
|
||||
#include "rp2350_coprocessor.h"
|
||||
|
||||
extern int main(void);
|
||||
|
||||
/**
|
||||
* @brief Initialize late peripherals (timer tick and coprocessor).
|
||||
* @brief Initialize late peripherals (timer release and tick init).
|
||||
* @retval None
|
||||
*/
|
||||
void _late_init(void)
|
||||
{
|
||||
timer_release_reset();
|
||||
timer_tick_init();
|
||||
coprocessor_enable();
|
||||
}
|
||||
|
||||
void __attribute__((naked, noreturn)) Reset_Handler(void)
|
||||
|
||||
Reference in New Issue
Block a user