Search found 27 matches

by rbarreiros
Sun Dec 30, 2018 10:28 pm
Forum: Development and Feedback
Topic: C++ wrappers
Replies: 84
Views: 47208

Re: C++ wrappers

It linked with -fno-lto, but --no-gc-sections (with or without) made no changes.
Note that I had to add syscalls.c to the make file, and of course, syscalls_cpp.cpp is added from chcpp.mk
by rbarreiros
Sun Dec 30, 2018 8:54 pm
Forum: Development and Feedback
Topic: C++ wrappers
Replies: 84
Views: 47208

Re: C++ wrappers

Hi, I'm having a problem with the latest trunk, I have a class and a callback typedef like this: typedef void (*MyCbFunction)(int); class MyClass { public: MyClass(); void somefunc(void); private: MyCbFunction _cb; } ---- MyClass::somefunc(void) { // Do stuff, have some pointer func point to _cb etc...
by rbarreiros
Sat May 05, 2018 6:51 pm
Forum: STM32 Support
Topic: Mutex, Semaphore, neither, other?
Replies: 5
Views: 2609

Re: Mutex, Semaphore, neither, other?

But he is used in callbacks. The application registers a callback tied to a port, then, in the thread, if the packet matches the registered destination port, calls the callback to process the data (same buffer, pointer at the data index), is it still safe to use the mutex like this?
by rbarreiros
Sat May 05, 2018 9:50 am
Forum: STM32 Support
Topic: Mutex, Semaphore, neither, other?
Replies: 5
Views: 2609

Re: Mutex, Semaphore, neither, other?

Exactly, that can't be changed by anything outside the network thread as soon as its started to be processed.

But sometimes I have to use the same buffer to send sporadic packets outside the thread processing loop.

Mutex on the buffer?
by rbarreiros
Fri May 04, 2018 11:08 pm
Forum: STM32 Support
Topic: Mutex, Semaphore, neither, other?
Replies: 5
Views: 2609

Mutex, Semaphore, neither, other?

Hi, I made a small network stack that's just meant to do ARP/ICMP and UDP, so its really small and fast (faster than uIP) and I have 1 thread handling the network traffic that calls callbacks based on which port the higher level api has registered. The network buffer is shared for data received and ...
by rbarreiros
Wed Jul 26, 2017 12:43 am
Forum: STM32 Support
Topic: STM32F103C8T6 (Blue Pill) Multiple Peripheral and DMA
Replies: 1
Views: 2019

STM32F103C8T6 (Blue Pill) Multiple Peripheral and DMA

Hello, I'm in need of the following peripherals, UART1, UART2, UART3, SPI(1 or 2), and I2C(1 or 2), but STM32F103 shares many DMA channels with these peripherals. The UARTs are generating DMX with strict and precise timings, so I'd guess that it would be best to keep the DMA with the UARTs and use I...
by rbarreiros
Tue Apr 19, 2016 4:19 pm
Forum: STM32 Support
Topic: STM32F1 Bulk transfer size problem
Replies: 15
Views: 9509

Re: STM32F1 Bulk transfer size problem

Weirdly enough, the dfu bootloader only just disables the peripheral clocks, boots into the application and the USB is re-enumerated ! I attempted to do the same thing on ChibiOS and still doesn't get re-enumerated, here is the DFU bootloader function that leaves the bootloader, it's using libopencm...
by rbarreiros
Tue Apr 19, 2016 4:12 pm
Forum: STM32 Support
Topic: STM32F1 Bulk transfer size problem
Replies: 15
Views: 9509

Re: STM32F1 Bulk transfer size problem

Thanks for those macros Dwar, I'm exactly on a pickle with that, I'm using a DFU bootloader with said same board, and I'm having trouble 'rebooting' into the bootloader from ChibiOS, those macros still don't help :/ the USB doesn't get re-numerated by the os when shutting down ChibiOS and rebooting ...
by rbarreiros
Tue Apr 19, 2016 11:51 am
Forum: STM32 Support
Topic: STM32F1 Bulk transfer size problem
Replies: 15
Views: 9509

Re: STM32F1 Bulk transfer size problem

Using the exact same board, latest github ChibiOS with latest Ubuntu, arm-none-eabi-gcc (15:4.9.3+svn227297-1) 4.9.3 20150529 (prerelease), libusb-1.0 It's currently working with 64 byte block, I have no idea what I changed to make it work !! surely was something I did (or didn't) I will attempt to ...
by rbarreiros
Tue Apr 12, 2016 11:20 am
Forum: STM32 Support
Topic: STM32F1 Bulk transfer size problem
Replies: 15
Views: 9509

Re: STM32F1 Bulk transfer size problem

Hello Giovanni, Any news on your weekend test ? I got my code running right now using a max packet size of 63, but I'd love to have it standard on 64 ! :D Another small issue, while debug is on (specially asserts) if I connect/disconnect/connect the device it hits an assert because it calls usbInitE...

Go to advanced search