Search found 13 matches

by learnerforlife
Fri Oct 05, 2018 5:24 am
Forum: Development of MicroPython
Topic: Build micropython under Atmel studio
Replies: 4
Views: 544

Re: Build micropython under Atmel studio

I'm sure someone would have already tried it but just in case someone else is looking to integrate micropython in their codebase, it was far easier to build a static library from micropython source and just link it in you own code.
by learnerforlife
Wed Oct 03, 2018 12:09 pm
Forum: Development of MicroPython
Topic: Build micropython under Atmel studio
Replies: 4
Views: 544

Re: Build micropython under Atmel studio

The shell is default windows cmd.exe, and as far as I know it uses semicolon as command separator.
I'll try and see if I can use some other shell.

EDIT- Sorry my bad, seems & is the command separator in windows command prompt.
by learnerforlife
Wed Oct 03, 2018 10:59 am
Forum: Development of MicroPython
Topic: Build micropython under Atmel studio
Replies: 4
Views: 544

Build micropython under Atmel studio

Hi, I was trying to integrate micropython into my existing project which which is on Atmel studio. I am trying to make it build from within the Atmel studio but I can't get past this error: C:\Program Files (x86)\Atmel\Studio\7.0\shellUtils\cp.exe: invalid option -- e Try `C:\Program Files (x86)\Atm...
by learnerforlife
Wed Oct 03, 2018 8:25 am
Forum: General Discussion and Questions
Topic: C data structure to python dictionary
Replies: 21
Views: 1764

Re: C data structure to python dictionary

@pythoncoder yeah I was also thinking the same thing (not the UART part) but my lead wants to keep as much code in C as possible. :P Do you have the answer you need? Lemme know if you need more C code. Sent from my iPhone using Tapatalk Pro Yes, I think I've got it. Thanks a lot. I can explore from...
by learnerforlife
Fri Sep 28, 2018 7:20 am
Forum: General Discussion and Questions
Topic: C data structure to python dictionary
Replies: 21
Views: 1764

Re: C data structure to python dictionary

@pythoncoder yeah I was also thinking the same thing (not the UART part) but my lead wants to keep as much code in C as possible. :P
by learnerforlife
Fri Sep 28, 2018 6:59 am
Forum: General Discussion and Questions
Topic: C data structure to python dictionary
Replies: 21
Views: 1764

Re: C data structure to python dictionary

Python: data = get_data() mp_obj_t get_data() { // somewhere data_list_t * first is declared data_list_t * curr = first; qstr prop_name; // create a list mp_obj_list_t * mylist = mp_type_list.make_new(NULL, 0, 0, NULL) // contain the payload data mp_obj_t mp_data; // simplest way to get list[x].fie...
by learnerforlife
Thu Sep 27, 2018 4:34 am
Forum: General Discussion and Questions
Topic: C data structure to python dictionary
Replies: 21
Views: 1764

Re: C data structure to python dictionary

Hi sorry if I was not clear, I am not a very experienced programmer, let me explain in detail. We have a device which acts like a IoT gateway. we already have all the data acquisition part done in C. The controllers that we are querying the data from are mainly communicating over Modbus protocol. So...
by learnerforlife
Wed Sep 26, 2018 12:13 pm
Forum: General Discussion and Questions
Topic: C data structure to python dictionary
Replies: 21
Views: 1764

Re: C data structure to python dictionary

Are you suggesting that I pass the memory address of the linked list head to python, read the bytearray at the address, map it into a ustruct, get the second node's address from the ustruct and repeat the previous steps till there is no more items in list and build a dictionary out of those structs....
by learnerforlife
Wed Sep 26, 2018 6:09 am
Forum: General Discussion and Questions
Topic: C data structure to python dictionary
Replies: 21
Views: 1764

C data structure to python dictionary

Hi, Can anyone tell if there is a way to map a data structure from C to a dictionary or maybe a JSON object in python. In my case specifically the data structure is a linked list containing three variables - name, data type and a union containing the data. I want to be able to pass this list to pyth...
by learnerforlife
Thu Sep 20, 2018 1:21 pm
Forum: Development of MicroPython
Topic: Micropython port for Atmel SAME70Q20
Replies: 4
Views: 553

Re: Micropython port for Atmel SAME70Q20

Never mind got the REPL working now. :D