Browse Source

update

master
zhaohe 2 years ago
parent
commit
2744469be2
  1. 131
      app/MDK-ARM/app.uvguix.h_zha
  2. 116
      app/MDK-ARM/app.uvoptx
  3. 50
      app/MDK-ARM/startup_stm32f407xx.lst
  4. 4
      app/MDK-ARM/startup_stm32f407xx.s
  5. 2
      dep/libiflytop_micro
  6. 27
      src/umain.cpp

131
app/MDK-ARM/app.uvguix.h_zha
File diff suppressed because it is too large
View File

116
app/MDK-ARM/app.uvoptx

@ -162,178 +162,194 @@
<Bp>
<Number>0</Number>
<Type>0</Type>
<LineNumber>57</LineNumber>
<LineNumber>70</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134231660</Address>
<Address>134234636</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>..\..\dep\libtrinamic\src\ic\tmc4361A.cpp</Filename>
<Filename>..\..\src\umain.cpp</Filename>
<ExecCommand></ExecCommand>
<Expression>\\app\../../dep/libtrinamic/src/ic/tmc4361A.cpp\57</Expression>
<Expression>\\app\../../src/umain.cpp\70</Expression>
</Bp>
<Bp>
<Number>1</Number>
<Type>0</Type>
<LineNumber>51</LineNumber>
<LineNumber>185</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134231626</Address>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>..\..\dep\libtrinamic\src\ic\tmc4361A.cpp</Filename>
<BreakIfRCount>0</BreakIfRCount>
<Filename>..\..\dep\libtrinamic\IFLYTOP-TMC-API\tmc\ic\TMC4361A\TMC4361A.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\app\../../dep/libtrinamic/src/ic/tmc4361A.cpp\51</Expression>
<Expression></Expression>
</Bp>
<Bp>
<Number>2</Number>
<Type>0</Type>
<LineNumber>257</LineNumber>
<LineNumber>197</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134234524</Address>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<BreakIfRCount>0</BreakIfRCount>
<Filename>..\..\dep\libtrinamic\IFLYTOP-TMC-API\tmc\ic\TMC4361A\TMC4361A.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\app\../../dep/libtrinamic/IFLYTOP-TMC-API/tmc/ic/TMC4361A/TMC4361A.c\257</Expression>
<Expression></Expression>
</Bp>
<Bp>
<Number>3</Number>
<Type>0</Type>
<LineNumber>260</LineNumber>
<LineNumber>198</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134234532</Address>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<BreakIfRCount>0</BreakIfRCount>
<Filename>..\..\dep\libtrinamic\IFLYTOP-TMC-API\tmc\ic\TMC4361A\TMC4361A.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\app\../../dep/libtrinamic/IFLYTOP-TMC-API/tmc/ic/TMC4361A/TMC4361A.c\260</Expression>
<Expression></Expression>
</Bp>
<Bp>
<Number>4</Number>
<Type>0</Type>
<LineNumber>231</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134234426</Address>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<BreakIfRCount>0</BreakIfRCount>
<Filename>..\..\dep\libtrinamic\IFLYTOP-TMC-API\tmc\ic\TMC4361A\TMC4361A.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\app\../../dep/libtrinamic/IFLYTOP-TMC-API/tmc/ic/TMC4361A/TMC4361A.c\231</Expression>
<Expression></Expression>
</Bp>
<Bp>
<Number>5</Number>
<Type>0</Type>
<LineNumber>30</LineNumber>
<LineNumber>257</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134231596</Address>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>..\..\dep\libtrinamic\src\ic\tmc4361A.cpp</Filename>
<BreakIfRCount>0</BreakIfRCount>
<Filename>..\..\dep\libtrinamic\IFLYTOP-TMC-API\tmc\ic\TMC4361A\TMC4361A.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\app\../../dep/libtrinamic/src/ic/tmc4361A.cpp\30</Expression>
<Expression></Expression>
</Bp>
<Bp>
<Number>6</Number>
<Type>0</Type>
<LineNumber>77</LineNumber>
<LineNumber>260</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134231564</Address>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>..\..\dep\libtrinamic\src\ic\tmc4361A.cpp</Filename>
<BreakIfRCount>0</BreakIfRCount>
<Filename>..\..\dep\libtrinamic\IFLYTOP-TMC-API\tmc\ic\TMC4361A\TMC4361A.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\app\../../dep/libtrinamic/src/ic/tmc4361A.cpp\77</Expression>
<Expression></Expression>
</Bp>
<Bp>
<Number>7</Number>
<Type>0</Type>
<LineNumber>84</LineNumber>
<LineNumber>30</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134231724</Address>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<BreakIfRCount>0</BreakIfRCount>
<Filename>..\..\dep\libtrinamic\src\ic\tmc4361A.cpp</Filename>
<ExecCommand></ExecCommand>
<Expression>\\app\../../dep/libtrinamic/src/ic/tmc4361A.cpp\84</Expression>
<Expression></Expression>
</Bp>
<Bp>
<Number>8</Number>
<Type>0</Type>
<LineNumber>198</LineNumber>
<LineNumber>51</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134234396</Address>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>..\..\dep\libtrinamic\IFLYTOP-TMC-API\tmc\ic\TMC4361A\TMC4361A.c</Filename>
<BreakIfRCount>0</BreakIfRCount>
<Filename>..\..\dep\libtrinamic\src\ic\tmc4361A.cpp</Filename>
<ExecCommand></ExecCommand>
<Expression>\\app\../../dep/libtrinamic/IFLYTOP-TMC-API/tmc/ic/TMC4361A/TMC4361A.c\198</Expression>
<Expression></Expression>
</Bp>
<Bp>
<Number>9</Number>
<Type>0</Type>
<LineNumber>197</LineNumber>
<LineNumber>57</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134234394</Address>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>..\..\dep\libtrinamic\IFLYTOP-TMC-API\tmc\ic\TMC4361A\TMC4361A.c</Filename>
<BreakIfRCount>0</BreakIfRCount>
<Filename>..\..\dep\libtrinamic\src\ic\tmc4361A.cpp</Filename>
<ExecCommand></ExecCommand>
<Expression>\\app\../../dep/libtrinamic/IFLYTOP-TMC-API/tmc/ic/TMC4361A/TMC4361A.c\197</Expression>
<Expression></Expression>
</Bp>
<Bp>
<Number>10</Number>
<Type>0</Type>
<LineNumber>185</LineNumber>
<LineNumber>77</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134234352</Address>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>..\..\dep\libtrinamic\IFLYTOP-TMC-API\tmc\ic\TMC4361A\TMC4361A.c</Filename>
<BreakIfRCount>0</BreakIfRCount>
<Filename>..\..\dep\libtrinamic\src\ic\tmc4361A.cpp</Filename>
<ExecCommand></ExecCommand>
<Expression>\\app\../../dep/libtrinamic/IFLYTOP-TMC-API/tmc/ic/TMC4361A/TMC4361A.c\185</Expression>
<Expression></Expression>
</Bp>
<Bp>
<Number>11</Number>
<Type>0</Type>
<LineNumber>84</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount>
<Filename>..\..\dep\libtrinamic\src\ic\tmc4361A.cpp</Filename>
<ExecCommand></ExecCommand>
<Expression></Expression>
</Bp>
</Breakpoint>
<Tracepoint>
@ -390,7 +406,7 @@
<Group>
<GroupName>Application/MDK-ARM</GroupName>
<tvExp>0</tvExp>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>

