arpruss / mouse3d_stm32f1

MIT License
13 stars 2 forks source link

compilation problem #1

Open robas781 opened 4 years ago

robas781 commented 4 years ago

Hi. Sorry for my english (google translator). To start with thank you for sharing this project, unfortunately I have a problem with compiling the sketch. I don't know much about programming but I tried to do everything according to the instruction https://www.instructables.com/id/SpaceBall -4000-Serial-to-USB-Adapter / however when I try to compile a sketch I get a lot of errors and can't find what I'm doing wrong so here I ask for help. errors that appear Arduino:1.8.12 (Windows 8.1), Płytka:"Generic STM32F103C series, STM32F103CB (20k RAM. 128k Flash), STM32duino bootloader, Serial"

Uwaga: platform.txt z rdzenia 'STM32 Boards (STM32duino.com)' zawiera przestarzałe recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}", przekonwertowane automatycznie na recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}". Rozważ uaktualnienie tego rdzenia. C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\mouse3d.ino:59:0: warning: "INPUT_MODE" redefined

define INPUT_MODE 0x02 // 0x06 = relative, 0x02 = absolute

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\mouse3d.ino:20:0: note: this is the location of the previous definition

define INPUT_MODE 1

In file included from C:\Users\robas78\Documents\Arduino\libraries\USBComposite_stm32f1-master/usb_generic.h:11:0,

             from C:\Users\robas78\Documents\Arduino\libraries\USBComposite_stm32f1-master/USBComposite.h:6,

             from C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\mouse3d.ino:3:

C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/stm32f1/usb_reg_map.h: In function 'void* usb_pma_ptr(uint32)':

C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/stm32f1/usb_reg_map.h:353:33: warning: pointer of type 'void *' used in arithmetic [-Wpointer-arith]

 return (void*)(USB_PMA_BASE + 2 * offset);

                             ^

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\mouse3d.ino: In constructor 'HIDMouse3D::HIDMouse3D(USBHID&)':

mouse3d:234:84: error: no matching function for call to 'HIDReporter::HIDReporter(USBHID&, uint8_t*, unsigned int, int)'

           modeData(modeBuffer, HID_BUFFER_SIZE(1,4), 1, HID_BUFFER_MODE_NO_WAIT)

                                                                                ^

In file included from C:\Users\robas78\Documents\Arduino\libraries\USBComposite_stm32f1-master/USBComposite.h:60:0,

             from C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\mouse3d.ino:3:

C:\Users\robas78\Documents\Arduino\libraries\USBComposite_stm32f1-master/USBHID.h:388:9: note: candidate: HIDReporter::HIDReporter(USBHID&, const HIDReportDescriptor, uint8_t, unsigned int)

     HIDReporter(USBHID& _HID, const HIDReportDescriptor* r, uint8_t* _buffer, unsigned _size);

     ^~~~~~~~~~~

C:\Users\robas78\Documents\Arduino\libraries\USBComposite_stm32f1-master/USBHID.h:388:9: note: no known conversion for argument 2 from 'uint8_t {aka unsigned char}' to 'const HIDReportDescriptor*'

C:\Users\robas78\Documents\Arduino\libraries\USBComposite_stm32f1-master/USBHID.h:386:9: note: candidate: HIDReporter::HIDReporter(USBHID&, const HIDReportDescriptor, uint8_t, unsigned int, uint8_t, bool)

     HIDReporter(USBHID& _HID, const HIDReportDescriptor* r, uint8_t* _buffer, unsigned _size, uint8_t _reportID, bool forceReportID=false);

     ^~~~~~~~~~~

C:\Users\robas78\Documents\Arduino\libraries\USBComposite_stm32f1-master/USBHID.h:386:9: note: candidate expects 6 arguments, 4 provided

C:\Users\robas78\Documents\Arduino\libraries\USBComposite_stm32f1-master/USBHID.h:366:7: note: candidate: constexpr HIDReporter::HIDReporter(const HIDReporter&)

class HIDReporter {

