mirror of https://github.com/FOME-Tech/fome-fw.git
optimize for hot thread stacks and data in CCM
This commit is contained in:
parent
053e9daceb
commit
17c6a46e84
|
@ -65,8 +65,8 @@ static constexpr size_t totalEntryCount = BIG_BUFFER_SIZE / sizeof(composite_log
|
|||
static constexpr size_t bufferCount = totalEntryCount / toothLoggerEntriesPerBuffer;
|
||||
|
||||
static CompositeBuffer* buffers = nullptr;
|
||||
static chibios_rt::Mailbox<CompositeBuffer*, bufferCount> freeBuffers CCM_OPTIONAL;
|
||||
static chibios_rt::Mailbox<CompositeBuffer*, bufferCount> filledBuffers CCM_OPTIONAL;
|
||||
static chibios_rt::Mailbox<CompositeBuffer*, bufferCount> freeBuffers;
|
||||
static chibios_rt::Mailbox<CompositeBuffer*, bufferCount> filledBuffers;
|
||||
|
||||
static CompositeBuffer* currentBuffer = nullptr;
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ struct UsbThread : public TunerstudioThread {
|
|||
}
|
||||
};
|
||||
|
||||
static UsbThread usbConsole;
|
||||
static CCM_OPTIONAL UsbThread usbConsole;
|
||||
|
||||
void startUsbConsole() {
|
||||
usbConsole.start();
|
||||
|
|
|
@ -19,9 +19,9 @@
|
|||
#include "stepper.h"
|
||||
/* Storing two following structs in CCM memory cause HardFault (at least on F4)
|
||||
* This need deep debuging. Until it is moved out of CMM. */
|
||||
static StepDirectionStepper iacStepperHw /*CCM_OPTIONAL*/;
|
||||
static DualHBridgeStepper iacHbridgeHw /*CCM_OPTIONAL*/;
|
||||
StepperMotor iacMotor CCM_OPTIONAL;
|
||||
static StepDirectionStepper iacStepperHw;
|
||||
static DualHBridgeStepper iacHbridgeHw;
|
||||
StepperMotor iacMotor;
|
||||
#endif /* EFI_UNIT_TEST */
|
||||
|
||||
static SimplePwm idleSolenoidOpen("idle open");
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
static constexpr size_t maxFilterCount = 48;
|
||||
|
||||
static size_t filterCount = 0;
|
||||
static CanFilter filters[maxFilterCount];
|
||||
static CCM_OPTIONAL CanFilter filters[maxFilterCount];
|
||||
|
||||
CanFilter* getFilterForId(CanBusIndex busIndex, int Id) {
|
||||
for (size_t i = 0; i < filterCount; i++) {
|
||||
|
|
|
@ -139,7 +139,7 @@ public:
|
|||
void ThreadTask() override;
|
||||
};
|
||||
|
||||
static KnockThread kt;
|
||||
static CCM_OPTIONAL KnockThread kt;
|
||||
|
||||
void initSoftwareKnock() {
|
||||
if (engineConfiguration->enableSoftwareKnock) {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#endif /* EFI_ELECTRONIC_THROTTLE_BODY */
|
||||
|
||||
// todo: clean this mess, this should become 'static'/private
|
||||
EnginePins enginePins;
|
||||
CCM_OPTIONAL EnginePins enginePins;
|
||||
|
||||
static const char* const sparkNames[] = { "Coil 1", "Coil 2", "Coil 3", "Coil 4", "Coil 5", "Coil 6", "Coil 7", "Coil 8",
|
||||
"Coil 9", "Coil 10", "Coil 11", "Coil 12"};
|
||||
|
|
|
@ -54,7 +54,7 @@ static char shaft_signal_msg_index[15];
|
|||
#define WAVE_LOGGING_SIZE 35000
|
||||
#endif
|
||||
|
||||
static char WAVE_LOGGING_BUFFER[WAVE_LOGGING_SIZE] CCM_OPTIONAL;
|
||||
static char WAVE_LOGGING_BUFFER[WAVE_LOGGING_SIZE];
|
||||
|
||||
int waveChartUsedSize;
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include "status_loop.h"
|
||||
|
||||
#if EFI_TEXT_LOGGING
|
||||
static char LOGGING_BUFFER[SC_BUFFER_SIZE] CCM_OPTIONAL;
|
||||
static char LOGGING_BUFFER[SC_BUFFER_SIZE];
|
||||
static Logging scLogging("analog chart", LOGGING_BUFFER, sizeof(LOGGING_BUFFER));
|
||||
#endif /* EFI_TEXT_LOGGING */
|
||||
|
||||
|
|
|
@ -431,7 +431,7 @@ static void configureInputs() {
|
|||
setAdcChannelOverrides();
|
||||
}
|
||||
|
||||
static SlowAdcController slowAdcController;
|
||||
static CCM_OPTIONAL SlowAdcController slowAdcController;
|
||||
|
||||
void initAdcInputs() {
|
||||
efiPrintf("initAdcInputs()");
|
||||
|
|
|
@ -159,7 +159,7 @@ private:
|
|||
uint8_t m_write = 0;
|
||||
};
|
||||
|
||||
static ExtiQueue<ExtiQueueEntry, 32> queue;
|
||||
static CCM_OPTIONAL ExtiQueue<ExtiQueueEntry, 32> queue;
|
||||
|
||||
static uint8_t overflowCounter = 0;
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
static NO_CACHE uint8_t blkbuf0[MMCSD_BLOCK_SIZE];
|
||||
static NO_CACHE uint8_t blkbuf1[MMCSD_BLOCK_SIZE];
|
||||
|
||||
static MassStorageController msd(usb_driver);
|
||||
static CCM_OPTIONAL MassStorageController msd(usb_driver);
|
||||
|
||||
static const scsi_inquiry_response_t iniDriveInquiry = {
|
||||
0x00, /* direct access block device */
|
||||
|
|
|
@ -16,15 +16,15 @@ struct FuncPair {
|
|||
FuncChain<resist, therm> thermistor;
|
||||
};
|
||||
|
||||
static CCM_OPTIONAL FunctionalSensor clt(SensorType::Clt, MS2NT(10));
|
||||
static CCM_OPTIONAL FunctionalSensor iat(SensorType::Iat, MS2NT(10));
|
||||
static CCM_OPTIONAL FunctionalSensor aux1(SensorType::AuxTemp1, MS2NT(10));
|
||||
static CCM_OPTIONAL FunctionalSensor aux2(SensorType::AuxTemp2, MS2NT(10));
|
||||
static FunctionalSensor clt(SensorType::Clt, MS2NT(10));
|
||||
static FunctionalSensor iat(SensorType::Iat, MS2NT(10));
|
||||
static FunctionalSensor aux1(SensorType::AuxTemp1, MS2NT(10));
|
||||
static FunctionalSensor aux2(SensorType::AuxTemp2, MS2NT(10));
|
||||
|
||||
static CCM_OPTIONAL FunctionalSensor oilTempSensor(SensorType::OilTemperature, MS2NT(10));
|
||||
static CCM_OPTIONAL FunctionalSensor fuelTempSensor(SensorType::FuelTemperature, MS2NT(10));
|
||||
static CCM_OPTIONAL FunctionalSensor ambientTempSensor(SensorType::AmbientTemperature, MS2NT(10));
|
||||
static CCM_OPTIONAL FunctionalSensor compressorDischargeTemp(SensorType::CompressorDischargeTemperature, MS2NT(10));
|
||||
static FunctionalSensor oilTempSensor(SensorType::OilTemperature, MS2NT(10));
|
||||
static FunctionalSensor fuelTempSensor(SensorType::FuelTemperature, MS2NT(10));
|
||||
static FunctionalSensor ambientTempSensor(SensorType::AmbientTemperature, MS2NT(10));
|
||||
static FunctionalSensor compressorDischargeTemp(SensorType::CompressorDischargeTemperature, MS2NT(10));
|
||||
|
||||
static FuncPair fclt, fiat, faux1, faux2, foil, ffuel, fambient, fcdt;
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#define CONSOLE_MAX_ACTIONS 150
|
||||
|
||||
static int consoleActionCount = 0;
|
||||
static TokenCallback consoleActions[CONSOLE_MAX_ACTIONS] CCM_OPTIONAL;
|
||||
static TokenCallback consoleActions[CONSOLE_MAX_ACTIONS];
|
||||
|
||||
void resetConsoleActions(void) {
|
||||
consoleActionCount = 0;
|
||||
|
|
Loading…
Reference in New Issue