50
app/MDK-ARM/startup_stm32f407xx.lst

@ -46,22 +46,22 @@ ARM Macro Assembler Page 1
29 00000000 ; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
30 00000000 ; </h>
31 00000000
32 00000000 00000400
32 00000000 00001000
Stack_Size
EQU 0x400
EQU 0x1000
33 00000000
34 00000000 AREA STACK, NOINIT, READWRITE, ALIGN
=3
35 00000000 Stack_Mem
SPACE Stack_Size
36 00000400 __initial_sp
37 00000400
38 00000400
39 00000400 ; <h> Heap Configuration
40 00000400 ; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
41 00000400 ; </h>
42 00000400
43 00000400 00000400
36 00001000 __initial_sp
37 00001000
38 00001000
39 00001000 ; <h> Heap Configuration
40 00001000 ; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
41 00001000 ; </h>
42 00001000
43 00001000 00001000
Heap_Size
@ -69,21 +69,21 @@ ARM Macro Assembler Page 1
ARM Macro Assembler Page 2
EQU 0x400
44 00000400
45 00000400 AREA HEAP, NOINIT, READWRITE, ALIGN=
EQU 0x1000
44 00001000
45 00001000 AREA HEAP, NOINIT, READWRITE, ALIGN=
3
46 00000000 __heap_base
47 00000000 Heap_Mem
SPACE Heap_Size
48 00000400 __heap_limit
49 00000400
50 00000400 PRESERVE8
51 00000400 THUMB
52 00000400
53 00000400
54 00000400 ; Vector Table Mapped to Address 0 at Reset
55 00000400 AREA RESET, DATA, READONLY
48 00001000 __heap_limit
49 00001000
50 00001000 PRESERVE8
51 00001000 THUMB
52 00001000
53 00001000
54 00001000 ; Vector Table Mapped to Address 0 at Reset
55 00001000 AREA RESET, DATA, READONLY
56 00000000 EXPORT __Vectors
57 00000000 EXPORT __Vectors_End
58 00000000 EXPORT __Vectors_Size
@ -859,7 +859,7 @@ Symbol: Stack_Mem
Uses
None
Comment: Stack_Mem unused
__initial_sp 00000400
__initial_sp 00001000
Symbol: __initial_sp
Definitions
@ -899,7 +899,7 @@ Symbol: __heap_base
Uses
At line 402 in file startup_stm32f407xx.s
Comment: __heap_base used once
__heap_limit 00000400
__heap_limit 00001000
Symbol: __heap_limit
Definitions
@ -1873,7 +1873,7 @@ Symbol: WWDG_IRQHandler
ARM Macro Assembler Page 1 Alphabetic symbol ordering
Absolute symbols
Heap_Size 00000400
Heap_Size 00001000
Symbol: Heap_Size
Definitions
@ -1881,7 +1881,7 @@ Symbol: Heap_Size
Uses
At line 47 in file startup_stm32f407xx.s
Comment: Heap_Size used once
Stack_Size 00000400
Stack_Size 00001000
Symbol: Stack_Size
Definitions

