Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Accessing registers/interrupts
04-06-2015, 06:09 PM,
#21
RE: Accessing registers/interrupts
Wow, this code can be such small? Smile Under Windows I don't get the same results. Shouldn't it be the same Bootloader? But your are right, if I comment out everything (CDC and the blink functions) I get the following result (MIPS16 is always activated in my board configuration):

Code size: 3692 / 16368 bytes (22% used)

with CDC.getKey, CDC.print, CDC.printnumber (blink functions still commented out):

Code size: 11288 / 16368 bytes (68% used)

with Serial.getKey, Serial.print, Serial.printnumber (blink functions still commented out):

Code size: 4560 / 16368 bytes (27% used)

with Serial, I2C and Blink I get the assembler error again. Strange, I assume there should be the error message, that the program is to big, which I normally get quite often Smile.
I identified the delay function as very code hungry. As I comment out this:

Code size: 4612 / 16368 bytes (28% used)


I am currently not aware how to debug with Serial under Windows, since I use the cdcterm tool from djpark. Huh
Reply
08-06-2015, 12:31 PM,
#22
RE: Accessing registers/interrupts
Windows or Linux, the bootloader is the same as this code is for the microcontroller not for your OS.
MIPS16 and MIPS32 options influence the code size as well as the -O (-O2, -O3 or -Os) option. I used -O2 maybe you used another ?
If you get an error message, press F9 to see the stdout file and get more information about what happens.
You can also take a look at all sources/main32.* files.
The delay function is less than 300 bytes mainly because it includes the system.c library to get the CPU frequency.
To use serial under windows, you certainly need a USB/Serial converter to connect your board to your PC and a Serial terminal under windows. I personnaly use RealTerm (for CDC and Serial) : https://sourceforge.net/projects/realterm/
It is easier to complain than it is to do, but it is better to do than it is to complain.
Reply
13-06-2015, 05:55 PM,
#23
RE: Accessing registers/interrupts
Ah this could be the difference. I am using O3 option, because it gives me mostly a smaller code than with O2. But thanks, for the hint looking into the main32.* files. Maybe I find out something about this strange compiling behaviour.

Unfortunately, I have no serial port at my laptop, only a DVI, HDMI and several USB ports. When I would try to use a USB to RS-232 / TTL Cable together with the ICSP interface and putty or realterm. Would this work together with the serial library?
Reply
13-06-2015, 06:15 PM,
#24
RE: Accessing registers/interrupts
(13-06-2015, 05:55 PM)Dobby_ Wrote: Unfortunately, I have no serial port at my laptop, only a DVI, HDMI and several USB ports. When I would try to use a USB to RS-232 / TTL Cable together with the ICSP interface and putty or realterm. Would this work together with the serial library?

You need to connect your USB to RS-232 / TTL Cable to your PC (USB connector) and to one of the Serial port of your Pinguino (RX, TX pins). You can use ICSP along as long as ICSP and Serial don't share the same pins.
It is easier to complain than it is to do, but it is better to do than it is to complain.
Reply
13-06-2015, 09:59 PM,
#25
RE: Accessing registers/interrupts
Ok, I figured out 2 serial ports: UEXT pins 3 & 4 as well as pins D0 & D1. I guess I will order a cable USB/TTL cable and try it with one of these ports. Thx Regis.

Robert
Reply
29-09-2016, 04:31 PM, (This post was last modified: 30-09-2016, 04:50 PM by fpeixeiro. Edit Reason: Doing something wrong )
#26
RE: Accessing registers/interrupts
Hello friends

Sorry if this is the wrong post, but i'm trying to get the lower side of the timer1 into an lcd but the ide always gives error.
The register is TMR1L.

I'm not showing the code because all i want is to view in an lcd the lower count of TIMER1

Thanks.

fpeixeiro



Ok, i've found why.

I was declaring the register out of the setup... Dumb...

Thanks anyway
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)