diff options
author | Ben V. Brown <[email protected]> | 2018-12-16 16:16:31 +1100 |
---|---|---|
committer | Ben V. Brown <[email protected]> | 2018-12-16 16:16:31 +1100 |
commit | b744f51e2d59d5cb88cf809dccca776e71d047a0 (patch) | |
tree | bcf99861b21375dbe6caeed021c00e5800deb9e5 | |
parent | 21afc3e898cee112d16e9e3bff714ae6d808fc63 (diff) | |
download | IronOS-b744f51e2d59d5cb88cf809dccca776e71d047a0.tar.gz IronOS-b744f51e2d59d5cb88cf809dccca776e71d047a0.zip |
Fix normal solder screen issues, disable I2C DMA pending some testing
-rw-r--r-- | workspace/TS100/inc/FreeRTOSConfig.h | 2 | ||||
-rw-r--r-- | workspace/TS100/inc/hardware.h | 34 | ||||
-rw-r--r-- | workspace/TS100/inc/main.hpp | 2 | ||||
-rw-r--r-- | workspace/TS100/inc/power.hpp | 2 | ||||
-rw-r--r-- | workspace/TS100/src/FRToSI2C.cpp | 16 | ||||
-rw-r--r-- | workspace/TS100/src/Settings.cpp | 2 | ||||
-rw-r--r-- | workspace/TS100/src/Setup.c | 3 | ||||
-rw-r--r-- | workspace/TS100/src/gui.cpp | 8 | ||||
-rw-r--r-- | workspace/TS100/src/hardware.c | 42 | ||||
-rw-r--r-- | workspace/TS100/src/main.cpp | 82 | ||||
-rw-r--r-- | workspace/TS100/src/power.cpp | 14 | ||||
-rw-r--r-- | workspace/TS100A/.cproject | 160 | ||||
-rw-r--r-- | workspace/TS100A/.gitignore | 1 | ||||
-rw-r--r-- | workspace/TS100A/.settings/language.settings.xml | 12 |
14 files changed, 287 insertions, 93 deletions
diff --git a/workspace/TS100/inc/FreeRTOSConfig.h b/workspace/TS100/inc/FreeRTOSConfig.h index 4c787b06..31dcdfab 100644 --- a/workspace/TS100/inc/FreeRTOSConfig.h +++ b/workspace/TS100/inc/FreeRTOSConfig.h @@ -101,7 +101,7 @@ #define configTICK_RATE_HZ ((TickType_t)100) #define configMAX_PRIORITIES ( 4 ) #define configMINIMAL_STACK_SIZE ((uint16_t)256) -#define configTOTAL_HEAP_SIZE ((size_t)10240) /*Currently use about 9000*/ +#define configTOTAL_HEAP_SIZE ((size_t)10240+2048) /*Currently use about 9000*/ #define configMAX_TASK_NAME_LEN ( 24 ) #define configUSE_16_BIT_TICKS 0 #define configUSE_MUTEXES 1 diff --git a/workspace/TS100/inc/hardware.h b/workspace/TS100/inc/hardware.h index bdc062ac..53a5084e 100644 --- a/workspace/TS100/inc/hardware.h +++ b/workspace/TS100/inc/hardware.h @@ -14,9 +14,7 @@ extern "C" { #endif enum Orientation { - ORIENTATION_LEFT_HAND = 0, - ORIENTATION_RIGHT_HAND = 1, - ORIENTATION_FLAT = 3 + ORIENTATION_LEFT_HAND = 0, ORIENTATION_RIGHT_HAND = 1, ORIENTATION_FLAT = 3 }; #if defined(MODEL_TS100) + defined(MODEL_TS80) > 1 @@ -96,42 +94,40 @@ enum Orientation { */ #ifdef MODEL_TS100 enum TipType { - TS_B2 = 0, - TS_D24 = 1, - TS_BC2 = 2, - TS_C1 = 3, - Tip_MiniWare = 4, - HAKKO_BC2 = 4, - Tip_Hakko = 5, - Tip_Custom = 5, + TS_B2 = 0, + TS_D24 = 1, + TS_BC2 = 2, + TS_C1 = 3, + Tip_MiniWare = 4, + HAKKO_BC2 = 4, + Tip_Hakko = 5, + Tip_Custom = 5, }; #endif #ifdef MODEL_TS80 enum TipType { - TS_B02 = 0, - TS_D25 = 1, - Tip_MiniWare = 2, - Tip_Custom = 2, + TS_B02 = 0, TS_D25 = 1, Tip_MiniWare = 2, Tip_Custom = 2, }; #endif +extern uint16_t tipGainCalValue ; uint16_t lookupTipDefaultCalValue(enum TipType tipID); uint16_t getHandleTemperature(); uint16_t getTipRawTemp(uint8_t refresh); -uint16_t getInputVoltageX10(uint16_t divisor); +uint16_t getInputVoltageX10(uint16_t divisor,uint8_t sample); uint8_t getTipPWM(); void setTipPWM(uint8_t pulse); uint16_t ctoTipMeasurement(uint16_t temp); uint16_t tipMeasurementToC(uint16_t raw); uint16_t ftoTipMeasurement(uint16_t temp); uint16_t tipMeasurementToF(uint16_t raw); -void seekQC(int16_t Vx10,uint16_t divisor); +void seekQC(int16_t Vx10, uint16_t divisor); void setCalibrationOffset(int16_t offSet); void setTipType(enum TipType tipType, uint8_t manualCalGain); uint32_t calculateTipR(); int16_t calculateMaxVoltage(uint8_t useHP); -void startQC(uint16_t divisor); // Tries to negotiate QC for highest voltage, must be run after - // RToS +void startQC(uint16_t divisor); // Tries to negotiate QC for highest voltage, must be run after +// RToS // This will try for 12V, failing that 9V, failing that 5V // If input is over 12V returns -1 // If the input is [5-12] Will return the value. diff --git a/workspace/TS100/inc/main.hpp b/workspace/TS100/inc/main.hpp index f83933a5..2474fe60 100644 --- a/workspace/TS100/inc/main.hpp +++ b/workspace/TS100/inc/main.hpp @@ -5,7 +5,7 @@ #include "OLED.hpp" #include "Setup.h" extern uint8_t PCBVersion; -extern uint16_t currentlyActiveTemperatureTarget; +extern uint32_t currentlyActiveTemperatureTarget; enum ButtonState { BUTTON_NONE = 0, /* No buttons pressed / < filter time*/ BUTTON_F_SHORT = 1, /* User has pressed the front button*/ diff --git a/workspace/TS100/inc/power.hpp b/workspace/TS100/inc/power.hpp index da3acff4..70b6986e 100644 --- a/workspace/TS100/inc/power.hpp +++ b/workspace/TS100/inc/power.hpp @@ -13,7 +13,7 @@ const uint8_t hz = 32;//PID loop rate const uint8_t oscillationPeriod = 3.5 * hz; // dampening look back tuning -extern history<uint16_t, oscillationPeriod> milliWattHistory; +extern history<uint32_t, oscillationPeriod> milliWattHistory; void setupPower(uint8_t resistance); int32_t tempToMilliWatts(int32_t rawTemp, uint16_t mass, uint8_t rawC); diff --git a/workspace/TS100/src/FRToSI2C.cpp b/workspace/TS100/src/FRToSI2C.cpp index cecd6994..70d1d822 100644 --- a/workspace/TS100/src/FRToSI2C.cpp +++ b/workspace/TS100/src/FRToSI2C.cpp @@ -6,7 +6,7 @@ */ #include "FRToSI2C.hpp" - +//#define I2CUSESDMA I2C_HandleTypeDef* FRToSI2C::i2c; SemaphoreHandle_t FRToSI2C::I2CSemaphore; void FRToSI2C::CpltCallback() { @@ -20,6 +20,7 @@ void FRToSI2C::CpltCallback() { void FRToSI2C::Mem_Read(uint16_t DevAddress, uint16_t MemAddress, uint16_t MemAddSize, uint8_t* pData, uint16_t Size) { +#ifdef I2CUSESDMA if (I2CSemaphore == NULL) { // no RToS, run blocking code HAL_I2C_Mem_Read(i2c, DevAddress, MemAddress, MemAddSize, pData, Size, @@ -36,6 +37,10 @@ void FRToSI2C::Mem_Read(uint16_t DevAddress, uint16_t MemAddress, } else { } } +#else + HAL_I2C_Mem_Read(i2c, DevAddress, MemAddress, MemAddSize, pData, Size, + 5000); +#endif } void FRToSI2C::I2C_RegisterWrite(uint8_t address, uint8_t reg, uint8_t data) { Mem_Write(address, reg, I2C_MEMADD_SIZE_8BIT, &data, 1); @@ -48,6 +53,7 @@ uint8_t FRToSI2C::I2C_RegisterRead(uint8_t add, uint8_t reg) { } void FRToSI2C::Mem_Write(uint16_t DevAddress, uint16_t MemAddress, uint16_t MemAddSize, uint8_t* pData, uint16_t Size) { +#ifdef I2CUSESDMA if (I2CSemaphore == NULL) { // no RToS, run blocking code HAL_I2C_Mem_Write(i2c, DevAddress, MemAddress, MemAddSize, pData, Size, @@ -65,9 +71,14 @@ void FRToSI2C::Mem_Write(uint16_t DevAddress, uint16_t MemAddress, } else { } } +#else + HAL_I2C_Mem_Write(i2c, DevAddress, MemAddress, MemAddSize, pData, Size, + 5000); +#endif } void FRToSI2C::Transmit(uint16_t DevAddress, uint8_t* pData, uint16_t Size) { +#ifdef I2CUSESDMA if (I2CSemaphore == NULL) { // no RToS, run blocking code HAL_I2C_Master_Transmit(i2c, DevAddress, pData, Size, 5000); @@ -82,4 +93,7 @@ void FRToSI2C::Transmit(uint16_t DevAddress, uint8_t* pData, uint16_t Size) { } else { } } +#else + HAL_I2C_Master_Transmit(i2c, DevAddress, pData, Size, 5000); +#endif } diff --git a/workspace/TS100/src/Settings.cpp b/workspace/TS100/src/Settings.cpp index c541124c..f3ab233f 100644 --- a/workspace/TS100/src/Settings.cpp +++ b/workspace/TS100/src/Settings.cpp @@ -107,7 +107,7 @@ void resetSettings() { systemSettings.PID_P = 42; // PID tuning constants systemSettings.PID_I = 50; systemSettings.PID_D = 15; - systemSettings.CalibrationOffset = 2780; // the adc offset + systemSettings.CalibrationOffset = 1400; // the adc offset systemSettings.customTipGain = 0; // The tip type is either default or a custom gain #ifdef MODEL_TS100 diff --git a/workspace/TS100/src/Setup.c b/workspace/TS100/src/Setup.c index 0d0a6898..eeb4a834 100644 --- a/workspace/TS100/src/Setup.c +++ b/workspace/TS100/src/Setup.c @@ -329,7 +329,7 @@ static void MX_TIM2_Init(void) { HAL_TIMEx_MasterConfigSynchronization(&htim2, &sMasterConfig); sConfigOC.OCMode = TIM_OCMODE_PWM1; - sConfigOC.Pulse = 255+50; //255 is the largest time period of the drive signal, and the 47 offsets this around 5ms afterwards + sConfigOC.Pulse = 255+50; //255 is the largest time period of the drive signal, and the 50 offsets this around 5ms afterwards /* * It takes 4 milliseconds for output to be stable after PWM turns off. * Assume ADC samples in 0.5ms @@ -348,6 +348,7 @@ static void MX_TIM2_Init(void) { HAL_TIM_Base_Start_IT(&htim2); HAL_TIM_PWM_Start(&htim2, TIM_CHANNEL_1); HAL_TIM_PWM_Start_IT(&htim2, TIM_CHANNEL_4); + HAL_NVIC_SetPriority(TIM2_IRQn, 15, 0); HAL_NVIC_EnableIRQ(TIM2_IRQn); } diff --git a/workspace/TS100/src/gui.cpp b/workspace/TS100/src/gui.cpp index 2ae80ab6..a2ab5b1a 100644 --- a/workspace/TS100/src/gui.cpp +++ b/workspace/TS100/src/gui.cpp @@ -662,6 +662,10 @@ static void setTipOffset() { osDelay(333); } systemSettings.CalibrationOffset = offset / 15; + // Need to remove from this the ambient temperature offset + uint32_t ambientoffset = getHandleTemperature(); // Handle temp in C + ambientoffset *=1000; + ambientoffset /= tipGainCalValue; setCalibrationOffset(systemSettings.CalibrationOffset); // store the error osDelay(100); } @@ -812,10 +816,10 @@ static void settings_setCalibrateVIN(void) { for (;;) { OLED::setCursor(0, 0); - OLED::printNumber(getInputVoltageX10(systemSettings.voltageDiv) / 10, + OLED::printNumber(getInputVoltageX10(systemSettings.voltageDiv,0) / 10, 2); OLED::print("."); - OLED::printNumber(getInputVoltageX10(systemSettings.voltageDiv) % 10, + OLED::printNumber(getInputVoltageX10(systemSettings.voltageDiv,0) % 10, 1); OLED::print("V"); diff --git a/workspace/TS100/src/hardware.c b/workspace/TS100/src/hardware.c index 8600d545..c038620b 100644 --- a/workspace/TS100/src/hardware.c +++ b/workspace/TS100/src/hardware.c @@ -127,7 +127,7 @@ uint16_t getTipRawTemp(uint8_t refresh) { return lastSample; } -uint16_t getInputVoltageX10(uint16_t divisor) { +uint16_t getInputVoltageX10(uint16_t divisor, uint8_t sample) { // ADC maximum is 32767 == 3.3V at input == 28.05V at VIN // Therefore we can divide down from there // Multiplying ADC max by 4 for additional calibration options, @@ -141,16 +141,16 @@ uint16_t getInputVoltageX10(uint16_t divisor) { samples[i] = getADC(1); preFillneeded--; } - samples[index] = getADC(1); - index = (index + 1) % BATTFILTERDEPTH; + if (sample) { + samples[index] = getADC(1); + index = (index + 1) % BATTFILTERDEPTH; + } uint32_t sum = 0; for (uint8_t i = 0; i < BATTFILTERDEPTH; i++) sum += samples[i]; sum /= BATTFILTERDEPTH; - if (sum < 50) - preFillneeded = 1; return sum * 4 / divisor; } #ifdef MODEL_TS80 @@ -170,7 +170,7 @@ void seekQC(int16_t Vx10, uint16_t divisor) { // try and step towards the wanted value // 1. Measure current voltage - int16_t vStart = getInputVoltageX10(divisor); + int16_t vStart = getInputVoltageX10(divisor, 0); int difference = Vx10 - vStart; // 2. calculate ideal steps (0.2V changes) @@ -185,7 +185,7 @@ void seekQC(int16_t Vx10, uint16_t divisor) { HAL_GPIO_WritePin(GPIOA, GPIO_PIN_8, GPIO_PIN_RESET); //-0.6V HAL_Delay(1); HAL_GPIO_WritePin(GPIOA, GPIO_PIN_8, GPIO_PIN_SET); - HAL_IWDG_Refresh(&hiwdg); + HAL_Delay(1); steps++; } @@ -199,7 +199,7 @@ void seekQC(int16_t Vx10, uint16_t divisor) { HAL_GPIO_WritePin(GPIOB, GPIO_PIN_3, GPIO_PIN_SET); HAL_Delay(1); HAL_GPIO_WritePin(GPIOB, GPIO_PIN_3, GPIO_PIN_RESET); - HAL_IWDG_Refresh(&hiwdg); + HAL_Delay(1); steps--; } @@ -235,7 +235,7 @@ void seekQC(int16_t Vx10, uint16_t divisor) { void startQC(uint16_t divisor) { // Pre check that the input could be >5V already, and if so, dont both // negotiating as someone is feeding in hv - uint16_t vin = getInputVoltageX10(divisor); + uint16_t vin = getInputVoltageX10(divisor, 1); if (vin > 150) return; // Over voltage if (vin > 100) { @@ -275,7 +275,7 @@ void startQC(uint16_t divisor) { for (uint16_t i = 0; i < 130 && enteredQC == 0; i++) { // HAL_Delay(10); vTaskDelay(1); - HAL_IWDG_Refresh(&hiwdg); + } // Check if D- is low to spot a QC charger if (HAL_GPIO_ReadPin(GPIOA, GPIO_PIN_11) == GPIO_PIN_RESET) @@ -292,12 +292,11 @@ void startQC(uint16_t divisor) { HAL_GPIO_WritePin(GPIOB, GPIO_PIN_3, GPIO_PIN_SET); HAL_GPIO_WritePin(GPIOA, GPIO_PIN_10, GPIO_PIN_SET); HAL_GPIO_WritePin(GPIOA, GPIO_PIN_8, GPIO_PIN_RESET); - HAL_IWDG_Refresh(&hiwdg); // Wait for frontend ADC to stabilise QCMode = 4; for (uint8_t i = 0; i < 10; i++) { - if (getInputVoltageX10(divisor) > 80) { + if (getInputVoltageX10(divisor, 1) > 80) { // yay we have at least QC2.0 or QC3.0 QCMode = 3; // We have at least QC2, pray for 3 HAL_GPIO_WritePin(GPIOB, GPIO_PIN_3, GPIO_PIN_RESET); @@ -321,8 +320,8 @@ void startQC(uint16_t divisor) { } // Get tip resistance in milliohms uint32_t calculateTipR() { - static uint32_t lastRes=0; - if(lastRes) + static uint32_t lastRes = 0; + if (lastRes) return lastRes; // We inject a small current into the front end of the iron, // By measuring the Vdrop over the tip we can calculate the resistance @@ -340,6 +339,7 @@ uint32_t calculateTipR() { uint32_t offReading = getTipRawTemp(1); for (uint8_t i = 0; i < 49; i++) { vTaskDelay(1); // delay to allow it to stabilize + HAL_IWDG_Refresh(&hiwdg); offReading += getTipRawTemp(1); } @@ -349,6 +349,7 @@ uint32_t calculateTipR() { uint32_t onReading = getTipInstantTemperature(); for (uint8_t i = 0; i < 49; i++) { vTaskDelay(1); // delay to allow it to stabilize + HAL_IWDG_Refresh(&hiwdg); onReading += getTipRawTemp(1); } @@ -362,7 +363,7 @@ uint32_t calculateTipR() { // 4688 milliohms (Measured using 4 terminal measurement) 25x oversampling // reads this as around 47490 Almost perfectly 10x the milliohms value This // will drift massively with tip temp However we really only need 10x ohms - lastRes=(difference / 21) + 1; // ceil + lastRes = (difference / 21) + 1; // ceil return lastRes; } static unsigned int sqrt32(unsigned long n) { @@ -423,8 +424,8 @@ uint8_t getTipPWM() { return pendingPWM; } void setTipPWM(uint8_t pulse) { - PWMSafetyTimer = 2; // This is decremented in the handler for PWM so that the tip pwm is - // disabled if the PID task is not scheduled often enough. + PWMSafetyTimer = 50; // This is decremented in the handler for PWM so that the tip pwm is + // disabled if the PID task is not scheduled often enough. pendingPWM = pulse; } @@ -436,9 +437,10 @@ void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) { // Period has elapsed if (htim->Instance == TIM2) { // we want to turn on the output again - PWMSafetyTimer--; // We decrement this safety value so that lockups in the - // scheduler will not cause the PWM to become locked in an - // active driving state. + PWMSafetyTimer--; + // We decrement this safety value so that lockups in the + // scheduler will not cause the PWM to become locked in an + // active driving state. // While we could assume this could never happen, its a small price for // increased safety htim2.Instance->CCR4 = pendingPWM; diff --git a/workspace/TS100/src/main.cpp b/workspace/TS100/src/main.cpp index 4ae266e6..112f1eac 100644 --- a/workspace/TS100/src/main.cpp +++ b/workspace/TS100/src/main.cpp @@ -15,7 +15,7 @@ #define ACCELDEBUG 0 uint8_t PCBVersion = 0; // File local variables -uint16_t currentlyActiveTemperatureTarget = 0; +uint32_t currentlyActiveTemperatureTarget = 0; uint32_t lastMovementTime = 0; uint32_t lastButtonTime = 0; int16_t idealQCVoltage = 0; @@ -59,7 +59,6 @@ int main(void) { systemSettings.SleepTime = 0; systemSettings.ShutdownTime = 0; // No accel -> disable sleep systemSettings.sensitivity = 0; - saveSettings(); } HAL_IWDG_Refresh(&hiwdg); restoreSettings(); // load the settings from flash @@ -70,15 +69,15 @@ int main(void) { /* Create the thread(s) */ /* definition and creation of GUITask */ - osThreadDef(GUITask, startGUITask, osPriorityBelowNormal, 0, 768); // 3k + osThreadDef(GUITask, startGUITask, osPriorityBelowNormal, 0, 4 * 1024 / 4); GUITaskHandle = osThreadCreate(osThread(GUITask), NULL); /* definition and creation of PIDTask */ - osThreadDef(PIDTask, startPIDTask, osPriorityRealtime, 0, 512); // 2k + osThreadDef(PIDTask, startPIDTask, osPriorityRealtime, 0, 2 * 1024 / 4); PIDTaskHandle = osThreadCreate(osThread(PIDTask), NULL); if (PCBVersion < 3) { /* definition and creation of MOVTask */ - osThreadDef(MOVTask, startMOVTask, osPriorityNormal, 0, 512); // 2k + osThreadDef(MOVTask, startMOVTask, osPriorityNormal, 0, 2 * 1024 / 4); MOVTaskHandle = osThreadCreate(osThread(MOVTask), NULL); } @@ -91,9 +90,10 @@ int main(void) { } void printVoltage() { - OLED::printNumber(getInputVoltageX10(systemSettings.voltageDiv) / 10, 2); + uint32_t volt = getInputVoltageX10(systemSettings.voltageDiv, 0); + OLED::printNumber(volt / 10, 2); OLED::drawChar('.'); - OLED::printNumber(getInputVoltageX10(systemSettings.voltageDiv) % 10, 1); + OLED::printNumber(volt % 10, 1); } void GUIDelay() { // Called in all UI looping tasks, @@ -201,12 +201,10 @@ void waitForButtonPress() { while (buttons) { buttons = getButtonState(); GUIDelay(); - GUIDelay(); } while (!buttons) { buttons = getButtonState(); GUIDelay(); - GUIDelay(); } } @@ -231,10 +229,12 @@ void waitForButtonPressOrTimeout(uint32_t timeout) { #ifdef MODEL_TS100 // returns true if undervoltage has occured static bool checkVoltageForExit() { - uint16_t v = getInputVoltageX10(systemSettings.voltageDiv); + uint16_t v = getInputVoltageX10(systemSettings.voltageDiv, 0); + //Dont check for first 1.5 seconds while the ADC stabilizes and the DMA fills the buffer - if(xTaskGetTickCount()>150) { + if (xTaskGetTickCount() > 150) { if ((v < lookupVoltageLevel(systemSettings.cutoutSetting))) { + GUIDelay(); OLED::clearScreen(); OLED::setCursor(0, 0); if (systemSettings.detailedSoldering) { @@ -265,7 +265,7 @@ static void gui_drawBatteryIcon() { // User is on a lithium battery // we need to calculate which of the 10 levels they are on uint8_t cellCount = systemSettings.cutoutSetting + 2; - uint16_t cellV = getInputVoltageX10(systemSettings.voltageDiv) + uint16_t cellV = getInputVoltageX10(systemSettings.voltageDiv, 0) / cellCount; // Should give us approx cell voltage X10 // Range is 42 -> 33 = 9 steps therefore we will use battery 1-10 @@ -280,7 +280,7 @@ static void gui_drawBatteryIcon() { #else // On TS80 we replace this symbol with the voltage we are operating on // If <9V then show single digit, if not show duals - uint8_t V = getInputVoltageX10(systemSettings.voltageDiv); + uint8_t V = getInputVoltageX10(systemSettings.voltageDiv, 0); if (V % 10 >= 5) V = V / 10 + 1; // round up else @@ -506,8 +506,8 @@ static void gui_solderingMode(uint8_t jumpToSleep) { sleepThres = systemSettings.SleepTime * 10 * 100; else sleepThres = (systemSettings.SleepTime - 5) * 60 * 100; + for (;;) { - uint16_t tipTemp = getTipRawTemp(0); ButtonState buttons = getButtonState(); switch (buttons) { @@ -543,13 +543,16 @@ static void gui_solderingMode(uint8_t jumpToSleep) { OLED::setCursor(0, 0); OLED::clearScreen(); OLED::setFont(0); + uint16_t tipTemp = getTipRawTemp(0); if (tipTemp > 32752) { OLED::print(BadTipString); OLED::refresh(); currentlyActiveTemperatureTarget = 0; waitForButtonPress(); + currentlyActiveTemperatureTarget = 0; return; } else { + OLED::setCursor(0, 0); if (systemSettings.detailedSoldering) { OLED::setFont(1); OLED::print(SolderingAdvancedPowerPrompt); // Power: @@ -570,6 +573,7 @@ static void gui_solderingMode(uint8_t jumpToSleep) { printVoltage(); OLED::drawChar('V'); } else { + OLED::setFont(0); // We switch the layout direction depending on the orientation of the // OLED:: if (OLED::getRotation()) { @@ -587,10 +591,10 @@ static void gui_solderingMode(uint8_t jumpToSleep) { OLED::drawChar(' '); // Draw heating/cooling symbols - OLED::drawHeatSymbol(getTipPWM()); + OLED::drawHeatSymbol(milliWattsToPWM(milliWattHistory[0],systemSettings.voltageDiv)); } else { // Draw heating/cooling symbols - OLED::drawHeatSymbol(getTipPWM()); + OLED::drawHeatSymbol(milliWattsToPWM(milliWattHistory[0],systemSettings.voltageDiv)); // We draw boost arrow if boosting, or else gap temp <-> heat // indicator if (boostModeOn) @@ -633,8 +637,9 @@ static void gui_solderingMode(uint8_t jumpToSleep) { } #else // on the TS80 we only want to check for over voltage to prevent tip damage - if (getInputVoltageX10(systemSettings.voltageDiv) > 150) { + if (getInputVoltageX10(systemSettings.voltageDiv, 1) > 150) { lastButtonTime = xTaskGetTickCount(); + currentlyActiveTemperatureTarget = 0; return; // Over voltage } #endif @@ -662,8 +667,7 @@ __DATE__, "Heap: ", "HWMG: ", "HWMP: ", "HWMM: ", "Time: ", "Move: ", "RTip: ", #ifdef MODEL_TS80 "QCV: ", "Tr ", #else - "Tm ", - "Ralim-", + "Tm ", "Ralim-", #endif }; @@ -835,7 +839,7 @@ void startGUITask(void const *argument __unused) { } currentlyActiveTemperatureTarget = 0; // ensure tip is off - + getInputVoltageX10(systemSettings.voltageDiv, 0); uint16_t tipTemp = tipMeasurementToC(getTipRawTemp(0)); if (tipTemp < 50) { @@ -862,10 +866,7 @@ void startGUITask(void const *argument __unused) { OLED::print(TipDisconnectedString); } else { OLED::print(IdleTipString); - if (systemSettings.temperatureInF) - OLED::printNumber(tipMeasurementToF(getTipRawTemp(0)), 3); - else - OLED::printNumber(tipMeasurementToC(getTipRawTemp(0)), 3); + gui_drawTipTemp(false); OLED::print(IdleSetString); OLED::printNumber(systemSettings.SolderingTemp, 3); } @@ -934,8 +935,7 @@ void startPIDTask(void const *argument __unused) { idealQCVoltage = calculateMaxVoltage(systemSettings.cutoutSetting); #endif uint8_t rawC = ctoTipMeasurement(101) - ctoTipMeasurement(100); // 1*C change in raw. - currentlyActiveTemperatureTarget = 0; // Force start with no output (off). If in sleep / soldering this will - // be over-ridden rapidly + #ifdef MODEL_TS80 //Set power management code to the tip resistance in ohms * 10 setupPower(calculateTipR() / 100); @@ -944,13 +944,13 @@ void startPIDTask(void const *argument __unused) { setupPower(85); #endif - history<int16_t> tempError = { { 0 }, 0, 0 }; - + history<int32_t> tempError = { { 0 }, 0, 0 }; + currentlyActiveTemperatureTarget = 0; // Force start with no output (off). If in sleep / soldering this will + // be over-ridden rapidly pidTaskNotification = xTaskGetCurrentTaskHandle(); for (;;) { - if (ulTaskNotifyTake(pdTRUE, 1000)) { - // Wait a max of 50ms + if (ulTaskNotifyTake(pdTRUE, 2000)) { // This is a call to block this thread until the ADC does its samples uint16_t rawTemp = getTipRawTemp(1); // get instantaneous reading if (currentlyActiveTemperatureTarget) { @@ -958,13 +958,16 @@ void startPIDTask(void const *argument __unused) { if (currentlyActiveTemperatureTarget > ctoTipMeasurement(450)) { currentlyActiveTemperatureTarget = ctoTipMeasurement(450); } + if (currentlyActiveTemperatureTarget > 32500) { + currentlyActiveTemperatureTarget = 32500; + } // As we get close to our target, temp noise causes the system // to be unstable. Use a rolling average to dampen it. // We overshoot by roughly 1/2 of 1 degree Fahrenheit. // This helps stabilize the display. int32_t tError = currentlyActiveTemperatureTarget - rawTemp - + rawC / 4; + + (rawC / 4); tError = tError > INT16_MAX ? INT16_MAX : tError; tError = tError < INT16_MIN ? INT16_MIN : tError; tempError.update(tError); @@ -1011,15 +1014,16 @@ void startPIDTask(void const *argument __unused) { //If its a TS80, we want to have the option of using an occasional pulse to keep the power bank on //~200ms @ a low wattage //Doesnt keep all power banks awake but helps with some - if (xTaskGetTickCount() - lastPowerPulse < 20) { + /*if (xTaskGetTickCount() - lastPowerPulse < 20) { // for the first 200mS turn on for a bit - setTipMilliWatts(4000); // typically its around 5W to hold the current temp, so this wont raise temp much + setTipMilliWatts(4000); // typically its around 5W to hold the current temp, so this wont raise temp much } else setTipMilliWatts(0); //Then wait until the next second if (xTaskGetTickCount() - lastPowerPulse > 100) { lastPowerPulse = xTaskGetTickCount(); - } + }*/ + setTipMilliWatts(0); #else setTipMilliWatts(0); #endif @@ -1027,9 +1031,9 @@ void startPIDTask(void const *argument __unused) { HAL_IWDG_Refresh(&hiwdg); } else { - if (currentlyActiveTemperatureTarget == 0) { - setTipMilliWatts(0); - } +//ADC interrupt timeout + setTipMilliWatts(0); + setTipPWM(0); } } } @@ -1040,8 +1044,8 @@ void startMOVTask(void const *argument __unused) { #ifdef MODEL_TS80 startQC(systemSettings.voltageDiv); - while (idealQCVoltage == 0) - osDelay(20); // To ensure we return after idealQCVoltage is setup + while (pidTaskNotification == 0) + osDelay(20); // To ensure we return after idealQCVoltage/tip resistance seekQC(idealQCVoltage, systemSettings.voltageDiv); // this will move the QC output to the preferred voltage to start with diff --git a/workspace/TS100/src/power.cpp b/workspace/TS100/src/power.cpp index 553de475..19578a67 100644 --- a/workspace/TS100/src/power.cpp +++ b/workspace/TS100/src/power.cpp @@ -11,9 +11,9 @@ uint8_t tipResistance = 85; //x10 ohms, 8.5 typical for ts100, 4.5 typical for ts80 const uint16_t powerPWM = 255; -const uint16_t totalPWM = 255+50; // Setup.c:sConfigOC.Pulse, the full PWM cycle +const uint16_t totalPWM = 255 + 65; //htim2.Init.Period, the full PWM cycle -history<uint16_t, oscillationPeriod> milliWattHistory = { { 0 }, 0, 0 }; +history<uint32_t, oscillationPeriod> milliWattHistory = { { 0 }, 0, 0 }; void setupPower(uint8_t res) { tipResistance = res; @@ -41,19 +41,23 @@ uint8_t milliWattsToPWM(int32_t milliWatts, uint8_t divisor) { // R = R*10 // P therefore is in V^2*10/R = W*10. // Scale input milliWatts to the pwm rate - int32_t v = getInputVoltageX10(divisor);// 100 = 10v + int32_t v = getInputVoltageX10(divisor, 1); // 100 = 10v int32_t availableMilliWatts = v * v / tipResistance; - int32_t pwm = (powerPWM * totalPWM / powerPWM) * milliWatts / availableMilliWatts; + + int32_t pwm = ((powerPWM * totalPWM / powerPWM) * milliWatts) + / availableMilliWatts; if (pwm > powerPWM) { pwm = powerPWM; } else if (pwm < 0) { pwm = 0; } + if (milliWatts == 0) + pwm = 0; return pwm; } int32_t PWMToMilliWatts(uint8_t pwm, uint8_t divisor) { - int32_t v = getInputVoltageX10(divisor); + int32_t v = getInputVoltageX10(divisor, 0); return pwm * (v * v / tipResistance) / (powerPWM * totalPWM / powerPWM); } diff --git a/workspace/TS100A/.cproject b/workspace/TS100A/.cproject index 8025ecc0..e59d7c6c 100644 --- a/workspace/TS100A/.cproject +++ b/workspace/TS100A/.cproject @@ -19,7 +19,7 @@ <option id="com.atollic.truestudio.toolchain_options.mcu.1436647432" name="Microcontroller" superClass="com.atollic.truestudio.toolchain_options.mcu" useByScannerDiscovery="false" value="STM32F103T8" valueType="string"/> <option id="com.atollic.truestudio.toolchain_options.vendor.1169826438" name="Vendor name" superClass="com.atollic.truestudio.toolchain_options.vendor" useByScannerDiscovery="false" value="STMicroelectronics" valueType="string"/> <targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.atollic.truestudio.exe.release.toolchain.platform.1125330428" isAbstract="false" name="release platform" superClass="com.atollic.truestudio.exe.release.toolchain.platform"/> - <builder buildPath="${workspace_loc:/TS100A}/Release" customBuilderProperties="toolChainpathString=C:\\Program Files (x86)\\Atollic\\TrueSTUDIO for STM32 9.1.0\\ARMTools\\bin|toolChainpathType=1|com.atollic.truestudio.common_options.target.vendor=STMicroelectronics|com.atollic.truestudio.common_options.target.mcu=STM32F103T8|" id="com.atollic.truestudio.mbs.builder1.1682214826" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="com.atollic.truestudio.mbs.builder1"/> + <builder autoBuildTarget="" buildPath="${workspace_loc:/TS100A}/Release" cleanBuildTarget="" customBuilderProperties="toolChainpathString=C:\\Program Files (x86)\\Atollic\\TrueSTUDIO for STM32 9.1.0\\ARMTools\\bin|toolChainpathType=1|com.atollic.truestudio.common_options.target.vendor=STMicroelectronics|com.atollic.truestudio.common_options.target.mcu=STM32F103T8|" enableAutoBuild="false" enableCleanBuild="true" enabledIncrementalBuild="true" id="com.atollic.truestudio.mbs.builder1.1682214826" incrementalBuildTarget="" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" parallelBuildOn="false" superClass="com.atollic.truestudio.mbs.builder1"/> <tool id="com.atollic.truestudio.exe.release.toolchain.as.5806016" name="Assembler" superClass="com.atollic.truestudio.exe.release.toolchain.as"> <option id="com.atollic.truestudio.common_options.target.endianess.1911688133" name="Endianess" superClass="com.atollic.truestudio.common_options.target.endianess" useByScannerDiscovery="false"/> <option id="com.atollic.truestudio.common_options.target.mcpu.1179040963" name="Microcontroller" superClass="com.atollic.truestudio.common_options.target.mcpu" useByScannerDiscovery="false" value="STM32F103T8" valueType="enumerated"/> @@ -156,6 +156,163 @@ </storageModule> <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> </cconfiguration> + <cconfiguration id="com.atollic.truestudio.configuration.release.200032419.2005314669"> + <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.atollic.truestudio.configuration.release.200032419.2005314669" moduleId="org.eclipse.cdt.core.settings" name="TS100"> + <externalSettings/> + <extensions> + <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/> + <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> + <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> + <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> + </extensions> + </storageModule> + <storageModule moduleId="cdtBuildSystem" version="4.0.0"> + <configuration artifactExtension="elf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" errorParsers="org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GCCErrorParser" id="com.atollic.truestudio.configuration.release.200032419.2005314669" name="TS100" parent="com.atollic.truestudio.configuration.release" postannouncebuildStep="" postbuildStep="" preannouncebuildStep="" prebuildStep=""> + <folderInfo id="com.atollic.truestudio.configuration.release.200032419.2005314669." name="/" resourcePath=""> + <toolChain errorParsers="" id="com.atollic.truestudio.exe.release.toolchain.790179169" name="Atollic ARM Tools" superClass="com.atollic.truestudio.exe.release.toolchain"> + <option id="com.atollic.truestudio.general.runtimelib.832126625" name="Runtime Library" superClass="com.atollic.truestudio.general.runtimelib" useByScannerDiscovery="false" value="com.atollic.truestudio.ld.general.cclib.CCStandardCStandard" valueType="enumerated"/> + <option id="com.atollic.truestudio.toolchain_options.mcu.967724944" name="Microcontroller" superClass="com.atollic.truestudio.toolchain_options.mcu" useByScannerDiscovery="false" value="STM32F103T8" valueType="string"/> + <option id="com.atollic.truestudio.toolchain_options.vendor.1608876733" name="Vendor name" superClass="com.atollic.truestudio.toolchain_options.vendor" useByScannerDiscovery="false" value="STMicroelectronics" valueType="string"/> + <targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.atollic.truestudio.exe.release.toolchain.platform.2056621458" isAbstract="false" name="release platform" superClass="com.atollic.truestudio.exe.release.toolchain.platform"/> + <builder buildPath="${workspace_loc:/TS100A}/Release" customBuilderProperties="toolChainpathString=C:\\Program Files (x86)\\Atollic\\TrueSTUDIO for STM32 9.1.0\\ARMTools\\bin|toolChainpathType=1|com.atollic.truestudio.common_options.target.vendor=STMicroelectronics|com.atollic.truestudio.common_options.target.mcu=STM32F103T8|" errorParsers="" id="com.atollic.truestudio.mbs.builder1.1970479062" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="com.atollic.truestudio.mbs.builder1"/> + <tool command="arm-atollic-eabi-gcc -c" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GASErrorParser" id="com.atollic.truestudio.exe.release.toolchain.as.1116045031" name="Assembler" superClass="com.atollic.truestudio.exe.release.toolchain.as"> + <option id="com.atollic.truestudio.common_options.target.endianess.532801301" name="Endianess" superClass="com.atollic.truestudio.common_options.target.endianess" useByScannerDiscovery="false"/> + <option id="com.atollic.truestudio.common_options.target.mcpu.1606774976" name="Microcontroller" superClass="com.atollic.truestudio.common_options.target.mcpu" useByScannerDiscovery="false" value="STM32F103T8" valueType="enumerated"/> + <option id="com.atollic.truestudio.common_options.target.instr_set.833489345" name="Instruction set" superClass="com.atollic.truestudio.common_options.target.instr_set" useByScannerDiscovery="false" value="com.atollic.truestudio.common_options.target.instr_set.thumb2" valueType="enumerated"/> + <option id="com.atollic.truestudio.common_options.target.fpucore.313760852" name="FPU" superClass="com.atollic.truestudio.common_options.target.fpucore" useByScannerDiscovery="false" value="com.atollic.truestudio.common_options.target.fpucore.None" valueType="enumerated"/> + <option id="com.atollic.truestudio.common_options.target.fpu.423848100" name="Floating point" superClass="com.atollic.truestudio.common_options.target.fpu" useByScannerDiscovery="false"/> + <option id="com.atollic.truestudio.as.symbols.defined.706464592" name="Defined symbols" superClass="com.atollic.truestudio.as.symbols.defined" useByScannerDiscovery="false" valueType="definedSymbols"> + <listOptionValue builtIn="false" value="STM32F103T8Ux"/> + <listOptionValue builtIn="false" value="STM32F1"/> + <listOptionValue builtIn="false" value="STM32"/> + <listOptionValue builtIn="false" value="USE_HAL_DRIVER"/> + <listOptionValue builtIn="false" value="STM32F103xB"/> + <listOptionValue builtIn="false" value="USE_RTOS_SYSTICK"/> + </option> + <option id="com.atollic.truestudio.as.general.incpath.1165258034" name="Include path" superClass="com.atollic.truestudio.as.general.incpath" useByScannerDiscovery="false" valueType="includePath"> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}/../TS100/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}/../TS100\Middlewares\Third_Party\FreeRTOS\Source\portable\GCC\ARM_CM3""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}/../TS100\Middlewares\Third_Party\FreeRTOS\Source\include""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}/../TS100\Middlewares\Third_Party\FreeRTOS\Source\portable""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}/../TS100\HAL_Driver\Inc\Legacy""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}/../TS100\inc""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}/../TS100\HAL_Driver\Inc""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}/../TS100\CMSIS\core""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}/../TS100\CMSIS\device""/> + </option> + <option id="com.atollic.truestudio.common_options.target.interwork.2098532585" name="Mix ARM/Thumb" superClass="com.atollic.truestudio.common_options.target.interwork" useByScannerDiscovery="false"/> + <inputType id="com.atollic.truestudio.as.input.199834741" name="Input" superClass="com.atollic.truestudio.as.input"/> + </tool> + <tool command="arm-atollic-eabi-gcc -c" commandLinePattern="${COMMAND} ${INPUTS} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="com.atollic.truestudio.exe.release.toolchain.gcc.1773256937" name="C Compiler" superClass="com.atollic.truestudio.exe.release.toolchain.gcc"> + <option id="com.atollic.truestudio.gcc.symbols.defined.1274040270" name="Defined symbols" superClass="com.atollic.truestudio.gcc.symbols.defined" useByScannerDiscovery="false" valueType="definedSymbols"> + <listOptionValue builtIn="false" value="STM32F103T8Ux"/> + <listOptionValue builtIn="false" value="MODEL_TS100"/> + <listOptionValue builtIn="false" value="STM32F1"/> + <listOptionValue builtIn="false" value="STM32"/> + <listOptionValue builtIn="false" value="USE_HAL_DRIVER"/> + <listOptionValue builtIn="false" value="STM32F103xB"/> + <listOptionValue builtIn="false" value="USE_RTOS_SYSTICK"/> + </option> + <option id="com.atollic.truestudio.gcc.directories.select.1921628340" name="Include path" superClass="com.atollic.truestudio.gcc.directories.select" useByScannerDiscovery="false" valueType="includePath"> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}/../TS100/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}/../TS100\Middlewares\Third_Party\FreeRTOS\Source\portable\GCC\ARM_CM3""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}/../TS100\Middlewares\Third_Party\FreeRTOS\Source\include""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}/../TS100\Middlewares\Third_Party\FreeRTOS\Source\portable""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}/../TS100\HAL_Driver\Inc\Legacy""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}/../TS100\inc""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}/../TS100\HAL_Driver\Inc""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}/../TS100\CMSIS\core""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}/../TS100\CMSIS\device""/> + </option> + <option id="com.atollic.truestudio.common_options.target.endianess.1246726436" name="Endianess" superClass="com.atollic.truestudio.common_options.target.endianess" useByScannerDiscovery="false"/> + <option id="com.atollic.truestudio.common_options.target.mcpu.120931966" name="Microcontroller" superClass="com.atollic.truestudio.common_options.target.mcpu" useByScannerDiscovery="false" value="STM32F103T8" valueType="enumerated"/> + <option id="com.atollic.truestudio.common_options.target.instr_set.1609836877" name="Instruction set" superClass="com.atollic.truestudio.common_options.target.instr_set" useByScannerDiscovery="false" value="com.atollic.truestudio.common_options.target.instr_set.thumb2" valueType="enumerated"/> + <option id="com.atollic.truestudio.common_options.target.fpucore.2048530479" name="FPU" superClass="com.atollic.truestudio.common_options.target.fpucore" useByScannerDiscovery="false" value="com.atollic.truestudio.common_options.target.fpucore.None" valueType="enumerated"/> + <option id="com.atollic.truestudio.common_options.target.fpu.179253875" name="Floating point" superClass="com.atollic.truestudio.common_options.target.fpu" useByScannerDiscovery="false"/> + <option id="com.atollic.truestudio.gcc.optimization.prep_garbage.487627031" name="Prepare dead code removal " superClass="com.atollic.truestudio.gcc.optimization.prep_garbage" useByScannerDiscovery="false" value="true" valueType="boolean"/> + <option id="com.atollic.truestudio.gcc.optimization.prep_data.732099984" name="Prepare dead data removal" superClass="com.atollic.truestudio.gcc.optimization.prep_data" useByScannerDiscovery="false" value="true" valueType="boolean"/> + <option id="com.atollic.truestudio.exe.release.toolchain.gcc.debug.info.1305877572" name="Debug Level" superClass="com.atollic.truestudio.exe.release.toolchain.gcc.debug.info" useByScannerDiscovery="false" value="com.atollic.truestudio.gcc.debug.info.3" valueType="enumerated"/> + <option id="com.atollic.truestudio.gcc.warnings.extra.918502286" name="Enable extra warning flags" superClass="com.atollic.truestudio.gcc.warnings.extra" useByScannerDiscovery="false" value="true" valueType="boolean"/> + <option id="com.atollic.truestudio.common_options.target.interwork.1430376754" name="Mix ARM/Thumb" superClass="com.atollic.truestudio.common_options.target.interwork" useByScannerDiscovery="false"/> + <inputType id="com.atollic.truestudio.gcc.input.1218983433" superClass="com.atollic.truestudio.gcc.input"/> + </tool> + <tool id="com.atollic.truestudio.exe.release.toolchain.ld.2062140266" name="C Linker" superClass="com.atollic.truestudio.exe.release.toolchain.ld"> + <option id="com.atollic.truestudio.common_options.target.endianess.202331070" name="Endianess" superClass="com.atollic.truestudio.common_options.target.endianess"/> + <option id="com.atollic.truestudio.common_options.target.mcpu.1584957200" name="Microcontroller" superClass="com.atollic.truestudio.common_options.target.mcpu" value="STM32F103T8" valueType="enumerated"/> + <option id="com.atollic.truestudio.common_options.target.instr_set.88629340" name="Instruction set" superClass="com.atollic.truestudio.common_options.target.instr_set" value="com.atollic.truestudio.common_options.target.instr_set.thumb2" valueType="enumerated"/> + <option id="com.atollic.truestudio.common_options.target.fpucore.935232041" name="FPU" superClass="com.atollic.truestudio.common_options.target.fpucore" value="com.atollic.truestudio.common_options.target.fpucore.None" valueType="enumerated"/> + <option id="com.atollic.truestudio.common_options.target.fpu.308894529" name="Floating point" superClass="com.atollic.truestudio.common_options.target.fpu"/> + <option id="com.atollic.truestudio.ld.general.scriptfile.30838865" name="Linker script" superClass="com.atollic.truestudio.ld.general.scriptfile" value="../stm32_flash.ld" valueType="string"/> + <option id="com.atollic.truestudio.ld.optimization.do_garbage.1519904337" name="Dead code removal " superClass="com.atollic.truestudio.ld.optimization.do_garbage" value="true" valueType="boolean"/> + <option id="com.atollic.truestudio.common_options.target.interwork.1876933394" name="Mix ARM/Thumb" superClass="com.atollic.truestudio.common_options.target.interwork"/> + <option id="com.atollic.truestudio.ld.misc.genmapfile.1111696661" name="Create map file" superClass="com.atollic.truestudio.ld.misc.genmapfile"/> + </tool> + <tool command="arm-atollic-eabi-g++ -c" commandLinePattern="${COMMAND} ${INPUTS} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="com.atollic.truestudio.exe.release.toolchain.gpp.229799678" name="C++ Compiler" superClass="com.atollic.truestudio.exe.release.toolchain.gpp"> + <option id="com.atollic.truestudio.gpp.symbols.defined.843853133" name="Defined symbols" superClass="com.atollic.truestudio.gpp.symbols.defined" useByScannerDiscovery="false" valueType="definedSymbols"> + <listOptionValue builtIn="false" value="STM32F103T8Ux"/> + <listOptionValue builtIn="false" value="MODEL_TS100"/> + <listOptionValue builtIn="false" value="STM32F1"/> + <listOptionValue builtIn="false" value="STM32"/> + <listOptionValue builtIn="false" value="USE_HAL_DRIVER"/> + <listOptionValue builtIn="false" value="STM32F103xB"/> + <listOptionValue builtIn="false" value="USE_RTOS_SYSTICK"/> + </option> + <option id="com.atollic.truestudio.gpp.directories.select.429075052" name="Include path" superClass="com.atollic.truestudio.gpp.directories.select" useByScannerDiscovery="false" valueType="includePath"> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}/../TS100/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}/../TS100\Middlewares\Third_Party\FreeRTOS\Source\portable\GCC\ARM_CM3""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}/../TS100\Middlewares\Third_Party\FreeRTOS\Source\include""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}/../TS100\Middlewares\Third_Party\FreeRTOS\Source\portable""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}/../TS100\HAL_Driver\Inc\Legacy""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}/../TS100\inc""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}/../TS100\HAL_Driver\Inc""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}/../TS100\CMSIS\core""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}/../TS100\CMSIS\device""/> + </option> + <option id="com.atollic.truestudio.common_options.target.endianess.2125214141" name="Endianess" superClass="com.atollic.truestudio.common_options.target.endianess" useByScannerDiscovery="false"/> + <option id="com.atollic.truestudio.common_options.target.mcpu.1535244038" name="Microcontroller" superClass="com.atollic.truestudio.common_options.target.mcpu" useByScannerDiscovery="false" value="STM32F103T8" valueType="enumerated"/> + <option id="com.atollic.truestudio.common_options.target.instr_set.1844576388" name="Instruction set" superClass="com.atollic.truestudio.common_options.target.instr_set" useByScannerDiscovery="false" value="com.atollic.truestudio.common_options.target.instr_set.thumb2" valueType="enumerated"/> + <option id="com.atollic.truestudio.common_options.target.fpucore.1536189706" name="FPU" superClass="com.atollic.truestudio.common_options.target.fpucore" useByScannerDiscovery="false" value="com.atollic.truestudio.common_options.target.fpucore.None" valueType="enumerated"/> + <option id="com.atollic.truestudio.common_options.target.fpu.1070745777" name="Floating point" superClass="com.atollic.truestudio.common_options.target.fpu" useByScannerDiscovery="false"/> + <option id="com.atollic.truestudio.gpp.optimization.prep_garbage.967740502" name="Prepare dead code removal" superClass="com.atollic.truestudio.gpp.optimization.prep_garbage" useByScannerDiscovery="false" value="true" valueType="boolean"/> + <option id="com.atollic.truestudio.gpp.optimization.prep_data.1758485333" name="Prepare dead data removal" superClass="com.atollic.truestudio.gpp.optimization.prep_data" useByScannerDiscovery="false" value="true" valueType="boolean"/> + <option id="com.atollic.truestudio.gpp.optimization.fno_rtti.1034234085" name="Disable RTTI" superClass="com.atollic.truestudio.gpp.optimization.fno_rtti" useByScannerDiscovery="false" value="true" valueType="boolean"/> + <option id="com.atollic.truestudio.gpp.optimization.fno_exceptions.489770809" name="Disable exception handling" superClass="com.atollic.truestudio.gpp.optimization.fno_exceptions" useByScannerDiscovery="false" value="true" valueType="boolean"/> + <option id="com.atollic.truestudio.exe.release.toolchain.gpp.debug.info.657554017" name="Debug Level" superClass="com.atollic.truestudio.exe.release.toolchain.gpp.debug.info" useByScannerDiscovery="false" value="com.atollic.truestudio.gpp.debug.info.3" valueType="enumerated"/> + <option id="com.atollic.truestudio.gpp.warnings.extra.1622434843" name="Enable extra warning flags" superClass="com.atollic.truestudio.gpp.warnings.extra" useByScannerDiscovery="false" value="true" valueType="boolean"/> + <option id="com.atollic.truestudio.gpp.cppstandard.117433311" name="C++ standard" superClass="com.atollic.truestudio.gpp.cppstandard" useByScannerDiscovery="false" value="com.atollic.truestudio.gpp.cppstandard.gnupp14" valueType="enumerated"/> + <option id="com.atollic.truestudio.common_options.target.interwork.2122034593" name="Mix ARM/Thumb" superClass="com.atollic.truestudio.common_options.target.interwork" useByScannerDiscovery="false"/> + <inputType id="com.atollic.truestudio.gpp.input.1134011493" superClass="com.atollic.truestudio.gpp.input"/> + </tool> + <tool command="arm-atollic-eabi-g++" commandLinePattern="${COMMAND} ${OUTPUT_FLAG} ${OUTPUT} ${INPUTS} ${FLAGS}" errorParsers="org.eclipse.cdt.core.GLDErrorParser" id="com.atollic.truestudio.exe.release.toolchain.ldcc.1509174742" name="C++ Linker" superClass="com.atollic.truestudio.exe.release.toolchain.ldcc"> + <option id="com.atollic.truestudio.common_options.target.endianess.1963695768" name="Endianess" superClass="com.atollic.truestudio.common_options.target.endianess" useByScannerDiscovery="false"/> + <option id="com.atollic.truestudio.common_options.target.mcpu.1110004424" name="Microcontroller" superClass="com.atollic.truestudio.common_options.target.mcpu" useByScannerDiscovery="false" value="STM32F103T8" valueType="enumerated"/> + <option id="com.atollic.truestudio.common_options.target.instr_set.1898845686" name="Instruction set" superClass="com.atollic.truestudio.common_options.target.instr_set" useByScannerDiscovery="false" value="com.atollic.truestudio.common_options.target.instr_set.thumb2" valueType="enumerated"/> + <option id="com.atollic.truestudio.common_options.target.fpucore.1332810361" name="FPU" superClass="com.atollic.truestudio.common_options.target.fpucore" useByScannerDiscovery="false" value="com.atollic.truestudio.common_options.target.fpucore.None" valueType="enumerated"/> + <option id="com.atollic.truestudio.common_options.target.fpu.1726742655" name="Floating point" superClass="com.atollic.truestudio.common_options.target.fpu" useByScannerDiscovery="false"/> + <option id="com.atollic.truestudio.ldcc.optimization.do_garbage.195654453" name="Dead code removal" superClass="com.atollic.truestudio.ldcc.optimization.do_garbage" useByScannerDiscovery="false" value="true" valueType="boolean"/> + <option id="com.atollic.truestudio.ldcc.general.scriptfile.1795298853" name="Linker script" superClass="com.atollic.truestudio.ldcc.general.scriptfile" useByScannerDiscovery="false" value="${workspace_loc:/${ProjName}}/../TS100/LinkerScript.ld" valueType="string"/> + <option id="com.atollic.truestudio.ldcc.misc.linkerflags.322875797" name="Other options" superClass="com.atollic.truestudio.ldcc.misc.linkerflags" useByScannerDiscovery="false" value="-Wl,-cref,-u,Reset_Handler,-lm -Os -flto -Wl,--undefined=vTaskSwitchContext" valueType="string"/> + <option id="com.atollic.truestudio.ldcc.optimization.malloc_page_size.109966334" name="Page size allocation for malloc() " superClass="com.atollic.truestudio.ldcc.optimization.malloc_page_size" useByScannerDiscovery="false" value="com.atollic.truestudio.ldcc.optimization.malloc_page_size.128" valueType="enumerated"/> + <option id="com.atollic.truestudio.common_options.target.interwork.512584410" name="Mix ARM/Thumb" superClass="com.atollic.truestudio.common_options.target.interwork" useByScannerDiscovery="false"/> + <option id="com.atollic.truestudio.ldcc.misc.genmapfile.1748611146" name="Create map file" superClass="com.atollic.truestudio.ldcc.misc.genmapfile" useByScannerDiscovery="false"/> + <inputType id="com.atollic.truestudio.ldcc.input.282752612" name="Input" superClass="com.atollic.truestudio.ldcc.input"> + <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/> + <additionalInput kind="additionalinput" paths="$(LIBS)"/> + </inputType> + </tool> + <tool id="com.atollic.truestudio.ar.base.1243768714" name="Archiver" superClass="com.atollic.truestudio.ar.base"/> + <tool command="arm-atollic-reports.jar" commandLinePattern="${COMMAND} ${FLAGS} ${INPUTS}" errorParsers="" id="com.atollic.truestudio.exe.release.toolchain.secoutput.2132361708" name="Other" superClass="com.atollic.truestudio.exe.release.toolchain.secoutput"> + <option id="com.atollic.truestudio.secoutput.general.convert.1699078359" name="Convert build output" superClass="com.atollic.truestudio.secoutput.general.convert" useByScannerDiscovery="false" value="true" valueType="boolean"/> + </tool> + </toolChain> + </folderInfo> + <sourceEntries> + <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> + </sourceEntries> + </configuration> + </storageModule> + <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> + </cconfiguration> </storageModule> <storageModule moduleId="cdtBuildSystem" version="4.0.0"> <project id="TS100A.com.atollic.truestudio.exe.1757612526" name="Executable" projectType="com.atollic.truestudio.exe"/> @@ -165,6 +322,7 @@ </storageModule> <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/> <storageModule moduleId="refreshScope" versionNumber="2"> + <configuration configurationName="TS100"/> <configuration configurationName="Release"> <resource resourceType="PROJECT" workspacePath="/TS100A"/> </configuration> diff --git a/workspace/TS100A/.gitignore b/workspace/TS100A/.gitignore index 9f963cf1..2018cd2b 100644 --- a/workspace/TS100A/.gitignore +++ b/workspace/TS100A/.gitignore @@ -1 +1,2 @@ /Release/ +/TS100/ diff --git a/workspace/TS100A/.settings/language.settings.xml b/workspace/TS100A/.settings/language.settings.xml index c7982b86..e8dc2907 100644 --- a/workspace/TS100A/.settings/language.settings.xml +++ b/workspace/TS100A/.settings/language.settings.xml @@ -4,7 +4,17 @@ <extension point="org.eclipse.cdt.core.LanguageSettingsProvider"> <provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/> <provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/> - <provider class="com.atollic.truestudio.mbs.GCCSpecsDetectorAtollicArm" console="false" env-hash="1908924148938516785" id="com.atollic.truestudio.mbs.provider" keep-relative-paths="false" name="Atollic ARM Tools Language Settings" parameter="${COMMAND} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true"> + <provider class="com.atollic.truestudio.mbs.GCCSpecsDetectorAtollicArm" console="false" env-hash="1716839660263613736" id="com.atollic.truestudio.mbs.provider" keep-relative-paths="false" name="Atollic ARM Tools Language Settings" parameter="${COMMAND} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true"> + <language-scope id="org.eclipse.cdt.core.gcc"/> + <language-scope id="org.eclipse.cdt.core.g++"/> + </provider> + </extension> + </configuration> + <configuration id="com.atollic.truestudio.configuration.release.200032419.2005314669" name="TS100"> + <extension point="org.eclipse.cdt.core.LanguageSettingsProvider"> + <provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/> + <provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/> + <provider class="com.atollic.truestudio.mbs.GCCSpecsDetectorAtollicArm" console="false" env-hash="1716839660263613736" id="com.atollic.truestudio.mbs.provider" keep-relative-paths="false" name="Atollic ARM Tools Language Settings" parameter="${COMMAND} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true"> <language-scope id="org.eclipse.cdt.core.gcc"/> <language-scope id="org.eclipse.cdt.core.g++"/> </provider> |