#avr Logs

Mar 12 2018

#avr Calendar

12:23 AM day__ is now known as day
12:46 AM polprog: morning
12:46 AM nuxil: mornings. whats up.
12:50 AM nuxil: unless you call in sick the 1st 4 days :p
12:51 AM polprog: well, i got the wire in my braces replaced so my teeth still hurt..
12:53 AM polprog: wrote a bash script yesterday. calls mplayer with libcaca output
12:53 AM polprog: applle.sh ; http://puu.sh/zFujy/f47c948e2d.jpg
12:53 AM nuxil: there you go. perfect excuse to stay home and mess with your sun.
12:54 AM polprog: lol
12:56 AM nuxil: also vlc ftw :)
01:19 AM polprog: vlc > *
01:35 AM aidos_ is now known as aidos
03:22 AM polprog: #define NULL *((uint8_t*) 0x123)
03:22 AM polprog: never crash your program again :^)
04:25 AM nohitzwork: what is 0x123 polprog
04:25 AM rue_shop3: its a num,ber
04:25 AM polprog: some number i made up
04:26 AM polprog: not sure if 0xdead or 0xbeef is a valid ram address on most avrs
04:26 AM rue_shop3: tho I think 0xdeadbeef is a better value
04:27 AM polprog: yeah but can an avr even address that?
04:27 AM nohitzwork: no
04:27 AM polprog: 0xded
04:29 AM rue_shop3: https://en.wikipedia.org/wiki/Hexspeak
04:29 AM polprog: 0x1badboo7
04:35 AM rue_shop3: didn't notice deadfood
04:35 AM rue_shop3: or beeff00d
04:37 AM polprog: badc0ffe
04:40 AM rue_shop3: 8badf00d
04:40 AM rue_shop3: 8badf00d2
04:42 AM polprog: a whole lot of them
05:19 AM nohitzwork: what was the cpu we talked about last week?
05:25 AM nohitzwork: how many instructions avr has ?
05:29 AM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/pdf/atmel/AVR_instruction_set.pdf
05:29 AM Tom_L: see for yourself
05:30 AM nohitzwork: im looking for a number
05:31 AM Tom_L: 9
05:31 AM Tom_L: that one?
05:31 AM nohitzwork: 131
05:49 AM polprog: lol
06:10 AM skz81: nohitzwork, IIRC, depends on the chip model and/or familly (tiny, mega xmega). 131 is for the most extended set ?
06:12 AM skz81: yup see the note (1) page 14
06:18 AM nohitzwork: yep
12:57 PM Ameisen: I'm going to be working on a templated, compile-time sprintf if anyone's interested
12:57 PM Ameisen: I suspect it won't be ideal for AVR since it may instantiate itself multiple times, but who knows.
12:58 PM Ameisen: though for AVR, I'm unsure what format character to use for int24...
12:59 PM Ameisen: I presume a length specifier, though all the good characters are taken :(
01:28 PM * antto instantiates every possible kind of Ameisen ...
01:29 PM Ameisen: There's a lot different kinds of ants
01:29 PM Ameisen: so that might take a while
01:29 PM Ameisen: I should check on my colonies actually
01:29 PM Ameisen: one of my Formicid colonies died the other day :(
01:30 PM antto: aww, the global ant population dropped with 0.000000000000000001315% ?
01:32 PM Ameisen: yup
01:32 PM Ameisen: they were domesticated ants though
01:33 PM antto: my cat is not domesticated.. she acts like a predator ;P~
01:34 PM Ameisen: we have two siamese
01:34 PM antto: mine's white
01:34 PM Ameisen: like all siamese, they think that they're meowing, intelligent labrador retrievers
01:36 PM antto: https://i.imgur.com/saSd3VX.jpg
01:38 PM Ameisen: ours look like... two adorable siamese
01:38 PM Ameisen: :|
01:38 PM Ameisen: blue eyes, always want attention
01:38 PM antto: godzilla, godzilla, godzilla...! https://i.imgur.com/ShYC6A2.jpg
01:38 PM Ameisen: when they were kittens they looked like white rats with dark spots on their noses
01:38 PM Ameisen: then they darkened
01:39 PM antto: yeah, we had two siamese too
01:40 PM antto: the female one was with us for like 13 years.. i miss her so much
02:02 PM Ameisen: I wish that the Cortex Ms supported NEON
03:11 PM Ameisen: I'm attempting to rebuild the arm embedded toolchain so the libs have LTO support
03:11 PM Ameisen: also had to update some of GCC's support libs to actually build from the versions they wer eincluding.
03:11 PM Ameisen: If I get around to it, I _may_ try updating newlib and gcc as well.
03:11 PM Ameisen: I would effectively be forking it though
03:32 PM Emil: Ameisen: what's your toolchain on arm?
03:32 PM Emil: And what arms are you developing on?
03:36 PM Ameisen: I'm rebuilding the ARM Embedded Toolchain
03:36 PM Ameisen: ARM has one built around GCC. They have a source package for it, you can build the entire toolchain and libs with it
03:36 PM Ameisen: it builds for Linux, OSX, and Windows
03:37 PM Ameisen: I'm testing enabling LTO builds for all of its libraries, and also testing updating GCC and newlib
03:37 PM Ameisen: also, mainly cortex-m
03:37 PM Ameisen: may do some work on some of the lesser cortex-a chips, but they're far more annoying to set up
03:37 PM Ameisen: always require a ton more configuration/setup, and the documentation almost never exists
03:45 PM Emil: YeahbutImean
03:45 PM Emil: how are you getting the register descriptions
03:45 PM Emil: and startupcode
03:45 PM Emil: and so on
03:46 PM Emil: Or do you just make everything yourself? :D
03:48 PM Ameisen: you usually need documentation for that.
03:49 PM Ameisen: Most A-series ones have shit documentation if any at all
03:49 PM Ameisen: or the documentation is very convoluted and hard to use in practice
03:49 PM Ameisen: Cortex-M chips tend to be much better
03:49 PM Ameisen: With M, chances are you have an NXP chip or an STM chip, and both publish a LOT of docs
03:49 PM Ameisen: there's some Atmel ARM chips as well
03:50 PM Emil: Iknow
03:50 PM Emil: but I'd like something as easy as sudo apt-get install avrdude gcc-avr avr-libc binutils-avr
03:51 PM Emil: and then just use REEEEEEEEEEEEEEEEgisters
03:51 PM Emil: and without having to fuck around with the startup code
03:51 PM Emil: I mean
03:51 PM Emil: sudo apt-get install gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi gdb-arm-none-eabi openocd handless most
03:51 PM Emil: but it still doesn't provide the fucking register descriptions
03:52 PM Emil: and startupcode is a question
03:56 PM Ameisen: I mean
03:56 PM Ameisen: it's _relatively_ simple to do the most basic ARM stuff, too
03:57 PM Ameisen: there's no good universal flash tool for ARM, as there's no clear standard bootloader
03:57 PM Ameisen: every maker has their own tool
03:57 PM Ameisen: and bootloader
03:57 PM Ameisen: I _think_ there's a universal one floating around though
03:57 PM Ameisen: uboot?
03:57 PM Ameisen: I wasn't able to get it to build though
03:57 PM Ameisen: but then you just need gcc-arm-eabi-none, same libc, and same binutils
03:57 PM Ameisen: though for libc the ARM toolchain uses newlib
03:58 PM Ameisen: and for stdlibc++... I'm not entirely sure where they are getting it. Might be using the GCC one
03:59 PM Emil: Ameisen: the bootloader doesn't detail the register descriptions
03:59 PM Ameisen: I suspect that there's a generic arm libc one
03:59 PM Ameisen: uboot has profiles for a bunch of different cortex m chips, which each detail the necessary info for the bootloader
04:00 PM Ameisen: your _software_ also usually needs the headers from the relevant SDK as well
04:00 PM Emil: exactly
04:00 PM Ameisen: and usually needs a linker script set up sanely
04:00 PM Emil: and avr-libc provides those definitions for avr
04:00 PM Emil: in an excellent manner
04:00 PM Ameisen: AVR hardly changes from chip to chip.
04:00 PM Emil: eh
04:00 PM Emil: ARM hardly changes from chip to chip either
04:00 PM Ameisen: an NXP and STM Cortex-M are very different
04:00 PM Emil: of course
04:01 PM Emil: (I meant per vendor, their arm chips hardly change chip to chip)
04:01 PM Emil: Anycase, you are just writing your own register descriptions and startupcode?
04:02 PM Ameisen: No, I'm using the NXP headers
04:03 PM Ameisen: well, the ones that came with Teensyduino. I ripped some of their code
04:03 PM Ameisen: since I didn't want to implement USB myself
04:03 PM Ameisen: At some point I'll port it to the newer headers from the SDK
04:03 PM Ameisen: they changed their header formats at some point
04:03 PM Emil: ah
04:04 PM Ameisen: there were some register definitions missing from there (mainly for peripherals)
04:04 PM Ameisen: wasn't hard to add them to the linker script, and then assign the address to a C array symboo
04:04 PM Ameisen: symbol
04:13 PM Ameisen: wish GCC had a way to do it directly though
04:14 PM Ameisen: so that the compiler knew the address during optimization
04:14 PM Ameisen: you can do it by assigning a pointer, but I wanted a sized array
04:30 PM JonelethIrenicus: what is the ack function usually for?
04:30 PM JonelethIrenicus: acknowledgement?
04:34 PM Tom_L: software flow control
04:34 PM Tom_L: ack nak
04:39 PM Ameisen: also used by martians
04:39 PM Ameisen: for communicating
04:40 PM Ameisen: Also a sound that Bill the Cat makes
04:40 PM JonelethIrenicus: haha
04:40 PM Ameisen: Any proper server should respond to ack with thppft
04:40 PM JonelethIrenicus: is it an abbreviation ?
04:40 PM Ameisen: acknowledge
04:41 PM JonelethIrenicus: oh ok
04:41 PM JonelethIrenicus: and nak?
04:41 PM JonelethIrenicus: not-ack
04:41 PM Ameisen: negative acknowledgement
04:41 PM JonelethIrenicus: ok thanks
04:41 PM Ameisen: in Bill the Cat's case, it's just a cough/hack
04:41 PM Ameisen: in the Martians case, we have no idea
04:41 PM JonelethIrenicus: ive heard that a few times
04:41 PM JonelethIrenicus: the martians not the cats
05:31 PM polprog: ac
05:32 PM polprog: ack is the sound a packet makes when its sick
07:00 PM polprog: niters
07:10 PM Tom_L: JonelethIrenicus, ack nak are ascii bits 006 & 021
07:24 PM Casper: polprog: no, nak is what a sick one make, ack is when it's healthy! Learn your sound!