Skip to content

Commit fc5bf9b

Browse files
author
Yury Vostrenkov
committed
removed segger, fixed gcc makefile
1 parent 8b9eef5 commit fc5bf9b

13 files changed

+1088
-634
lines changed

MDK-ARM/FreeJoy.bin

-2.43 KB
Binary file not shown.

MDK-ARM/FreeJoy.uvprojx

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -760,6 +760,75 @@
760760
</Group>
761761
<Group>
762762
<GroupName>SEGGER</GroupName>
763+
<GroupOption>
764+
<CommonProperty>
765+
<UseCPPCompiler>0</UseCPPCompiler>
766+
<RVCTCodeConst>0</RVCTCodeConst>
767+
<RVCTZI>0</RVCTZI>
768+
<RVCTOtherData>0</RVCTOtherData>
769+
<ModuleSelection>0</ModuleSelection>
770+
<IncludeInBuild>0</IncludeInBuild>
771+
<AlwaysBuild>2</AlwaysBuild>
772+
<GenerateAssemblyFile>2</GenerateAssemblyFile>
773+
<AssembleAssemblyFile>2</AssembleAssemblyFile>
774+
<PublicsOnly>2</PublicsOnly>
775+
<StopOnExitCode>11</StopOnExitCode>
776+
<CustomArgument></CustomArgument>
777+
<IncludeLibraryModules></IncludeLibraryModules>
778+
<ComprImg>1</ComprImg>
779+
</CommonProperty>
780+
<GroupArmAds>
781+
<Cads>
782+
<interw>2</interw>
783+
<Optim>0</Optim>
784+
<oTime>2</oTime>
785+
<SplitLS>2</SplitLS>
786+
<OneElfS>2</OneElfS>
787+
<Strict>2</Strict>
788+
<EnumInt>2</EnumInt>
789+
<PlainCh>2</PlainCh>
790+
<Ropi>2</Ropi>
791+
<Rwpi>2</Rwpi>
792+
<wLevel>0</wLevel>
793+
<uThumb>2</uThumb>
794+
<uSurpInc>2</uSurpInc>
795+
<uC99>2</uC99>
796+
<uGnu>2</uGnu>
797+
<useXO>2</useXO>
798+
<v6Lang>0</v6Lang>
799+
<v6LangP>0</v6LangP>
800+
<vShortEn>2</vShortEn>
801+
<vShortWch>2</vShortWch>
802+
<v6Lto>2</v6Lto>
803+
<v6WtE>2</v6WtE>
804+
<v6Rtti>2</v6Rtti>
805+
<VariousControls>
806+
<MiscControls></MiscControls>
807+
<Define></Define>
808+
<Undefine></Undefine>
809+
<IncludePath></IncludePath>
810+
</VariousControls>
811+
</Cads>
812+
<Aads>
813+
<interw>2</interw>
814+
<Ropi>2</Ropi>
815+
<Rwpi>2</Rwpi>
816+
<thumb>2</thumb>
817+
<SplitLS>2</SplitLS>
818+
<SwStkChk>2</SwStkChk>
819+
<NoWarn>2</NoWarn>
820+
<uSurpInc>2</uSurpInc>
821+
<useXO>2</useXO>
822+
<uClangAs>2</uClangAs>
823+
<VariousControls>
824+
<MiscControls></MiscControls>
825+
<Define></Define>
826+
<Undefine></Undefine>
827+
<IncludePath></IncludePath>
828+
</VariousControls>
829+
</Aads>
830+
</GroupArmAds>
831+
</GroupOption>
763832
<Files>
764833
<File>
765834
<FileName>SEGGER_SYSVIEW.c</FileName>

application/Src/analog.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424

2525
#include "analog.h"
2626

27-
#include "SEGGER_SYSVIEW.h"
28-
2927
#include <string.h>
3028
#include <math.h>
3129
#include "tle5011.h"
@@ -647,7 +645,6 @@ void AxesInit (dev_config_t * p_dev_config)
647645
*/
648646
void ADC_Conversion (void)
649647
{
650-
SEGGER_SYSVIEW_RecordVoid(45);
651648

652649
if (adc_cnt > 0)
653650
{
@@ -683,7 +680,6 @@ void ADC_Conversion (void)
683680
adc_data[j] /= ADC_CONV_NUM;
684681
}
685682
}
686-
SEGGER_SYSVIEW_RecordEndCall(45);
687683
}
688684

689685
/**
@@ -693,7 +689,6 @@ void ADC_Conversion (void)
693689
*/
694690
void AxesProcess (dev_config_t * p_dev_config)
695691
{
696-
SEGGER_SYSVIEW_RecordVoid(46);
697692

698693
int32_t tmp[MAX_AXIS_NUM];
699694
float tmpf;
@@ -1173,7 +1168,6 @@ void AxesProcess (dev_config_t * p_dev_config)
11731168
NVIC_EnableIRQ(TIM2_IRQn);
11741169
}
11751170