4
app/MDK-ARM/startup_stm32f407xx.s

@ -29,7 +29,7 @@
; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
; </h>
Stack_Size EQU 0x400
Stack_Size EQU 0x1000
AREA STACK, NOINIT, READWRITE, ALIGN=3
Stack_Mem SPACE Stack_Size
@ -40,7 +40,7 @@ __initial_sp
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
; </h>
Heap_Size EQU 0x400
Heap_Size EQU 0x1000
AREA HEAP, NOINIT, READWRITE, ALIGN=3
__heap_base

2
dep/libiflytop_micro

@ -1 +1 @@
Subproject commit 59c26e1dcba6743ee3ed302bb14a110526c50aaf
Subproject commit 689e4620ef77fb1ea26ba5cb1ce002d29be6c4ad

27
src/umain.cpp

@ -20,10 +20,14 @@ class Main {
IflytopCanClient canClient;
IflytopMicroOSImpl os;
ZSLOT3(Main, onCanRxData, CAN_RxHeaderTypeDef *, uint8_t *, uint8_t);
void onCanRxData(CAN_RxHeaderTypeDef *rxMegHeader, uint8_t *data, uint8_t len) {
ZLOGI(TAG, "onCanRxData:");
ZLOGI_HEX(TAG, data, len);
bool canOnRxDataFlag;
Main() { canOnRxDataFlag = false; }
ZSLOT0(Main, onCanRxData);
void onCanRxData() {
canOnRxDataFlag = true;
canClient.deactivateRxIT();
}
void motorInitialize() {
@ -62,10 +66,21 @@ class Main {
IflytopCanClient::iflytop_can_client_config_t *config = canClient.createDefaultConfig(DEVICE_ID);
canClient.initialize(&os, config);
canClient.onCanRxData.connect(this, &Main::onCanRxData);
canClient.activateRxIT();
while (true) {
port_do_debug_light_state();
#if 0
if (canOnRxDataFlag) {
canOnRxDataFlag = false;
static IflytopCanClient::packet_t packet;
while (canClient.getRxPacket(&packet)) {
ZLOGI(TAG, "type:%d targetId:%d sourceId:%d index:%d regAdd:%d regValue:%d", packet.type, packet.targetId, packet.sourceId, packet.index,
packet.regAdd, packet.regValue);
}
canClient.activateRxIT();
}
#if 0
static uint8_t tx[8] = {1, 2, 3, 4, 5, 6, 7, 8};
canClient.translate(0x01, tx, 8, 2);
if (canClient.getLastTransmitStatus() == HAL_OK) {
@ -74,7 +89,7 @@ class Main {
ZLOGI(TAG, "send fail");
}
HAL_Delay(1000);
#endif
#endif
}
}
};

Loading…
Cancel
Save