Quantcast
Channel: User Dan - Stack Overflow
Browsing index pages (37 articles)

Comment by Dan on Mutual TLS support in mbed-TLS

Are you talking about mutual authentication? Where the server authenticates to the client (always), and the client also must authenticate to the server?

View Article


Answer by Dan for Encryption Strategy for Flashing or updating firmware on...

A small book could be written on the topics you touch in this question. But this site isn't intended to be a consulting service or a blog entry site, so I'll try to answer your question succinctly....

View Article


Experiences with (free) embedded TCP / IP stacks? [closed]

Does anyone have especially good (or bad) experiences with any of the following embedded TCP / IP stacks?uIPlwIPBentham's TCP/IP Lean implementationThe TCP/IP stack from this bookMy needs are for a...

View Article

Detect when multiple enum items map to same value

Is there a compile-time way to detect / prevent duplicate values within a C/C++ enumeration? The catch is that there are multiple items which are initialized to explicit values.Background:I've...

View Article

Answer by Dan for Multitasking RTOS on AVR

When you say "RTOS", I presume you mean pre-emptive multi-tasking? I'm guessing (since this is an 8-bit AVR) you don't need a filesystem, network stack, etc.?If you're looking for a tiny, pre-emptive...

View Article


Vim - yank into search register

Is there any easy/quick way to "yank" into vim's "last search" register ("/)?From the vim documentation, it appears that the answer is no, but that it can be assigned via a "let" command:It is writable...

View Article

Answer by Dan for What are alternatives to malloc() in C?

You might want to check out Ralph Hempel's Embedded Memory Manager.

View Article

Answer by Dan for When calling OS_EXIT_CRITICAL(), STM32 runs into HardFault

You are calling OSTimeDly() before you have started the operating system.If you want to delay/pause/wait prior to starting the OS (via OSStart()), you will have to use a "dummy loop" with a volatile,...

View Article


Answer by Dan for Best way to avoid cast integer to pointer when dealing with...

OK a few things here - first of all, your definition for READ_REG is missing a volatile -- it should be something like #define READREG(address) (*(uint32_t volatile *)(address))Secondly - and this is...

View Article


Answer by Dan for Choose of AES ECB in specifications

From my (quick) reading of the specification, the same device-specific key ("Appkey") is used to "decrypt" the plaintext message at the server. I put "decrypt" in quotes, because it's using AES decrypt...

View Article

Answer by Dan for How to re-enable interrupts from within an interrupt...

First of all, your "flag" variable should be volatile since it is shared between foreground and background code.But to answer your question, on the Cortex-M, interrupts are already enabled inside an...

View Article

Answer by Dan for confusion in implementing usb interface for programming...

For a new chip, you need to get code into it through something like a JTAG port or the chip's serial (UART) port & primary bootloader. "Out of the box", you can't load new code into it over USB.You...

View Article

Answer by Dan for How to keep interrupts short?

There are 100 different ways to skin this cat, depending on CPU architecture (interrupt nesting & prioritization, software interrupt support, etc.) but let's take a pretty straightforward approach...

View Article


Answer by Dan for Embedded systems file encryption library

You might want to check out NaCl (pronounced as "salt"), especially since this is for an embedded system.It has CPU-specific tunings and doesn't require any dynamic memory allocation.As for licensing,...

View Article

Answer by Dan for difference between Preemption and context switch

Rather than answering each of your enumerated questions, I'll do my best to service your (thankfully) bolded request:A better alternative to answering all the questions would be if you could refer to...

View Article


Answer by Dan for Mips calculation for embedded software

OK you realize that this is fraught with disclaimers & warnings -- CPU speeds, memory speeds, cache hits, MMU page tables flushes, bus contention, etc... (if it's a heavy-duty embedded system) all...

View Article

Answer by Dan for Software interrupts, Keil MCB1700 evaluation board

Yes, except that on a Cortex M3 processor you'll use SVC instead of SWI. You don't need to use an RTOS to use this functionality.The exception handler will be a little bit different than with SWI...

View Article


Answer by Dan for How do I set a VxWorks breakpoint on a C static function?

Assuming the routine really exists as you'd expect (i.e., not optimized away or inlined) - I've used a couple approaches in situations like this:Assembly breakpointlet's say you want to set a...

View Article

Answer by Dan for How to save value of the user stack pointer into variable...

I think I might have answered a similar question here: "ARM - access R13 and R14 from Supervisor Mode"In your case, just use "IRQ mode" instead of "Supervisor mode", but I think the same principle...

View Article

Answer by Dan for When is an integerpointer cast actually correct?

It's very common in embedded systems to access memory-mapped hardware devices where the registers are at fixed addresses in the memory map. I often model hardware differently in C vs. C++ (with C++ you...

View Article
Browsing index pages (37 articles)


Latest Images