From f44d95630c1629627b99a2ccf06b434d23027bb3 Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Wed, 14 Nov 2012 12:51:51 +0100 Subject: imxtools: introduce hwemul The hwemul tool is a small binary blob running on the device that can received commands over USB. It is mainly intended to be loaded using the recory mode and allows to read/write registers, memory, use the OTP device, ... The tool is split into three parts: dev/ contains the actual blob (which handles both imx233 and stmp3700), lib/ contains the communication library and can also use the register description produced by the regtools/ to ease register by name, tools/ contains an interactive tool to send commands to the device when running the blob. Change-Id: Ie8cb32e987f825d8ed750d48071e43415b4dacb3 --- utils/imxtools/hwemul/dev/string.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 utils/imxtools/hwemul/dev/string.c (limited to 'utils/imxtools/hwemul/dev/string.c') diff --git a/utils/imxtools/hwemul/dev/string.c b/utils/imxtools/hwemul/dev/string.c new file mode 100644 index 0000000..1f8c415 --- /dev/null +++ b/utils/imxtools/hwemul/dev/string.c @@ -0,0 +1,29 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (C) 2012 by Amaury Pouly + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ +#include "string.h" + +size_t strlen(const char *s) +{ + size_t len = 0; + while(*s++) + len++; + return len; +} -- cgit v1.1