Go to advanced search

by bzt
Fri Jul 19, 2019 10:59 am
Forum: Automation, sensing and robotics
Topic: Electronic chess board and identifying specific pieces
Replies: 2
Views: 105

Re: Electronic chess board and identifying specific pieces

Hi If transparent or semi-transparent chess-board is an option, then I'd put a camera beneath and a small easily identifiable shape or color code on the bottom of each chess-piece. That's the simplest and cheapest solution, requires only one reader, and it is guaranteed that pieces won't interfere (...
by bzt
Mon Jul 15, 2019 12:25 pm
Forum: General programming discussion
Topic: Script for check IP adress
Replies: 3
Views: 137

Re: Script for check IP adress

Hi, Using ipinfo.io reveals your real IP, I'd recommend against that. There's a simpler solution, use ip ro get 8.8.8.8 Replace the IP address with one that should go through the tunnel. It returns a line like: 8.8.8.8 via x.x.x.x dev tun0 src x.x.x.x If there's no "dev tun0" (or whatever your tunne...
by bzt
Mon Jul 15, 2019 12:15 pm
Forum: General discussion
Topic: RPi4 chargers
Replies: 19
Views: 836

Re: RPi4 chargers

just don't use an e-marked cable Which leads us back to my original question: how can I know without trying it out? Is there a standard marking on the box to indicate the charger comes with an e-marked cable? I mean there are codes on the box to indicate European, British and American plug types, i...
by bzt
Mon Jul 15, 2019 8:33 am
Forum: Bare metal, Assembly language
Topic: Kernel switcher... kernel?
Replies: 4
Views: 234

Re: Kernel switcher... kernel?

Hi, The magic keyword you need to google for is "raspberrypi dual boot". There are boot managers written for the RPi, and they do exactly as @pik33 described (except the overwrite part, which is unnecessary with chain loading). My personal favourite is jncronin's multiboot compatible rpi-boot . Many...
by bzt
Sat Jul 13, 2019 11:39 am
Forum: Bare metal, Assembly language
Topic: Virtual memory and linking
Replies: 21
Views: 6618

Re: Virtual memory and linking

Hi, You could take a look at my bootloader . It's loaded at 80000, which loads an ELF kernel from the SD card (or over serial) and sets up paging for it, jumping to the entry point in upper-half address. That way your kernel can be an ELF (no objconv needed), purely linked to upper-half, forgetting ...
by bzt
Sat Jul 13, 2019 11:28 am
Forum: Bare metal, Assembly language
Topic: Reserving cores for bare-metal programs - interupts
Replies: 21
Views: 706

Re: Reserving cores for bare-metal programs - interupts

Hi,

I'm not sure about the new GIC, but Pi4 also has the old interface to the ARM Q4 interrupt controller with which you can route every single interrupt to a specific core.

Cheers,
bzt
by bzt
Sat Jul 13, 2019 11:25 am
Forum: General discussion
Topic: RPi4 chargers
Replies: 19
Views: 836

Re: RPi4 chargers

Hi, Thanks for the answers. It doesn't matter what you called them, the article I've linked call them "charger" hence the title. Believe me, if I could buy the official adapter, I would, but unfortunately it's out of stock :-( So my question is still unanswered, how can I know if a power supply/char...
by bzt
Thu Jul 11, 2019 7:46 pm
Forum: General discussion
Topic: RPi4 chargers
Replies: 19
Views: 836

RPi4 chargers

Hi, I've read here , that certain chargers won't work with the RPi4. The article mentions something about non e-marked cable, and that most chargers are such, therefore will work, with a counter-example of Macbook chargers. My question is, assuming I'm going to buy a new charger, what should I look ...
by bzt
Thu Jul 11, 2019 6:00 pm
Forum: Beginners
Topic: SD-card backup one line code?
Replies: 1
Views: 98

Re: SD-card backup one line code?

Hi, I remember seeing 1 row code which backed up currently running Raspbian card to USB-stick. Anybody know that code? Yes, sync && dd if=(inputdevice) of=(outputfile) The inputdevice is the name of your SD card, "/dev/...", and outputfile is a filename on the USB (if mounted under /mnt, then "/mnt/...
by bzt
Mon Jul 08, 2019 3:20 pm
Forum: General programming discussion
Topic: TCP client in PHP not working
Replies: 4
Views: 183

Re: TCP client in PHP not working

If that were true you'd have more things that were very broken in your Linux system. I totally agree. If using gethostbyname() solved the problem, then you've just workarounded some bigger issues with your network stack configuration. It would be better to fix those first. Opening the loopback devi...
by bzt
Mon Jul 08, 2019 3:05 pm
Forum: General programming discussion
Topic: Boot to Application
Replies: 30
Views: 974

Re: Boot to Application

Hi, Any luck with this? It would be really great to have a BASIC interpreter that generates web pages on an RPi :-) Another thing that popped into my mind, is that your built-in webserver must pass the query string to the script somehow. Let's say it's in a global QUERY$ variable. Then in your scrip...
by bzt
Mon Jul 08, 2019 2:47 pm
Forum: Bare metal, Assembly language
Topic: Problem with handling multiple functions
Replies: 22
Views: 634

Re: Problem with handling multiple functions