1176-
SEGGER_SYSVIEW_RecordEndCall(46);
11771171
}
11781172

11791173
/**

application/Src/buttons.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
#include "buttons.h"
2626
#include "string.h"
2727

28-
#include "SEGGER_SYSVIEW.h"
29-
3028
uint8_t raw_buttons_data[MAX_BUTTONS_NUM];
3129
physical_buttons_state_t physical_buttons_state[MAX_BUTTONS_NUM];
3230
logical_buttons_state_t logical_buttons_state[MAX_BUTTONS_NUM];
@@ -167,7 +165,6 @@ static void LogicalButtonProcessTimer (logical_buttons_state_t * p_button_state,
167165
*/
168166
void LogicalButtonProcessState (logical_buttons_state_t * p_button_state, uint8_t * pov_buf, dev_config_t * p_dev_config, uint8_t num)
169167
{
170-
SEGGER_SYSVIEW_RecordVoid(49);
171168

172169
uint32_t millis;
173170
uint8_t pov_group = 0;
@@ -566,7 +563,6 @@ void LogicalButtonProcessState (logical_buttons_state_t * p_button_state, uint8_
566563
default:
567564
break;
568565
}
569-
SEGGER_SYSVIEW_RecordEndCall(49);
570566
}
571567

572568
/**
@@ -721,8 +717,6 @@ void SingleButtonsGet (uint8_t * raw_button_data_buf, dev_config_t * p_dev_confi
721717

722718
uint8_t ButtonsReadPhysical(dev_config_t * p_dev_config, uint8_t * p_buf)
723719
{
724-
SEGGER_SYSVIEW_RecordVoid(47);
725-
726720
uint8_t pos = 0;
727721

728722
// Getting physical buttons states
@@ -733,8 +727,6 @@ uint8_t ButtonsReadPhysical(dev_config_t * p_dev_config, uint8_t * p_buf)
733727
a2b_last = pos;
734728
SingleButtonsGet(p_buf, p_dev_config, &pos);
735729

736-
SEGGER_SYSVIEW_RecordEndCall(47);
737-
738730
return pos;
739731
}
740732

@@ -745,8 +737,6 @@ uint8_t ButtonsReadPhysical(dev_config_t * p_dev_config, uint8_t * p_buf)
745737
*/
746738
void ButtonsReadLogical (dev_config_t * p_dev_config)
747739
{
748-
SEGGER_SYSVIEW_RecordVoid(48);
749-
750740
// Process regular buttons
751741
for (uint8_t i=0; i<MAX_BUTTONS_NUM; i++)
752742
{
@@ -962,8 +952,6 @@ void ButtonsReadLogical (dev_config_t * p_dev_config)
962952
break;
963953
}
964954
}
965-
966-
SEGGER_SYSVIEW_RecordEndCall(48);
967955
}
968956

969957
/**

application/Src/main.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
/* Includes ------------------------------------------------------------------*/
2626
#include "main.h"
2727

28-
#include "SEGGER_SYSVIEW.h"
29-
3028
#include "periphery.h"
3129
#include "config.h"
3230
#include "analog.h"
@@ -57,9 +55,6 @@ int main(void)
5755

5856
SysTick_Init();
5957

60-
// Configure and initialize SystemView
61-
SEGGER_SYSVIEW_Conf();
62-
6358
// getting configuration from flash memory
6459
DevConfigGet(&dev_config);
6560

application/Src/stm32f10x_it.c

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
/* Includes ------------------------------------------------------------------*/
2525
#include "stm32f10x_it.h"
2626

27-
#include "SEGGER_SYSVIEW.h"
28-
2927
#include "usb_istr.h"
3028
#include "usb_lib.h"
3129
#include "periphery.h"
@@ -163,13 +161,10 @@ void PendSV_Handler(void)
163161
*/
164162
void SysTick_Handler(void)
165163
{
166-
SEGGER_SYSVIEW_RecordEnterISR();
167-
168164
if (TimingDelay != 0x00)
169165
{
170166
TimingDelay--;
171167
}
172-
SEGGER_SYSVIEW_RecordExitISR();
173168
}
174169

175170
/******************************************************************************/
@@ -182,8 +177,6 @@ void SysTick_Handler(void)
182177

183178
void TIM2_IRQHandler(void)
184179
{
185-
SEGGER_SYSVIEW_RecordVoid(33);
186-
187180
static uint8_t btn_num = 0;
188181
uint8_t physical_buttons_data[MAX_BUTTONS_NUM];
189182
joy_report_t joy_report;
@@ -289,7 +282,6 @@ void TIM2_IRQHandler(void)
289282
if (sensors[i].type == TLE5011)
290283
{
291284
TLE501x_StartDMA(&sensors[i]);
292-
SEGGER_SYSVIEW_RecordEndCall(33);
293285
return;
294286
}
295287
else if (sensors[i].type == MCP3201 ||
@@ -303,21 +295,18 @@ void TIM2_IRQHandler(void)
303295
else if (sensors[i].type == MLX90393_SPI)
304296
{
305297
MLX90393_StartDMA(&sensors[i]);
306-
SEGGER_SYSVIEW_RecordEndCall(33);
307298
return;
308299
}
309300
}
310301
}
311302
}
312303