   ^~~~~~~~~~~

C:\Users\robas78\Documents\Arduino\libraries\USBComposite_stm32f1-master/USBHID.h:366:7: note: candidate expects 1 argument, 4 provided

C:\Users\robas78\Documents\Arduino\libraries\USBComposite_stm32f1-master/USBHID.h:366:7: note: candidate: constexpr HIDReporter::HIDReporter(HIDReporter&&)

C:\Users\robas78\Documents\Arduino\libraries\USBComposite_stm32f1-master/USBHID.h:366:7: note: candidate expects 1 argument, 4 provided

mouse3d:234:84: error: no matching function for call to 'HIDReporter::HIDReporter(USBHID&, uint8_t*, unsigned int, int)'

           modeData(modeBuffer, HID_BUFFER_SIZE(1,4), 1, HID_BUFFER_MODE_NO_WAIT)

                                                                                ^

In file included from C:\Users\robas78\Documents\Arduino\libraries\USBComposite_stm32f1-master/USBComposite.h:60:0,

             from C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\mouse3d.ino:3:

C:\Users\robas78\Documents\Arduino\libraries\USBComposite_stm32f1-master/USBHID.h:388:9: note: candidate: HIDReporter::HIDReporter(USBHID&, const HIDReportDescriptor, uint8_t, unsigned int)

     HIDReporter(USBHID& _HID, const HIDReportDescriptor* r, uint8_t* _buffer, unsigned _size);

     ^~~~~~~~~~~

C:\Users\robas78\Documents\Arduino\libraries\USBComposite_stm32f1-master/USBHID.h:388:9: note: no known conversion for argument 2 from 'uint8_t {aka unsigned char}' to 'const HIDReportDescriptor*'

C:\Users\robas78\Documents\Arduino\libraries\USBComposite_stm32f1-master/USBHID.h:386:9: note: candidate: HIDReporter::HIDReporter(USBHID&, const HIDReportDescriptor, uint8_t, unsigned int, uint8_t, bool)

     HIDReporter(USBHID& _HID, const HIDReportDescriptor* r, uint8_t* _buffer, unsigned _size, uint8_t _reportID, bool forceReportID=false);

     ^~~~~~~~~~~

C:\Users\robas78\Documents\Arduino\libraries\USBComposite_stm32f1-master/USBHID.h:386:9: note: candidate expects 6 arguments, 4 provided

C:\Users\robas78\Documents\Arduino\libraries\USBComposite_stm32f1-master/USBHID.h:366:7: note: candidate: constexpr HIDReporter::HIDReporter(const HIDReporter&)

class HIDReporter {

   ^~~~~~~~~~~

C:\Users\robas78\Documents\Arduino\libraries\USBComposite_stm32f1-master/USBHID.h:366:7: note: candidate expects 1 argument, 4 provided

C:\Users\robas78\Documents\Arduino\libraries\USBComposite_stm32f1-master/USBHID.h:366:7: note: candidate: constexpr HIDReporter::HIDReporter(HIDReporter&&)

C:\Users\robas78\Documents\Arduino\libraries\USBComposite_stm32f1-master/USBHID.h:366:7: note: candidate expects 1 argument, 4 provided

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\mouse3d.ino: In constructor 'HIDJoy3D::HIDJoy3D(USBHID&)':

mouse3d:269:84: error: no matching function for call to 'HIDReporter::HIDReporter(USBHID&, uint8_t*, unsigned int, int)'

           modeData(modeBuffer, HID_BUFFER_SIZE(1,4), 1, HID_BUFFER_MODE_NO_WAIT)

                                                                                ^

In file included from C:\Users\robas78\Documents\Arduino\libraries\USBComposite_stm32f1-master/USBComposite.h:60:0,

             from C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\mouse3d.ino:3:

C:\Users\robas78\Documents\Arduino\libraries\USBComposite_stm32f1-master/USBHID.h:388:9: note: candidate: HIDReporter::HIDReporter(USBHID&, const HIDReportDescriptor, uint8_t, unsigned int)

     HIDReporter(USBHID& _HID, const HIDReportDescriptor* r, uint8_t* _buffer, unsigned _size);

