Search found 2500 matches

by dhylands
Tue Nov 21, 2017 8:02 pm
Forum: Development of MicroPython
Topic: [SOLVED]Is mpconfigport.h included in every micropython source file?
Replies: 4
Views: 65

Re: Is mpconfigport.h included in every micropython source file?

That's definitely something that you should be able to do in the linker script file. I know that linker script files are very picky about having the syntax exactly right, and tend to silently ignore stuff it doesn't like. I think that you should modify your linker script to look like this: dflash_co...
by dhylands
Mon Nov 20, 2017 11:21 pm
Forum: General Discussion and Questions
Topic: micropython framework
Replies: 2
Views: 52

Re: micropython framework

MicroPython compiles the script into bytecodes and then executes the bytecodes.

There are also code emitters which can generate assembly directly. See: https://docs.micropython.org/en/latest/ ... ython.html
by dhylands
Mon Nov 20, 2017 11:18 pm
Forum: Development of MicroPython
Topic: [SOLVED]Is mpconfigport.h included in every micropython source file?
Replies: 4
Views: 65

Re: Is mpconfigport.h included in every micropython source file?

What/why are you really asking? You can run the following command (under linux) from inside the build directory to get a list of the files which don't include mpconfigport.h: find . -name '*.P' -exec fgrep -L mpconfigport.h {} \; The files listed come from lib/libm, lib/libc and the HAL. The *.P fil...
by dhylands
Mon Nov 20, 2017 7:11 pm
Forum: Development of MicroPython
Topic: help is appreciated - memory allocated by m_malloc() is automatically free'ed
Replies: 5
Views: 140

Re: help is appreciated - memory allocated by m_malloc() is automatically free'ed

Yes - soft reset causes the entire heap to be re-initialized.

I think that any code which adds a root pointer should also add an init function to zero the root pointer.
by dhylands
Mon Nov 20, 2017 6:58 pm
Forum: Hardware Projects
Topic: Most basic standalone board
Replies: 2
Views: 74

Re: Most basic standalone board

The (now discontinued) Fez CERB40 is an example of a pretty basic STM32 microcontroller. http://old.ghielectronics.com/catalog/product/353 The schematics are available in the Resources section at the bottom. The 32 kHz RTC crystal isn't required. If you don't mind losing USB functionality, then you ...
by dhylands
Mon Nov 20, 2017 6:52 pm
Forum: Other Boards
Topic: [STM32F401CE/G30TH] alt functions
Replies: 1
Views: 45

Re: [STM32F401CE/G30TH] alt functions

Each port has a separate GPIO_MODER register. A single MODER register can change the mode for each of the pins associated with that port. So each pin is independent. The GPIOx_AFRL/GPIOx_AFRH registers (also available for each port) control the alternate function for each pin, when the GPIOx_MODER f...
by dhylands
Fri Nov 17, 2017 11:49 pm
Forum: General Discussion and Questions
Topic: I2C Bus Sniffing
Replies: 7
Views: 142

Re: I2C Bus Sniffing

You're right. I wasn't thinking about this in the right context. I think that the issue would be detecting start & stop bits and dealing with the ack/nack.
by dhylands
Fri Nov 17, 2017 9:12 pm
Forum: General Discussion and Questions
Topic: I2C Bus Sniffing
Replies: 7
Views: 142

Re: I2C Bus Sniffing

Using the SPI interface will only work if a device doesn't stretch the clock. You probably want to create a new I2C-sniffer module based on the software I2C code, or add a mode to the software I2C module to allow it to be a sniffer. To be a sniffer the SDA and SCL signals will always be inputs and w...
by dhylands
Fri Nov 17, 2017 4:32 pm
Forum: General Discussion and Questions
Topic: Problem entering (¨)
Replies: 2
Views: 59

Re: Problem entering (¨)

Your message is showing backticks (`) and not single quotes aka apostrophe (') or double quotes (") On my keyboard, the backtick is shared with the tilde character and is located just below the ESC key. The single and double quote key is over on the right side of the keyboard near the ENTER key. Not...
by dhylands
Fri Nov 17, 2017 4:22 pm
Forum: Development of MicroPython
Topic: help is appreciated - memory allocated by m_malloc() is automatically free'ed
Replies: 5
Views: 140

Re: help is appreciated - memory allocated by m_malloc() is automatically free'ed

If there is no python reference to the object allocated then there needs to be a pointer stored in the root pointers. For example, if we look in the stm32 timer.c file, you'll see references to the MP_STATE_PORT macro: https://github.com/micropython/micropython/blob/31550a52e4b9ff5797755b54c415e365a...