Репозиторий для Агилии.

Собственно, давно напрашивалось и запилил сабж. Ссылка есть теперь и сбоку. Внутри можно найти фарш самого разнообразного ПО, для тех, кто прошел стадию красноглазия и перешал в стадию “инфракрасноглазия”. А именно, iverilog, кросс-компиляторы для разных архитектур мк, kicad с либами, openscad и прочее.
Работает это безобразие на моем небольшом wl520gU под управлением OpenWRT. Да да, том самом где я память апгрейдил

Scam-o-matic

Well, I’ve been scammed. You might have heard of the SD card scam, when you buy a card, and it reports to be bigger, than it actually is, and whatever you write beyond the boundary of the really available space gets lost.
I ordered a bunch of 5 microSD cards, 4GiB each, and they were a pure scam with about 115 MiB instead of 4 GiB.
Luckily, I managed to get my money back, via opening a dispute and later a claim (Scammers didn’t want to give the money back, did they?), but the cards still remained here.
To test such shitty cards there exist 2 tools: h2testw and f3. First for windows, second for linux. Thy figure out the real capacity for you. I didn’t like them, because they took ages to scan one 4 GiB card. And, they operated upon a upon a filesystem, that I didn’t like as well. So I wrote my own tool.
It’s dumb as hell, and was created while f3 was still scanning one card. And it’s a lot faster. Meet ‘scam-o-matic’.
It writes some preudorandom data to the card, until it detects something bad. Usually that happens when we reach the boundary of ‘good’, somewhat ‘reliable’ memory. Then it double-checks the region, and if everything is fine (e.g. no mismatches between first and second pass) it creates a partition table for you, with one partition that covers only working area of the card.
Now just format it, alter the type with cfdisk, and make use of it.
Continue reading “Scam-o-matic”

Configuring a Xilinx FPGA from ARM

Okay, it’s time I got down to my Ph.D project which is a 2D/3D GFX accelerator. I really wonder if I’m going to pull it off. So, after playing for a couple of months with a simulator I decided to move on to an FPGA. I doubt that a spartan will allow me to fit in everything I want – but I definetely can test a plenty of stuff there.

I had this board from starterkit.ru, which has an FPGA and an AT91SAM9260, which is a 200Mhz ARM SoC.
Continue reading “Configuring a Xilinx FPGA from ARM”

ASUS wl520-gU: RAM upgrade

I had this router around for quite a long time, but unfortunately it sucked at some points.
1. The clock bug. It’s 200Mhz, not 240, the clock’s off and the result is usb 1.1 hangups. Luckily this is cured by installing a 2.0 hub, to do transaction translation
2. Memory. 16mb is a not enough! Esapecially with the leaking wl driver. b43 seems quite greedy as well. The trunk builds of OpenWRT did not work for me any more, so…
I was of for an upgrade.
Continue reading “ASUS wl520-gU: RAM upgrade”

Reverse engineering STC ISP protocol.

Some time ago, I got myself a bunch of those chips. They were dirt chip, they come from china, they have a 8051 architecture and… They are totally missing a way to get programmed in linux.
You can use sdcc, but you are still made to use their binary sh*t to upload the firmware.  And they were retarded enoght no to open up the protocol.
So, time to hack…
Continue reading “Reverse engineering STC ISP protocol.”

Agilia Linux: Немного ABUILD’ов

Не так давно поставил себе субж. Для начала на дачный воркстейшн потестить. И как это не странно, он меня порадовал. Шевелится намного быстрее кубубунты, пакетная система достаточно простая… Настолько, что мейнтейнеры даже пакеты не подписывают. Но это, думаю, вскоре поправят. А нет, так начитавшиеся журнала “хакирь” школьники поторопят =)
Но вот софта маловато. Ни iverilog’a, ни avrdude, ни openocd, kicad’a или mspdebug нет. Пришлось сварганить несколько ABUILD’ов. Оные лежат тут: https://github.com/nekromant/agilia-files
Пока сделал ABUILD’ы только для mspdebug, avrdude и libftdi.

Using android TTS engine remotely

Strangely enough, there appeared some good TTS engines for android that don’t make me go nuts . So, instead of building qemu to run my favorite cepstral synth using x86->arm translation, I decided to move on to a different software. Besides, it supports Russian, so I decided to give it a try.
Time to recall programming in java. Damn, I hate java =), last time I coded something in it was some crappy j2me app 4 years ago. Not much changed.
After a wasted evening here goes a small util: NetTTS.


Continue reading “Using android TTS engine remotely”

Using GS6300 charger IC as an adjustable stepdown.