     ^~~~~~~~~~~

C:\Users\robas78\Documents\Arduino\libraries\USBComposite_stm32f1-master/USBHID.h:388:9: note: no known conversion for argument 2 from 'uint8_t {aka unsigned char}' to 'const HIDReportDescriptor*'

C:\Users\robas78\Documents\Arduino\libraries\USBComposite_stm32f1-master/USBHID.h:386:9: note: candidate: HIDReporter::HIDReporter(USBHID&, const HIDReportDescriptor, uint8_t, unsigned int, uint8_t, bool)

     HIDReporter(USBHID& _HID, const HIDReportDescriptor* r, uint8_t* _buffer, unsigned _size, uint8_t _reportID, bool forceReportID=false);

     ^~~~~~~~~~~

C:\Users\robas78\Documents\Arduino\libraries\USBComposite_stm32f1-master/USBHID.h:386:9: note: candidate expects 6 arguments, 4 provided

C:\Users\robas78\Documents\Arduino\libraries\USBComposite_stm32f1-master/USBHID.h:366:7: note: candidate: constexpr HIDReporter::HIDReporter(const HIDReporter&)

class HIDReporter {

   ^~~~~~~~~~~

C:\Users\robas78\Documents\Arduino\libraries\USBComposite_stm32f1-master/USBHID.h:366:7: note: candidate expects 1 argument, 4 provided

C:\Users\robas78\Documents\Arduino\libraries\USBComposite_stm32f1-master/USBHID.h:366:7: note: candidate: constexpr HIDReporter::HIDReporter(HIDReporter&&)

C:\Users\robas78\Documents\Arduino\libraries\USBComposite_stm32f1-master/USBHID.h:366:7: note: candidate expects 1 argument, 4 provided

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\mouse3d.ino: In function 'void loadMode()':

mouse3d:325:3: error: 'EEPROM8_init' was not declared in this scope

EEPROM8_init();

^~~~

mouse3d:326:11: error: 'EEPROM8_getValue' was not declared in this scope

int i = EEPROM8_getValue(INPUT_MODE);

       ^~~~~~~~~~~~~~~~

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\mouse3d.ino: In function 'void saveMode()':

mouse3d:352:3: error: 'EEPROM8_storeValue' was not declared in this scope

EEPROM8_storeValue(INPUT_MODE, mode);

^~~~~~

exit status 1 no matching function for call to 'HIDReporter::HIDReporter(USBHID&, uint8_t*, unsigned int, int)'

Ten raport powinien zawierać więcej informacji jeśli w File -> Preferencje zostanie włączona opcja "Pokaż szczegółowe informacje podczas kompilacji"

arpruss commented 4 years ago

I changed the USBComposite library's definition of HIDReporter(), forgetting that Mouse3D used the old version.

I fixed it. Get the latest USBComposite code from https://github.com/arpruss/USBComposite_stm32f1/ and it should work.

Przepraszam!

robas781 commented 4 years ago

Thank you for the quick reply, but something is still wrong. Maybe you'd better send the hex file and short information on how to upload it, I won't bother because of my ignorance in arduino. I have a blue pill. I am sorry for such matches but I really want to start it.

arpruss commented 4 years ago

What error messages are you getting?

robas781 commented 4 years ago

I don't know if I did it right because I moved this eeprom ino file to the sketch folder. I am not sure if I was supposed to do it with it and maybe this is the reason. Arduino:1.8.12 (Windows 8.1), Płytka:"Generic STM32F103C series, STM32F103CB (20k RAM. 128k Flash), STM32duino bootloader, Serial"

Uwaga: platform.txt z rdzenia 'STM32 Boards (STM32duino.com)' zawiera przestarzałe recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}", przekonwertowane automatycznie na recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}". Rozważ uaktualnienie tego rdzenia. C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\mouse3d.ino:59:0: warning: "INPUT_MODE" redefined

define INPUT_MODE 0x02 // 0x06 = relative, 0x02 = absolute

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\mouse3d.ino:20:0: note: this is the location of the previous definition

define INPUT_MODE 1

In file included from C:\Users\robas78\Documents\Arduino\libraries\USBComposite_stm32f1-master/usb_generic.h:11:0,