313304
}
314-
SEGGER_SYSVIEW_RecordEndCall(33);
315305
}
316306

317307
// SPI Rx Complete
318308
void DMA1_Channel2_IRQHandler(void)
319309
{
320-
SEGGER_SYSVIEW_RecordVoid(34);
321310

322311
uint8_t i=0;
323312

@@ -352,7 +341,6 @@ void DMA1_Channel2_IRQHandler(void)
352341
if (sensors[i].curr_channel < 1)
353342
{
354343
MCP320x_StartDMA(&sensors[i], sensors[i].curr_channel + 1);
355-
SEGGER_SYSVIEW_RecordEndCall(34);
356344
return;
357345
}
358346
i++;
@@ -364,7 +352,6 @@ void DMA1_Channel2_IRQHandler(void)
364352
if (sensors[i].curr_channel < 3)
365353
{
366354
MCP320x_StartDMA(&sensors[i], sensors[i].curr_channel + 1);
367-
SEGGER_SYSVIEW_RecordEndCall(34);
368355
return;
369356
}
370357
i++;
@@ -376,7 +363,6 @@ void DMA1_Channel2_IRQHandler(void)
376363
if (sensors[i].curr_channel < 7)
377364
{
378365
MCP320x_StartDMA(&sensors[i], sensors[i].curr_channel + 1);
379-
SEGGER_SYSVIEW_RecordEndCall(34);
380366
return;
381367
}
382368
i++;
@@ -396,7 +382,6 @@ void DMA1_Channel2_IRQHandler(void)
396382
if (sensors[i].type == TLE5011)
397383
{
398384
TLE501x_StartDMA(&sensors[i]);
399-
SEGGER_SYSVIEW_RecordEndCall(34);
400385
return;
401386
}
402387
else if (sensors[i].type == MCP3201 ||
@@ -405,26 +390,21 @@ void DMA1_Channel2_IRQHandler(void)
405390
sensors[i].type == MCP3208)
406391
{
407392
MCP320x_StartDMA(&sensors[i], 0);
408-
SEGGER_SYSVIEW_RecordEndCall(34);
409393
return;
410394
}
411395
else if (sensors[i].type == MLX90393_SPI)
412396
{
413397
MLX90393_StartDMA(&sensors[i]);
414-
SEGGER_SYSVIEW_RecordEndCall(34);
415398
return;
416399
}
417400
}
418401
}
419402
}
420-
SEGGER_SYSVIEW_RecordEndCall(34);
421403
}
422404

423405
// SPI Tx Complete
424406
void DMA1_Channel3_IRQHandler(void)
425407
{
426-
SEGGER_SYSVIEW_RecordVoid(35);
427-
428408
uint8_t i=0;
429409

430410
if (DMA_GetITStatus(DMA1_IT_TC3))
@@ -447,19 +427,15 @@ void DMA1_Channel3_IRQHandler(void)
447427
{
448428
SPI_HalfDuplex_Receive(&sensors[i].data[1], 5, TLE5011_SPI_MODE);
449429
}
450-
SEGGER_SYSVIEW_RecordEndCall(35);
451430
return;
452431
}
453432
}
454433
}
455-
SEGGER_SYSVIEW_RecordEndCall(35);
456434
}
457435

458436
// I2C error
459437
void I2C1_ER_IRQHandler(void)
460438
{
461-
SEGGER_SYSVIEW_RecordVoid(36);
462-
463439
__IO uint32_t SR1Register =0;
464440

465441
/* Read the I2C1 status register */
@@ -494,8 +470,6 @@ void I2C1_ER_IRQHandler(void)
494470
I2C1->CR1 |= I2C_CR1_SWRST;
495471
I2C1->CR1 &= ~I2C_CR1_SWRST;
496472
I2C_Start();
497-
498-
SEGGER_SYSVIEW_RecordEndCall(36);
499473
}
500474

501475

@@ -504,12 +478,8 @@ void I2C1_ER_IRQHandler(void)
504478
* @brief This function handles USB low priority or CAN RX0 interrupts.
505479
*/
506480
void USB_LP_CAN1_RX0_IRQHandler(void)
507-
{
508-
SEGGER_SYSVIEW_RecordVoid(37);
509-
481+
{
510482
USB_Istr();
511-
512-
SEGGER_SYSVIEW_RecordEndCall(37);
513483
}
514484

515485
/**

0 commit comments

Comments
 (0)