I got quite a bunch of these thingies some time ago, so it was just the time to get the fun started. At least I needed a car charger for my tablet badly. The wall plug is said to provide 9 volts up to 2,5 Amps. So GS6300 3 Amp thing was just what I needed.
The datasheet for the chip sucked: really little detail and only one application circuit. Luckily, the application circuit was quite simple to understand, so with minor modifications I made a small power adaptor for my flytouch II tablet.

Hints: Make sure you use the right core for the inductance: if you pick the wrong core, you’ll get GS6300 to heat up pretty fast at some 500-600mA consumption.
If you get the diode with the wrong trr (reverse recovery time), you’ll get it to overheat and won’t get enough current.
At first I used a 10k POT to adjust the output voltage and got it to be VERY unstable. 1k POT solved the problem.
Tab is connected to the GND pin, so make sure you have some nice’n’big ground polygons do dissipate all the heat, unless you want to attach a heatsink. At big currents it heats up. (a charging tablet + max brightness screen + a 3g modem plugged into the tablet).
There is the photo of the assembled thingie:

Since I didn’t have the car’s smoke’o’plug around, I wired the raw voltage from a 5v dc-dc stepdown I had around.

Laser cut goodies: acrylic test-tube holder

Well, It relly rocks when you have an access to a laser cutter and have some spare acrylic. Some time ago I’ve done this test-tube holder I use in my lab.

Instead of the actual test-tubes I use bottles from ‘bifidum bacterinum’ I used to take whenever I got my stomach screwed by antibiotics. Therefore, I have a sh*tload of ’em. So there goes a photo of the thing:

The source code for the OpenSCAD project is below, licensed under the beer-ware license.

rows=2;
cols=5;
spacing=2;
borderspace_w = 4;
borderspace_l   =  20;
radius=8.5;
drill_via=1.6;
delta=0.1;

TARGET=2;
//////////////////////////

length  =  borderspace_l*2 +  spacing + (radius*2+spacing) * cols;
width   =  borderspace_w*2 + spacing + (radius*2+spacing) * rows;

module vials(rows,cols,spacing,radius, borderspace_l, borderspace_w, shift)
{
length  =  borderspace_l*2 +  spacing + (radius*2+spacing) * cols;
width   =  borderspace_w*2 + spacing + (radius*2+spacing) * rows;
echo("Vial holder: length: ",length, "width:", width);
difference(){
	for (j=[0:rows-1])
	{

	for (i=[0:cols-1+ ( j % 2)])
		{
		#translate(
			[
			borderspace_w +radius+spacing + (radius*2+spacing)*j,
			-shift * (j %2 )  + borderspace_l  +radius+spacing + (radius*2+spacing)*i
			]
			) circle(radius);

		}
	}
}
}

difference()
{
	square([width,length]);
	# translate ([width/4,borderspace_l/3])circle(drill_via);
	# translate ([3*width/4,borderspace_l/3])circle(drill_via);
	# translate ([width/4,length-borderspace_l/3])circle(drill_via);
	# translate ([3*width/4,length-borderspace_l/3])circle(drill_via);

	# translate ([2*width/20,length/2-radius-spacing/2])circle(drill_via);
	# translate ([2*width/20,length/2+radius+spacing/2])circle(drill_via);
	# translate ([18*width/20,length/2])circle(drill_via);
}

if ( TARGET==1 )
{
	translate([width+delta,0]) difference(){
	square([width,length]);
	# vials(rows,cols,spacing,radius, borderspace_l, borderspace_w, radius);
	# translate ([width/4,borderspace_l/3])circle(drill_via);
	# translate ([3*width/4,borderspace_l/3])circle(drill_via);
	# translate ([width/4,length-borderspace_l/3])circle(drill_via);
	# translate ([3*width/4,length-borderspace_l/3])circle(drill_via);

	# translate ([2*width/20,length/2-radius-spacing/2])circle(drill_via);
	# translate ([2*width/20,length/2+radius+spacing/2])circle(drill_via);
	# translate ([18*width/20,length/2])circle(drill_via);

	}
}
else
{
	translate([0,0,15]) difference(){
	square([width,length]);
	# vials(rows,cols,spacing,radius, borderspace_l, borderspace_w, radius);
	# translate ([width/4,borderspace_l/3])circle(drill_via);
	# translate ([3*width/4,borderspace_l/3])circle(drill_via);
	# translate ([width/4,length-borderspace_l/3])circle(drill_via);

	# translate ([2*width/20,length/2-radius-spacing/2])circle(drill_via);
	# translate ([2*width/20,length/2+radius+spacing/2])circle(drill_via);
	# translate ([18*width/20,length/2])circle(drill_via);
}
}