             from C:\Users\robas78\Documents\Arduino\libraries\USBComposite_stm32f1-master/USBComposite.h:6,

             from C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\mouse3d.ino:3:

C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/stm32f1/usb_reg_map.h: In function 'void* usb_pma_ptr(uint32)':

C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/stm32f1/usb_reg_map.h:353:33: warning: pointer of type 'void *' used in arithmetic [-Wpointer-arith]

 return (void*)(USB_PMA_BASE + 2 * offset);

                             ^

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\eeprom8.ino: In function 'bool erasePage(uint32_t)':

eeprom8:37:30: error: '__IO' was not declared in this scope

define GET_WORD(address) ((__IO uint32_t)(address))

                          ^

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\eeprom8.ino:59:38: note: in expansion of macro 'GET_WORD'

return success && EEPROM8_MAGIC == GET_WORD(base);

                                  ^~~~~~~~

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\eeprom8.ino:37:30: note: suggested alternative: '__tm'

define GET_WORD(address) ((__IO uint32_t)(address))

                          ^

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\eeprom8.ino:59:38: note: in expansion of macro 'GET_WORD'

return success && EEPROM8_MAGIC == GET_WORD(base);

                                  ^~~~~~~~

eeprom8:37:35: error: expected ')' before 'uint32_t'

define GET_WORD(address) ((__IO uint32_t)(address))

                               ^

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\eeprom8.ino:59:38: note: in expansion of macro 'GET_WORD'

return success && EEPROM8_MAGIC == GET_WORD(base);

                                  ^~~~~~~~

eeprom8:59:52: error: expected ')' before ';' token

return success && EEPROM8_MAGIC == GET_WORD(base);

                                                ^

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\eeprom8.ino: In function 'int EEPROM8_getValue(uint8_t)':

eeprom8:35:30: error: '__IO' was not declared in this scope

define GET_BYTE(address) ((__IO uint8_t)(address))

                          ^

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\eeprom8.ino:74:9: note: in expansion of macro 'GET_BYTE'