Hi, First, I'd like to say well done! Although you haven't produced a working kernel yet, you've definitely made a big progress here! I'm not sure what ARM mode kernel.img uses. I'd recommend to a) use arm-eabi-none-gcc, dwelch67's startup (the startup function alone is enough, you don't need PUT32/...
by bzt
Sat Jul 06, 2019 10:40 am
Forum: Bare metal, Assembly language
Topic: Problem with handling multiple functions
Replies: 22
Views: 634

Re: Problem with handling multiple functions

Hi, Yeah I agree with DavidS, you were extremely lucky. Not only because you lack a proper stack, but also because you haven't zerod out the bss, and you have started running your code at the first function found. The entry point is NOT main() by default, but _start(), which should set up the C envi...
by bzt
Sat Jul 06, 2019 10:16 am
Forum: General programming discussion
Topic: TCP client in PHP not working
Replies: 4
Views: 183

Re: TCP client in PHP not working

Hi, I never had problems using fsockopen . $fp = fsockopen("tcp://127.0.0.1", 8888, $errno, $errstr, 30); You can use fread, fgets, fwrite, fclose etc. on $fp. What functions do you use? Is the port correct? Is your port above 1023? Is your php client the only client? Can your server handle multiple...
by bzt
Sat Jul 06, 2019 10:08 am
Forum: General programming discussion
Topic: Boot to Application
Replies: 30
Views: 974

Re: Boot to Application

I'm not sure that will work with sbhttpd . I will give it a try but I'm not hopeful. ??? If ScriptBasic has a web interface then it must produce html somehow. If it produces html, then it must output strings like "<img src='http://...'>". Data URI is simply a matter of writing different strings, li...
by bzt
Fri Jul 05, 2019 12:53 pm
Forum: Bare metal, Assembly language
Topic: Problem with handling multiple functions
Replies: 22
Views: 634

Re: Problem with handling multiple functions

Hi and welcome, First, there's a "for" construct in C which would make your code much simpler and more readable: for(i = 0; i < 500000; i++) { About your problem, I'm just guessing here (you should compare the disassembly of the two functions to be sure), but I suspect some of your code is optimized...
by bzt
Thu Jul 04, 2019 9:39 am
Forum: General programming discussion
Topic: Boot to Application
Replies: 30
Views: 974

Re: Boot to Application

One down side is sbhttpd doesn't server up images in its current design. If you only use small images (like logo, icons in menu etc.), then you can use Data URI , aka RFC2397 . To generate them from PHP (other script languages should be similarly simple): echo ("data:image/png;base64," . base64_enc...
by bzt
Thu Jul 04, 2019 9:26 am
Forum: Bare metal, Assembly language
Topic: Raspbery Pi 3 Undefined instruction
Replies: 11
Views: 410

Re: Raspbery Pi 3 Undefined instruction

Hi, Welcome back! It repeats again and again. I don't know how to make QEMU pause after the first exception so I don't know the origin. Yeah, very annoying, right? That's why I've created this qemu patch . Try it. The first step to debug your issue is to locate the faulting code that triggers the ve...
by bzt
Tue Jul 02, 2019 2:47 pm
Forum: Bare metal, Assembly language
Topic: writing to terminal using gpu and asm
Replies: 8
Views: 1039

Re: writing to terminal using gpu and asm

Again, sorry for the lack of proper terms and correctly stating what I was after. No worries, we figured it out after all :-) The only confusing thing is, that you want to use Linux and this is the Bare metal section, but now I see there's no separate Assembly section. I was able to do the the abov...
by bzt
Tue Jul 02, 2019 2:14 pm
Forum: General programming discussion
Topic: Boot to Application
Replies: 30
Views: 974

Re: Boot to Application

SciptBasic's http server can run on its own without having to run as a proxy. For applications like this, it's all I need. Best part is I can still run my SDL app in the worker thread. (non-http server maintenance thread) If you already have a webserver, you don't have to mess around with SDL at al...
by bzt
Tue Jul 02, 2019 1:59 pm
Forum: General programming discussion
Topic: Boot to Application
Replies: 30
Views: 974

Re: Boot to Application

Hi, I don't believe that it is necessary to write your app as a daemon and mess with stdio like that. Yes, it is necessary. But you are right that it doesn't have to be coded, systemd can do the forking and fd redirections for you. It only depends what "type" you specify in the service file. My serv...
by bzt
Tue Jul 02, 2019 12:58 am
Forum: General programming discussion
Topic: Boot to Application
Replies: 30
Views: 974

Re: Boot to Application

Hi, Well, if you see the Linux console on the screen while it's booting, then you can simply redirect the console to another terminal (/dev/tty2 for example) in the kernel command line txt. That would leave the screen black. For the splash, you can most definitely compile your own kernel with your o...
by bzt
Mon Jul 01, 2019 4:07 pm
Forum: Bare metal, Assembly language
Topic: writing to terminal using gpu and asm
Replies: 8
Views: 1039

Re: writing to terminal using gpu and asm

For option 2, that would require me to connect a monitor to the GPIO pins correct? Erhm, not sure I follow you. Those were not options, but required steps. Also you can't connect a monitor to the GPIO pins, there's a HDMI port for that. In theory you should connect a video terminal to the GPIO, lik...
by bzt
Fri Jun 28, 2019 5:22 pm
Forum: Bare metal, Assembly language
Topic: writing to terminal using gpu and asm
Replies: 8
Views: 1039

Re: writing to terminal using gpu and asm

Hi, There are three things here to consider: 1) GPU vs. ARM Most tutorials are running on the ARM, and not on the GPU. Compiler and assemblers for the GPU exists, but they are not free nor Open Source as far as I know. (But I could be wrong) 2) Writing on the terminal You would do the same way as in...
by bzt
Thu Jun 27, 2019 3:09 pm
Forum: Bare metal, Assembly language
Topic: Raspberry Pi 4
Replies: 45
Views: 3974

Re: Raspberry Pi 4

I already have mine with me so so far there are a few changes: 1) Peripheral base address is now moved to 0x7E000000 2) There's a mention of ARM's GIC400 @ 0x40041000 but probably is only the distributor since the old CPU interface is still there @ 0x40000000 Thanks for sharing, these are very usef...

Go to advanced search