 if (GET_BYTE(base+offset) == variable) {

     ^~~~~~~~

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\eeprom8.ino:35:30: note: suggested alternative: '__tm'

define GET_BYTE(address) ((__IO uint8_t)(address))

                          ^

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\eeprom8.ino:74:9: note: in expansion of macro 'GET_BYTE'

 if (GET_BYTE(base+offset) == variable) {

     ^~~~~~~~

eeprom8:35:35: error: expected ')' before 'uint8_t'

define GET_BYTE(address) ((__IO uint8_t)(address))

                               ^

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\eeprom8.ino:74:9: note: in expansion of macro 'GET_BYTE'

 if (GET_BYTE(base+offset) == variable) {

     ^~~~~~~~

eeprom8:77:3: error: expected ')' before '}' token

}

^

eeprom8:77:3: error: expected ')' before '}' token

eeprom8:77:3: error: expected primary-expression before '}' token

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\eeprom8.ino: In function 'bool writeHalfWord(uint32_t, uint16_t)':

eeprom8:36:35: error: '__IO' was not declared in this scope

define GET_HALF_WORD(address) ((__IO uint16_t)(address))

                               ^

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\eeprom8.ino:92:21: note: in expansion of macro 'GET_HALF_WORD'

return success && GET_HALF_WORD(address) == halfWord;

                 ^~~~~~~~~~~~~

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\eeprom8.ino:36:35: note: suggested alternative: '__tm'

define GET_HALF_WORD(address) ((__IO uint16_t)(address))

                               ^

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\eeprom8.ino:92:21: note: in expansion of macro 'GET_HALF_WORD'

return success && GET_HALF_WORD(address) == halfWord;

                 ^~~~~~~~~~~~~

eeprom8:36:40: error: expected ')' before 'uint16_t'

define GET_HALF_WORD(address) ((__IO uint16_t)(address))

                                    ^

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\eeprom8.ino:92:21: note: in expansion of macro 'GET_HALF_WORD'

return success && GET_HALF_WORD(address) == halfWord;

                 ^~~~~~~~~~~~~

eeprom8:92:55: error: expected ')' before ';' token

return success && GET_HALF_WORD(address) == halfWord;

                                                   ^

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\eeprom8.ino: In function 'boolean EEPROM8_storeValue(uint8_t, uint8_t)':

eeprom8:36:35: error: '__IO' was not declared in this scope

define GET_HALF_WORD(address) ((__IO uint16_t)(address))

                               ^

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\eeprom8.ino:106:9: note: in expansion of macro 'GET_HALF_WORD'

 if (GET_HALF_WORD(base+offset) == 0xFFFF) {

     ^~~~~~~~~~~~~

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\eeprom8.ino:36:35: note: suggested alternative: '__tm'

define GET_HALF_WORD(address) ((__IO uint16_t)(address))

                               ^

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\eeprom8.ino:106:9: note: in expansion of macro 'GET_HALF_WORD'

 if (GET_HALF_WORD(base+offset) == 0xFFFF) {

     ^~~~~~~~~~~~~

eeprom8:36:40: error: expected ')' before 'uint16_t'

define GET_HALF_WORD(address) ((__IO uint16_t)(address))

                                    ^

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\eeprom8.ino:106:9: note: in expansion of macro 'GET_HALF_WORD'

 if (GET_HALF_WORD(base+offset) == 0xFFFF) {

     ^~~~~~~~~~~~~

eeprom8:109:3: error: expected ')' before '}' token

}

^

eeprom8:109:3: error: expected ')' before '}' token

eeprom8:109:3: error: expected primary-expression before '}' token

eeprom8:36:35: error: '__IO' was not declared in this scope

define GET_HALF_WORD(address) ((__IO uint16_t)(address))

                               ^

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\eeprom8.ino:126:14: note: in expansion of macro 'GET_HALF_WORD'

   data = GET_HALF_WORD(base+offset);

          ^~~~~~~~~~~~~

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\eeprom8.ino:36:35: note: suggested alternative: '__tm'

define GET_HALF_WORD(address) ((__IO uint16_t)(address))

                               ^

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\eeprom8.ino:126:14: note: in expansion of macro 'GET_HALF_WORD'

   data = GET_HALF_WORD(base+offset);

          ^~~~~~~~~~~~~

eeprom8:36:40: error: expected ')' before 'uint16_t'

define GET_HALF_WORD(address) ((__IO uint16_t)(address))

                                    ^

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\eeprom8.ino:126:14: note: in expansion of macro 'GET_HALF_WORD'

   data = GET_HALF_WORD(base+offset);

          ^~~~~~~~~~~~~

eeprom8:126:40: error: expected ')' before ';' token

   data = GET_HALF_WORD(base+offset);

                                    ^

eeprom8:35:30: error: '__IO' was not declared in this scope

define GET_BYTE(address) ((__IO uint8_t)(address))

                          ^

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\eeprom8.ino:132:13: note: in expansion of macro 'GET_BYTE'

     if (GET_BYTE(otherBase+j) == variable)

         ^~~~~~~~

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\eeprom8.ino:35:30: note: suggested alternative: '__tm'

define GET_BYTE(address) ((__IO uint8_t)(address))

                          ^

Znaleziono wiele bibliotek w "USBComposite.h" Wykorzystane: C:\Users\robas78\Documents\Arduino\libraries\USBComposite_stm32f1-master C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\eeprom8.ino:132:13: note: in expansion of macro 'GET_BYTE'

Niewykorzystane: C:\Users\robas78\Documents\Arduino\libraries\USBHID if (GET_BYTE(otherBase+j) == variable)

         ^~~~~~~~

eeprom8:35:35: error: expected ')' before 'uint8_t'

define GET_BYTE(address) ((__IO uint8_t)(address))

                               ^

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\eeprom8.ino:132:13: note: in expansion of macro 'GET_BYTE'

     if (GET_BYTE(otherBase+j) == variable)

         ^~~~~~~~

eeprom8:133:16: error: expected ')' before ';' token

       break;

            ^

eeprom8:133:16: error: expected ')' before ';' token

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\eeprom8.ino: In function 'void EEPROM8_init()':

eeprom8:37:30: error: '__IO' was not declared in this scope

define GET_WORD(address) ((__IO uint32_t)(address))

                          ^

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\eeprom8.ino:164:24: note: in expansion of macro 'GET_WORD'

if (EEPROM8_MAGIC != GET_WORD(EEPROM_PAGE0_BASE) && ! erasePage(EEPROM_PAGE0_BASE) ) {

                    ^~~~~~~~

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\eeprom8.ino:37:30: note: suggested alternative: '__tm'

define GET_WORD(address) ((__IO uint32_t)(address))

                          ^

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\eeprom8.ino:164:24: note: in expansion of macro 'GET_WORD'

if (EEPROM8_MAGIC != GET_WORD(EEPROM_PAGE0_BASE) && ! erasePage(EEPROM_PAGE0_BASE) ) {

                    ^~~~~~~~

eeprom8:37:35: error: expected ')' before 'uint32_t'

define GET_WORD(address) ((__IO uint32_t)(address))

                               ^

C:\Users\robas78\Downloads\mouse3d_stm32f1-master\mouse3d_stm32f1-master\mouse3d\eeprom8.ino:164:24: note: in expansion of macro 'GET_WORD'

if (EEPROM8_MAGIC != GET_WORD(EEPROM_PAGE0_BASE) && ! erasePage(EEPROM_PAGE0_BASE) ) {

                    ^~~~~~~~

eeprom8:168:3: error: expected ')' before 'if'

if (EEPROM8_MAGIC != GET_WORD(EEPROM_PAGE1_BASE) && ! erasePage(EEPROM_PAGE1_BASE) ) {

^~

eeprom8:172:3: error: expected ')' before 'if'

if (GET_HALF_WORD(EEPROM_PAGE0_BASE+4) != 0xFFFF) {

^~

exit status 1 '__IO' was not declared in this scope

Ten raport powinien zawierać więcej informacji jeśli w File -> Preferencje zostanie włączona opcja "Pokaż szczegółowe informacje podczas kompilacji"

robas781 commented 4 years ago

I will describe what I did, maybe I will help it. Point 1 went without a problem. Point 2 I downloaded 2 libraries (usbhid, GameControllersSTM32 library). I installed boards zero. C: \ Program Files (x86) \ Arduino \ hardware \ Arduino_STM32) I had to create the Arduino_STM32 folder because it was not in this location. Another uncertain one was the files (debounce h, bridge py, mode py, license) I moved to the folder (C: \ Users \ robas78 \ Documents \ Arduino \ libraries \ debounce) I had to create a debounce folder. I moved the eeprom ino file to the shared mouse 3d sketch folder. I probably mixed up a lot and therefore it doesn't work.

robas781 commented 4 years ago

I do not know if it will help with something, but I have tried to compile something from the examples and I also fail, even blink does not go and gives such errors. Arduino:1.8.12 (Windows 8.1), Płytka:"Generic STM32F103C series, STM32F103CB (20k RAM. 128k Flash), STM32duino bootloader, Serial"

Uwaga: platform.txt z rdzenia 'STM32 Boards (STM32duino.com)' zawiera przestarzałe recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}", przekonwertowane automatycznie na recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}". Rozważ uaktualnienie tego rdzenia. C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple\libmaple\usb\stm32f1\usb_cdcacm.c:67:2: warning: #warning USB CDC ACM relies on LeafLabs board-specific configuration. You may have problems on non-LeafLabs boards. [-Wcpp]

warning USB CDC ACM relies on LeafLabs board-specific configuration.\

^~~

In file included from C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple\WString.cpp:23:0:

C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple\itoa.h:34:14: error: conflicting declaration of C function 'char utoa(long unsigned int, char, int)'

extern char utoa( unsigned long value, char string, int radix ) ;

          ^~~~

In file included from c:\users\robas78\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\stdlib.h:11:0,

             from c:\users\robas78\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\c++\7.2.1\cstdlib:75,

             from c:\users\robas78\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\c++\7.2.1\stdlib.h:36,

             from C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple\WString.h:26,

             from C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple\WString.cpp:22:

c:\users\robas78\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\stdlib.h:225:8: note: previous declaration 'char utoa(unsigned int, char, int)'

char _EXFUN(utoa,(unsigned, char , int));

    ^

C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple\WString.cpp: In constructor 'String::String(unsigned char, unsigned char)':

C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple\WString.cpp:74:23: error: call of overloaded 'utoa(unsigned char&, char [9], unsigned char&)' is ambiguous

utoa(value, buf, base);

                   ^

In file included from c:\users\robas78\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\stdlib.h:11:0,

             from c:\users\robas78\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\c++\7.2.1\cstdlib:75,

             from c:\users\robas78\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\c++\7.2.1\stdlib.h:36,

             from C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple\WString.h:26,

             from C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple\WString.cpp:22:

c:\users\robas78\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\stdlib.h:225:8: note: candidate: char utoa(unsigned int, char, int)

char _EXFUN(utoa,(unsigned, char , int));

    ^

In file included from C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple\WString.cpp:23:0:

C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple\itoa.h:34:14: note: candidate: char utoa(long unsigned int, char, int)

extern char utoa( unsigned long value, char string, int radix ) ;

          ^~~~

exit status 1 Błąd kompilacji dla płytki Generic STM32F103C series.

Ten raport powinien zawierać więcej informacji jeśli w File -> Preferencje zostanie włączona opcja "Pokaż szczegółowe informacje podczas kompilacji"

Maybe I did something wrong when adding stm32duino core

arpruss commented 4 years ago

Try posting this last error log on the stm32duino.com board. Hopefully someone can help you.

robas781 commented 4 years ago

Thanks for your help.Bede was looking for a solution but with my acquaintance arduino probably will be hard, so if it's not a problem, I will ask for this hex again because I think it would be easier for me to upload it than to find an error in the compilation. Hex on a blue pill plate. Thank you in advance .

robas781 commented 4 years ago

I succeeded, I succeeded. Somehow I came across what I mixed up and of course, as I said, the wine was on my side but I managed to compile without errors. Now I will try to write on the plate. Once again, I will ask you if I have any additional questions. beat you here in this thread.

robas781 commented 4 years ago

Whether such an adapter https://allegro.pl/oferta/kompaktowy-konwerter-rs232-na-ttl-z-db9-e4571-8452366301 can be or must be exactly as described in the instructions. Usas are not as recommended and you would have to wait for the shipment from China.

arpruss commented 4 years ago

I think so. Mine was SP3232 based, and this one is SP3232e.

robas781 commented 4 years ago

Thank you. Then I'll take a chance.

robas781 commented 4 years ago

Hello. So for information because maybe someone will be useful. Everything works on a converter of this type http://www.meraprojekt.com.pl/mp-rs232-dte.html Thanks again for your help and wonderful project. Regards

robas781 commented 4 years ago

I hurried a bit with everything working. I don't know if it should be like that but in joy mode it detects all the keys but the numbers are changed (as pressing No. 1 it displays pressing No. 4, as pressing 2 it displays No. 5 etc.) In spacemouse mode it works only for me physical buttons 2,3,6, a, b, c

Madtricksystem commented 4 years ago

@robas781 Hi. I read your postings here. You wrote that at some point you managed to...

Can you give any hint as to how it worked out then? Or what libraries you used?

There are several users like me who are interested.

If it is possible that the software runs on the board again, I would try to write a manual and possibly fix the software version. Exactly so that other interested parties also have the possibility.

I think it would be great if you would contact me.

Many greetings, Dirk

robas781 commented 4 years ago

Hello. In my case, the problem arose when the 2nd step of the instruction " Next, download the stm32duino core (click on "Clone or download" and then "zip"). Put the branch in Arduino/Hardware/Arduino_STM32 (so you'll have folders like Arduino/Hardware/Arduino_STM32/STM32F1, etc.) " I followed exactly (https://github.com/rogerclarkmelbourne/Arduino_STM32/wiki/Installation) As I wrote, the fault was on my side (lack of sufficient knowledge about arduino) Unfortunately, the problem with the buttons remained, but you can live with it. Regards